* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', monospace;
    background: #000;
    color: #0f0;
    overflow: hidden;
    padding-top: 60px;
}

#main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 20, 0, 0.95);
    border-bottom: 2px solid #0f0;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 0 15px #0f0;
}

#main-header h1 {
    font-size: 24px;
    text-shadow: 0 0 10px #0f0;
}

#main-header nav {
    display: flex;
    gap: 15px;
}

.nav-btn {
    padding: 8px 20px;
    background: transparent;
    border: 1px solid #0f0;
    color: #0f0;
    font-family: 'Courier New', monospace;
    cursor: pointer;
    transition: all 0.3s;
}

.nav-btn:hover {
    background: #0f0;
    color: #000;
    box-shadow: 0 0 10px #0f0;
}

#app {
    width: 100vw;
    height: 100vh;
    position: relative;
}

.screen {
    display: none;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.screen.active {
    display: block;
}

.story-container {
    width: 80%;
    max-width: 800px;
    margin: 10% auto;
    padding: 40px;
    background: rgba(0, 20, 0, 0.9);
    border: 2px solid #0f0;
    box-shadow: 0 0 20px #0f0;
}

.terminal-header {
    font-size: 24px;
    text-align: center;
    margin-bottom: 30px;
    text-shadow: 0 0 10px #0f0;
    border-bottom: 1px solid #0f0;
    padding-bottom: 10px;
}

.story-content {
    min-height: 200px;
    line-height: 1.8;
    font-size: 16px;
    margin-bottom: 30px;
}

.cyber-btn {
    display: block;
    margin: 0 auto;
    padding: 15px 40px;
    background: transparent;
    border: 2px solid #0f0;
    color: #0f0;
    font-family: 'Courier New', monospace;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s;
}

.cyber-btn:hover {
    background: #0f0;
    color: #000;
    box-shadow: 0 0 20px #0f0;
}

.hub-container {
    padding: 20px;
    overflow-y: auto;
    height: calc(100vh - 60px);
}

.screen-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 20px;
    text-shadow: 0 0 15px #0f0;
}

.companion-message {
    background: rgba(0, 40, 0, 0.8);
    border: 1px solid #0f0;
    padding: 15px;
    margin: 0 auto 30px;
    max-width: 600px;
    text-align: center;
    border-radius: 5px;
}

.missions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.mission-card {
    background: rgba(0, 20, 0, 0.8);
    border: 2px solid #0f0;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.mission-card:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px #0f0;
}

.mission-card.completed {
    border-color: #00ff00;
    background: rgba(0, 40, 0, 0.9);
}

.mission-card h3 {
    margin-bottom: 10px;
    font-size: 20px;
}

.mission-card p {
    font-size: 14px;
    line-height: 1.6;
}

.mission-container {
    padding: 20px;
    overflow-y: auto;
    height: calc(100vh - 60px);
}

.mission-scene {
    position: relative;
    width: 90%;
    max-width: 900px;
    height: 500px;
    margin: 20px auto;
    background: rgba(0, 10, 0, 0.7);
    border: 2px solid #0f0;
    overflow: hidden;
}

.mission-info {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background: rgba(0, 20, 0, 0.8);
    border: 1px solid #0f0;
}

.cyber-btn.small {
    padding: 10px 20px;
    font-size: 14px;
    margin-bottom: 20px;
}

.quiz-container {
    padding: 40px;
    max-width: 900px;
    margin: 50px auto;
}

.quiz-content {
    background: rgba(0, 20, 0, 0.9);
    border: 2px solid #0f0;
    padding: 40px;
    margin: 30px 0;
}

.quiz-question {
    font-size: 22px;
    margin-bottom: 30px;
    line-height: 1.6;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.quiz-option {
    padding: 20px;
    background: transparent;
    border: 2px solid #0f0;
    color: #0f0;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    cursor: pointer;
    text-align: left;
    transition: all 0.3s;
}

.quiz-option:hover {
    background: rgba(0, 255, 0, 0.2);
}

.quiz-option.correct {
    background: #0f0;
    color: #000;
}

.quiz-option.incorrect {
    background: #f00;
    color: #fff;
    border-color: #f00;
}

.quiz-result {
    background: rgba(0, 20, 0, 0.9);
    border: 2px solid #0f0;
    padding: 30px;
    text-align: center;
    margin-top: 20px;
}

.quiz-result.hidden {
    display: none;
}

.trophy-container {
    padding: 20px;
    overflow-y: auto;
    height: calc(100vh - 60px);
}

.trophies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.trophy-card {
    background: rgba(0, 20, 0, 0.8);
    border: 2px solid #0f0;
    padding: 20px;
    text-align: center;
}

.trophy-card.locked {
    opacity: 0.3;
}

.trophy-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.trophy-card h3 {
    margin: 10px 0;
    font-size: 18px;
}

.trophy-card p {
    font-size: 14px;
}

.hidden {
    display: none;
}

.scanner {
    position: absolute;
    width: 80px;
    height: 80px;
    pointer-events: none;
    display: none;
}

.scanner.active {
    display: block;
}

.scanner-circle {
    width: 100%;
    height: 100%;
    border: 3px solid #0ff;
    border-radius: 50%;
    box-shadow: 0 0 20px #0ff, inset 0 0 20px #0ff;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.7;
    }
}

