/* ===========================
   Prison Bar Effects & Extras
   =========================== */

/* Prison bar overlay effect for cards */
.prison-bar-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    animation: slideIn 0.3s ease;
}

.prison-bar-effect span {
    position: absolute;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, 
        rgba(100,100,100,0.8) 0%, 
        rgba(50,50,50,0.8) 100%);
    box-shadow: 2px 0 4px rgba(0,0,0,0.5);
}

.prison-bar-effect span:nth-child(1) { left: 25%; }
.prison-bar-effect span:nth-child(2) { left: 50%; }
.prison-bar-effect span:nth-child(3) { left: 75%; }

@keyframes slideIn {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Blood splatter effect for violence sections */
.blood-splatter {
    position: absolute;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, 
        rgba(139,0,0,0.8) 0%, 
        rgba(139,0,0,0.4) 30%, 
        transparent 70%);
    border-radius: 40% 60% 70% 30% / 40% 30% 70% 60%;
    animation: splatter 0.5s ease;
    pointer-events: none;
}

@keyframes splatter {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(180deg);
        opacity: 1;
    }
    100% {
        transform: scale(1) rotate(360deg);
        opacity: 0.8;
    }
}

/* Searchlight effect */
.searchlight {
    position: fixed;
    top: 0;
    left: -200px;
    width: 200px;
    height: 100vh;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255,255,255,0.05) 50%, 
        transparent 100%);
    animation: searchlight 10s linear infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes searchlight {
    0% { left: -200px; }
    100% { left: 100%; }
}

/* Barbed wire decoration */
.barbed-wire {
    position: relative;
    height: 20px;
    background: repeating-linear-gradient(
        90deg,
        #666 0px,
        #666 2px,
        transparent 2px,
        transparent 20px
    );
    margin: 2rem 0;
}

.barbed-wire::before,
.barbed-wire::after {
    content: '✕ ✕ ✕ ✕ ✕ ✕ ✕ ✕ ✕ ✕';
    position: absolute;
    top: -5px;
    left: 0;
    right: 0;
    color: #666;
    font-size: 1.5rem;
    letter-spacing: 20px;
    overflow: hidden;
}

/* Graffiti text effect */
.graffiti {
    font-family: 'Permanent Marker', cursive;
    color: var(--primary-color);
    text-shadow: 
        3px 3px 0 #000,
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        1px 1px 0 #000;
    transform: rotate(-2deg);
    display: inline-block;
}

/* Alarm light effect */
.alarm-light {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, 
        transparent 0%, 
        rgba(255,0,0,0.1) 100%);
    animation: alarm 2s ease-in-out infinite;
    pointer-events: none;
    z-index: 999;
    opacity: 0;
}

.alarm-active .alarm-light {
    opacity: 1;
}

@keyframes alarm {
    0%, 100% {
        background: radial-gradient(circle at center, 
            transparent 0%, 
            rgba(255,0,0,0.1) 100%);
    }
    50% {
        background: radial-gradient(circle at center, 
            transparent 0%, 
            rgba(255,0,0,0.3) 100%);
    }
}

/* Stamp effect for "CLASSIFIED" or "CONFIDENTIEL" */
.stamp {
    position: relative;
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 3px solid var(--primary-color);
    border-radius: 8px;
    transform: rotate(-5deg);
    font-weight: 900;
    text-transform: uppercase;
    color: var(--primary-color);
    background: rgba(255,68,68,0.1);
    font-family: var(--font-mono);
    letter-spacing: 2px;
}

.stamp::after {
    content: '';
    position: absolute;
    top: -10px;
    right: -10px;
    bottom: -10px;
    left: -10px;
    border: 1px dashed var(--primary-color);
    border-radius: 8px;
    opacity: 0.5;
}

/* Chain link fence background pattern */
.chain-fence {
    background-image: 
        linear-gradient(45deg, #333 25%, transparent 25%, transparent 75%, #333 75%),
        linear-gradient(45deg, #333 25%, transparent 25%, transparent 75%, #333 75%);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
    opacity: 0.1;
}

/* Countdown timer style */
.countdown {
    font-family: var(--font-mono);
    font-size: 3rem;
    color: var(--danger-color);
    text-align: center;
    text-shadow: 0 0 20px rgba(255,0,0,0.5);
}

.countdown-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--gray-text);
}

/* Metal texture for buttons */
.metal-button {
    background: linear-gradient(135deg, #666 0%, #333 50%, #666 100%);
    border: 2px solid #222;
    box-shadow: 
        inset 0 2px 5px rgba(255,255,255,0.2),
        inset 0 -2px 5px rgba(0,0,0,0.5),
        0 2px 10px rgba(0,0,0,0.8);
    text-shadow: 0 2px 2px rgba(0,0,0,0.8);
}

.metal-button:hover {
    background: linear-gradient(135deg, #777 0%, #444 50%, #777 100%);
}

/* Scratch marks decoration */
.scratches {
    position: relative;
}

.scratches::before {
    content: '||||||||';
    position: absolute;
    top: 50%;
    left: 10px;
    transform: rotate(-15deg) translateY(-50%);
    font-size: 2rem;
    color: rgba(255,255,255,0.1);
    letter-spacing: -5px;
}

/* Cell door effect */
.cell-door {
    position: relative;
    background: #1a1a1a;
    border: 4px solid #333;
    box-shadow: inset 0 0 50px rgba(0,0,0,0.5);
}

.cell-door::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 40%;
    background: repeating-linear-gradient(
        90deg,
        #444 0px,
        #444 8px,
        transparent 8px,
        transparent 20px
    );
}

/* Tally marks (days counting) */
.tally-marks {
    font-family: var(--font-mono);
    font-size: 2rem;
    color: rgba(255,255,255,0.3);
    letter-spacing: -2px;
    transform: rotate(-10deg);
}

.tally-marks span:nth-child(5n) {
    text-decoration: line-through;
    margin-right: 10px;
}

/* Fingerprint smudge effect */
.fingerprint {
    position: absolute;
    width: 60px;
    height: 80px;
    background: radial-gradient(ellipse at center, 
        rgba(100,100,100,0.2) 0%, 
        transparent 70%);
    filter: blur(2px);
    opacity: 0.5;
}

/* Broken glass effect */
.broken-glass {
    position: relative;
    overflow: hidden;
}

.broken-glass::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(45deg, transparent 48%, rgba(255,255,255,0.1) 50%, transparent 52%),
        linear-gradient(-45deg, transparent 48%, rgba(255,255,255,0.1) 50%, transparent 52%),
        linear-gradient(90deg, transparent 48%, rgba(255,255,255,0.1) 50%, transparent 52%);
    pointer-events: none;
}

/* Smoke effect */
@keyframes smoke {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0.8;
    }
    100% {
        transform: translateY(-100px) scale(1.5);
        opacity: 0;
    }
}

.smoke {
    position: absolute;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(100,100,100,0.4) 0%, transparent 70%);
    border-radius: 50%;
    animation: smoke 4s ease-out infinite;
}

/* Easter egg: Konami code activation */
body.konami-activated {
    animation: rainbow 3s linear infinite;
}

@keyframes rainbow {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

/* Print styles for rules download */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .no-print {
        display: none !important;
    }
    
    .page-break {
        page-break-after: always;
    }
}