/* ═════════════════════════════════════════════════════════ */
/* GLOBAL RESET */
/* ═════════════════════════════════════════════════════════ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ═════════════════════════════════════════════════════════ */
/* BODY & MAIN BACKGROUND */
/* ═════════════════════════════════════════════════════════ */
body {
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #0a0a1e 0%, #1a0a2e 50%, #0f0f24 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: Arial, sans-serif;
    overflow: hidden;
}

/* ═════════════════════════════════════════════════════════ */
/* ANIMATION - KEEP THIS SAFE */
/* ═════════════════════════════════════════════════════════ */
@keyframes livesPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.95;
        transform: scale(1.01);
    }
}

@keyframes timer-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

@keyframes titleFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

/* ═════════════════════════════════════════════════════════ */
/* HUD - TOP STATS BAR */
/* ═════════════════════════════════════════════════════════ */
#hud {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(6, 6, 26, 0.9);
    border-bottom: 1px solid rgba(0, 240, 255, 0.2);
    padding: 10px 0;
    display: flex;
    justify-content: center;
    gap: 60px;
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 2px;
    z-index: 50;
}

#level-display {
    color: #00f0ff;
    text-shadow: 0 0 10px #00f0ff;
    animation: livesPulse 2s ease-in-out infinite;
}

#score-display {
    color: #00ffaa;
    text-shadow: 0 0 10px #00ffaa;
    animation: livesPulse 2s ease-in-out infinite;
}

#timer-display {
    color: #ffd700;
    text-shadow: 0 0 10px #ffd700;
    animation: livesPulse 2s ease-in-out infinite;
}

#timer-display.timer-urgent {
    color: #ff3366;
    text-shadow: 0 0 10px #ff3366;
    animation: timer-blink 0.5s ease-in-out infinite;
}

#lives-display {
    color: #ff3366;
    text-shadow: 0 0 10px #ff3366;
    animation: livesPulse 2s ease-in-out infinite;
}

/* ═════════════════════════════════════════════════════════ */
/* MENU CONTAINER */
/* ═════════════════════════════════════════════════════════ */
.menu-container {
    background: rgba(6, 6, 26, 0.95);
    border: 1px solid #00f0ff;
    border-radius: 6px;
    padding: 40px 60px;
    text-align: center;
    z-index: 10;
}

/* ═════════════════════════════════════════════════════════ */
/* TITLE */
/* ═════════════════════════════════════════════════════════ */
.game-title {
    font-size: 48px;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 0 0 20px #00f0ff;
    letter-spacing: 8px;
    margin-bottom: 20px;
    animation: titleFloat 4s ease-in-out infinite;
}

/* ═════════════════════════════════════════════════════════ */
/* MENU ART */
/* ═════════════════════════════════════════════════════════ */
.menu-art {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
}

.mini-ball {
    width: 16px;
    height: 16px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 15px #00f0ff;
}

.mini-paddle {
    width: 90px;
    height: 10px;
    background: linear-gradient(to right, #0088ff, #00f0ff);
    border-radius: 5px;
    box-shadow: 0 0 10px #00f0ff;
}

/* ═════════════════════════════════════════════════════════ */
/* START BUTTON */
/* ═════════════════════════════════════════════════════════ */
.start-button {
    background: transparent;
    border: 2px solid #00f0ff;
    color: #00f0ff;
    padding: 12px 40px;
    font-size: 16px;
    font-weight: bold;
    letter-spacing: 4px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    margin: 15px 0;
}

.start-button:hover {
    background: #00f0ff;
    color: #06061a;
    transform: translateY(-2px);
}

/* ═════════════════════════════════════════════════════════ */
/* TUTORIAL */
/* ═════════════════════════════════════════════════════════ */
.tutorial {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #00f0ff;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.tut-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tut-sep {
    width: 1px;
    height: 20px;
    background: #00f0ff;
    opacity: 0.3;
}

.tut-keys {
    display: flex;
    gap: 4px;
}

kbd {
    background: transparent;
    border: 1px solid #00f0ff;
    color: #00f0ff;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
    min-width: 24px;
    text-align: center;
}

.key-wide {
    min-width: 60px;
}

.tut-icon {
    width: 14px;
    height: 14px;
    color: #00f0ff;
}

.tut-label {
    font-size: 11px;
    color: #00f0ff;
    letter-spacing: 2px;
    font-weight: bold;
}

/* ═════════════════════════════════════════════════════════ */
/* PAUSE BUTTON & ICONS */
/* ═════════════════════════════════════════════════════════ */
.pause-container {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 100;
    display: flex;
    gap: 8px;
}

#pause-btn,
.icon-btn {
    background: transparent;
    border: 1px solid #00f0ff;
    color: #00f0ff;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 2px;
    transition: all 0.2s;
}

#pause-btn:hover,
.icon-btn:hover {
    background: #00f0ff;
    color: #06061a;
}

.icon-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn.audio-off {
    opacity: 0.3;
}

/* ═════════════════════════════════════════════════════════ */
/* OVERLAYS (PAUSE, WIN, GAMEOVER) */
/* ═════════════════════════════════════════════════════════ */
#pause-overlay,
#win-overlay,
#gameover-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 200;
}

