/* =============================================================
   1997.gpo.ca — April Fools Campaign Stylesheet
   Combines layout styles + Win95 retro overrides
   ============================================================= */

/* --- 1. THE HACKER LOADER --- */
#hacker-loader {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: #000; color: #00FF00; z-index: 100000000;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    font-family: 'Courier New', monospace;
}
.progress-box { width: 300px; border: 1px solid #00FF00; padding: 3px; margin: 20px; }
#bar { width: 0%; height: 10px; background: #00FF00; transition: width 0.3s; }

#sound-btn {
    background: transparent !important;
    border: 1px solid #00FF00 !important;
    color: #00FF00 !important;
    font-family: 'Courier New', monospace !important;
    font-size: 11px !important;
    padding: 5px 14px !important;
    cursor: pointer !important;
    margin-top: 10px !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    letter-spacing: 1px;
}
#sound-btn:hover:not(:disabled) { background: rgba(0,255,0,0.12) !important; }
#sound-btn:disabled { opacity: 0.7; cursor: default !important; }

/* --- 2. THE 1997 HIJACK LAYOUT --- */
#gpo-97-hijack {
    display: none; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background-color: #004d26;
    background-image: radial-gradient(#002d16 2px, transparent 2px);
    background-size: 25px 25px;
    z-index: 99999999; overflow-y: auto; font-family: "Times New Roman", Times, serif;
}

