* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: #FFD700;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    overflow: hidden;
    -webkit-touch-callout: none;
    position: fixed;
    width: 100%;
    height: 100%;
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#game-canvas {
    display: block;
    max-width: 100%;
    max-height: 100%;
    touch-action: none;
    cursor: pointer;
}

/* UI Overlay */
#ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 10;
    pointer-events: none;
}

#score-display {
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 15px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.score-item {
    display: flex;
    gap: 8px;
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.label {
    color: #666;
}

#hearts-display {
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 15px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    gap: 5px;
    font-size: 24px;
}

.heart.lost {
    opacity: 0.2;
    filter: grayscale(100%);
}

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

.screen.hidden {
    display: none;
}

.screen h1 {
    color: #FFD700;
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.screen p {
    color: #fff;
    font-size: 1.2rem;
    margin: 10px 0;
}

.final-score {
    font-size: 1.5rem;
    font-weight: bold;
    color: #FFD700;
    margin: 20px 0;
}

.high-score-msg {
    color: #4CAF50;
    font-weight: bold;
}

.game-button {
    margin-top: 30px;
    padding: 18px 45px;
    font-size: 1.3rem;
    font-weight: bold;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    touch-action: manipulation;
    pointer-events: auto;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: rgba(102, 126, 234, 0.3);
    -webkit-appearance: none;
    appearance: none;
    min-height: 54px;
    position: relative;
    z-index: 1000;
}

.game-button:active {
    transform: scale(0.95);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Mobile specific */
@media (max-width: 768px) {
    .screen h1 {
        font-size: 2rem;
    }

    .screen p {
        font-size: 1rem;
    }

    .game-button {
        font-size: 1.1rem;
        padding: 12px 35px;
    }
}

/* Prevent pull-to-refresh on mobile */
body {
    overscroll-behavior: none;
}

/* Landscape mode adjustments */
@media (orientation: landscape) and (max-height: 500px) {
    .screen h1 {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }

    .screen p {
        font-size: 0.9rem;
        margin: 5px 0;
    }

    .game-button {
        margin-top: 15px;
        padding: 10px 30px;
    }
}
