/* Prank "Hacked" Effect Styles */

/* Hide gallery to prevent image loading */
#gallery,
.gallery-section,
.gallery {
    display: none !important;
}

/* ================================
   PRANK OVERLAY CONTAINER
   ================================ */
.prank-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999;
    pointer-events: none;
    overflow: hidden;
}

.prank-overlay.active {
    pointer-events: all;
}

/* ================================
   GLITCH EFFECT - AGGRESSIVE
   ================================ */
.glitch-active {
    animation: glitch-shake 0.1s infinite;
}

.glitch-active::before,
.glitch-active::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 99998;
}

/* Red channel offset */
.glitch-active::before {
    background: inherit;
    mix-blend-mode: screen;
    animation: glitch-red 0.15s infinite;
    opacity: 0.8;
    background-color: rgba(255, 0, 0, 0.1);
}

/* Cyan channel offset */
.glitch-active::after {
    background: inherit;
    mix-blend-mode: screen;
    animation: glitch-cyan 0.15s infinite;
    opacity: 0.8;
    background-color: rgba(0, 255, 255, 0.1);
}

/* Scanline overlay during glitch */
.glitch-scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 99999;
    animation: scanline-flicker 0.1s infinite;
}

/* RGB Split overlay */
.glitch-rgb-split {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 99997;
    animation: rgb-split 0.2s infinite;
}

@keyframes glitch-shake {
    0% { transform: translate(0, 0) skewX(0deg); }
    10% { transform: translate(-5px, 2px) skewX(-2deg); }
    20% { transform: translate(5px, -2px) skewX(2deg); }
    30% { transform: translate(-3px, 3px) skewX(-1deg); }
    40% { transform: translate(3px, -3px) skewX(1deg); }
    50% { transform: translate(-2px, 1px) skewX(-3deg); }
    60% { transform: translate(4px, -1px) skewX(3deg); }
    70% { transform: translate(-4px, 2px) skewX(-2deg); }
    80% { transform: translate(2px, -2px) skewX(2deg); }
    90% { transform: translate(-1px, 1px) skewX(-1deg); }
    100% { transform: translate(0, 0) skewX(0deg); }
}

@keyframes glitch-red {
    0% { transform: translate(0, 0); }
    20% { transform: translate(-8px, 2px); clip-path: inset(20% 0 30% 0); }
    40% { transform: translate(8px, -2px); clip-path: inset(50% 0 10% 0); }
    60% { transform: translate(-5px, 1px); clip-path: inset(10% 0 60% 0); }
    80% { transform: translate(5px, -1px); clip-path: inset(70% 0 5% 0); }
    100% { transform: translate(0, 0); clip-path: inset(0 0 0 0); }
}

@keyframes glitch-cyan {
    0% { transform: translate(0, 0); }
    20% { transform: translate(8px, -2px); clip-path: inset(40% 0 20% 0); }
    40% { transform: translate(-8px, 2px); clip-path: inset(10% 0 50% 0); }
    60% { transform: translate(5px, -1px); clip-path: inset(60% 0 10% 0); }
    80% { transform: translate(-5px, 1px); clip-path: inset(5% 0 70% 0); }
    100% { transform: translate(0, 0); clip-path: inset(0 0 0 0); }
}

@keyframes scanline-flicker {
    0% { opacity: 0.8; }
    50% { opacity: 0.4; }
    100% { opacity: 0.8; }
}

@keyframes rgb-split {
    0% {
        box-shadow: -5px 0 0 rgba(255, 0, 0, 0.3), 5px 0 0 rgba(0, 255, 255, 0.3);
    }
    25% {
        box-shadow: -8px 0 0 rgba(255, 0, 0, 0.5), 8px 0 0 rgba(0, 255, 255, 0.5);
    }
    50% {
        box-shadow: -3px 0 0 rgba(255, 0, 0, 0.3), 3px 0 0 rgba(0, 255, 255, 0.3);
    }
    75% {
        box-shadow: -10px 0 0 rgba(255, 0, 0, 0.4), 10px 0 0 rgba(0, 255, 255, 0.4);
    }
    100% {
        box-shadow: -5px 0 0 rgba(255, 0, 0, 0.3), 5px 0 0 rgba(0, 255, 255, 0.3);
    }
}