.overlay-content {
    background: rgba(6, 6, 26, 0.95);
    border: 1px solid #00f0ff;
    border-radius: 6px;
    padding: 40px 60px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.overlay-content h2 {
    font-size: 32px;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 0 0 20px #00f0ff;
    letter-spacing: 4px;
    text-transform: uppercase;
}

.win-title {
    color: #ffd700;
    text-shadow: 0 0 20px #ffd700;
}

.gameover-title {
    color: #ff3366;
    text-shadow: 0 0 20px #ff3366;
}

.final-score {
    font-size: 14px;
    color: #00f0ff;
    letter-spacing: 2px;
    font-weight: bold;
}

/* ═════════════════════════════════════════════════════════ */
/* BUTTONS */
/* ═════════════════════════════════════════════════════════ */
.resume-btn,
.restart-btn {
    background: transparent;
    border: 2px solid #00ffaa;
    color: #00ffaa;
    padding: 10px 30px;
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 2px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.resume-btn:hover {
    background: #00ffaa;
    color: #06061a;
}

.restart-btn {
    border-color: #ff3366;
    color: #ff3366;
}

.restart-btn:hover {
    background: #ff3366;
    color: #ffffff;
}

/* ═════════════════════════════════════════════════════════ */
/* AUDIO BUTTONS */
/* ═════════════════════════════════════════════════════════ */
.audio-row {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 10px 0;
}

.audio-toggle {
    background: transparent;
    border: 1px solid #6f6df0;
    color: #6f6df0;
    width: 70px;
    height: 70px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.2s;
}

.audio-toggle:hover {
    background: rgba(111, 109, 240, 0.1);
}

.audio-toggle.audio-off {
    opacity: 0.3;
}

.audio-toggle svg {
    width: 24px;
    height: 24px;
}

.audio-label {
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 1px;
}

/* ═════════════════════════════════════════════════════════ */
/* UTILITY */
/* ═════════════════════════════════════════════════════════ */
.hidden {
    display: none !important;
}

/* ═════════════════════════════════════════════════════════ */
/* GAME CONTAINER */
/* ═════════════════════════════════════════════════════════ */
#game-container {
    position: relative;
    width: 900px;
    height: 600px;
    background: #04040f;
    border: 2px solid #00f0ff;
    border-radius: 4px;
    margin-top: 44px;
}

/* ═════════════════════════════════════════════════════════ */
/* BRICKS */
/* ═════════════════════════════════════════════════════════ */
.bricks-container {
    position: absolute;
    top: 90px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.brick-row {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.brick {
    width: 85px;
    height: 30px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.brick-gap {
    width: 85px;
    height: 30px;
    visibility: hidden;
}

.red { background: linear-gradient(to bottom, #ff2244, #990022); box-shadow: 0 0 8px #ff2244; }
.yellow { background: linear-gradient(to bottom, #ffdd00, #997700); box-shadow: 0 0 8px #ffdd00; }
.blue { background: linear-gradient(to bottom, #0077ff, #003388); box-shadow: 0 0 8px #0077ff; }
.cyan { background: linear-gradient(to bottom, #00ddff, #005577); box-shadow: 0 0 8px #00ddff; }
.green { background: linear-gradient(to bottom, #00ff88, #006633); box-shadow: 0 0 8px #00ff88; }
.purple { background: linear-gradient(to bottom, #bb00ff, #550088); box-shadow: 0 0 8px #bb00ff; }
.orange { background: linear-gradient(to bottom, #ff8800, #993300); box-shadow: 0 0 8px #ff8800; }
.pink { background: linear-gradient(to bottom, #ff0099, #880044); box-shadow: 0 0 8px #ff0099; }

/* ═════════════════════════════════════════════════════════ */
/* PADDLE */
/* ═════════════════════════════════════════════════════════ */
#paddle {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 250px;
    height: 14px;
    background: linear-gradient(to right, #cccccc, #ffffff);
    border-radius: 7px;
    box-shadow: 0 0 15px #ffffff;
    transform: translateX(325px);
}

#paddle.paddle-multi {
    background: linear-gradient(to right, #0044cc, #4499ff, #00ccff);
    box-shadow: 0 0 15px #4499ff;
}

#paddle.paddle-fire {
    background: linear-gradient(to right, #cc2200, #ff6600, #ffcc00);
    box-shadow: 0 0 15px #ff6600;
}

/* ═════════════════════════════════════════════════════════ */
/* BALL */
/* ═════════════════════════════════════════════════════════ */
.ball {
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, #ffffff, #aaeeff);
    border-radius: 50%;
    box-shadow: 0 0 12px #00f0ff;
}

.ball.fire {
    background: radial-gradient(circle, #ffee44, #ff4400);
    box-shadow: 0 0 12px #ff6600;
}

/* ═════════════════════════════════════════════════════════ */
/* POWERUPS */
/* ═════════════════════════════════════════════════════════ */
@keyframes powerup-fall {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.powerup {
    position: absolute;
    top: 0;
    left: 0;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    animation: powerup-fall 0.6s ease-in-out infinite;
}

.powerup.multi {
    background: linear-gradient(135deg, #1a6fff, #00ccff);
    box-shadow: 0 0 15px #1a6fff;
}

.powerup.fire {
    background: linear-gradient(135deg, #ff3300, #ffaa00);
    box-shadow: 0 0 15px #ff5500;
}
