@media (max-width: 600px) {
    .game-layout {
        flex-direction: column !important;
        gap: 10px !important;
    }
    .left-panel, .right-panel, .game-board, .panel-card, .game-info {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box;
    }
    .panel-card h2 {
        font-size: 18px !important;
    }
    .panel-card h3 {
        font-size: 14px !important;
    }
    .game-board {
        width: 220px !important;
        height: 220px !important;
        gap: 2px !important;
        padding: 4px !important;
    }
    .game-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px 40px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    margin: 0;
    margin-bottom: 20px;
    gap: 30px;
    width: 100%;
    flex-wrap: wrap;
    }
    .control-group, .stats {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
    }
}
/* Bubble Shooter Game Styles */

/* Game Layout */
.game-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

/* Left Panel */
.left-panel {
    width: 280px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.panel-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.panel-card h2 {
    color: #667eea;
    font-size: 24px;
    margin: 0 0 10px 0;
    text-align: center;
}

.panel-card h3 {
    color: #667eea;
    font-size: 18px;
    margin: 0 0 15px 0;
}

.game-description {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin: 0;
}

.instructions-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.instructions-list li {
    padding: 10px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    font-size: 14px;
    border-left: 4px solid #667eea;
}

/* Middle Panel - Canvas */
.middle-panel {
    flex: 1;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 600px;
}

/* Right Panel - Ads */
.right-panel {
    width: 220px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ad-container {
    background: white;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    height: 150px;
}

.ad-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
}

/* Canvas Container */
.canvas-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    height: auto;
    background: white;
    border-radius: 8px;
    overflow: visible;
}

#bubbleCanvas {
    border: 3px solid #667eea;
    border-radius: 10px;
    background: linear-gradient(180deg, #87CEEB 0%, #E0F6FF 100%);
    cursor: crosshair;
    display: block;
    max-width: 100%;
}

/* Bubble styles */
.bubble {
    position: absolute;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.1s ease;
    box-shadow: 
        0 6px 16px rgba(0, 0, 0, 0.25),
        inset -3px -3px 8px rgba(0, 0, 0, 0.2),
        inset 3px 3px 8px rgba(255, 255, 255, 0.4);
}

.bubble::before {
    content: '';
    position: absolute;
    top: 10%;
    left: 10%;
    width: 25%;
    height: 25%;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.2));
    filter: blur(2px);
}

/* Bubble colors */
.bubble.red { 
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E8E 100%);
}

.bubble.blue { 
    background: linear-gradient(135deg, #4ECDC4 0%, #6FE7DD 100%);
}

.bubble.yellow { 
    background: linear-gradient(135deg, #FFD93D 0%, #FFE66D 100%);
}

.bubble.green { 
    background: linear-gradient(135deg, #95E1D3 0%, #B8F3E7 100%);
}

.bubble.purple { 
    background: linear-gradient(135deg, #AA96DA 0%, #C7B5E0 100%);
}

.bubble.orange { 
    background: linear-gradient(135deg, #F7A563 0%, #F7BB8A 100%);
}

/* Bubble hover effect */
.bubble:hover {
    transform: scale(1.1);
    filter: brightness(1.2);
}

/* Pop animation */
@keyframes pop {
    0% {
        transform: scale(1);
        opacity: 1;
        filter: brightness(1);
    }
    30% {
        transform: scale(1.3);
        opacity: 0.9;
        filter: brightness(1.3);
    }
    70% {
        transform: scale(0.8);
        opacity: 0.5;
        filter: brightness(1.1);
    }
    100% {
        transform: scale(0);
        opacity: 0;
        filter: brightness(0.8);
    }
}

@keyframes popParticle {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(0);
        opacity: 0;
    }
}

@keyframes popShockwave {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

.bubble.popping {
    animation: pop 0.5s cubic-bezier(0.36, 0, 0.66, -0.56) forwards;
}

/* Shooter cannon */
#bubbleShooter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.cannon-base {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #333 0%, #555 100%);
    border-radius: 50%;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset -2px -2px 5px rgba(0, 0, 0, 0.4),
        inset 2px 2px 5px rgba(255, 255, 255, 0.1);
}

.cannon-barrel {
    width: 8px;
    height: 60px;
    background: linear-gradient(90deg, #444 0%, #666 50%, #444 100%);
    border-radius: 4px;
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform-origin: center bottom;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Stats styling */
#score, #best-score, #timer {
    color: #FF6B6B;
    font-weight: bold;
    font-size: 1.3em;
}

/* Celebration modal adjustments */
#celebrationMessage {
    font-size: 1.1em;
    color: #fff;
    margin: 15px 0;
}

.celebration-stats {
    background: rgba(255, 255, 255, 0.2);
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
}

.celebration-stats p {
    margin: 8px 0;
    font-size: 1.05em;
    color: #fff;
}

.celebration-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
    flex-wrap: wrap;
}

.play-again-btn {
    padding: 14px 32px;
    font-size: 16px;
    font-weight: bold;
    background: white;
    color: #667eea;
    border: 2px solid white;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.play-again-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.4);
    background: #f0f4ff;
}

/* Responsive design */
@media (max-width: 1024px) {
    #bubbleCanvas {
        width: 500px;
        height: 600px;
    }
}

@media (max-width: 768px) {
    .middle-panel {
        min-height: 500px;
        padding: 15px;
    }
    
    #bubbleCanvas {
        width: 100%;
        height: auto;
    }
    
    .left-panel {
        width: 250px;
    }
    
    .right-panel {
        width: 180px;
    }
}
