/* Pop the Bubble — FunDash premium dark mobile-first */

:root {
    --bg: #080f1e;
    --purple: #7c5cff;
    --purple-soft: rgba(124, 92, 255, 0.22);
    --cyan: #22d3ee;
    --gold: #f59e0b;
    --text: #f0f5ff;
    --muted: #94a3b8;
}

* { box-sizing: border-box; }

.bubble-svg-filters {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

html, body {
    margin: 0;
    height: 100%;
    overflow: hidden;
    font-family: Inter, Roboto, system-ui, sans-serif;
    background: radial-gradient(circle at 50% 0%, #0f1e3f 0%, #0a1428 36%, var(--bg) 72%);
    color: var(--text);
}

body { padding: 0; }

.bubble-app {
    height: 100dvh;
    max-height: 100dvh;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 0.35rem;
    overflow: hidden;
    padding:
        calc(0.45rem + env(safe-area-inset-top))
        calc(0.55rem + env(safe-area-inset-right))
        calc(0.45rem + env(safe-area-inset-bottom))
        calc(0.55rem + env(safe-area-inset-left));
    box-sizing: border-box;
}

.bubble-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.28rem;
    position: relative;
    z-index: 120;
}

.bubble-brand {
    display: inline-flex;
    align-self: flex-start;
    line-height: 0;
    text-decoration: none;
}

.prize-line {
    margin: 0;
    width: 100%;
    text-align: center;
    color: var(--gold);
    font-weight: 800;
    font-size: clamp(0.78rem, 3.1vw, 0.98rem);
    text-shadow: 0 0 12px rgba(255, 204, 0, 0.45);
}

.bubble-stage {
    position: relative;
    width: 100%;
    max-width: 480px;
    justify-self: center;
    height: 100%;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(180deg, rgba(22, 15, 38, 0.75), rgba(8, 8, 16, 0.9));
    box-shadow: inset 0 0 80px rgba(140, 59, 255, 0.08), 0 14px 42px rgba(0, 0, 0, 0.45);
    z-index: 120;
}

#bubble-canvas {
    width: 100%;
    height: 100%;
    display: block;
    touch-action: none;
}

.status-pill {
    position: absolute;
    top: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    background: rgba(6, 6, 12, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--muted);
    font-size: clamp(0.7rem, 2.9vw, 0.82rem);
    white-space: nowrap;
    pointer-events: none;
    z-index: 125;
}

.voucher-badge {
    position: absolute;
    left: 50%;
    bottom: 1rem;
    transform: translateX(-50%) scale(0.92);
    opacity: 0;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    font-size: clamp(0.72rem, 2.9vw, 0.84rem);
    font-weight: 800;
    letter-spacing: 0.05em;
    color: #2a1900;
    background: linear-gradient(135deg, #ffe27f, #ffcc00, #f0aa00);
    box-shadow: 0 0 18px rgba(255, 204, 0, 0.5);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.voucher-badge.show {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

.ad-slot {
    width: min(320px, 100%);
    max-width: 320px;
    min-height: 50px;
    max-height: 50px;
    margin-top: 0.1rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    background: rgba(17, 17, 17, 0.96);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    color: var(--muted);
    z-index: 90;
    justify-self: center;
}

/* ─── Short-phone + small-phone optimizations (Phase 2) ───────────── */
@media (max-height: 680px) {
    .bubble-header { padding-top: 0.25rem !important; padding-bottom: 0.25rem !important; }
}
@media (max-width: 360px) {
    .bubble-header { padding-left: 54px !important; }
}
