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

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

body {
    font-family: 'Orbitron', monospace;
    background: radial-gradient(ellipse at center, #1a1a2e 0%, #16213e 50%, #0f0f23 100%);
    color: #00ff00;
    overflow: hidden;
    user-select: none;
}

#gameContainer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 10;
}

.screen.active {
    display: flex;
}

#titleScreen {
    background: linear-gradient(135deg, rgba(0,0,0,0.9) 0%, rgba(26,26,46,0.9) 100%);
    text-align: center;
    animation: starfield 20s linear infinite;
    z-index: 15;
}

.title {
    font-size: 4rem;
    font-weight: 900;
    color: #ffd700;
    text-shadow: 0 0 20px #ffd700, 0 0 40px #ffd700;
    margin-bottom: 0.5rem;
    letter-spacing: 0.3rem;
}

.subtitle {
    font-size: 2.5rem;
    font-weight: 700;
    color: #00ff00;
    text-shadow: 0 0 15px #00ff00;
    margin-bottom: 2rem;
    letter-spacing: 0.2rem;
}

.story {
    font-size: 1.2rem;
    color: #cccccc;
    margin-bottom: 3rem;
    max-width: 500px;
    line-height: 1.5;
}

.btn {
    background: linear-gradient(45deg, #ff0000, #cc0000);
    border: 2px solid #ff0000;
    color: white;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    cursor: pointer;
    border-radius: 5px;
    margin: 10px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
}

.btn:hover {
    background: linear-gradient(45deg, #ff3333, #ff0000);
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
    transform: translateY(-2px);
}

.btn.secondary {
    background: linear-gradient(45deg, #333333, #666666);
    border-color: #666666;
}

.btn.secondary:hover {
    background: linear-gradient(45deg, #555555, #888888);
    box-shadow: 0 0 20px rgba(102, 102, 102, 0.5);
}

.instructions {
    margin-top: 2rem;
    color: #888888;
    font-size: 0.9rem;
}

.instructions p {
    margin: 5px 0;
}

#gameScreen {
    background: transparent;
    padding: 0;
    margin: 0;
}

#gameContainer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: black url('ChatGPT Image Jun 6, 2025 at 03_25_54 PM.png') center center;
    background-repeat: no-repeat;
    background-size: auto 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

#gameCanvas {
    background: transparent;
    position: relative;
    width: 40vw;
    height: 60vh;
    z-index: 5;
}

#hud {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 250px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 20;
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 10px;
    border: 2px solid #00ff00;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
}

.hud-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #00ff00;
    font-weight: 700;
    text-shadow: 0 0 10px #00ff00;
}

#forceBar {
    width: 200px;
    height: 20px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid #0066ff;
    border-radius: 10px;
    overflow: hidden;
}

#forceLevel {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #0066ff, #00aaff);
    border-radius: 8px;
    transition: width 0.3s ease;
    box-shadow: 0 0 15px rgba(0, 102, 255, 0.5);
}

#gameOverScreen {
    background: linear-gradient(135deg, rgba(255,0,0,0.1) 0%, rgba(0,0,0,0.9) 100%);
    text-align: center;
}

#gameOverScreen h1 {
    font-size: 3rem;
    color: #ff0000;
    text-shadow: 0 0 20px #ff0000;
    margin-bottom: 2rem;
}

#finalScore {
    font-size: 1.5rem;
    color: #ffd700;
    margin-bottom: 1rem;
}

.flavor-text {
    font-size: 1.1rem;
    color: #cccccc;
    margin-bottom: 2rem;
    font-style: italic;
}

.name-input-section {
    margin-bottom: 2rem;
    text-align: center;
}

.name-input-section p {
    color: #cccccc;
    margin-bottom: 1rem;
    font-size: 1rem;
}

#playerName {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #00ff00;
    color: #00ff00;
    padding: 10px 15px;
    font-size: 1rem;
    font-family: 'Orbitron', monospace;
    border-radius: 5px;
    margin-right: 10px;
    text-align: center;
    outline: none;
}

#playerName:focus {
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
}

.high-scores-section {
    margin-bottom: 2rem;
    text-align: center;
    max-width: 400px;
}

.high-scores-section h2 {
    color: #ffd700;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-shadow: 0 0 10px #ffd700;
}

#highScoresList {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #00ff00;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 1rem;
}

.score-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid rgba(0, 255, 0, 0.3);
    color: #cccccc;
}

.score-entry:last-child {
    border-bottom: none;
}

.score-rank {
    color: #ffd700;
    font-weight: bold;
    width: 30px;
}

.score-name {
    flex: 1;
    text-align: left;
    margin-left: 10px;
}

.score-value {
    color: #00ff00;
    font-weight: bold;
}

.game-over-buttons {
    margin-top: 1rem;
}

@keyframes starfield {
    0% {
        background-position: 0% 0%;
    }
    100% {
        background-position: 100% 100%;
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.pulse {
    animation: pulse 2s infinite;
}

@media (max-width: 768px) {
    .title {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1.8rem;
    }
    
    #hud {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .hud-item {
        justify-content: center;
    }
    
    #forceBar {
        width: 150px;
    }
}