/* ===== BIRD HUNTER – Game Styles ===== */
/* Inherits global CSS variables from ../../styles.css */

@import url('https://fonts.googleapis.com/css2?family=Righteous&family=DM+Sans:wght@400;600;700&display=swap');

:root {
    --bh-sky-top:    #0d1b3e;
    --bh-sky-mid:    #1a3a6e;
    --bh-sky-bottom: #2e6fa8;
    --bh-ground:     #2d5a1b;
    --bh-ground-top: #4a8c2a;
    --bh-primary:    #f59e0b;
    --bh-primary-glow: rgba(245, 158, 11, 0.4);
    --bh-danger:     #ef4444;
    --bh-success:    #22c55e;
    --bh-wood:       #92400e;
    --bh-wood-light: #b45309;
}

/* ── Container ─────────────────────────────────── */
.bh-container {
    max-width: 1200px;
    width: 100%;
    margin: 80px auto 20px auto;
    padding: 16px;
    background: linear-gradient(160deg, #0f172a 0%, #1e293b 100%);
    border-radius: 24px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.06);
    font-family: 'DM Sans', var(--font-body, system-ui), sans-serif;
    position: relative;
}

/* ── Header ─────────────────────────────────────── */
.bh-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.bh-header h1 {
    margin: 0;
    font-family: 'Righteous', var(--font-heading, sans-serif);
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #f59e0b 0%, #fde68a 50%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    filter: drop-shadow(0 0 8px rgba(245,158,11,0.4));
}

.bh-icon { font-size: 1.6rem; -webkit-text-fill-color: initial; filter: none; }

.bh-back-btn {
    padding: 9px 18px;
    background: rgba(51, 65, 85, 0.6);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    color: #e2e8f0;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    font-family: inherit;
    transition: all 0.25s ease;
    white-space: nowrap;
}
.bh-back-btn:hover {
    background: rgba(51,65,85,0.9);
    transform: translateX(-3px);
}

/* ── Stats Bar ───────────────────────────────────── */
.bh-stats-bar {
    display: flex;
    gap: 8px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 14px;
    padding: 10px 14px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.bh-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    min-width: 60px;
}

.bh-stat-label {
    font-size: 0.68rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.bh-stat-value {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--bh-primary);
    font-family: 'Righteous', sans-serif;
    line-height: 1.2;
}

/* ── Game Screen ─────────────────────────────────── */
.bh-screen {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: inset 0 0 40px rgba(0,0,0,0.5), 0 0 0 2px rgba(245,158,11,0.2);
}

#birdCanvas {
    display: block;
    width: 100%;
    aspect-ratio: 3/2;
    cursor: crosshair;
    border-radius: 18px;
    touch-action: none;
}

/* ── Controls Hint ───────────────────────────────── */
.bh-controls-hint {
    text-align: center;
    margin-top: 10px;
    font-size: 0.8rem;
    color: #475569;
    font-weight: 500;
}

/* ── Bottom Ad ───────────────────────────────────── */
.bh-bottom-ad {
    margin-top: 16px;
    text-align: center;
}

/* ══════════════════════════════════════════════════
   MODAL
══════════════════════════════════════════════════ */
.bh-modal {
    position: absolute;
    inset: 0;
    background: rgba(7, 15, 35, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    border-radius: 18px;
    animation: bh-fadeIn 0.3s ease;
}

.bh-modal.hidden { display: none; }

@keyframes bh-fadeIn {
    from { opacity: 0; transform: scale(0.97); }
    to   { opacity: 1; transform: scale(1); }
}

.bh-modal-box {
    background: linear-gradient(145deg, #1e293b, #0f172a);
    border: 1px solid rgba(245,158,11,0.25);
    border-radius: 22px;
    padding: 28px 24px;
    width: 90%;
    max-width: 380px;
    max-height: 90vh;
    overflow-y: auto;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 30px rgba(245,158,11,0.1);
}

.bh-modal-bird {
    font-size: 3rem;
    margin-bottom: 8px;
    animation: bh-float 2.5s ease-in-out infinite;
}

@keyframes bh-float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-8px); }
}

