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

body {
    font-family: 'Arial Rounded MT Bold', 'Helvetica Rounded', Arial, sans-serif;
    background: linear-gradient(to bottom, #87CEEB 0%, #E0F6FF 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    touch-action: none;
}

#game-container {
    width: 100%;
    max-width: 400px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

header {
    width: 100%;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 10;
}

h1 {
    font-size: 28px;
    color: white;
    text-shadow: 3px 3px 0 #2c3e50, -1px -1px 0 #2c3e50, 1px -1px 0 #2c3e50, -1px 1px 0 #2c3e50;
    letter-spacing: 2px;
}

#scores {
    display: flex;
    gap: 20px;
}

.score-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.score-label {
    font-size: 12px;
    color: #2c3e50;
    font-weight: bold;
}

#current-score, #high-score {
    font-size: 24px;
    color: white;
    text-shadow: 2px 2px 0 #2c3e50;
    font-weight: bold;
}

#settings-btn {
    background: rgba(255, 255, 255, 0.3);
    border: 2px solid white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    cursor: pointer;
    transition: transform 0.2s;
}

#settings-btn:hover {
    transform: scale(1.1);
}

#settings-panel {
    position: absolute;
    top: 70px;
    right: 20px;
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    z-index: 100;
    min-width: 200px;
}

#settings-panel.hidden {
    display: none;
}

#settings-panel h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.setting-row label {
    font-weight: bold;
    color: #2c3e50;
}

.toggle-btn {
    background: #5CBF3C;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 5px 15px;
    cursor: pointer;
    font-weight: bold;
}

.toggle-btn.off {
    background: #e74c3c;
}

#difficulty-select {
    padding: 5px 10px;
    border-radius: 8px;
    border: 2px solid #2c3e50;
    font-weight: bold;
    cursor: pointer;
}

#reset-highscore, #close-settings {
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    border: none;
    border-radius: 10px;
    background: #e74c3c;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

#close-settings {
    background: #3498db;
}

#reset-highscore:hover {
    background: #c0392b;
}

#close-settings:hover {
    background: #2980b9;
}

#canvas {
    display: block;
    width: 100%;
    max-width: 400px;
    height: 600px;
    background: linear-gradient(to bottom, #87CEEB 0%, #E0F6FF 70%);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    cursor: pointer;
}

.screen {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    max-width: 320px;
}

.screen.hidden {
    display: none;
}

.screen-content h2 {
    font-size: 36px;
    color: #2c3e50;
    margin-bottom: 20px;
    text-shadow: 2px 2px 0 #ecf0f1;
}

.pulse {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.instructions {
    font-size: 16px;
    color: #34495e;
    margin-bottom: 20px;
}

.motivation {
    font-size: 14px;
    color: #7f8c8d;
    font-style: italic;
}

#medal-container {
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#medal {
    font-size: 60px;
    margin-bottom: 10px;
}

#medal-text {
    font-size: 18px;
    font-weight: bold;
    color: #2c3e50;
}

.final-score {
    font-size: 24px;
    color: #2c3e50;
    margin: 20px 0;
    font-weight: bold;
}

.combo-message {
    font-size: 14px;
    color: #e67e22;
    font-weight: bold;
    margin-bottom: 15px;
    min-height: 20px;
}

#play-again-btn, #share-btn {
    width: 100%;
    padding: 15px 30px;
    margin: 10px 0;
    font-size: 18px;
    font-weight: bold;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

#play-again-btn {
    background: #5CBF3C;
    color: white;
}

#share-btn {
    background: #3498db;
    color: white;
}

#play-again-btn:hover, #share-btn:hover {
    transform: scale(1.05);
}

#play-again-btn:hover {
    background: #469C2B;
}

#share-btn:hover {
    background: #2980b9;
}

footer {
    margin-top: 20px;
    text-align: center;
    padding: 15px;
    color: #2c3e50;
    font-size: 14px;
}

footer a {
    color: #e74c3c;
    text-decoration: none;
    font-weight: bold;
}

footer a:hover {
    text-decoration: underline;
}

.bird-credit {
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 5px;
}

@media (max-width: 480px) {
    h1 {
        font-size: 22px;
    }
    
    #current-score, #high-score {
        font-size: 20px;
    }
    
    .screen {
        padding: 30px 20px;
        max-width: 280px;
    }
    
    .screen-content h2 {
        font-size: 28px;
    }
}