* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    touch-action: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(to bottom, #2c3e50, #4a6580);
    color: #FFF;
    overflow: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#game-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    height: 80vh;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

#game-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="%238B4513"/><path d="M0 0L100 100M100 0L0 100" stroke="%23633E12" stroke-width="1"/></svg>');
    z-index: 1;
}

#ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.score-display {
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 32px;
    font-weight: bold;
    color: #FFD700;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
    z-index: 11;
}

.combo-display {
    position: absolute;
    top: 65px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 24px;
    color: #FFF;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
    z-index: 11;
}

#game-menu {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(90, 50, 20, 0.95);
    padding: 25px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7);
    border: 3px solid #FFD700;
    z-index: 20;
    width: 85%;
    max-width: 340px;
}

h1 {
    color: #FFD700;
    margin-bottom: 15px;
    font-size: 32px;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8);
    background: linear-gradient(to right, #FF8C00, #FFD700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

button {
    background: linear-gradient(to bottom, #FF8C00, #FF4500);
    color: white;
    border: none;
    border-radius: 30px;
    padding: 15px 30px;
    margin: 12px 0;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
    transition: all 0.2s;
    pointer-events: auto;
}

button:active {
    transform: scale(0.95);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
}

#game-over {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(90, 50, 20, 0.95);
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7);
    border: 3px solid #FFD700;
    z-index: 20;
    width: 85%;
    max-width: 340px;
}

#final-score {
    font-size: 32px;
    color: #FFD700;
    margin: 15px 0;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
}

.swipe-effect {
    position: absolute;
    pointer-events: none;
    background: radial-gradient(circle, rgba(255,215,0,0.8) 0%, rgba(255,140,0,0.4) 70%, transparent 100%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
}

#pause-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(255, 215, 0, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #5A3214;
    pointer-events: auto;
    z-index: 11;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.instructions {
    margin: 15px 0;
    font-size: 16px;
    color: #FFD700;
    line-height: 1.5;
}

.fruit {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 4;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.fruit-inner {
    width: 80%;
    height: 80%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    font-size: 24px;
}

.bomb {
    position: absolute;
    width: 50px;
    height: 50px;
    background: radial-gradient(circle at 30% 30%, #555, #000);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFD700;
    font-size: 24px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.5);
    z-index: 4;
}

.bomb-fuse {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 15px;
    background: linear-gradient(to bottom, #FF8C00, #FF4500);
    border-radius: 40% 40% 0 0;
}

.special-effect {
    position: absolute;
    top: 120px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 28px;
    font-weight: bold;
    color: #FFD700;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 12;
}

.fruit-slice {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transform: translate(-50%, -50%);
    z-index: 3;
    opacity: 0.9;
}

.juice {
    position: absolute;
    background: radial-gradient(circle, rgba(255,140,0,0.8) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

.combo-popup {
    position: absolute;
    font-size: 24px;
    font-weight: bold;
    color: #FFD700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    transform: translate(-50%, -50%);
    z-index: 6;
    opacity: 0;
    animation: comboPopup 1s ease-out;
}

@keyframes comboPopup {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
    50% { opacity: 1; transform: translate(-50%, -70%) scale(1.2); }
    100% { opacity: 0; transform: translate(-50%, -100%) scale(1); }
}

#lives-container {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    gap: 10px;
    z-index: 11;
}

.life {
    width: 30px;
    height: 30px;
    background: #FFD700;
    clip-path: polygon(50% 0%, 100% 35%, 82% 100%, 18% 100%, 0% 35%);
}

@media (max-height: 700px) {
    .score-display {
        top: 15px;
        font-size: 28px;
    }
    
    .combo-display {
        top: 55px;
        font-size: 20px;
    }
    
    h1 {
        font-size: 28px;
    }
    
    button {
        padding: 12px 25px;
        font-size: 18px;
    }
    
    #game-container {
        height: 85vh;
    }
}