@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;700&display=swap');

/* Fake "hacked" intro screen (pure visual prank) */
body.hacking {
    overflow: hidden;
}

#hack-screen {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: #000;
    color: #00ff66;
    font-family: 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 15px;
    line-height: 1.6;
    overflow: hidden;
    cursor: default;
    transition: opacity 1s ease;
}

#hack-screen.active {
    display: block;
}

#hack-screen.done {
    opacity: 0;
    pointer-events: none;
}

/* Dim scrolling hex in the background */
.hack-bg {
    position: absolute;
    inset: 0;
    padding: 8px;
    color: #00ff66;
    opacity: 0.12;
    font-size: 12px;
    line-height: 1.3;
    white-space: pre;
    overflow: hidden;
    pointer-events: none;
}

/* CRT scanlines */
#hack-screen::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.25) 0 1px, transparent 1px 3px);
    pointer-events: none;
}

.hack-term {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 64px 16px 32px;
    text-shadow: 0 0 6px rgba(0, 255, 102, 0.6);
}

.hack-line {
    white-space: pre-wrap;
    word-break: break-word;
}

.hack-line.dim {
    color: #4dbb7a;
}

.hack-line.ok::after {
    content: ' [OK]';
    color: #fff;
}

.hack-cursor {
    display: inline-block;
    width: 9px;
    height: 1.1em;
    background: #00ff66;
    vertical-align: text-bottom;
    animation: hackBlink 0.8s steps(1) infinite;
}

.hack-alert {
    margin: 24px 0 12px;
    padding: 16px;
    border: 2px solid #ff1a1a;
    color: #ff1a1a;
    font-weight: 700;
    font-size: 1.5rem;
    text-align: center;
    text-shadow: 0 0 10px rgba(255, 26, 26, 0.8);
    animation: hackGlitch 0.35s infinite;
}

.hack-count {
    color: #ff4d4d;
    font-size: 1.2rem;
    text-align: center;
}

.hack-joke {
    margin-top: 28px;
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: #ff69b4;
    text-shadow: 0 0 12px rgba(255, 105, 180, 0.8);
    animation: hackPop 0.5s ease;
}

#hack-screen.alarm {
    animation: hackFlash 0.5s steps(1) infinite;
}

@keyframes hackBlink {
    50% { opacity: 0; }
}

@keyframes hackFlash {
    0% { background: #000; }
    50% { background: #2a0000; }
}

@keyframes hackGlitch {
    0% { transform: translate(0); }
    20% { transform: translate(-3px, 1px); }
    40% { transform: translate(3px, -1px); }
    60% { transform: translate(-2px, -1px); }
    80% { transform: translate(2px, 1px); }
    100% { transform: translate(0); }
}

@keyframes hackPop {
    0% { transform: scale(0.6); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@media (max-width: 640px) {
    #hack-screen { font-size: 12.5px; }
    .hack-alert { font-size: 1.1rem; }
    .hack-joke { font-size: 1.3rem; }
}

#hack-screen,
#hack-screen * {
    cursor: default;
}


/* Blackout: pure black screen before the reveal */
#hack-screen.blackout .hack-bg {
    opacity: 0;
    transition: opacity 0.4s ease;
}

#hack-screen.blackout::after {
    opacity: 0;
}

/* Order ("Trưa nay ăn gì") landing screen */
#order-screen {
    position: fixed;
    inset: 0;
    z-index: 10001;
    background: #0b1117;
}

#order-screen iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

#order-catch {
    position: absolute;
    inset: 0;
    background: transparent;
    cursor: pointer;
}

/* Anonymous mask watermark + badge during the hack */
.hack-mask {
    position: fixed;
    top: 50%;
    left: 50%;
    width: min(66vw, 500px);
    transform: translate(-50%, -50%);
    opacity: 0.1;
    pointer-events: none;
    z-index: 0;
    filter: drop-shadow(0 0 18px rgba(0, 255, 102, 0.8));
    animation: maskPulse 3s ease-in-out infinite;
}

@keyframes maskPulse {
    0%, 100% { opacity: 0.06; }
    50% { opacity: 0.18; }
}

.hack-warn {
    position: fixed;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: #ff2a2a;
    font-family: 'Roboto Mono', monospace;
    font-weight: 700;
    letter-spacing: 3px;
    font-size: clamp(14px, 3.2vw, 24px);
    white-space: nowrap;
    text-shadow: 0 0 12px rgba(255, 42, 42, 0.9);
    animation: warnPulse 1s ease-in-out infinite;
}

@keyframes warnPulse {
    0%, 100% { opacity: 0.55; }
    50% { opacity: 1; }
}

/* Hidden during the final blackout so it stays pure black */
#hack-screen.blackout .hack-mask,
#hack-screen.blackout .hack-warn {
    display: none;
}

@media (max-width: 640px) {
    .hack-warn { letter-spacing: 1.5px; }
}