.anachronism {
    position: absolute;
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, #ff0, #f00);
    border-radius: 50%;
    cursor: pointer;
}

#parallax-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.parallax-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0.1;
}

.layer-1 {
    background: repeating-linear-gradient(0deg, transparent, transparent 50px, #0f0 50px, #0f0 51px);
    animation: parallax1 20s linear infinite;
}

.layer-2 {
    background: repeating-linear-gradient(90deg, transparent, transparent 50px, #0f0 50px, #0f0 51px);
    animation: parallax2 25s linear infinite;
}

.layer-3 {
    background: radial-gradient(circle at center, #0f0 1px, transparent 1px);
    background-size: 100px 100px;
    animation: parallax3 30s linear infinite;
}

@keyframes parallax1 {
    from { transform: translateY(0); }
    to { transform: translateY(100px); }
}

@keyframes parallax2 {
    from { transform: translateX(0); }
    to { transform: translateX(100px); }
}

@keyframes parallax3 {
    from { transform: rotate(0deg) scale(1); }
    to { transform: rotate(360deg) scale(1.1); }
}

#flying-clocks {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.clock {
    position: absolute;
    font-size: 40px;
    opacity: 0.15;
    animation: float 15s linear infinite;
}

.clock:nth-child(1) {
    left: 10%;
    animation-duration: 12s;
    animation-delay: 0s;
}

.clock:nth-child(2) {
    left: 30%;
    animation-duration: 18s;
    animation-delay: 2s;
}

.clock:nth-child(3) {
    left: 50%;
    animation-duration: 15s;
    animation-delay: 4s;
}

.clock:nth-child(4) {
    left: 70%;
    animation-duration: 20s;
    animation-delay: 1s;
}

.clock:nth-child(5) {
    left: 90%;
    animation-duration: 14s;
    animation-delay: 3s;
}

@keyframes float {
    from {
        transform: translateY(100vh) rotate(0deg);
    }
    to {
        transform: translateY(-100px) rotate(360deg);
    }
}

.story-container::before,
.quiz-container::before,
.mission-scene::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: conic-gradient(from 0deg at 50% 50%, #0f0, #000, #0f0);
    border-radius: inherit;
    z-index: -1;
    animation: vortex 4s linear infinite;
    opacity: 0.3;
}

@keyframes vortex {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.terminal-header,
.screen-title,
#main-header h1 {
    text-shadow: 0 0 10px #0f0, 0 0 20px #0f0, 0 0 30px #0f0;
}

.cyber-btn,
.nav-btn,
.mission-card,
.trophy-card {
    box-shadow: 0 0 5px #0f0;
}

.cyber-btn:hover,
.nav-btn:hover {
    box-shadow: 0 0 15px #0f0, 0 0 25px #0f0;
}

@media (max-width: 768px) {
    #main-header {
        flex-direction: column;
        padding: 10px;
    }

    #main-header h1 {
        font-size: 18px;
        margin-bottom: 10px;
    }

    #main-header nav {
        flex-wrap: wrap;
        gap: 8px;
    }

    .nav-btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    .missions-grid {
        grid-template-columns: 1fr;
        padding: 10px;
    }

    .story-container,
    .quiz-container {
        width: 95%;
        padding: 20px;
    }

    .mission-scene {
        width: 100%;
        height: 300px;
    }

    .screen-title {
        font-size: 24px;
    }
}

.story-container,
.mission-scene {
    position: relative;
}

.mission-card:hover,
.trophy-card:not(.locked):hover {
    transform: translateY(-5px);
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 255, 0, 0.03) 0px,
        transparent 2px,
        transparent 4px,
        rgba(0, 255, 0, 0.03) 4px
    );
    pointer-events: none;
    z-index: 9999;
}
