body { font-family: 'Quicksand', sans-serif; }

/* ==========================================================
   Noos Glide - assets/css/glide.css
   ========================================================== */
:root {
    --glide-bg: #f0f9ff;
    --glide-accent: #38bdf8;
    --glide-accent-dark: #0ea5e9;
    --glide-ink: #1e293b;
    --glide-muted: #64748b;
    --glide-gold: #f59e0b;
}

body {
    margin: 0;
    background: var(--glide-bg);
    touch-action: manipulation;
}

/* A class rule with its own display beats the UA [hidden] rule, so force it. */
[hidden] { display: none !important; }

/* Arcade games use the Options panel for bug reports, never the floating pill. */
#beta-report-trigger { display: none !important; }

.glide-page { padding-bottom: 16px; }

.glide-stats {
    color: var(--glide-ink);
    margin: 12px 0 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 13px;
    text-align: center;
}

.glide-mode-badge {
    display: inline-block;
    margin-left: 10px;
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--glide-accent);
    color: #fff;
    font-size: 11px;
    letter-spacing: 1.5px;
    vertical-align: 1px;
}
.glide-mode-badge.is-daily { background: var(--glide-gold); }

/* ---------- Stage (size is set by js/glide.js so the 5:8 world never distorts) ---------- */
.glide-stage {
    position: relative;
    width: min(100%, 360px);
    height: 576px;
    margin: 0 auto;
    border-radius: 20px;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.1);
    box-sizing: border-box;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    background: #0369a1;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

#gameCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 1;
}

/* ---------- HUD ---------- */
.ui-layer {
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
}

.score-wrap { position: absolute; top: 14px; left: 18px; }

.score {
    display: flex;
    gap: 8px;
    align-items: baseline;
    color: #fff;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
.score-label { font-size: 15px; opacity: 0.9; text-transform: uppercase; letter-spacing: 1px; }
#scoreDiv { font-size: 32px; display: inline-block; }
#scoreDiv.pop { animation: glideScorePop 0.18s ease-out; }

.hud-btns { position: absolute; top: 12px; right: 12px; display: flex; gap: 8px; }

.hud-btn {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    border: 2px solid #fff;
    border-radius: 50%;
    color: #fff;
    font-size: 17px;
    cursor: pointer;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.2s;
}
.hud-btn:hover { background: rgba(255, 255, 255, 0.4); }

.glide-ready {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 16%;
    z-index: 6;
    text-align: center;
    color: #fff;
    font-weight: 700;
    letter-spacing: 2px;
    font-size: 15px;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
    pointer-events: none;
    animation: glidePulse 1.6s ease-in-out infinite;
}

/* ---------- Countdown ---------- */
#countdown-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 15;
    pointer-events: none;
}
#countdown-number {
    font-size: 100px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    animation: glidePulse 1s infinite;
}

/* ---------- Panels (start / options / pause) ---------- */
.glide-panel {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.84);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    overflow-y: auto;
    padding: 18px;
    box-sizing: border-box;
    text-align: center;
}
.glide-panel-inner { margin: auto; width: 100%; max-width: 300px; }
.glide-panel h1, .glide-panel h2 { color: var(--glide-ink); margin: 0 0 8px; }
.glide-panel p { color: var(--glide-muted); margin: 0 0 18px; font-size: 14px; line-height: 1.45; }

.glide-btn {
    display: block;
    width: 100%;
    margin: 0 0 10px;
    padding: 14px 20px;
    border: none;
    border-radius: 50px;
    background: var(--glide-accent);
    color: #fff;
    font: 700 18px 'Quicksand', sans-serif;
    cursor: pointer;
    transition: transform 0.2s ease;
}
.glide-btn:hover { transform: scale(1.03); }
.glide-btn:active { transform: scale(0.98); }
.glide-btn.is-daily { background: linear-gradient(135deg, #f59e0b, #f97316); }
.glide-btn.is-secondary {
    background: #fff;
    color: var(--glide-ink);
    border: 2px solid #cbd5e1;
    font-size: 16px;
    padding: 11px 18px;
}
.glide-btn small { display: block; font-size: 12px; font-weight: 600; opacity: 0.9; margin-top: 2px; }

.glide-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 4px;
    border-bottom: 1px solid #e2e8f0;
    color: var(--glide-ink);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-align: left;
}
.glide-row button {
    flex: 0 0 auto;
    min-width: 76px;
    padding: 7px 14px;
    border: 2px solid var(--glide-accent);
    border-radius: 999px;
    background: #fff;
    color: var(--glide-accent-dark);
    font: 700 12px 'Quicksand', sans-serif;
    letter-spacing: 1px;
    cursor: pointer;
}
#trophy-list { margin: 10px 0 14px; text-align: left; }

/* ---------- Toast ---------- */
.glide-toast {
    position: absolute;
    left: 50%;
    bottom: 12px;
    transform: translateX(-50%);
    z-index: 30;
    background: rgba(15, 23, 42, 0.92);
    color: #fff;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    pointer-events: none;
    white-space: nowrap;
}

/* ---------- Animation ---------- */
@keyframes glidePulse {
    0%   { transform: scale(1);    opacity: 1; }
    50%  { transform: scale(1.12); opacity: 0.8; }
    100% { transform: scale(1);    opacity: 1; }
}
@keyframes glideScorePop {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.3); }
    100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .glide-ready, #countdown-number { animation: none; }
    #scoreDiv.pop { animation: none; }
    .glide-btn { transition: none; }
}

/* Short landscape phones: tighten the panels so Play stays reachable */
@media (max-height: 480px) {
    .glide-panel { padding: 10px; }
    .glide-panel p { margin-bottom: 10px; font-size: 13px; }
    .glide-btn { padding: 10px 16px; font-size: 16px; margin-bottom: 8px; }
}