/* ==========================================================================
   PLAY VIC — in-browser GameLift Streams player
   Brand blue: #2B6CB0 / hover #1A4973
   ========================================================================== */

.vic-play-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 20px 48px;
}

/* Auth wall spacing when signed out (matches dashboard's centred wall). */
.vic-auth-wall {
    max-width: 42rem;
    margin: 32px auto;
}

/* ── Stage: near-full-browser video container ──────────────────────────────
   16:9, capped by viewport height so controls stay visible without scrolling. */
.vic-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: calc(100vh - 220px);
    margin: 0 auto;
    background: #0b1220;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
    outline: none;
}
.vic-stage:focus-visible {
    box-shadow: 0 0 0 3px #90cdf4, 0 24px 60px rgba(15, 23, 42, 0.35);
}

.vic-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #0b1220;
    display: block;
}

/* ── Overlays (loading / start / error) ────────────────────────────────────*/
.vic-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
    color: #fff;
    background: radial-gradient(120% 120% at 50% 30%, rgba(43, 108, 176, 0.35), rgba(11, 18, 32, 0.92));
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    z-index: 2;
}
.vic-overlay.hidden { display: none; }

/* Once live, the video sits on top of any lingering overlays. */
.vic-stage.is-live .vic-start-overlay,
.vic-stage.is-live .vic-loading { display: none; }

/* Loading */
.vic-spinner {
    width: 44px;
    height: 44px;
    border: 3px solid rgba(255, 255, 255, 0.25);
    border-top-color: #fff;
    border-radius: 50%;
    animation: vicSpin 0.9s linear infinite;
    margin-bottom: 18px;
}
@keyframes vicSpin { to { transform: rotate(360deg); } }
.vic-loading-text {
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.9rem;
}

/* Booting overlay: same look as loading, but clickable to dismiss. */
.vic-booting { cursor: pointer; }
.vic-booting-sub {
    margin-top: 12px;
    max-width: 420px;
    font-size: 0.8rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.7);
}

/* Start card */
.vic-start-card { max-width: 460px; }
.vic-start-title {
    font-size: 1.9rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    margin-bottom: 12px;
}
.vic-start-sub {
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 22px;
}
.vic-start-btn { min-width: 200px; }
.vic-browser-note {
    margin-top: 16px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Error card */
.vic-error-inner {
    max-width: 460px;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 28px;
}
.vic-error-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: #fecaca;
}
.vic-error-message {
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 20px;
}
.vic-error-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}
.vic-error-actions .hidden { display: none; }

/* Input hint (bottom-centre, revealed when live) */
.vic-input-hint {
    position: absolute;
    left: 50%;
    bottom: 14px;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.7);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 999px;
    z-index: 3;
    pointer-events: none;
}
.vic-input-hint.hidden { display: none; }

/* ── Control strip ─────────────────────────────────────────────────────────*/
.vic-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 16px;
    padding: 14px 18px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}
.vic-controls.hidden { display: none; }

.vic-status-wrap { display: inline-flex; align-items: center; gap: 8px; }
.vic-status-dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2);
}
.vic-status-text {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #475569;
}
.vic-controls-actions { display: inline-flex; gap: 10px; }

/* ── Buttons ───────────────────────────────────────────────────────────────*/
.vic-btn {
    appearance: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.02em;
    padding: 11px 20px;
    border-radius: 999px;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease, opacity 0.2s ease;
}
.vic-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.vic-btn:focus-visible { outline: 3px solid #90cdf4; outline-offset: 2px; }
.vic-btn:not(:disabled):active { transform: translateY(1px) scale(0.98); }

.vic-btn-primary {
    background: #2B6CB0;
    color: #fff;
    box-shadow: 0 4px 12px rgba(43, 108, 176, 0.35);
}
.vic-btn-primary:not(:disabled):hover { background: #1A4973; }

.vic-btn-ghost {
    background: #f1f5f9;
    color: #334155;
}
.vic-btn-ghost:not(:disabled):hover { background: #e2e8f0; }

.vic-btn-danger {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}
.vic-btn-danger:not(:disabled):hover { background: #b91c1c; color: #fff; }

/* Fullscreen: fill the viewport and keep the video letterboxed. */
.vic-stage:fullscreen { border-radius: 0; max-height: none; }
.vic-stage:fullscreen .vic-video { object-fit: contain; }

/* ── Touch / small screens ─────────────────────────────────────────────────*/
@media (max-width: 768px) {
    .vic-play-main { padding: 16px 12px 32px; }
    .vic-stage { max-height: calc(100vh - 180px); border-radius: 12px; }
    .vic-controls { justify-content: center; }
    .vic-controls-actions { width: 100%; justify-content: center; }
    .vic-btn { padding: 13px 22px; font-size: 0.9rem; }  /* larger touch targets */
    .vic-start-title { font-size: 1.5rem; }
}
