@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 {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }
    .control-group, .stats {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
    }
}
/* Vegetable Blast 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 - Game Board */
.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;
}

.game-board-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    width: 100%;
}

.hint-bar {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hint-text {
    color: #444;
}

.game-board {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-template-rows: repeat(6, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
    max-width: 640px;
    aspect-ratio: 1;
    background: radial-gradient(1200px 800px at 10% 10%, #7aa2ff 0%, #667eea 35%, #5a54b0 100%);
    padding: 22px;
    border-radius: 26px;
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.35),
                inset 0 1px 0 rgba(255, 255, 255, 0.25),
                inset 0 -6px 18px rgba(0, 0, 0, 0.2);
    position: relative;
    backdrop-filter: saturate(130%) contrast(105%);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.cell {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
    background: linear-gradient(135deg, #fff5e1 0%, #ffe8c4 100%);
    border: 3px solid #ffb700;
    border-radius: 18px;
    cursor: pointer;
    transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.2s ease, filter 0.2s ease;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28),
                inset 0 1px 0 rgba(255, 255, 255, 0.45),
                inset 0 -3px 6px rgba(0, 0, 0, 0.12);
    user-select: none;
    position: relative;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.12));
    will-change: transform, box-shadow, filter;
}

.cell::before {
    content: '';
    position: absolute;
    top: 8%;
    left: 12%;
    width: 20%;
    height: 20%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.2));
    border-radius: 50%;
    filter: blur(2px);
    pointer-events: none;
}

.cell:hover {
    transform: translateY(-4px) scale(1.08);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.38),
                inset 0 1px 0 rgba(255, 255, 255, 0.55),
                inset 0 -3px 6px rgba(0, 0, 0, 0.12),
                0 0 20px rgba(255, 215, 0, 0.45);
    filter: saturate(115%);
}

.cell.selected {
    border-color: #ff1493;
    box-shadow: 0 0 24px rgba(255, 20, 147, 1),
                inset 0 1px 0 rgba(255, 255, 255, 0.45),
                inset 0 -3px 6px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px) scale(1.12);
    background: linear-gradient(135deg, #ffccee 0%, #ffb3e6 100%);
    animation: selectedPulse 0.5s ease-out;
}

.cell:active {
    transform: scale(0.92);
}

@keyframes selectedPulse {
    0% {
        box-shadow: 0 0 22px rgba(255, 20, 147, 0.6),
                    inset 0 1px 0 rgba(255, 255, 255, 0.5);
    }
    50% {
        box-shadow: 0 0 38px rgba(255, 20, 147, 1),
                    inset 0 1px 0 rgba(255, 255, 255, 0.4);
    }
    100% {
        box-shadow: 0 0 22px rgba(255, 20, 147, 0.8),
                    inset 0 1px 0 rgba(255, 255, 255, 0.45);
    }
}

@keyframes popVegetable {
    0% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
        filter: brightness(1);
    }
    40% {
        transform: scale(1.4) rotate(10deg);
        filter: brightness(1.3);
    }
    100% {
        transform: scale(0) rotate(360deg);
        opacity: 0;
        filter: brightness(0.5);
    }
}

@keyframes blastGlow {
    0% {
        filter: brightness(1) drop-shadow(0 0 5px rgba(255, 255, 255, 0.3));
    }
    30% {
        filter: brightness(1.5) drop-shadow(0 0 30px rgba(255, 215, 0, 1));
    }
    60% {
        filter: brightness(1.3) drop-shadow(0 0 20px rgba(255, 165, 0, 0.8));
    }
    100% {
        filter: brightness(1) drop-shadow(0 0 5px rgba(255, 255, 255, 0.3));
    }
}

@keyframes popBurst {
    0% {
        transform: scale(1);
        filter: brightness(1) drop-shadow(0 0 0 rgba(255, 215, 0, 1));
    }
    50% {
        filter: brightness(1.6) drop-shadow(0 0 40px rgba(255, 215, 0, 1));
    }
    100% {
        transform: scale(0.3);
        filter: brightness(0.3) drop-shadow(0 0 20px rgba(255, 165, 0, 0.3));
    }
}

