:root {
    --primary: #FFD700;
    --primary-dark: #FFA500;
    --bg-gradient: linear-gradient(180deg, #4facfe 0%, #00f2fe 100%);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-color: #ffffff;
    --accent: #ff4757;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
}

#game-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--bg-gradient);
}

canvas {
    display: block;
    max-width: 100%;
    max-height: 100%;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.3);
}

/* Overlays */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(0px);
}

.overlay.active {
    opacity: 1;
    visibility: visible;
    backdrop-filter: blur(8px);
}

.content {
    text-align: center;
    padding: 2rem;
    border-radius: 24px;
    color: var(--text-color);
    max-width: 90%;
    width: 400px;
}

.content.glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

/* Typography & Buttons */
.title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -2px;
    background: linear-gradient(to bottom, #fff, #ffd700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.2));
}

.subtitle {
    font-size: 1.2rem;
    font-weight: 600;
    opacity: 0.8;
    margin-bottom: 2rem;
    letter-spacing: 2px;
}

.main-btn {
    padding: 1rem 2.5rem;
    font-size: 1.2rem;
    font-weight: 800;
    border: none;
    border-radius: 50px;
    background: #ffffff;
    color: #4facfe;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
}

.main-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.3);
}

.main-btn:active {
    transform: translateY(-2px);
}

/* HUD */
#hud {
    position: absolute;
    top: 20px;
    left: 0;
    width: 100%;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 5;
    pointer-events: none;
}

#current-score {
    font-size: 3rem;
    font-weight: 800;
    color: #fff;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
}

.icon-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.2s ease;
}

.icon-btn svg {
    width: 24px;
    height: 24px;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Scores Box */
.scores-box {
    margin: 2rem 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.score-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem 1.5rem;
    border-radius: 16px;
}

.label { font-weight: 600; opacity: 0.7; font-size: 0.9rem; }
.value { font-size: 1.8rem; font-weight: 800; }

/* Bird Preview Animation */
.bird-preview {
    width: 60px;
    height: 60px;
    margin: 0 auto 2rem;
    position: relative;
    animation: float 2s ease-in-out infinite;
    filter: drop-shadow(0 5px 15px rgba(255,215,0,0.4));
    background: #FFD700;
    border-radius: 50%;
}

.bird-preview::before {
    content: '';
    position: absolute;
    top: 15px; right: 10px;
    width: 15px; height: 15px;
    background: white;
    border-radius: 50%;
    box-shadow: inset 4px -2px 0 black;
}

.bird-preview::after {
    content: '';
    position: absolute;
    top: 25px; right: -10px;
    border-left: 15px solid #FF7F50;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    display: block;
}

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

/* Tutorial Animation */
.tutorial-gesture {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.pulse-circle {
    position: absolute;
    width: 60px;
    height: 60px;
    border: 2px solid white;
    border-radius: 50%;
    animation: tap-pulse 1.5s ease-out infinite;
}

.hand-icon {
    width: 40px;
    height: 40px;
    z-index: 2;
    animation: hand-move 1.5s ease-in-out infinite;
}

.tutorial-text {
    font-weight: 800;
    letter-spacing: 2px;
    text-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

@keyframes tap-pulse {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(2); opacity: 0; }
}

@keyframes hand-move {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(0.9); }
}

#tutorial-overlay {
    pointer-events: none;
}

/* Enhancements */
.glass {
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
