/* Terminal Theme */
@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

:root {
    --bg-color: #050505;
    --text-color: #33ff33;
    --text-dim: #1a9e1a;
    --glow-color: rgba(51, 255, 51, 0.5);
    --glow-strong: rgba(51, 255, 51, 0.8);
    --danger-color: #ff3333;
    --font-main: 'VT323', monospace;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    text-transform: uppercase;
}

/* CRT Effects */
.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.7) 100%);
    pointer-events: none;
    z-index: 100;
}

.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.12) 50%);
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 99;
    animation: flicker 0.15s infinite;
}

/* Phosphor burn / ambient glow on the "screen" */
.screen-glow {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 600px;
    height: 600px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(51, 255, 51, 0.04) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
}

@keyframes flicker {
    0% {
        opacity: 0.88;
    }

    50% {
        opacity: 0.95;
    }

    100% {
        opacity: 0.88;
    }
}

/* Terminal Container */
.terminal-container {
    width: 800px;
    max-width: 90%;
    z-index: 10;
    text-shadow: 0 0 5px var(--glow-color), 0 0 10px var(--glow-color);
}

/* Boot-up animation */
.terminal-container {
    animation: bootUp 1.2s ease-out;
}

@keyframes bootUp {
    0% {
        opacity: 0;
        transform: scale(0.95);
        filter: brightness(3);
    }

    30% {
        opacity: 1;
        filter: brightness(1.8);
    }

    100% {
        transform: scale(1);
        filter: brightness(1);
    }
}

/* Glitch Title */
h1 {
    font-size: 4rem;
    text-align: center;
    margin-bottom: 3rem;
    letter-spacing: 5px;
    font-weight: normal;
    position: relative;
    display: inline-block;
    width: 100%;
    color: var(--text-color);
    text-shadow: 0 0 10px var(--glow-strong), 0 0 20px var(--glow-color), 0 0 40px rgba(51, 255, 51, 0.2);
}

h1::before,
h1::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
}

h1::before {
    left: 1px;
    text-shadow: -2px 0 #00ff41;
    clip: rect(0, 0, 0, 0);
    animation: glitch-anim 8s infinite linear alternate-reverse;
}

h1::after {
    left: -1px;
    text-shadow: 2px 0 #39ff14;
    clip: rect(0, 0, 0, 0);
    animation: glitch-anim2 8s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip: rect(0, 0, 0, 0);
    }

    88% {
        clip: rect(0, 0, 0, 0);
    }

    89% {
        clip: rect(30px, 9999px, 10px, 0);
    }

    90% {
        clip: rect(70px, 9999px, 90px, 0);
    }

    91% {
        clip: rect(35px, 9999px, 15px, 0);
    }

    92% {
        clip: rect(0, 0, 0, 0);
    }

    93% {
        clip: rect(10px, 9999px, 80px, 0);
    }

    94% {
        clip: rect(100px, 9999px, 100px, 0);
    }

    95% {
        clip: rect(0, 0, 0, 0);
    }

    100% {
        clip: rect(0, 0, 0, 0);
    }
}

@keyframes glitch-anim2 {
    0% {
        clip: rect(0, 0, 0, 0);
    }

    88% {
        clip: rect(0, 0, 0, 0);
    }

    89% {
        clip: rect(10px, 9999px, 80px, 0);
    }

    90% {
        clip: rect(90px, 9999px, 10px, 0);
    }

    91% {
        clip: rect(20px, 9999px, 60px, 0);
    }

    92% {
        clip: rect(0, 0, 0, 0);
    }

    93% {
        clip: rect(50px, 9999px, 30px, 0);
    }

    94% {
        clip: rect(10px, 9999px, 90px, 0);
    }

    95% {
        clip: rect(0, 0, 0, 0);
    }

    100% {
        clip: rect(0, 0, 0, 0);
    }
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--text-color);
    display: inline-block;
    text-shadow: 0 0 8px var(--glow-color);
}

/* Blinking cursor after header */
.system-line {
    font-size: 1.2rem;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-dim);
    letter-spacing: 2px;
}

.blink {
    animation: blink-cursor 1s step-end infinite;
}

@keyframes blink-cursor {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Countdown Timer */
.countdown-timer {
    font-size: 1.5rem;
    color: var(--danger-color);
    text-align: center;
    margin-bottom: 2rem;
    letter-spacing: 3px;
    text-shadow: 0 0 10px rgba(255, 51, 51, 0.4);
    animation: flash-danger 2s infinite alternate;
}

@keyframes flash-danger {
    0% {
        opacity: 0.7;
    }

    100% {
        opacity: 1;
        text-shadow: 0 0 15px var(--danger-color);
    }
}

/* Boot Screen Overlay */
#boot-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    z-index: 50;
    /* Below CRT effects (99/100) but above content (10) */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 2rem;
    font-size: 1.4rem;
    color: #44ff44;
    text-shadow: 0 0 4px var(--glow-color);
    text-transform: uppercase;
    transition: opacity 1s ease-out, filter 1s ease-out;
}

