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

body {
    background: #0a1628;
    font-family: 'Nunito', 'Segoe UI', sans-serif;
    overflow: hidden;
    height: 100vh; width: 100vw;
    color: white;
    user-select: none;
}

#input-video { position: fixed; left: -9999px; }

#game-canvas {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    display: block;
}

/* ─── MODAL ─────────────────────────────────────────────────── */
.game-modal {
    position: fixed; inset: 0; z-index: 300;
    display: flex; align-items: center; justify-content: center;
    background: rgba(5, 8, 22, 0.92);
}
.game-modal.hidden { display: none; }

.modal-content {
    text-align: center;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.13);
    border-radius: 28px;
    padding: 2rem 2.6rem;
    max-width: 460px; width: 92%;
    box-shadow: 0 24px 64px rgba(0,0,0,0.55);
    animation: modalIn 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    max-height: 94vh; overflow-y: auto;
}
@keyframes modalIn {
    from { opacity: 0; transform: scale(0.86) translateY(22px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-icon {
    font-size: 3rem; margin-bottom: 0.5rem;
    animation: iconBounce 2.2s ease-in-out infinite;
}
@keyframes iconBounce {
    0%,100% { transform: translateY(0); }
    50%     { transform: translateY(-8px); }
}

.modal-title {
    font-size: 2.2rem; font-weight: 900; letter-spacing: 4px;
    background: linear-gradient(135deg, #fff 30%, #38bdf8);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.modal-subtitle {
    font-size: 0.9rem; color: rgba(255,255,255,0.62);
    margin-bottom: 1.1rem; line-height: 1.75;
}

.control-diagram {
    display: flex; flex-direction: column; gap: 0.4rem;
    margin-bottom: 1rem; text-align: left;
}
.ctrl-item {
    display: flex; align-items: center; gap: 0.75rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px; padding: 0.45rem 0.85rem;
}
.ctrl-icon  { font-size: 1rem; width: 1.6rem; text-align: center; }
.ctrl-text  { flex: 1; color: rgba(255,255,255,0.65); font-size: 0.82rem; }
.ctrl-action { font-weight: 900; font-size: 0.82rem; color: #38bdf8; }

.keyboard-hint {
    font-size: 0.68rem; color: rgba(255,255,255,0.28);
    margin-bottom: 1rem;
}

.action-btn {
    display: flex; align-items: center; justify-content: center;
    gap: 0.6rem; width: 100%; padding: 0.95rem 2rem;
    background: linear-gradient(135deg, #0369a1, #0ea5e9);
    border: none; border-radius: 14px; color: white;
    font-family: 'Nunito', sans-serif;
    font-size: 1.15rem; font-weight: 900; letter-spacing: 3px; cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 4px 20px rgba(14,165,233,0.4);
}
.action-btn:hover { transform: scale(1.03); box-shadow: 0 0 30px rgba(14,165,233,0.7); }
.btn-icon { font-size: 1.2rem; }

.privacy-notice {
    margin-top: 0.75rem; font-size: 0.68rem;
    color: rgba(255,255,255,0.28);
    border-left: 2px solid rgba(255,255,255,0.1);
    padding-left: 0.75rem; text-align: left;
}

/* ─── HUD ───────────────────────────────────────────────────── */
#game-hud {
    position: fixed; inset: 0;
    pointer-events: none; z-index: 10;
    padding: 1rem 1.5rem;
    padding-right: 180px; /* Kamera Aktif badge için yer */
    display: flex; align-items: flex-start; justify-content: space-between;
}
#game-hud.hidden { display: none; }

/* Altitude bar */
#hud-left { display: flex; flex-direction: column; align-items: center; gap: 4px; }

#altitude-label {
    font-size: 0.52rem; letter-spacing: 2px;
    color: rgba(255,255,255,0.38); font-weight: 900;
}
#altitude-bar {
    width: 8px; height: 150px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 4px; position: relative;
}
#altitude-fill {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(0deg, #0284c7, #38bdf8);
    border-radius: 4px;
    transition: height 0.15s;
}
#altitude-marker {
    position: absolute; left: 12px;
    font-size: 0.7rem; color: white;
    transition: bottom 0.15s;
    white-space: nowrap;
}

/* Center */
#hud-center {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center;
}
#flight-time {
    font-size: 1.6rem; font-weight: 900;
    color: #fbbf24; letter-spacing: 3px;
}
#flight-label {
    font-size: 0.52rem; letter-spacing: 2px;
    color: rgba(255,255,255,0.32); font-weight: 900;
}
#score-display {
    font-size: 1.4rem; font-weight: 900;
    color: #34d399; letter-spacing: 2px;
    margin-top: 0.6rem;
    transition: transform 0.15s;
}
#score-display.bump { transform: scale(1.4); }
#score-label {
    font-size: 0.52rem; letter-spacing: 2px;
    color: rgba(255,255,255,0.32); font-weight: 900;
}

/* Control status */
#hud-right {
    position: fixed;
    top: 3.8rem;   /* Kamera Aktif badge'inin altı */
    right: 1.2rem;
    display: flex; flex-direction: column; align-items: center;
}
#control-status {
    display: flex; flex-direction: column; align-items: center;
    gap: 0.2rem; padding: 0.55rem 0.9rem;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.3);
    transition: all 0.25s;
}
#control-status.active {
    border-color: rgba(34,197,94,0.55);
    background: rgba(34,197,94,0.1);
    box-shadow: 0 0 16px rgba(34,197,94,0.2);
}
#status-icon { font-size: 1.5rem; }
#status-text {
    font-size: 0.58rem; letter-spacing: 1.5px; font-weight: 900;
    color: rgba(255,255,255,0.4);
}
#control-status.active #status-text { color: #86efac; }

/* ─── HAND DOT ──────────────────────────────────────────────── */
#hand-dot {
    position: fixed;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: rgba(251,191,36,0.85);
    border: 2px solid white;
    box-shadow: 0 0 12px rgba(251,191,36,0.6);
    transform: translate(-50%, -50%);
    pointer-events: none; z-index: 100;
    display: none;
    transition: background 0.15s, box-shadow 0.15s;
}
#hand-dot.active {
    background: rgba(34,197,94,0.9);
    box-shadow: 0 0 20px rgba(34,197,94,0.8);
    width: 22px; height: 22px;
}