.disclaimer-alert {
    background: #FF0000; color: #fff; padding: 10px; text-align: center;
    font-family: Arial, sans-serif; font-weight: bold; border-bottom: 3px solid #000;
    animation: pulse 2s infinite;
}
@keyframes pulse { 0% { background: #FF0000; } 50% { background: #aa0000; } 100% { background: #FF0000; } }

.main-table {
    width: 95%; max-width: 900px; background: #c0c0c0;
    border: 4px outset #fff; margin: 20px auto;
    box-shadow: 15px 15px 0px rgba(0,0,0,0.5);
}

.sidebar {
    width: 220px;
    background: #00A651;
    border-right: 4px outset #88d4ac;
    padding: 15px;
    vertical-align: top;
    color: #000;
}

.nav-btn {
    display: block;
    background: #c0c0c0;
    border: 2px outset #fff;
    padding: 8px;
    margin-bottom: 8px;
    text-decoration: none;
    color: #000;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 13px;
    text-align: center;
    box-shadow: 2px 2px 0px #003d1e;
}
.nav-btn:active { border: 2px inset #fff; }

.error-header {
    font-family: "Arial Black";
    font-size: 45px;
    color: #FF0000;
    text-shadow: 3px 3px 0px #000;
    text-align: center;
    margin: 10px 0;
}

.action-btn {
    display: block;
    background: #00A651;
    color: #fff !important;
    padding: 20px;
    border: 5px outset #88d4ac;
    text-decoration: none !important;
    font-weight: bold;
    font-family: Arial;
    font-size: 22px;
    text-align: center;
    margin: 20px 0;
    box-shadow: 5px 5px 0px #000;
}
.action-btn:active {
    border: 5px inset #88d4ac;
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px #000;
}

/* THE RED FLASH TRAP */
.flash-red #gpo-97-hijack { background-color: #FF0000 !important; background-image: none !important; }


/* --- 3. GLOBAL '97 RESET --- */
body.is-1997-mode {
    background-color: #008080 !important;
    font-family: "Times New Roman", Times, serif !important;
    color: #000 !important;
    margin: 0;
    padding: 0;
}

/* --- 4. RETRO BUTTONS (Win95 Style) --- */
.btn-donate, button {
    background: #c0c0c0 !important;
    border-top: 2px solid #ffffff !important;
    border-left: 2px solid #ffffff !important;
    border-right: 2px solid #808080 !important;
    border-bottom: 2px solid #808080 !important;
    border-radius: 0px !important;
    box-shadow: 1px 1px 0px #000000 !important;
    padding: 10px 20px !important;
    color: #000 !important;
    font-weight: bold !important;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-donate:active, button:active {
    border-top: 2px solid #808080 !important;
    border-left: 2px solid #808080 !important;
    border-right: 2px solid #ffffff !important;
    border-bottom: 2px solid #ffffff !important;
    box-shadow: none !important;
}

/* THE TRAP HIGHLIGHT */
#the-only-way-out:focus {
    outline: 5px solid #FFFF00 !important;
    box-shadow: 0 0 20px #FFFF00 !important;
}

/* --- 5. VISITOR COUNTER --- */
.visitor-counter-box {
    display: inline-block;
    background-color: #000;
    border: 2px inset #ffffff;
    padding: 5px 10px;
    font-family: 'Courier New', Courier, monospace;
}

.counter-digits {
    color: #00ff00;
    font-size: 20px;
    font-weight: bold;
    letter-spacing: 2px;
}

/* --- 6. ANIMATIONS --- */
@keyframes retro-blink {
    50% { opacity: 0; }
}

.blink { animation: retro-blink 1s step-start infinite; }

/* 1997 Link Colors */
a { color: #0000FF; text-decoration: underline; }
a:visited { color: #551A8B; }

/* --- 7. ESCAPE HATCH BUTTON --- */
.escape-hatch-btn {
    display: inline-block;
    background: #000080;
    color: #ffffff !important;
    border: 2px outset #8888ff;
    padding: 8px 16px;
    text-decoration: none !important;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    cursor: pointer;
    margin-bottom: 10px;
}
.escape-hatch-btn:hover { background: #0000aa; }
.escape-hatch-btn:active { border: 2px inset #8888ff; }

/* --- 8. APRIL FOOLS BANNER --- */
#april-fools-banner {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.90);
    z-index: 2000000000;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.af-content {
    text-align: center;
    padding: 20px;
    position: relative;
    z-index: 2000000002;
}

.af-title {
    font-family: "Arial Black", Impact, sans-serif;
    font-size: clamp(60px, 15vw, 130px);
    color: #FF0000;
    text-shadow: 4px 4px 0px #FFFF00, 8px 8px 0px #00A651;
    line-height: 1;
    animation: af-shake 0.25s ease-in-out infinite;
    margin-bottom: 20px;
}

@keyframes af-shake {
    0%, 100% { transform: rotate(-1.5deg) scale(1); }
    50% { transform: rotate(1.5deg) scale(1.02); }
}

.af-subtitle {
    font-family: Arial, sans-serif;
    font-size: clamp(14px, 2.5vw, 22px);
    color: #FFFF00;
    max-width: 600px;
    margin: 0 auto 30px;
    padding: 0 20px;
}

.af-cta-btn {
    display: inline-block;
    background: #00A651;
    color: #ffffff !important;
    border: 6px outset #88d4ac;
    padding: 20px 40px;
    text-decoration: none !important;
    font-family: 'Courier New', monospace;
    font-size: clamp(18px, 3vw, 26px);
    font-weight: bold;
    cursor: pointer;
    box-shadow: 6px 6px 0px #000;
    animation: cta-pulse 1.5s ease-in-out infinite;
}
@keyframes cta-pulse {
    0%, 100% { box-shadow: 6px 6px 0px #000; transform: scale(1); }
    50% { box-shadow: 8px 8px 0px #000; transform: scale(1.04); }
}
.af-cta-btn:active {
    border: 6px inset #88d4ac;
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px #000;
    animation: none;
}

/* --- 9. CONFETTI CANVAS --- */

#confetti-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    pointer-events: none;
    z-index: 2000000001;
    display: none;
}

/* --- 10. MOBILE --- */
@media (max-width: 640px) {
    /* Stack the table layout vertically */
    .main-table,
    .main-table tbody,
    .main-table tr,
    .main-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    /* Sidebar becomes a top banner, border moves to bottom */
    .sidebar {
        width: 100% !important;
        border-right: none;
        border-bottom: 4px outset #88d4ac;
        padding: 10px 15px;
    }

    /* Shrink sidebar logo */
    .sidebar img {
        width: 80px !important;
    }

    /* Nav buttons: 2-column grid */
    .nav-btn {
        display: inline-block;
        width: calc(50% - 6px);
        box-sizing: border-box;
        margin: 3px;
        font-size: 11px;
        padding: 6px 4px;
    }

    /* SYS_REQUIREMENTS box: full width */
    .sidebar > div:last-child {
        margin-top: 10px !important;
    }

    /* Content pane: less padding */
    .content-pane {
        padding: 15px !important;
    }

    /* Error header: scale down */
    .error-header {
        font-size: clamp(26px, 8vw, 45px);
    }

    /* Blink warning text: scale down */
    .blink {
        font-size: clamp(12px, 3.5vw, 20px) !important;
    }

    /* Action button: smaller text and padding */
    .action-btn {
        font-size: clamp(16px, 5vw, 22px);
        padding: 15px;
    }

    /* Loader image */
    #hacker-loader img {
        width: min(180px, 55vw) !important;
    }

    /* Loader progress box */
    .progress-box {
        width: 85vw;
        max-width: 300px;
    }
}
