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

body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-family: Arial, sans-serif;
}

.game-nav {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 100;
}

.back-link {
    color: white;
    text-decoration: none;
    font-size: 16px;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
    transition: background 0.3s;
}

.back-link:hover {
    background: rgba(0, 0, 0, 0.5);
}

.main-menu {
    text-align: center;
    color: white;
    padding: 40px 20px;
    max-width: 500px;
}

.main-menu h1 {
    font-size: 48px;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.menu-subtitle {
    font-size: 18px;
    margin-bottom: 40px;
    opacity: 0.9;
}

.menu-section {
    margin-bottom: 30px;
    text-align: center;
}

.menu-section label {
    display: block;
    font-size: 16px;
    margin-bottom: 10px;
    opacity: 0.9;
}

.menu-section select {
    padding: 10px 15px;
    font-size: 16px;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.menu-section select:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.menu-section select option {
    background-color: #667eea;
    color: white;
}

.unlock-hint {
    font-size: 14px;
    margin-top: 8px;
    opacity: 0.8;
    font-style: italic;
}

.start-button {
    padding: 15px 40px;
    font-size: 18px;
    background-color: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.start-button:hover {
    background-color: #764ba2;
    transform: scale(1.05);
}

.start-button:active {
    transform: scale(0.98);
}

.game-container {
    position: relative;
    width: 400px;
    height: 600px;
    background: linear-gradient(180deg, #87ceeb 0%, #e0f6ff 100%);
    border: 2px solid #333;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

#gameCanvas {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #87ceeb 0%, #e0f6ff 100%);
}

.start-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.start-content {
    text-align: center;
    color: white;
}

.start-content h1 {
    font-size: 48px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.start-content p {
    font-size: 18px;
    margin-bottom: 15px;
}

.start-content .instructions {
    font-size: 14px;
    opacity: 0.8;
}

.game-over-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;
}

.game-over-screen.hidden {
    display: none;
}

.game-over-content {
    text-align: center;
    color: white;
}

.game-over-content h1 {
    font-size: 48px;
    margin-bottom: 20px;
    color: #ff6b6b;
}

.game-over-content p {
    font-size: 24px;
    margin-bottom: 30px;
}

.unlocked-notification {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    border: 3px solid #FF8C00;
    animation: slideIn 0.5s ease-out;
}

.unlocked-notification.hidden {
    display: none;
}

.unlocked-notification p {
    color: white;
    margin: 5px 0;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.unlocked-notification p:first-child {
    font-size: 20px;
}

#unlockedBirdName {
    font-size: 18px;
}

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

.confetti-canvas {
    position: absolute;
    top: 0;
    left: 0;
    display: none;
}

.confetti-canvas.active {
    display: block;
}

#restartBtn, #backToMenuBtn {
    padding: 12px 30px;
    font-size: 18px;
    background-color: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin: 10px;
}

#restartBtn:hover, #backToMenuBtn:hover {
    background-color: #764ba2;
}

.score-display {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 24px;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    z-index: 5;
}

@media (max-width: 600px) {
    .game-container {
        width: 100vw;
        height: 100vh;
        border: none;
    }

    #gameCanvas {
        width: 100%;
        height: 100%;
    }
}
