* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Arial', sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #70c5ce;
}

#game-container {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 600px;
    max-height: 800px;
    margin: 0 auto;
    overflow: hidden;
    touch-action: none;
}

#game-canvas {
    display: block;
    width: 100%;
    height: 100%;
    background: #70c5ce;
    cursor: pointer;
}

/* HUD */
#hud {
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    pointer-events: none;
    z-index: 10;
}

.score-display {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    padding: 0 20px;
}

.score-item {
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 16px;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    font-weight: bold;
}

.score-label {
    color: #888;
    font-size: 14px;
    margin-right: 5px;
}

#current-score, #distance, #time {
    color: #333;
    font-size: 18px;
}

/* Overlays */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.overlay.visible {
    display: flex;
}

.menu-panel {
    background: white;
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
    animation: slideIn 0.3s ease-out;
}

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

.menu-panel h1 {
    font-size: 48px;
    color: #333;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.instructions {
    font-size: 18px;
    color: #666;
    margin-bottom: 10px;
    font-weight: bold;
}

.instructions-detail {
    font-size: 14px;
    color: #999;
    margin-bottom: 30px;
}

.game-btn {
    background: linear-gradient(135deg, #FFA500, #FF6347);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 20px;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(255, 100, 0, 0.4);
    margin: 10px 0;
}

.game-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 100, 0, 0.6);
}

.game-btn:active {
    transform: translateY(0);
}

.controls-info {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #eee;
}

.controls-info p {
    font-size: 14px;
    color: #666;
    margin: 8px 0;
}

/* Stats */
.stats {
    margin: 30px 0;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 20px;
    margin: 8px 0;
    background: #f5f5f5;
    border-radius: 10px;
}

.stat-row.highlight {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    font-weight: bold;
}

.stat-label {
    color: #666;
    font-size: 16px;
}

.stat-row.highlight .stat-label {
    color: #fff;
}

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

.stat-row.highlight .stat-value {
    color: #fff;
    font-size: 20px;
}

/* Mobile optimizations */
@media (max-width: 600px) {
    .menu-panel {
        padding: 30px 20px;
    }
    
    .menu-panel h1 {
        font-size: 36px;
    }
    
    .score-display {
        gap: 10px;
    }
    
    .score-item {
        padding: 6px 12px;
    }
    
    .score-label {
        font-size: 12px;
    }
    
    #current-score, #distance, #time {
        font-size: 16px;
    }
}

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

