/* ============================================
   SONGBIRD — Whistle with the Forest | PNEUOMA
   Call birds with your whistle
   ============================================ */

:root {
    /* Forest Theme */
    --forest-dark: #1a2e1a;
    --forest-mid: #2d4a2d;
    --forest-light: #4a7a4a;
    --forest-glow: rgba(74, 122, 74, 0.3);
    
    /* Sky Colors */
    --sky-dawn: #ffecd2;
    --sky-day: #a8d8ea;
    --sky-dusk: #ffb7b2;
    
    /* Bird Colors */
    --bird-blue: #5da9e9;
    --bird-yellow: #ffd166;
    --bird-red: #ef6461;
    --bird-green: #7bc950;
    
    /* Accent */
    --accent-gold: #ffd700;
    --accent-glow: rgba(255, 215, 0, 0.4);
    
    /* Text */
    --text-light: #f8f4e8;
    --text-dark: #2d3b2d;
    --text-muted: rgba(248, 244, 232, 0.7);
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'SF Pro Rounded', 'Comic Sans MS', sans-serif;
    background: var(--forest-dark);
    color: var(--text-light);
    line-height: 1.5;
}

/* Game Container */
.game-container {
    width: 100%;
    height: 100vh;
    position: relative;
    overflow: hidden;
}

/* Navigation */
.game-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    z-index: 100;
    background: linear-gradient(180deg, rgba(26, 46, 26, 0.9) 0%, transparent 100%);
}

.back-link {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.back-link:hover {
    opacity: 1;
}

.birds-counter {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
}

.bird-icon {
    font-size: 1.2rem;
}

.bird-count {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent-gold);
}

/* Screens */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.screen.active {
    opacity: 1;
    visibility: visible;
}

/* ========== TITLE SCREEN ========== */
.title-screen {
    background: linear-gradient(180deg, var(--sky-dawn) 0%, var(--sky-day) 50%, var(--forest-mid) 100%);
}

.forest-bg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
}