#boot-screen.fade-out {
    opacity: 0;
    filter: blur(5px) brightness(2);
    pointer-events: none;
}

#boot-text p {
    margin: 5px 0;
}

.boot-error {
    color: var(--danger-color);
    text-shadow: 0 0 5px rgba(255, 51, 51, 0.8);
}

/* Menu */
.menu-list {
    list-style: none;
    padding: 0;
    font-size: 2rem;
}

.menu-item {
    margin-bottom: 1.5rem;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    padding: 0.3rem 0.5rem;
    border: 1px solid transparent;
}

.menu-item:hover {
    text-shadow: 0 0 10px var(--glow-strong), 0 0 20px var(--glow-color);
    transform: translateX(10px);
    border-color: var(--text-dim);
    background: rgba(51, 255, 51, 0.04);
}

.cursor {
    margin-right: 15px;
    opacity: 0;
    color: var(--text-color);
}

.menu-item:hover .cursor {
    opacity: 1;
}

/* Disabled / Coming Soon Steam button */
.menu-item.disabled {
    cursor: not-allowed;
    opacity: 0.45;
    position: relative;
}

.menu-item.disabled:hover {
    transform: none;
    text-shadow: 0 0 5px var(--glow-color);
    border-color: transparent;
    background: none;
}

.menu-item.disabled .menu-label {
    text-decoration: line-through;
    text-decoration-color: var(--danger-color);
    text-decoration-thickness: 3px;
}

.coming-soon-badge {
    font-size: 0.9rem;
    color: var(--danger-color);
    margin-left: 1rem;
    border: 1px solid var(--danger-color);
    padding: 0.1rem 0.5rem;
    letter-spacing: 2px;
    animation: pulse-badge 2s ease-in-out infinite;
    text-shadow: 0 0 8px rgba(255, 51, 51, 0.6);
    text-decoration: none;
}

@keyframes pulse-badge {

    0%,
    100% {
        opacity: 0.7;
    }

    50% {
        opacity: 1;
    }
}

/* Content */
.hidden {
    display: none;
}

.typewriter-text p {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ===== Incident Reports ===== */
.reports-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-height: 50vh;
    overflow-y: auto;
    padding-right: 1rem;
}

/* Custom scrollbar for reports */
.reports-container::-webkit-scrollbar {
    width: 3px;
}

.reports-container::-webkit-scrollbar-track {
    background: transparent;
}

.reports-container::-webkit-scrollbar-thumb {
    background: rgba(51, 255, 51, 0.3);
    border-radius: 2px;
}

.report-card {
    border-left: 3px solid var(--danger-color);
    padding: 1rem 1.5rem;
    background: linear-gradient(90deg, rgba(255, 51, 51, 0.05), transparent);
    border-top: 1px solid rgba(51, 255, 51, 0.05);
    border-right: 1px solid rgba(51, 255, 51, 0.02);
    border-bottom: 1px solid rgba(51, 255, 51, 0.05);
    box-shadow: inset 5px 0 15px rgba(255, 51, 51, 0.02);
    transition: all 0.3s ease;
}

.report-card:hover {
    border-left-color: var(--text-color);
    background: linear-gradient(90deg, rgba(51, 255, 51, 0.08), transparent);
    box-shadow: inset 5px 0 15px rgba(51, 255, 51, 0.05);
}

.report-header {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid rgba(51, 255, 51, 0.2);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: var(--text-dim);
    text-transform: uppercase;
}

.report-id {
    color: var(--text-color);
    font-weight: normal;
    font-size: 1.5rem;
    letter-spacing: 2px;
    text-shadow: 0 0 5px var(--glow-color);
}

.report-body {
    font-size: 1.4rem;
    line-height: 1.6;
    margin: 0;
    color: #e0ffe0;
}

.redacted-text {
    color: var(--danger-color);
    background: transparent;
    letter-spacing: 1px;
    animation: flash-redacted 4s infinite;
    text-shadow: 0 0 4px rgba(255, 51, 51, 0.6);
}

@keyframes flash-redacted {

    0%,
    90% {
        opacity: 0.8;
    }

    91% {
        opacity: 0.1;
    }

    92% {
        opacity: 0.9;
        text-shadow: 0 0 8px rgba(255, 51, 51, 1);
    }

    93% {
        opacity: 0.2;
    }

    94%,
    100% {
        opacity: 0.8;
    }
}

