:root {
    --primary-color: #00f7ff;
    --secondary-color: #ff00e6;
    --background-color: #0a0a20;
    --text-color: #ffffff;
    --accent-color: #ffcc00;
    --danger-color: #ff3860;
    --success-color: #48c774;
    --paddle-color: linear-gradient(90deg, #00f7ff, #ff00e6);
    --ball-color: #ffffff;
    --border-neon: 0 0 5px var(--primary-color), 0 0 10px var(--primary-color), 0 0 15px var(--primary-color);
}

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

body {
    font-family: 'Orbitron', sans-serif;
    background-color: black;
    color: var(--text-color);
    overflow: hidden;
    height: 100vh;
    background: radial-gradient(circle at center, #141452 0%, #0a0a20 70%, #050510 100%);
}

.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100vh;
    position: relative;
}

.canvas-container {
    position: relative;
    width: 800px;
    height: 600px;
    border: 2px solid var(--primary-color);
    border-radius: 5px;
    box-shadow: 0 0 10px var(--primary-color), inset 0 0 10px var(--primary-color);
    overflow: hidden;
}

#gameCanvas {
    width: 100%;
    height: 100%;
    background-color: var(--background-color);
}

.hud {
    display: flex;
    justify-content: space-between;
    width: 800px;
    padding: 10px 0;
    margin-bottom: 5px;
    color: var(--primary-color);
    font-weight: bold;
    text-shadow: 0 0 5px var(--primary-color);
}

.score-container, .lives-container, .level-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 5px 15px;
    border-radius: 5px;
    border: 1px solid var(--primary-color);
    box-shadow: var(--border-neon);
}

.score-label, .lives-label, .level-label {
    font-size: 14px;
    margin-bottom: 3px;
}

#score, #level {
    font-size: 24px;
    color: var(--text-color);
    text-shadow: 0 0 5px var(--primary-color);
}

#lives {
    display: flex;
    gap: 5px;
}

.life-icon {
    width: 15px;
    height: 15px;
    background-color: var(--danger-color);
    border-radius: 50%;
    box-shadow: 0 0 5px var(--danger-color);
}

/* Menus */
.game-menu {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(10, 10, 32, 0.9);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    min-width: 400px;
    backdrop-filter: blur(10px);
    border: 2px solid var(--primary-color);
    box-shadow: var(--border-neon);
    display: none;
    z-index: 10;
}

.game-menu h1, .game-menu h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px var(--primary-color);
}

.game-title {
    font-size: 36px;
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

.game-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), var(--secondary-color), transparent);
}

.game-subtitle {
    color: var(--secondary-color);
    margin-bottom: 30px;
    font-style: italic;
}

.neon-button {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 5px;
    padding: 10px 20px;
    font-family: 'Orbitron', sans-serif;
    font-size: 16px;
    margin: 10px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    outline: none;
    box-shadow: 0 0 5px var(--primary-color);
    position: relative;
    overflow: hidden;
}

.neon-button:hover {
    background-color: var(--primary-color);
    color: var(--background-color);
    box-shadow: 0 0 10px var(--primary-color), 0 0 20px var(--primary-color);
    transform: translateY(-2px);
}

.neon-button:active {
    transform: translateY(1px);
}

.neon-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.neon-button:hover::before {
    left: 100%;
}

.controls-info {
    margin-top: 30px;
    color: #aaa;
    font-size: 14px;
}

/* Power Up Indicator */
.power-up-indicator {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 20px;
    display: none;
    align-items: center;
    border: 1px solid var(--accent-color);
    box-shadow: 0 0 10px var(--accent-color);
    z-index: 5;
}

#powerUpName {
    color: var(--accent-color);
    font-weight: bold;
    margin-right: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#powerUpTimer {
    width: 50px;
    height: 5px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    overflow: hidden;
}

#powerUpTimer::before {
    content: '';
    display: block;
    height: 100%;
    width: 100%;
    background-color: var(--accent-color);
    animation: timerAnimation 10s linear forwards;
}

@keyframes timerAnimation {
    0% {
        width: 100%;
    }
    100% {
        width: 0%;
    }
}

/* Particles Container */
#particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

/* Animations */
@keyframes pulseNeon {
    0% {
        box-shadow: 0 0 5px var(--primary-color), 0 0 10px var(--primary-color);
    }
    50% {
        box-shadow: 0 0 10px var(--primary-color), 0 0 20px var(--primary-color), 0 0 30px var(--primary-color);
    }
    100% {
        box-shadow: 0 0 5px var(--primary-color), 0 0 10px var(--primary-color);
    }
}

/* Responsive design */
@media (max-width: 850px) {
    .canvas-container, .hud {
        width: 95%;
    }
    
    .game-menu {
        min-width: 300px;
        padding: 20px;
    }
    
    .game-title {
        font-size: 28px;
    }
    
    .neon-button {
        padding: 8px 16px;
        font-size: 14px;
    }
}

/* Special effects */
.brick-hit-effect {
    position: absolute;
    background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 3;
    animation: explode 0.5s forwards;
}

@keyframes explode {
    0% {
        opacity: 1;
        transform: scale(0);
    }
    100% {
        opacity: 0;
        transform: scale(3);
    }
}

.power-up {
    position: absolute;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    animation: powerUpFloat 3s linear forwards;
    z-index: 2;
}

@keyframes powerUpFloat {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    100% {
        transform: translateY(600px) rotate(360deg);
    }
}

.level-transition {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s;
}

.level-transition-text {
    font-size: 48px;
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--primary-color);
    animation: pulsateText 1.5s infinite;
}

@keyframes pulsateText {
    0% {
        opacity: 0.5;
        transform: scale(0.95);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    100% {
        opacity: 0.5;
        transform: scale(0.95);
    }
}
