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

body {
    font-family: 'Courier New', monospace;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: #fff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Intro Screen */
#intro-screen {
    text-align: left;
    max-width: 800px;
    padding: 40px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #4a90e2;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(74, 144, 226, 0.5);
}

#intro-text {
    font-size: 16px;
    line-height: 1.6;
    max-height: 500px;
    overflow-y: auto;
    white-space: pre-wrap;
    color: #4af;
    text-shadow: 0 0 5px rgba(68, 170, 255, 0.5);
    padding-right: 10px;
}

#intro-text::-webkit-scrollbar {
    width: 8px;
}

#intro-text::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

#intro-text::-webkit-scrollbar-thumb {
    background: #4a90e2;
    border-radius: 4px;
}

#intro-text::-webkit-scrollbar-thumb:hover {
    background: #4af;
}

#skip-hint {
    text-align: center;
    margin-top: 30px;
    font-size: 14px;
    color: #aaa;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 50%, 100% { opacity: 1; }
    25%, 75% { opacity: 0.3; }
}

/* Game Screen */
#game-screen {
    width: 100%;
    max-width: 1200px;
    padding: 20px;
}

#game-container {
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #4a90e2;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 0 30px rgba(74, 144, 226, 0.5);
}

#header {
    margin-bottom: 20px;
}

#header h1 {
    text-align: center;
    font-size: 32px;
    margin-bottom: 15px;
    color: #4af;
    text-shadow: 0 0 10px rgba(68, 170, 255, 0.8);
    letter-spacing: 4px;
}

#controls-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 5px;
}

#stats {
    display: flex;
    gap: 25px;
    font-size: 14px;
}

#stats div {
    color: #fff;
}

#stats span {
    color: #4af;
    font-weight: bold;
}

#buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

button {
    padding: 8px 16px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    background: #4a90e2;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

button:hover {
    background: #5aa0f2;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

button:active {
    transform: translateY(0);
}

select {
    padding: 8px 12px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    background: rgba(74, 144, 226, 0.3);
    color: #fff;
    border: 1px solid #4a90e2;
    border-radius: 4px;
    cursor: pointer;
}

select option {
    background: #1e3c72;
    color: #fff;
}

#game-canvas {
    display: block;
    margin: 0 auto;
    background: #fff;
    border: 2px solid #333;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

#instructions {
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
    color: #aaa;
}

#copyright {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(74, 144, 226, 0.3);
    font-size: 12px;
    color: #888;
}

#copyright a {
    color: #4a90e2;
    text-decoration: none;
    transition: color 0.2s;
}

#copyright a:hover {
    color: #4af;
    text-decoration: underline;
}

/* Victory Modal */
#victory-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#victory-content {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    padding: 40px;
    border-radius: 10px;
    border: 2px solid #4af;
    box-shadow: 0 0 40px rgba(68, 170, 255, 0.8);
    text-align: center;
    animation: victoryPop 0.3s ease-out;
}

@keyframes victoryPop {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

#victory-content h2 {
    font-size: 36px;
    margin-bottom: 20px;
    color: #4af;
    text-shadow: 0 0 15px rgba(68, 170, 255, 0.8);
}

#victory-content p {
    font-size: 18px;
    margin: 10px 0;
}

#victory-record {
    color: #ffeb3b;
    font-weight: bold;
}

#play-again-btn {
    margin-top: 20px;
    padding: 12px 30px;
    font-size: 16px;
}

#victory-copyright {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(68, 170, 255, 0.3);
    font-size: 12px;
    color: #aaa;
}

#victory-copyright a {
    color: #4af;
    text-decoration: none;
}

#victory-copyright a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    #controls-bar {
        flex-direction: column;
    }

    #stats {
        flex-direction: column;
        gap: 8px;
    }

    #header h1 {
        font-size: 24px;
    }
}