/* Quiz Styles */
#quiz-container {
    position: relative;
}

.quiz-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(51, 255, 51, 0.1);
    border: 1px solid var(--text-dim);
    margin-bottom: 2rem;
    overflow: hidden;
}

.quiz-progress-fill {
    height: 100%;
    background: var(--text-color);
    box-shadow: 0 0 10px var(--glow-color), 0 0 20px var(--glow-color);
    transition: width 0.5s ease;
    width: 0%;
}

#quiz-question {
    font-size: 1.8rem;
    letter-spacing: 2px;
    line-height: 1.5;
    text-shadow: 0 0 8px var(--glow-color);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(51, 255, 51, 0.15);
}

.quiz-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 2rem;
    width: 100%;
}

.quiz-option {
    border: 2px solid var(--text-dim);
    padding: 24px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(51, 255, 51, 0.02);
    position: relative;
    overflow: hidden;
}

.quiz-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(51, 255, 51, 0.06), transparent);
    transition: left 0.4s ease;
}

.quiz-option:hover::before {
    left: 100%;
}

.quiz-option:hover {
    background-color: rgba(51, 255, 51, 0.12);
    box-shadow: 0 0 20px var(--glow-color), inset 0 0 20px rgba(51, 255, 51, 0.04);
    border-color: var(--text-color);
    transform: scale(1.03);
}

.quiz-option:active {
    transform: scale(0.97);
}

.tool-icon {
    font-size: 3.2rem;
    margin-bottom: 12px;
    display: block;
    filter: drop-shadow(0 0 4px var(--glow-color));
}

.tool-name {
    font-size: 1.5rem;
    letter-spacing: 2px;
}

#quiz-status {
    margin-top: 24px;
    font-size: 1.5rem;
    text-align: center;
    min-height: 1.5em;
    letter-spacing: 1px;
}

.return-hint {
    color: var(--text-dim);
    animation: pulse-return 2s ease-in-out infinite;
    cursor: pointer;
}

@keyframes pulse-return {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

/* ===== Image Carousel ===== */
.carousel-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.carousel-image-wrapper {
    width: 100%;
    max-width: 700px;
    border: 2px solid var(--text-color);
    box-shadow: 0 0 12px var(--glow-color), inset 0 0 8px rgba(51, 255, 51, 0.03);
    background: rgba(0, 0, 0, 0.6);
    padding: 6px;
    position: relative;
    overflow: hidden;
}

.carousel-image-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.08) 50%);
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 1;
}

.carousel-image {
    width: 100%;
    height: auto;
    display: block;
}

.carousel-caption {
    font-size: 1.4rem;
    color: var(--text-color);
    text-align: center;
    letter-spacing: 1px;
    margin: 0.5rem 0 0 0;
    text-shadow: 0 0 6px var(--glow-color);
    min-height: 1.6em;
}

.carousel-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-top: 0.5rem;
}

.carousel-btn {
    font-family: var(--font-main);
    font-size: 1.4rem;
    color: var(--text-color);
    background: transparent;
    border: 1px solid var(--text-dim);
    padding: 0.4rem 1.2rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 5px var(--glow-color);
    transition: all 0.2s ease;
}

.carousel-btn:hover {
    border-color: var(--text-color);
    background: rgba(51, 255, 51, 0.1);
    box-shadow: 0 0 12px var(--glow-color), inset 0 0 8px rgba(51, 255, 51, 0.05);
    text-shadow: 0 0 10px var(--glow-strong);
}

.carousel-btn:active {
    transform: scale(0.96);
}

.carousel-counter {
    font-size: 1.2rem;
    color: var(--text-dim);
    letter-spacing: 2px;
    min-width: 8ch;
    text-align: center;
}

.carousel-return-hint {
    font-size: 1.1rem;
    color: var(--text-dim);
    margin-top: 1rem;
    letter-spacing: 1px;
    opacity: 0.6;
}

