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

body {
    background: linear-gradient(45deg, #1a1a1a, #2d2d2d);
    font-family: 'Courier New', monospace;
    color: #00ff00;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-x: auto;
}

.speaker-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.speaker-body {
    position: relative;
    width: 600px;
    height: 500px;
    background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
    border-radius: 20px;
    border: 3px solid #444;
    box-shadow: 
        0 20px 40px rgba(0,0,0,0.5),
        inset 0 1px 0 rgba(255,255,255,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

.speaker-grille {
    width: 90%;
    height: 60px;
    background: 
        repeating-linear-gradient(
            90deg,
            #1a1a1a 0px,
            #1a1a1a 2px,
            transparent 2px,
            transparent 6px
        );
    border-radius: 10px;
    border: 1px solid #333;
}

.speaker-grille.top {
    margin-bottom: 10px;
}

.speaker-grille.bottom {
    margin-top: auto;
}

.jbl-logo {
    position: absolute;
    top: 15px;
    right: 25px;
    font-weight: bold;
    font-size: 16px;
    color: #ff6b00;
    text-shadow: 0 0 10px #ff6b00;
}

.display-screen {
    position: relative;
    width: 500px;
    height: 340px;
    background: #000;
    border-radius: 15px;
    border: 3px solid #333;
    overflow: hidden;
    box-shadow: 
        inset 0 0 20px rgba(0,0,0,0.8),
        0 0 20px rgba(0,255,0,0.2);
}

#gameCanvas {
    width: 100%;
    height: 100%;
    display: block;
    image-rendering: pixelated;
    filter: contrast(1.2) brightness(1.1);
}

.status-bar {
    position: absolute;
    top: 5px;
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #00ff00;
    background: rgba(0,0,0,0.7);
    padding: 2px 8px;
    border-radius: 10px;
    z-index: 10;
}

.game-overlay {
    position: absolute;
    top: 30px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    z-index: 5;
}

.score-display {
    font-size: 24px;
    font-weight: bold;
    color: #00ff00;
    text-shadow: 0 0 10px #00ff00;
    font-family: 'Courier New', monospace;
}

.divider {
    margin: 0 15px;
    opacity: 0.7;
}

.menu-overlay, .win-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20;
}

.menu-content, .win-content {
    background: linear-gradient(145deg, #1a3a1a, #0f2f0f);
    padding: 30px;
    border-radius: 15px;
    border: 2px solid #00ff00;
    box-shadow: 0 0 30px rgba(0,255,0,0.3);
    text-align: center;
}

.menu-content h3 {
    margin-bottom: 20px;
    color: #00ff00;
    text-shadow: 0 0 10px #00ff00;
}

.menu-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #333;
    cursor: pointer;
    transition: all 0.2s;
}

.menu-item:hover {
    background: rgba(0,255,0,0.1);
    transform: translateX(5px);
}

.win-content h2 {
    color: #00ff00;
    text-shadow: 0 0 20px #00ff00;
    margin-bottom: 20px;
    animation: pulse 1s infinite;
}

.win-score {
    font-size: 36px;
    margin: 20px 0;
    color: #00ff00;
}

.play-again-btn {
    background: linear-gradient(145deg, #0f4f0f, #0a3f0a);
    color: #00ff00;
    border: 2px solid #00ff00;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    transition: all 0.2s;
}

.play-again-btn:hover {
    background: linear-gradient(145deg, #1a6f1a, #0f5f0f);
    box-shadow: 0 0 15px rgba(0,255,0,0.5);
    transform: translateY(-2px);
}

.control-panel {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.control-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(145deg, #3a3a3a, #2a2a2a);
    border: 2px solid #555;
    color: #ccc;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.control-btn:hover {
    background: linear-gradient(145deg, #4a4a4a, #3a3a3a);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.4);
}

.power-btn {
    border-color: #ff6b00;
    color: #ff6b00;
}

.power-btn:hover {
    box-shadow: 0 6px 12px rgba(255,107,0,0.3);
}

.led-ring {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid #333;
    transition: all 0.3s;
}

.led-ring.blue {
    border-color: #00aaff;
    box-shadow: 0 0 20px #00aaff;
}

.led-ring.green {
    border-color: #00ff00;
    box-shadow: 0 0 20px #00ff00;
}

.touch-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 600px;
    gap: 20px;
}

.paddle-control {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.control-arrow {
    width: 60px;
    height: 40px;
    background: linear-gradient(145deg, #0f4f0f, #0a3f0a);
    border: 2px solid #00ff00;
    color: #00ff00;
    font-size: 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: monospace;
}

.control-arrow:hover, .control-arrow:active {
    background: linear-gradient(145deg, #1a6f1a, #0f5f0f);
    box-shadow: 0 0 15px rgba(0,255,0,0.5);
    transform: translateY(-2px);
}

.control-label {
    font-size: 12px;
    color: #00ff00;
    font-weight: bold;
}

.game-info {
    text-align: center;
}

.difficulty-indicator {
    background: rgba(0,0,0,0.8);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid #00ff00;
    color: #00ff00;
    font-size: 14px;
    font-weight: bold;
}

.footer {
    margin-top: 20px;
    text-align: center;
    font-size: 12px;
    color: #666;
}

.footer a {
    color: #ff6b00;
    text-decoration: none;
}

.footer a:hover {
    text-shadow: 0 0 5px #ff6b00;
}

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

/* Responsive design */
@media (max-width: 768px) {
    .speaker-body {
        width: 90vw;
        max-width: 500px;
        height: auto;
        padding: 15px;
    }
    
    .display-screen {
        width: 100%;
        height: 280px;
    }
    
    .touch-controls {
        flex-direction: column;
        gap: 15px;
    }
    
    .paddle-control {
        flex-direction: row;
        width: 100%;
        justify-content: space-around;
    }
    
    .control-arrow {
        width: 80px;
        height: 50px;
    }
    
    .control-panel {
        gap: 10px;
    }
    
    .control-btn {
        width: 45px;
        height: 45px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .speaker-body {
        width: 95vw;
        padding: 10px;
    }
    
    .display-screen {
        height: 240px;
    }
    
    .score-display {
        font-size: 20px;
    }
    
    .status-bar {
        font-size: 10px;
    }
}