@keyframes cellBlast {
    0% {
        background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
        box-shadow: 0 0 20px rgba(255, 215, 0, 1), 
                    0 0 40px rgba(255, 165, 0, 0.8),
                    inset 0 1px 0 rgba(255, 255, 255, 0.6);
        transform: scale(1);
    }
    50% {
        background: linear-gradient(135deg, #FFE135 0%, #FFB90F 100%);
        box-shadow: 0 0 40px rgba(255, 215, 0, 1),
                    0 0 80px rgba(255, 165, 0, 0.8),
                    inset 0 1px 0 rgba(255, 255, 255, 0.8);
        transform: scale(1.05);
    }
    100% {
        background: linear-gradient(135deg, #fff5e1 0%, #ffe8c4 100%);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25),
                    inset 0 1px 0 rgba(255, 255, 255, 0.4);
        transform: scale(1);
    }
}

@keyframes gridHighlight {
    0% {
        background: linear-gradient(135deg, #fff5e1 0%, #ffe8c4 100%);
        border-color: #ffb700;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25),
                    inset 0 1px 0 rgba(255, 255, 255, 0.4),
                    0 0 0 rgba(102, 126, 234, 0.5);
    }
    50% {
        background: linear-gradient(135deg, #e8d9ff 0%, #d9ccff 100%);
        border-color: #667eea;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25),
                    inset 0 1px 0 rgba(255, 255, 255, 0.4),
                    0 0 20px rgba(102, 126, 234, 0.8),
                    inset 0 0 10px rgba(102, 126, 234, 0.3);
    }
    100% {
        background: linear-gradient(135deg, #fff5e1 0%, #ffe8c4 100%);
        border-color: #ffb700;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25),
                    inset 0 1px 0 rgba(255, 255, 255, 0.4),
                    0 0 0 rgba(102, 126, 234, 0.5);
    }
}

.cell.pop {
    animation: popVegetable 0.5s cubic-bezier(0.36, 0, 0.66, -0.56) forwards,
               popBurst 0.5s ease-out forwards;
}

.cell.matched {
    animation: cellBlast 0.4s ease-out forwards;
}

.cell.highlight {
    animation: gridHighlight 0.4s ease-in-out forwards;
}

.cell.hint {
    outline: 3px dashed #ffcc00;
    outline-offset: -4px;
}

/* Hint button styling */
#hint-btn {
    background: linear-gradient(135deg, #ffd54f 0%, #ffb300 100%);
    color: #3d2c00;
    border: none;
    padding: 8px 14px;
    border-radius: 10px;
    font-weight: 600;
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
    transition: transform 0.1s ease, box-shadow 0.2s ease;
}

#hint-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.25);
}

#hint-btn:active {
    transform: translateY(0);
}

.moves-info {
    display: none;
}

.moves-label {
    display: none;
}

.moves-count {
    display: none;
}

/* Responsive Design */
@media (max-width: 1400px) {
    .game-board {
        width: 420px;
        height: 420px;
        gap: 6px;
        padding: 12px;
    }

    .cell {
        font-size: 32px;
        border-width: 2px;
    }
}

@media (max-width: 1024px) {
    .game-board {
        width: 360px;
        height: 360px;
        gap: 5px;
        padding: 10px;
    }

    .cell {
        font-size: 28px;
        border-width: 2px;
    }
}

@media (max-width: 768px) {
    .game-board {
        width: 300px;
        height: 300px;
        gap: 4px;
        padding: 8px;
    }

    .cell {
        font-size: 20px;
        border-width: 2px;
    }

    .left-panel {
        display: none;
    }

    .right-panel {
        display: none;
    }
}

/* Celebration Modal Styles */
.celebration-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.celebration-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    max-width: 500px;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.flowers {
    font-size: 40px;
    margin: 10px 0;
    animation: bounce 1s infinite;
}

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

.celebration-content h1 {
    font-size: 36px;
    color: white;
    margin: 20px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.celebration-content p {
    font-size: 18px;
    color: white;
    margin: 10px 0;
}

.celebration-stats {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    color: white;
}

.celebration-stats p {
    margin: 8px 0;
    font-size: 16px;
}

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

.play-again-btn {
    padding: 12px 30px;
    font-size: 16px;
    font-weight: bold;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
}

.play-again-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(245, 87, 108, 0.6);
}

.play-again-btn:active {
    transform: translateY(-1px);
}

/* Game Info Styles */
.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 {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.control-group label {
    color: white;
    font-weight: bold;
    font-size: 16px;
    white-space: nowrap;
}

.control-group select {
    padding: 8px 15px;
    border: 2px solid white;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    background: white;
    color: #667eea;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 150px;
}

.control-group select:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(255, 255, 255, 0.3);
}

.reset-btn {
    padding: 10px 25px;
    font-size: 16px;
    font-weight: bold;
    background: white;
    color: #667eea;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    flex-shrink: 0;
}

.reset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.4);
}

.stats {
    display: flex;
    gap: 50px;
    flex-shrink: 0;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
}

.stat-label {
    color: white;
    font-weight: bold;
    font-size: 16px;
    white-space: nowrap;
}

.stat-value {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 5px 15px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 18px;
    min-width: 60px;
    text-align: center;
}