.bh-modal-box h2 {
    font-family: 'Righteous', sans-serif;
    font-size: 1.6rem;
    background: linear-gradient(135deg, #f59e0b, #fde68a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
}

.bh-modal-subtitle {
    color: #94a3b8;
    font-size: 0.9rem;
    margin-bottom: 18px;
}

/* ── Input Group ─────────────────────── */
.bh-input-group {
    text-align: left;
    margin-bottom: 16px;
}

.bh-input-group label {
    display: block;
    font-size: 0.82rem;
    color: #94a3b8;
    font-weight: 600;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.bh-input-group input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    color: #f1f5f9;
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.bh-input-group input:focus {
    border-color: var(--bh-primary);
    box-shadow: 0 0 0 3px var(--bh-primary-glow);
}

/* ── How to play ──────────────────────── */
.bh-how-to {
    background: rgba(15,23,42,0.6);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 18px;
    text-align: left;
}

.bh-how-to h3 {
    font-size: 0.85rem;
    color: var(--bh-primary);
    margin-bottom: 10px;
    font-family: 'Righteous', sans-serif;
    letter-spacing: 0.5px;
}

.bh-how-to ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.bh-how-to li {
    color: #94a3b8;
    font-size: 0.8rem;
    padding: 3px 0 3px 18px;
    position: relative;
    line-height: 1.4;
}

.bh-how-to li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--bh-primary);
    font-size: 0.75rem;
}

/* ── Buttons ─────────────────────────── */
.bh-btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #d97706, #f59e0b);
    border: none;
    border-radius: 14px;
    color: #0f172a;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Righteous', sans-serif;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: all 0.25s cubic-bezier(0.34,1.56,0.64,1);
    box-shadow: 0 4px 20px rgba(245,158,11,0.4);
    margin-bottom: 8px;
}
.bh-btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 30px rgba(245,158,11,0.55);
}
.bh-btn-primary:active {
    transform: translateY(0) scale(0.98);
}
.bh-btn-primary.hidden { display: none; }

.bh-btn-secondary {
    width: 100%;
    padding: 12px;
    background: rgba(51,65,85,0.7);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    color: #e2e8f0;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}
.bh-btn-secondary:hover {
    background: rgba(71,85,105,0.9);
}

/* ── Result Stats ─────────────────────── */
.bh-result-stats {
    display: flex;
    justify-content: space-around;
    background: rgba(15,23,42,0.6);
    border-radius: 12px;
    padding: 14px 10px;
    margin: 16px 0;
    gap: 8px;
}

.bh-result-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.bh-result-stat strong {
    font-family: 'Righteous', sans-serif;
    font-size: 1.3rem;
    color: var(--bh-primary);
}

.bh-modal-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ═════════════════════════════════════════════════
   HIT EFFECT overlay text
═════════════════════════════════════════════════ */
.bh-hit-fx {
    position: absolute;
    pointer-events: none;
    font-family: 'Righteous', sans-serif;
    font-size: 1.5rem;
    font-weight: 900;
    color: #fde68a;
    text-shadow: 0 0 10px rgba(245,158,11,0.8);
    animation: bh-floatUp 0.8s ease-out forwards;
    z-index: 50;
    white-space: nowrap;
}

@keyframes bh-floatUp {
    0%   { opacity: 1; transform: translateY(0) scale(1); }
    100% { opacity: 0; transform: translateY(-48px) scale(1.3); }
}

/* ═════════════════════════════════════════════════
   RESPONSIVE
═════════════════════════════════════════════════ */
@media (max-width: 640px) {
    .bh-container {
        margin-top: 70px;
        padding: 10px;
        border-radius: 16px;
    }

    .bh-header h1 { font-size: 1.35rem; }

    .bh-back-btn {
        padding: 7px 12px;
        font-size: 0.78rem;
    }

    .bh-stat-value { font-size: 1rem; }
    .bh-stat-label { font-size: 0.62rem; }

    .bh-modal-box {
        padding: 20px 16px;
        width: 92%;
    }

    .bh-modal-box h2 { font-size: 1.35rem; }
}

@media (max-width: 400px) {
    .bh-stats-bar { gap: 4px; padding: 8px 10px; }
    .bh-stat { min-width: 50px; }
}
