* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #74b9ff, #a29bfe);
    overflow: hidden;
    position: relative;
}

#fireworks-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

/* Main Card Style matching your reference */
.card {
    background: #ffffff;
    width: 100%;
    max-width: 500px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 10;
    position: relative;
}

.card h1 {
    text-align: center;
    color: #2d3436;
    font-size: 1.5rem;
}

/* Level Selection */
.levels {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.lvl-btn {
    flex: 1;
    padding: 8px;
    border: 2px solid #dfe6e9;
    background: #f5f6fa;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.lvl-btn.active {
    border-color: #0984e3;
    background: #74b9ff;
    color: white;
    box-shadow: 0 4px 10px rgba(116, 185, 255, 0.4);
}

/* Stats Row */
.stats {
    display: flex;
    gap: 10px;
}

.stat {
    flex: 1;
    background: #f1f2f6;
    padding: 10px;
    border-radius: 12px;
    text-align: center;
}

.stat .label {
    font-size: 0.75rem;
    color: #636e72;
    font-weight: bold;
    text-transform: uppercase;
}

.stat .value {
    font-size: 1.2rem;
    color: #2d3436;
    font-weight: bold;
}

/* Question/Play Box */
.question-box {
    background: #f8f9fa;
    border: 2px solid #dfe6e9;
    border-radius: 15px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#target-prompt {
    text-align: center;
    font-size: 1.1rem;
    font-weight: bold;
    color: #2d3436;
}

#target-letter {
    color: #e17055;
    font-size: 1.4rem;
}

#play-area {
    width: 100%;
    height: 350px;
    background: radial-gradient(circle, #ffffff 0%, #dfe6e9 100%);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    border: 1px solid #ced6e0;
}

/* Bubble Styling */
.bubble {
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
    box-shadow: inset -6px -6px 0px rgba(0, 0, 0, 0.2), 0 4px 10px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    user-select: none;
}

@keyframes floatUpCustom {
    0% {
        transform: translateY(370px) scale(0.8);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-80px) scale(1);
        opacity: 0;
    }
}

.pop {
    animation: popEffect 0.25s forwards ease-out !important;
}

@keyframes popEffect {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.5; }
    100% { transform: scale(0); opacity: 0; }
}

/* Overlay Screens */
.overlay-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(45, 52, 54, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    padding: 20px;
    z-index: 20;
}

.overlay-screen.hidden {
    display: none;
}

.overlay-screen h2 {
    font-size: 2rem;
    margin-bottom: 5px;
    color: #ffeaa7;
}

.overlay-screen p {
    font-size: 1rem;
    color: #dfe6e9;
}

/* Actions Button */
.actions {
    display: flex;
}

.action-btn {
    padding: 12px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.1s, background 0.2s;
}

.check-btn {
    background: #00b894;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 184, 148, 0.3);
}

.check-btn:hover {
    background: #00cec9;
}