@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: linear-gradient(45deg, #1a237e, #3f51b5, #1a237e);
    background-size: 400% 400%;
    animation: backgroundShift 10s ease infinite;
    color: white;
    overflow: hidden;
}

@keyframes backgroundShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.game-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.game-header {
    background: linear-gradient(135deg, #37474f, #546e7a);
    border-bottom: 2px solid #78909c;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.game-header h1 {
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
    text-align: center;
    padding: 8px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    background: linear-gradient(90deg, #1976d2, #2196f3, #1976d2);
    background-clip: text;
    -webkit-background-clip: text;
}

.menu-bar {
    display: flex;
    background: #455a64;
    border-top: 1px solid #607d8b;
}

.menu-item {
    padding: 8px 16px;
    cursor: pointer;
    border-right: 1px solid #607d8b;
    transition: all 0.2s;
}

.menu-item:hover {
    background: #546e7a;
    color: #81c784;
}

.game-main {
    display: flex;
    flex: 1;
    background: #263238;
}

#canvas {
    border: 3px solid #37474f;
    border-radius: 8px;
    margin: 10px;
    box-shadow: 
        inset 0 0 20px rgba(0,0,0,0.5),
        0 0 20px rgba(25, 118, 210, 0.3);
    background: radial-gradient(circle at center, #1a237e, #0d1656);
}

.score-panel {
    width: 250px;
    background: linear-gradient(135deg, #37474f, #455a64);
    border: 2px solid #546e7a;
    border-radius: 8px;
    margin: 10px 10px 10px 0;
    padding: 15px;
    box-shadow: 
        inset 0 0 20px rgba(0,0,0,0.3),
        0 0 15px rgba(25, 118, 210, 0.2);
}

.space-cadet-logo {
    text-align: center;
    margin-bottom: 20px;
    padding: 10px;
    background: radial-gradient(circle, #1a237e, #000051);
    border: 2px solid #3f51b5;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(63, 81, 181, 0.5);
}

.space-cadet-logo img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

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

.ball-counter, .player-score, .high-score {
    background: linear-gradient(135deg, #263238, #37474f);
    padding: 10px;
    border: 2px solid #455a64;
    border-radius: 6px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.3);
}

.label {
    display: block;
    font-size: 0.9rem;
    color: #81c784;
    text-shadow: 0 0 5px rgba(129, 199, 132, 0.5);
    margin-bottom: 5px;
}

.value, .score-value {
    display: block;
    font-size: 1.4rem;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    font-family: 'Orbitron', monospace;
    letter-spacing: 2px;
}

.score-value {
    font-size: 1.6rem;
    color: #ffeb3b;
    text-shadow: 0 0 15px rgba(255, 235, 59, 0.8);
}

.mission-status {
    background: linear-gradient(135deg, #1a237e, #283593);
    border: 2px solid #3f51b5;
    border-radius: 6px;
    padding: 15px;
    margin-top: 10px;
    box-shadow: 
        inset 0 0 15px rgba(0,0,0,0.5),
        0 0 10px rgba(63, 81, 181, 0.3);
}

.mission-text {
    font-size: 0.8rem;
    color: #e1bee7;
    text-align: center;
    line-height: 1.4;
    text-shadow: 0 0 8px rgba(225, 190, 231, 0.6);
}

.controls {
    background: linear-gradient(135deg, #37474f, #455a64);
    border-top: 2px solid #546e7a;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 -4px 8px rgba(0,0,0,0.3);
}

.control-info {
    display: flex;
    gap: 20px;
    font-size: 0.8rem;
    color: #b0bec5;
}

.controls button {
    background: linear-gradient(135deg, #1976d2, #2196f3);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Orbitron', monospace;
    font-weight: bold;
    transition: all 0.3s;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    margin-left: 10px;
}

.controls button:hover {
    background: linear-gradient(135deg, #1565c0, #1e88e5);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.4);
}

.game-menu, .game-over {
    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;
}

.menu-content, .game-over-content {
    background: linear-gradient(135deg, #263238, #37474f);
    border: 3px solid #546e7a;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 0 30px rgba(25, 118, 210, 0.5);
}

.menu-content h2, .game-over-content h2 {
    font-size: 2.5rem;
    margin-bottom: 30px;
    color: #81c784;
    text-shadow: 0 0 15px rgba(129, 199, 132, 0.8);
}

.menu-content button, .game-over-content button {
    display: block;
    width: 200px;
    margin: 15px auto;
    padding: 15px;
    background: linear-gradient(135deg, #1976d2, #2196f3);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-family: 'Orbitron', monospace;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.menu-content button:hover, .game-over-content button:hover {
    background: linear-gradient(135deg, #1565c0, #1e88e5);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.4);
}

.final-score {
    font-size: 1.5rem;
    margin: 20px 0;
    color: #ffeb3b;
    text-shadow: 0 0 15px rgba(255, 235, 59, 0.8);
}

.hidden {
    display: none !important;
}

/* Responsive design */
@media (max-width: 1024px) {
    .game-main {
        flex-direction: column;
    }
    
    .score-panel {
        width: 100%;
        margin: 10px;
        display: flex;
        flex-direction: row;
        gap: 20px;
    }
    
    .space-cadet-logo {
        flex: 1;
    }
    
    .score-display {
        flex: 2;
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    #canvas {
        margin: 10px;
        max-height: 60vh;
    }
    
    .control-info {
        flex-direction: column;
        gap: 5px;
    }
}

/* Retro CRT Effect */
@keyframes scanlines {
    0% { transform: translateY(-100vh); }
    100% { transform: translateY(100vh); }
}

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