/* Pixel Bubble Shooter - Retro 8-bit Style */

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

body {
    background: #1a1a2e;
    font-family: 'Courier New', monospace;
    overflow: hidden;
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 10px;
}

.header {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 480px;
    margin-bottom: 10px;
    gap: 10px;
}

.score-panel, .level-panel {
    background: #16213e;
    border: 3px solid #0f3460;
    border-radius: 4px;
    padding: 8px 16px;
    text-align: center;
    flex: 1;
    box-shadow:
        4px 4px 0 #0f3460,
        inset -2px -2px 0 rgba(0,0,0,0.3),
        inset 2px 2px 0 rgba(255,255,255,0.1);
}

.score-label, .level-label {
    color: #888;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 4px;
}

.score-value, .level-value {
    color: #e94560;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 2px 2px 0 rgba(233, 69, 96, 0.3);
}

.canvas-wrapper {
    position: relative;
    border: 4px solid #0f3460;
    border-radius: 8px;
    box-shadow:
        8px 8px 0 rgba(15, 52, 96, 0.5),
        inset 0 0 20px rgba(0,0,0,0.5);
    background: #0f0f23;
    overflow: hidden;
}

#gameCanvas {
    display: block;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    image-rendering: -moz-crisp-edges;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 15, 35, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.overlay-content {
    text-align: center;
    padding: 20px;
    color: #fff;
}

.overlay-content h1 {
    font-size: 28px;
    margin-bottom: 10px;
    color: #e94560;
    text-shadow:
        3px 3px 0 #ff6b6b,
        6px 6px 0 rgba(233, 69, 96, 0.3);
    letter-spacing: 3px;
}

.overlay-content p {
    font-size: 14px;
    margin-bottom: 20px;
    color: #ccc;
}

.high-score {
    margin-bottom: 20px;
    padding: 10px;
    background: #16213e;
    border: 2px solid #0f3460;
    color: #ffd700;
    font-size: 12px;
}

.pixel-button {
    background: linear-gradient(180deg, #e94560 0%, #c73e54 100%);
    color: #fff;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow:
        0 6px 0 #8b2a3a,
        0 8px 10px rgba(0,0,0,0.4);
    transition: all 0.1s ease;
    position: relative;
    top: 0;
}

.pixel-button:hover {
    background: linear-gradient(180deg, #ff6b6b 0%, #e94560 100%);
}

.pixel-button:active {
    top: 6px;
    box-shadow:
        0 0 0 #8b2a3a,
        0 2px 5px rgba(0,0,0,0.4);
}

/* Responsive Design */
@media (max-width: 480px) {
    .game-container {
        padding: 5px;
    }

    .header {
        max-width: 100%;
        margin-bottom: 5px;
    }

    .score-panel, .level-panel {
        padding: 6px 10px;
    }

    .score-label, .level-label {
        font-size: 8px;
    }

    .score-value, .level-value {
        font-size: 18px;
    }

    .overlay-content h1 {
        font-size: 22px;
    }

    .pixel-button {
        padding: 12px 30px;
        font-size: 16px;
    }
}

@media (min-width: 768px) {
    .canvas-wrapper {
        border-width: 6px;
    }

    .score-panel, .level-panel {
        padding: 12px 24px;
    }

    .score-label, .level-label {
        font-size: 12px;
    }

    .score-value, .level-value {
        font-size: 32px;
    }
}

/* Loading animation */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}