/* Flash/strobe effect */
.glitch-flash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    pointer-events: none;
    z-index: 99996;
    animation: strobe 0.1s infinite;
}

@keyframes strobe {
    0% { opacity: 0; }
    50% { opacity: 0.3; }
    100% { opacity: 0; }
}

/* ================================
   TV TURN-OFF EFFECT
   ================================ */
.tv-off-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.tv-off-screen {
    width: 100%;
    height: 100%;
    background: #fff;
    animation: tv-off 1s ease-in forwards;
}

@keyframes tv-off {
    0% {
        transform: scale(1, 1);
        filter: brightness(1.5);
    }
    30% {
        transform: scale(1.1, 0.01);
        filter: brightness(2);
    }
    50% {
        transform: scale(1.1, 0.01);
        filter: brightness(2);
    }
    70% {
        transform: scale(0.01, 0.01);
        filter: brightness(3);
        border-radius: 50%;
    }
    100% {
        transform: scale(0, 0);
        filter: brightness(0);
        border-radius: 50%;
    }
}

/* CRT glow effect on the white line/dot */
.tv-off-screen::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(255,255,255,0.8) 0%, transparent 70%);
    pointer-events: none;
}

/* ================================
   FAKE CODE EXECUTION
   ================================ */
.fake-code-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 100001;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow: hidden;
}

.fake-code-container.visible {
    opacity: 1;
}

/* Terminal-style scrolling code */
.code-stream {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 10px;
    box-sizing: border-box;
    font-family: 'Courier New', 'Monaco', 'Consolas', monospace;
    font-size: 9px;
    line-height: 1.4;
    color: #0f0;
    text-shadow: 0 0 3px #0f0;
    opacity: 0.5;
    overflow-y: scroll;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.code-stream::-webkit-scrollbar {
    display: none;
}

.terminal-line {
    white-space: nowrap;
    animation: fadeInLine 0.1s ease-out;
}

@keyframes fadeInLine {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* CRT vignette effect */
.fake-code-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0,0,0,0.4) 100%);
    pointer-events: none;
    z-index: 100003;
}

/* Scanlines overlay */
.matrix-scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 3px
    );
    pointer-events: none;
    z-index: 100004;
}

/* ================================
   RANSOM MESSAGE + VIDEO
   ================================ */
.ransom-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100005;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 90%;
    max-width: 800px;
}

.ransom-text {
    text-align: center;
    margin-bottom: 20px;
    font-family: 'Courier New', 'Monaco', 'Consolas', monospace;
}

.ransom-warning {
    font-size: 28px;
    color: #ff0000;
    text-shadow: 0 0 10px #ff0000, 0 0 20px #ff0000, 0 0 30px #ff0000;
    animation: pulse-red 1s infinite;
    margin-bottom: 15px;
    font-weight: bold;
    letter-spacing: 3px;
}

.ransom-message {
    font-size: 18px;
    color: #ff3333;
    text-shadow: 0 0 5px #ff0000;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.ransom-amount {
    font-size: 22px;
    color: #ff0000;
    text-shadow: 0 0 8px #ff0000, 0 0 15px #ff0000;
    margin-bottom: 8px;
    font-weight: bold;
}

.ransom-address {
    font-size: 12px;
    color: #ff6666;
    text-shadow: 0 0 3px #ff0000;
    opacity: 0.8;
}

@keyframes pulse-red {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.ransom-video {
    width: 100%;
    max-width: 700px;
    border: 2px solid #ff0000;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.5), 0 0 40px rgba(255, 0, 0, 0.3);
    background: #000;
    object-fit: contain;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    position: relative;
    z-index: 1;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .ransom-warning {
        font-size: 18px;
    }
    .ransom-message {
        font-size: 12px;
    }
    .ransom-amount {
        font-size: 14px;
    }
    .ransom-address {
        font-size: 9px;
    }
}