/* Footer */
footer {
    margin-top: 4rem;
    border-top: 1px solid var(--text-dim);
    padding-top: 1.5rem;
    text-align: center;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.social-icon {
    width: 32px;
    height: 32px;
    fill: var(--text-color);
    filter: drop-shadow(0 0 5px var(--glow-color));
    transition: all 0.2s;
}

.social-links a:hover .social-icon {
    transform: scale(1.2);
    filter: drop-shadow(0 0 12px var(--glow-strong));
    fill: #66ff66;
}

/* Version label */
.version-label {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-top: 1rem;
    letter-spacing: 1px;
}

/* ===== Responsive / Mobile ===== */

/* Allow scrolling on smaller viewports */
@media (max-height: 700px) {
    body {
        overflow-y: auto;
        align-items: flex-start;
        padding: 2rem 0;
    }
}

/* Tablets & small laptops */
@media (max-width: 768px) {
    body {
        overflow-y: auto;
        align-items: flex-start;
        padding: 2rem 0;
    }

    h1 {
        font-size: 2.8rem;
        margin-bottom: 2rem;
        letter-spacing: 3px;
    }

    .system-line {
        font-size: 1rem;
    }

    .menu-list {
        font-size: 1.6rem;
    }

    .menu-item {
        margin-bottom: 1rem;
    }

    .coming-soon-badge {
        font-size: 0.75rem;
    }

    h2 {
        font-size: 2rem;
    }

    .typewriter-text p {
        font-size: 1.3rem;
    }

    .quiz-grid {
        gap: 15px;
    }

    .quiz-option {
        padding: 15px;
    }

    .tool-icon {
        font-size: 2.5rem;
    }

    .tool-name {
        font-size: 1.2rem;
    }

    footer {
        margin-top: 2.5rem;
    }

    .carousel-caption {
        font-size: 1.2rem;
    }

    .carousel-btn {
        font-size: 1.2rem;
        padding: 0.3rem 0.8rem;
    }

    .carousel-controls {
        gap: 1.2rem;
    }

    .carousel-counter {
        font-size: 1rem;
    }
}

/* Phones */
@media (max-width: 480px) {
    body {
        padding: 1.5rem 0;
    }

    .terminal-container {
        max-width: 95%;
    }

    h1 {
        font-size: 2rem;
        margin-bottom: 1.5rem;
        letter-spacing: 2px;
    }

    .system-line {
        font-size: 0.85rem;
        margin-bottom: 1.5rem;
    }

    .menu-list {
        font-size: 1.3rem;
    }

    .menu-item {
        margin-bottom: 0.8rem;
        padding: 0.4rem 0.3rem;
    }

    .menu-item:hover {
        transform: translateX(5px);
    }

    .cursor {
        margin-right: 10px;
    }

    .coming-soon-badge {
        font-size: 0.65rem;
        margin-left: 0.5rem;
        padding: 0.05rem 0.35rem;
    }

    h2 {
        font-size: 1.6rem;
    }

    .typewriter-text p {
        font-size: 1.15rem;
    }

    /* Stack quiz options vertically on small screens */
    .quiz-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .quiz-option {
        padding: 12px;
        flex-direction: row;
        gap: 10px;
    }

    .tool-icon {
        font-size: 2rem;
        margin-bottom: 0;
    }

    .tool-name {
        font-size: 1.1rem;
    }

    #quiz-status {
        font-size: 1.2rem;
    }

    .social-links {
        gap: 1.5rem;
    }

    .social-icon {
        width: 28px;
        height: 28px;
    }

    footer {
        margin-top: 2rem;
        padding-top: 1rem;
    }

    .version-label {
        font-size: 0.75rem;
    }

    .carousel-caption {
        font-size: 1.1rem;
    }

    .carousel-btn {
        font-size: 1.1rem;
        padding: 0.3rem 0.6rem;
        letter-spacing: 1px;
    }

    .carousel-controls {
        gap: 0.8rem;
    }

    .carousel-counter {
        font-size: 0.9rem;
    }

    .carousel-return-hint {
        font-size: 0.9rem;
    }
}

/* ===== Hidden Terminal ===== */
#hidden-terminal {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: 50vh;
    background: rgba(5, 5, 5, 0.95);
    border-top: 2px solid var(--text-color);
    box-shadow: 0 -5px 15px rgba(51, 255, 51, 0.2);
    z-index: 1000;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow-y: auto;
    transition: transform 0.3s ease-out;
}

#hidden-terminal.hidden {
    display: flex !important;
    /* Override standard .hidden to keep it flex but translate it offscreen */
    transform: translateY(105%);
}

#terminal-output {
    margin-bottom: 1rem;
    font-size: 1.3rem;
    color: var(--text-dim);
    line-height: 1.4;
    white-space: pre-wrap;
    text-shadow: 0 0 3px var(--glow-color);
}

.terminal-line {
    margin: 5px 0;
}

.terminal-response {
    color: var(--text-color);
    margin: 5px 0 15px 0;
}

.terminal-input-line {
    display: flex;
    align-items: center;
    font-size: 1.4rem;
}

.prompt {
    margin-right: 10px;
}

#terminal-input {
    background: transparent;
    border: none;
    color: var(--text-color);
    font-family: var(--font-main);
    font-size: 1.4rem;
    flex-grow: 1;
    text-transform: uppercase;
    outline: none;
    text-shadow: 0 0 5px var(--glow-color);
}

#terminal-input::placeholder {
    color: rgba(51, 255, 51, 0.3);
}