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

body {
    font-family: 'Courier New', monospace;
    background: linear-gradient(135deg, #1a0a2e, #16213e, #0f3460);
    color: #fff;
    overflow: hidden;
}

.game-container {
    display: flex;
    height: 100vh;
    background: radial-gradient(ellipse at center, rgba(120, 119, 198, 0.3), transparent);
}

.game-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

#canvas {
    border: 3px solid #4a4a6a;
    border-radius: 10px;
    box-shadow: 
        0 0 20px rgba(0, 255, 255, 0.3),
        inset 0 0 20px rgba(0, 0, 0, 0.5);
    background: linear-gradient(145deg, #0a0a2a, #1a1a4a);
    flex: 1;
}

.controls {
    margin-top: 15px;
    text-align: center;
}

.control-hint {
    color: #a0a0ff;
    font-size: 14px;
    text-shadow: 0 0 10px rgba(160, 160, 255, 0.5);
}

.side-panel {
    width: 300px;
    background: linear-gradient(180deg, #2a2a4a, #1a1a3a);
    border-left: 3px solid #4a4a6a;
    padding: 20px;
    box-shadow: inset 5px 0 15px rgba(0, 0, 0, 0.3);
}

.game-title {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.game-title h1 {
    font-size: 24px;
    background: linear-gradient(45deg, #ff6b9d, #c44dff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 5px;
}

.game-title h2 {
    font-size: 20px;
    background: linear-gradient(45deg, #4dff91, #44c7ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.astronaut-icon {
    font-size: 30px;
    margin-top: 10px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.score-display {
    background: linear-gradient(145deg, #1a1a1a, #2a2a2a);
    border: 2px inset #4a4a4a;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
}

.score-label {
    color: #00ff00;
    font-size: 12px;
    margin-bottom: 5px;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.7);
}

.score-value {
    font-size: 28px;
    color: #00ff00;
    background: #000;
    padding: 10px;
    border: 1px inset #333;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.8);
    letter-spacing: 2px;
}

.high-score {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 12px;
    color: #ffff00;
}

.ball-counter {
    background: linear-gradient(145deg, #1a1a1a, #2a2a2a);
    border: 2px inset #4a4a4a;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
}

.ball-label {
    color: #00ff00;
    font-size: 12px;
    margin-bottom: 5px;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.7);
}

.ball-number {
    font-size: 36px;
    color: #00ff00;
    text-shadow: 0 0 15px rgba(0, 255, 0, 0.8);
    margin-bottom: 10px;
}

.ball-indicator {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.ball-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #333;
    border: 1px solid #666;
}

.ball-dot.active {
    background: #00ff00;
    box-shadow: 0 0 8px rgba(0, 255, 0, 0.7);
}

.player-info {
    background: linear-gradient(145deg, #1a1a1a, #2a2a2a);
    border: 2px inset #4a4a4a;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
}

.player-label {
    color: #00aaff;
    font-size: 18px;
    text-shadow: 0 0 10px rgba(0, 170, 255, 0.6);
}

.mission-panel {
    background: linear-gradient(145deg, #1a1a1a, #2a2a2a);
    border: 2px inset #4a4a4a;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.mission-status {
    color: #ffaa00;
    font-size: 14px;
    text-align: center;
    margin-bottom: 15px;
    text-shadow: 0 0 8px rgba(255, 170, 0, 0.6);
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rank-display {
    text-align: center;
}

.rank-label {
    color: #ff6b9d;
    font-size: 12px;
    margin-bottom: 5px;
}

.rank-value {
    color: #ff6b9d;
    font-size: 16px;
    text-shadow: 0 0 8px rgba(255, 107, 157, 0.6);
}

.game-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.control-btn {
    background: linear-gradient(145deg, #3a3a5a, #2a2a4a);
    border: 2px outset #4a4a6a;
    color: #fff;
    padding: 12px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    cursor: pointer;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    transition: all 0.2s;
}

.control-btn:hover {
    background: linear-gradient(145deg, #4a4a6a, #3a3a5a);
    box-shadow: 0 0 15px rgba(100, 100, 200, 0.3);
}

.control-btn:active {
    border: 2px inset #4a4a6a;
    transform: translateY(1px);
}

.pause-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.pause-menu {
    background: linear-gradient(145deg, #2a2a4a, #1a1a3a);
    border: 3px solid #4a4a6a;
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.7);
}

.pause-menu h2 {
    color: #ff6b9d;
    font-size: 24px;
    margin-bottom: 30px;
    text-shadow: 0 0 10px rgba(255, 107, 157, 0.6);
}

.menu-btn {
    background: linear-gradient(145deg, #3a3a5a, #2a2a4a);
    border: 2px outset #4a4a6a;
    color: #fff;
    padding: 15px 30px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    cursor: pointer;
    margin: 5px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    transition: all 0.2s;
}

.menu-btn:hover {
    background: linear-gradient(145deg, #4a4a6a, #3a3a5a);
    box-shadow: 0 0 15px rgba(100, 100, 200, 0.5);
}

@media (max-width: 1200px) {
    .game-container {
        flex-direction: column;
    }
    
    .side-panel {
        width: 100%;
        height: auto;
        border-left: none;
        border-top: 3px solid #4a4a6a;
    }
    
    #canvas {
        height: 60vh;
    }
}

@keyframes glow {
    0%, 100% { text-shadow: 0 0 5px currentColor; }
    50% { text-shadow: 0 0 15px currentColor, 0 0 25px currentColor; }
}

.score-value, .ball-number {
    animation: glow 2s ease-in-out infinite alternate;
}