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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #87CEEB, #98FB98, #FFB6C1);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.game-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    max-height: 600px;
    background: linear-gradient(180deg, #87CEEB 0%, #98FB98 50%, #FFB6C1 100%);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.score-board {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.9);
    padding: 15px 20px;
    border-radius: 25px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.score-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    min-width: 120px;
}

.score-item:last-child {
    margin-bottom: 0;
}

.score-label {
    font-weight: bold;
    color: #333;
    font-size: 14px;
}

.score-value {
    font-size: 18px;
    font-weight: bold;
    color: #FF6B6B;
    margin-left: 10px;
}

#gameCanvas {
    width: 100%;
    height: 100%;
    display: block;
    cursor: pointer;
}

.game-overlay, .start-screen {
    position: absolute;
    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: 20;
}

.start-screen {
    background: rgba(0, 0, 0, 0.6);
}

.overlay-content, .start-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 300px;
    width: 90%;
}

.overlay-content h2, .start-content h1 {
    color: #333;
    margin-bottom: 20px;
    font-size: 28px;
}

.start-content h1 {
    font-size: 32px;
    color: #FF6B6B;
}

.overlay-content p, .start-content p {
    color: #666;
    margin-bottom: 30px;
    font-size: 16px;
}

button {
    background: linear-gradient(45deg, #FF6B6B, #FF8E53);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 16px rgba(255, 107, 107, 0.3);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(255, 107, 107, 0.4);
}

button:active {
    transform: translateY(0);
}

.hidden {
    display: none !important;
}

.form-row { margin: 10px 0 20px; }
.form-row input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #eee;
    border-radius: 12px;
    font-size: 14px;
}

.button-row { display: flex; gap: 10px; justify-content: center; margin-bottom: 15px; flex-wrap: wrap; }

.leaderboard-list {
    list-style: none;
    text-align: left;
    padding: 0;
    margin: 0 0 15px 0;
    max-height: 300px;
    overflow: auto;
}
.leaderboard-list li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed #eee; }

/* Mobile optimizations */
@media (max-width: 480px) {
    .game-container {
        border-radius: 0;
        max-width: 100%;
        max-height: 100vh;
    }
    
    .score-board {
        top: 15px;
        left: 15px;
        padding: 12px 16px;
    }
    
    .score-item {
        min-width: 100px;
    }
    
    .overlay-content, .start-content {
        padding: 30px 20px;
        margin: 20px;
    }
}