.tree {
    position: absolute;
    bottom: 0;
    background: var(--forest-dark);
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.tree-1 {
    left: 5%;
    width: 120px;
    height: 250px;
    opacity: 0.6;
}

.tree-2 {
    left: 50%;
    transform: translateX(-50%);
    width: 180px;
    height: 350px;
}

.tree-3 {
    right: 10%;
    width: 100px;
    height: 220px;
    opacity: 0.7;
}

.floating-bird {
    position: absolute;
    font-size: 2rem;
    animation: bird-float 4s ease-in-out infinite;
}

.b1 {
    top: 15%;
    left: 20%;
    animation-delay: 0s;
}

.b2 {
    top: 25%;
    right: 25%;
    animation-delay: -1.5s;
}

.b3 {
    top: 35%;
    left: 40%;
    animation-delay: -3s;
}

@keyframes bird-float {
    0%, 100% { transform: translateY(0) rotate(-5deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

.title-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px;
}

.title-bird {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: title-bounce 2s ease-in-out infinite;
}

@keyframes title-bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.game-title {
    font-size: 4rem;
    font-weight: 700;
    color: var(--text-dark);
    text-shadow: 2px 2px 0 white;
    margin-bottom: 8px;
}

.game-tagline {
    font-size: 1.3rem;
    color: var(--forest-mid);
    margin-bottom: 30px;
}

.title-description {
    margin-bottom: 30px;
}

.title-description p {
    font-size: 1.1rem;
    color: var(--text-dark);
    opacity: 0.8;
    margin-bottom: 8px;
}

/* Buttons */
.btn-primary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 36px;
    background: linear-gradient(135deg, var(--forest-light) 0%, var(--forest-mid) 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 30px var(--forest-glow);
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px var(--forest-glow);
}

.btn-icon {
    font-size: 1.3rem;
}

.btn-secondary {
    display: inline-block;
    padding: 14px 28px;
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-dark);
    border: 2px solid var(--forest-mid);
    border-radius: 50px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.4);
}

.title-meta {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.meta-item {
    font-size: 0.85rem;
    color: var(--text-dark);
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 20px;
}

/* ========== MIC SCREEN ========== */
.mic-screen {
    background: linear-gradient(180deg, var(--sky-day) 0%, var(--forest-mid) 100%);
}

.mic-content {
    text-align: center;
    padding: 20px;
    max-width: 400px;
}

.mic-icon-large {
    font-size: 5rem;
    margin-bottom: 20px;
    animation: mic-pulse 2s ease-in-out infinite;
}

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

.mic-content h2 {
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.mic-content p {
    color: var(--forest-mid);
    margin-bottom: 30px;
}

.control-choice {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.mic-hint {
    font-size: 0.85rem;
    color: var(--forest-mid);
    opacity: 0.8;
}

/* ========== GAME SCREEN ========== */
.game-screen {
    background: linear-gradient(180deg, var(--sky-day) 0%, var(--forest-light) 100%);
}

#forestCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Pitch Indicator */
.pitch-indicator {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.pitch-bar {
    width: 20px;
    height: 200px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.pitch-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 0%;
    background: linear-gradient(180deg, var(--accent-gold), var(--bird-green));
    border-radius: 10px;
    transition: height 0.1s ease;
}

.pitch-marker {
    position: absolute;
    left: -5px;
    right: -5px;
    height: 4px;
    background: white;
    border-radius: 2px;
    bottom: 50%;
    box-shadow: 0 0 10px white;
    transition: bottom 0.1s ease;
}

.pitch-labels {
    display: flex;
    flex-direction: column;
    font-size: 0.7rem;
    color: var(--text-light);
    opacity: 0.7;
}

/* Note Display */
.note-display {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
}

.current-note {
    font-size: 3rem;
    color: var(--accent-gold);
    text-shadow: 0 0 20px var(--accent-glow);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.note-display.active .current-note {
    opacity: 1;
    animation: note-pop 0.3s ease;
}

@keyframes note-pop {
    0% { transform: scale(0.5); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Challenge Display */
.challenge-display {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    text-align: center;
    padding: 20px 30px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.challenge-display.visible {
    opacity: 1;
}

.challenge-text {
    font-size: 1rem;
    color: var(--forest-mid);
    margin-bottom: 10px;
}

.challenge-notes {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.challenge-note {
    width: 40px;
    height: 40px;
    background: var(--bird-yellow);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.challenge-note.matched {
    background: var(--bird-green);
    transform: scale(1.1);
}

/* Whistle Prompt */
.whistle-prompt {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.whistle-prompt.visible {
    opacity: 1;
}

.prompt-icon {
    font-size: 1.5rem;
    animation: note-wiggle 1s ease-in-out infinite;
}

@keyframes note-wiggle {
    0%, 100% { transform: rotate(-10deg); }
    50% { transform: rotate(10deg); }
}

.prompt-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--forest-mid);
}

/* ========== SUCCESS SCREEN ========== */
.success-screen {
    background: linear-gradient(180deg, var(--sky-dusk) 0%, var(--forest-mid) 100%);
}

.success-content {
    text-align: center;
    padding: 20px;
}

.success-birds {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.success-bird {
    font-size: 4rem;
    animation: success-dance 1s ease-in-out infinite;
}

.success-bird:nth-child(2) { animation-delay: 0.2s; }
.success-bird:nth-child(3) { animation-delay: 0.4s; }

@keyframes success-dance {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-15px) rotate(-10deg); }
    75% { transform: translateY(-15px) rotate(10deg); }
}

.success-title {
    font-size: 2.5rem;
    color: var(--text-light);
    margin-bottom: 10px;
}

.success-message {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.success-stats {
    display: flex;
    gap: 40px;
    justify-content: center;
    margin-bottom: 40px;
}

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

.stat-value {
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent-gold);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.success-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 600px) {
    .game-title {
        font-size: 2.5rem;
    }

    .pitch-indicator {
        right: 15px;
    }

    .pitch-bar {
        height: 150px;
    }

    .challenge-display {
        width: 90%;
        max-width: 350px;
    }
}

