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

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
}

.game-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    padding: 30px;
    max-width: 900px;
    width: 100%;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px 20px;
    background: linear-gradient(45deg, #ff6b6b, #ff9ff3);
    border-radius: 15px;
    color: white;
}

.game-header-content {
    display: flex;
    gap: 30px;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.score-display, .timer-display, .combo-display-header {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timer-bar-container {
    margin: 20px 0 15px 0;
    padding: 0 20px;
}

.timer-bar-full {
    width: 100%;
    height: 12px;
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid #ced4da;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.timer-progress {
    height: 100%;
    background: linear-gradient(90deg, #4ade80 0%, #22c55e 30%, #fbbf24 70%, #ef4444 100%);
    border-radius: 4px;
    transition: width 1s linear;
    width: 100%;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
}

.timer-text {
    text-align: center;
    margin-top: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.label {
    font-size: 14px;
    font-weight: 500;
    opacity: 0.9;
    margin-bottom: 5px;
}

#score, #timer {
    font-size: 24px;
    font-weight: bold;
}

.start-btn {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    background: white;
    color: #ff6b6b;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.start-btn:hover {
    background: #ff6b6b;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.start-btn:disabled {
    background: #ccc;
    color: #666;
    cursor: not-allowed;
    transform: none;
}

.game-board-container {
    position: relative;
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    display: flex;
    justify-content: center;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.05);
}

#gameCanvas {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    background: white;
    cursor: crosshair;
    user-select: none;
    touch-action: none; /* Prevents default touch behaviors like scrolling */
    -webkit-touch-callout: none; /* Disables iOS callout */
    -webkit-tap-highlight-color: transparent; /* Removes tap highlight */
    max-width: 100%;
    height: auto;
}

.selection-box {
    position: absolute;
    border: 3px dashed #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
    pointer-events: none;
    display: none;
    border-radius: 5px;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { border-color: #ff6b6b; }
    50% { border-color: #ff9f43; }
    100% { border-color: #ff6b6b; }
}

.game-info {
    text-align: center;
    margin-top: 20px;
    padding: 15px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border-radius: 10px;
    font-weight: 500;
}

.apple {
    position: absolute;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    color: #2c3e50;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
    border: 3px solid #e55039;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.apple::before {
    content: '🍎';
    position: absolute;
    top: -5px;
    font-size: 10px;
    opacity: 0.5;
}

.apple:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.apple.selected {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.8);
    border-color: #ffd700;
    background: linear-gradient(135deg, #ffd700 0%, #ffb347 100%);
}


.game-over {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.game-over-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    max-width: 450px;
    width: 90%;
}

.game-over h2 {
    color: #ff6b6b;
    margin-bottom: 25px;
    font-size: 28px;
}

.final-stats {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    border: 2px solid #dee2e6;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 12px 0;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-label {
    font-weight: 600;
    color: #495057;
    font-size: 16px;
}

.stat-value {
    font-weight: bold;
    color: #2c3e50;
    font-size: 18px;
}

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

.share-btn {
    padding: 12px 20px;
    font-size: 16px;
    font-weight: bold;
    background: linear-gradient(45deg, #00d2ff, #3a7bd5);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.3);
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 210, 255, 0.4);
}

.restart-btn {
    padding: 12px 20px;
    font-size: 16px;
    font-weight: bold;
    background: linear-gradient(45deg, #ff6b6b, #ff9ff3);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.restart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.4);
}

@media (max-width: 768px) {
    .game-container {
        padding: 20px;
    }
    
    /* Game header will be overridden by mobile styles below */
    
    .apple {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .game-over-content {
        padding: 25px 20px;
        max-width: 95%;
    }
    
    .final-stats {
        padding: 15px;
    }
    
    .stat-item {
        margin: 10px 0;
        padding: 6px 0;
    }
    
    .stat-label {
        font-size: 14px;
    }
    
    .stat-value {
        font-size: 16px;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .share-btn, .restart-btn {
        width: 100%;
        padding: 15px;
        font-size: 16px;
    }
}

/* Shuffle Notification */
.shuffle-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2000;
    pointer-events: none;
    animation: shuffleAlert 2s ease-out forwards;
}

.shuffle-content {
    background: linear-gradient(45deg, #ff9500, #ffb347);
    color: white;
    padding: 20px 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(255, 149, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 18px;
    font-weight: 900;
    border: 3px solid #ff8c00;
}

.shuffle-icon {
    font-size: 24px;
    animation: spin 1s linear infinite;
}

.shuffle-text {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

@keyframes shuffleAlert {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0;
    }
    20% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 1;
    }
    30% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    80% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Skills Container */
.skills-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 15px 0;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
    border: 2px solid #dee2e6;
}

.skill-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
    position: relative;
    min-width: 80px;
}

.skill-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(108, 92, 231, 0.4);
    background: linear-gradient(135deg, #5f3dc4, #9775fa);
}

.skill-btn:disabled {
    background: linear-gradient(135deg, #adb5bd, #ced4da);
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.skill-icon {
    font-size: 24px;
    display: block;
}

.skill-text {
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
}

.skill-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    color: white;
    font-size: 12px;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 50%;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(255, 107, 107, 0.4);
}

/* Combo Display */
.combo-display-header {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#combo {
    font-size: 24px;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.combo-display {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1500;
    pointer-events: none;
}

.combo-content {
    background: linear-gradient(135deg, #ffd700, #ffb347);
    color: #2c3e50;
    padding: 15px 25px;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 900;
    border: 3px solid #f39c12;
    animation: comboAppear 0.8s ease-out;
}

.combo-icon {
    font-size: 24px;
    animation: bounce 0.6s ease-in-out infinite alternate;
}

@keyframes comboAppear {
    0% {
        transform: translateX(100%) scale(0.5);
        opacity: 0;
    }
    60% {
        transform: translateX(-10px) scale(1.1);
        opacity: 1;
    }
    100% {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

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

/* Bonus Display */
.bonus-display {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2000;
    pointer-events: none;
    animation: bonusShow 1.5s ease-out forwards;
}

.bonus-content {
    background: linear-gradient(135deg, #00d2ff, #3a7bd5);
    color: white;
    padding: 20px 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 210, 255, 0.5);
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 24px;
    font-weight: 900;
    border: 3px solid #0984e3;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.bonus-icon {
    font-size: 32px;
    animation: rotate 2s linear infinite;
}

@keyframes bonusShow {
    0% {
        transform: translate(-50%, -50%) scale(0.3);
        opacity: 0;
    }
    30% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 1;
    }
    60% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
    }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Bomb Explosion Display */
.bomb-explosion-display {
    position: fixed;
    z-index: 2500;
    pointer-events: none;
    animation: bombExplosionShow 1.5s ease-out forwards;
}

.bomb-explosion-content {
    background: linear-gradient(135deg, #ff6b6b, #fd79a8);
    color: white;
    padding: 8px 12px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 900;
    border: 2px solid #e84393;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.bomb-explosion-icon {
    font-size: 20px;
    animation: explode 0.8s ease-out;
}

.bomb-explosion-text {
    font-size: 14px;
}

@keyframes bombExplosionShow {
    0% {
        transform: translate(-50%, -50%) scale(0.3);
        opacity: 0;
    }
    20% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 1;
    }
    40% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    80% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(0.6);
        opacity: 0;
    }
}

@keyframes explode {
    0% { transform: scale(1); }
    30% { transform: scale(1.5) rotate(15deg); }
    60% { transform: scale(1.2) rotate(-10deg); }
    100% { transform: scale(1) rotate(0deg); }
}

/* Apple Effect Display */
.apple-effect-display {
    position: fixed;
    z-index: 2400;
    pointer-events: none;
    animation: appleEffectShow 1.2s ease-out forwards;
}

.apple-effect-content {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 10px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 900;
    border: 1px solid rgba(255, 255, 255, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.apple-effect-icon {
    font-size: 14px;
}

.apple-effect-text {
    font-size: 11px;
}

@keyframes appleEffectShow {
    0% {
        transform: translate(-50%, -100%) scale(0.5);
        opacity: 0;
    }
    20% {
        transform: translate(-50%, -100%) scale(1.2);
        opacity: 1;
    }
    30% {
        transform: translate(-50%, -100%) scale(1);
        opacity: 1;
    }
    70% {
        transform: translate(-50%, -100%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -100%) scale(0.8);
        opacity: 0;
    }
}

/* Special Apple Styles */
.apple.golden {
    background: linear-gradient(135deg, #ffd700 0%, #ffb347 100%);
    border-color: #f39c12;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.6), 0 0 20px rgba(255, 215, 0, 0.3);
    animation: goldGlow 2s ease-in-out infinite alternate;
}

.apple.golden::before {
    content: '✨';
}

.apple.time {
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    border-color: #2980b9;
    box-shadow: 0 4px 15px rgba(116, 185, 255, 0.6), 0 0 20px rgba(116, 185, 255, 0.3);
    animation: timeGlow 1.5s ease-in-out infinite alternate;
}

.apple.time::before {
    content: '⏰';
}

.apple.wild {
    background: linear-gradient(135deg, #a29bfe 0%, #6c5ce7 100%);
    border-color: #5f3dc4;
    box-shadow: 0 4px 15px rgba(162, 155, 254, 0.6), 0 0 20px rgba(162, 155, 254, 0.3);
    animation: wildGlow 1.8s ease-in-out infinite alternate;
}

.apple.wild::before {
    content: '🌟';
}

.apple.bomb {
    background: linear-gradient(135deg, #fd79a8 0%, #e84393 100%);
    border-color: #d63031;
    box-shadow: 0 4px 15px rgba(253, 121, 168, 0.6), 0 0 20px rgba(253, 121, 168, 0.3);
    animation: bombPulse 1s ease-in-out infinite alternate;
}

.apple.bomb::before {
    content: '💥';
}

@keyframes goldGlow {
    0% { box-shadow: 0 4px 15px rgba(255, 215, 0, 0.6), 0 0 20px rgba(255, 215, 0, 0.3); }
    100% { box-shadow: 0 6px 20px rgba(255, 215, 0, 0.8), 0 0 30px rgba(255, 215, 0, 0.5); }
}

@keyframes timeGlow {
    0% { box-shadow: 0 4px 15px rgba(116, 185, 255, 0.6), 0 0 20px rgba(116, 185, 255, 0.3); }
    100% { box-shadow: 0 6px 20px rgba(116, 185, 255, 0.8), 0 0 30px rgba(116, 185, 255, 0.5); }
}

@keyframes wildGlow {
    0% { box-shadow: 0 4px 15px rgba(162, 155, 254, 0.6), 0 0 20px rgba(162, 155, 254, 0.3); }
    100% { box-shadow: 0 6px 20px rgba(162, 155, 254, 0.8), 0 0 30px rgba(162, 155, 254, 0.5); }
}

@keyframes bombPulse {
    0% { 
        box-shadow: 0 4px 15px rgba(253, 121, 168, 0.6), 0 0 20px rgba(253, 121, 168, 0.3);
        transform: scale(1);
    }
    100% { 
        box-shadow: 0 6px 20px rgba(253, 121, 168, 0.8), 0 0 30px rgba(253, 121, 168, 0.5);
        transform: scale(1.05);
    }
}

/* Hint Highlight */
.apple.hint-highlight {
    animation: hintPulse 1s ease-in-out 3;
}

@keyframes hintPulse {
    0% { 
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(255, 215, 0, 0);
        transform: scale(1.1);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0);
        transform: scale(1);
    }
}

/* Apple Legend */
.apple-legend {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
    padding: 20px;
    margin: 15px 0;
    border: 2px solid #dee2e6;
}

.apple-legend h3 {
    color: #495057;
    text-align: center;
    margin-bottom: 15px;
    font-size: 18px;
}

.legend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.legend-apple-img {
    width: 35px;
    height: 35px;
    object-fit: contain;
    flex-shrink: 0;
}

.legend-text {
    font-size: 14px;
    color: #495057;
    font-weight: 500;
}

/* Main wrapper for game and ads */
.main-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

/* Sidebar Ads (Desktop Only) */
.sidebar-ad {
    display: none;
    width: 160px;
    min-height: 600px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 20px;
}

/* Show sidebar ads only on desktop screens */
@media (min-width: 1280px) {
    .sidebar-ad {
        display: block;
    }
    
    .game-container {
        max-width: 900px;
        flex-shrink: 0;
    }
}

/* Hide ads on smaller screens */
@media (max-width: 1279px) {
    .main-wrapper {
        justify-content: center;
    }
    
    .sidebar-ad {
        display: none;
    }
}

/* Ensure ads are responsive */
.sidebar-ad .adsbygoogle {
    width: 100%;
    height: auto;
    min-height: 250px;
}

/* Mobile Responsive Updates */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .game-container {
        max-width: 100%;
        padding: 15px;
    }
    
    .game-header {
        flex-direction: column !important;
        justify-content: center;
        align-items: center;
        padding: 10px 15px;
        gap: 8px;
        position: relative;
    }
    
    .game-header-content {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        gap: 8px;
    }
    
    .score-display, .timer-display, .combo-display-header {
        min-width: auto;
        flex: 1;
        text-align: center;
    }
    
    .score-display .label, .timer-display .label, .combo-display-header .label {
        font-size: 12px;
        margin-bottom: 2px;
    }
    
    #score, #timer, #combo {
        font-size: 18px;
    }
    
    .start-btn {
        position: relative;
        top: 0;
        right: 0;
        padding: 8px 16px;
        font-size: 14px;
        margin-top: 5px;
        width: auto;
        min-width: 80px;
    }
    
    .game-board-container {
        padding: 10px;
    }
    
    #gameCanvas {
        max-width: 100%;
        height: auto;
        border-radius: 8px;
    }
    
    .skills-container {
        gap: 8px;
        padding: 10px;
        margin: 10px 0;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .skill-btn {
        min-width: 60px;
        padding: 8px 12px;
    }
    
    .skill-icon {
        font-size: 20px;
    }
    
    .skill-text {
        font-size: 10px;
    }
    
    .skill-count {
        top: -6px;
        right: -6px;
        font-size: 10px;
        padding: 2px 6px;
        min-width: 16px;
        height: 16px;
    }
    
    .combo-display {
        top: 10px;
        right: 10px;
    }
    
    .combo-content {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .bonus-content {
        padding: 15px 20px;
        font-size: 18px;
    }
    
    .apple-legend {
        padding: 15px;
        margin: 10px 0;
    }
    
    .apple-legend h3 {
        font-size: 16px;
    }
    
    .legend-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .legend-item {
        padding: 6px 10px;
    }
    
    .legend-apple {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
    
    .legend-text {
        font-size: 12px;
    }
}

/* Extra small screens (phones) */
@media (max-width: 480px) {
    body {
        padding: 5px;
        min-height: 100vh;
    }
    
    .game-container {
        padding: 8px;
        min-height: auto;
    }
    
    .game-board-container {
        padding: 5px;
        overflow: auto;
    }
    
    .game-header {
        padding: 8px 12px;
        font-size: 12px;
        gap: 6px;
    }
    
    .score-display .label, .timer-display .label, .combo-display-header .label {
        font-size: 10px;
        margin-bottom: 1px;
    }
    
    #score, #timer, #combo {
        font-size: 16px;
    }
    
    .start-btn {
        top: 0;
        padding: 6px 12px;
        font-size: 12px;
        margin-top: 3px;
    }
    
    .skills-container {
        gap: 6px;
        padding: 8px;
    }
    
    .skill-btn {
        min-width: 50px;
        padding: 6px 8px;
    }
    
    .skill-text {
        font-size: 9px;
    }
    
    .apple-legend {
        padding: 10px;
    }
    
    .apple-legend h3 {
        font-size: 14px;
    }
    
    .legend-item {
        padding: 4px 8px;
    }
    
    .legend-apple {
        width: 25px;
        height: 25px;
        font-size: 10px;
    }
    
    .legend-text {
        font-size: 11px;
    }
    
    .game-info p {
        font-size: 14px;
        padding: 10px;
    }
}

