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

body {
    background: linear-gradient(to bottom, #0a0a1a 0%, #1a0a2e 100%);
    font-family: 'Arial', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: white;
}

#game-container {
    position: relative;
    max-width: 1000px;
    margin: 20px;
}

#hud {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(10, 10, 30, 0.8);
    border: 2px solid #ff6b35;
    border-radius: 10px 10px 0 0;
    font-size: 20px;
    font-weight: bold;
}

#lives {
    color: #ff4757;
}

#score {
    color: #ffd700;
}

#power-status {
    color: #00d4ff;
    min-width: 200px;
    text-align: right;
}

#gameCanvas {
    display: block;
    background: #1a1a2e;
    border: 2px solid #ff6b35;
    border-top: none;
    cursor: crosshair;
}

.hidden {
    display: none !important;
}

#game-over, #victory, #instructions, #math-question {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(10, 10, 30, 0.95);
    border: 3px solid #ff6b35;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    z-index: 10;
}

#math-question {
    border-color: #00d4ff;
    min-width: 500px;
}

#math-question h1 {
    color: #00d4ff;
    font-size: 42px;
    margin-bottom: 20px;
    text-shadow: 0 0 10px #00d4ff;
}

#math-question p {
    color: #ffffff;
    font-size: 18px;
    margin: 15px 0;
}

#math-problem-display {
    margin: 30px 0;
}

#math-answer {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #00d4ff;
    border-radius: 10px;
    color: #1a1a2e;
    font-weight: bold;
}

#math-answer:focus {
    outline: none;
    border-color: #ffd700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

#game-over h1 {
    color: #ff4757;
    font-size: 48px;
    margin-bottom: 20px;
    text-shadow: 0 0 10px #ff4757;
}

#victory h1 {
    color: #ffd700;
    font-size: 48px;
    margin-bottom: 20px;
    text-shadow: 0 0 10px #ffd700;
}

#instructions h2 {
    color: #00d4ff;
    font-size: 36px;
    margin-bottom: 20px;
}

#instructions p {
    font-size: 18px;
    margin: 10px 0;
    color: #ffffff;
}

button {
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 24px;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    margin-top: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
}

button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.6);
}

button:active {
    transform: scale(0.98);
}

#final-score, #victory-score {
    color: #ffd700;
    font-size: 36px;
    font-weight: bold;
}
