/* MobPlay — CSS mínimo para login/PWA (sem Google Fonts, carrega rápido) */

:root {
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 22px;
    --bg-deep: #06080d;
    --bg: #0a0d16;
    --surface-0: rgba(5, 7, 12, 0.65);
    --surface-1: rgba(16, 22, 38, 0.7);
    --line: rgba(255, 255, 255, 0.07);
    --line-strong: rgba(255, 255, 255, 0.12);
    --text: #f9fafb;
    --text-secondary: #cbd5e1;
    --muted: #94a3b8;
    --accent: #0df2c9;
    --accent-hover: #3bffd8;
    --purple-hover: #a78bfa;
    --danger: #ef4444;
    --danger-soft: rgba(239, 68, 68, 0.15);
    --danger-fg: #fca5a5;
    --radius: 14px;
    --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.55);
    --leading-tight: 1.25;
    --leading-body: 1.55;
    color-scheme: dark;
    font-family: var(--font-sans);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
    height: 100%;
    background: var(--bg-deep);
}

body.app-body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    color: var(--text);
    background-color: var(--bg-deep);
    background-image:
        radial-gradient(circle 350px at 0% 0%, rgba(139, 92, 246, 0.11), transparent),
        radial-gradient(circle 400px at 50% 90%, rgba(139, 92, 246, 0.08), transparent),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
    -webkit-text-size-adjust: 100%;
}

html.mobplay-booting .mobplay-app-root {
    visibility: hidden;
}

.mobplay-boot-splash {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: var(--bg-deep);
}

html.mobplay-booting .mobplay-boot-splash {
    display: flex;
}

.mobplay-boot-splash__logo {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    box-shadow: 0 0 24px rgba(13, 242, 201, 0.25);
    animation: mobplay-boot-pulse 1.4s ease-in-out infinite;
}

.mobplay-boot-splash__text {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.mobplay-boot-splash__bar {
    width: min(220px, 70vw);
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.mobplay-boot-splash__bar-fill {
    height: 100%;
    width: 35%;
    border-radius: 999px;
    background: linear-gradient(90deg, #8b5cf6, var(--accent));
    animation: mobplay-boot-slide 1.1s ease-in-out infinite;
}

@keyframes mobplay-boot-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.85; }
}

@keyframes mobplay-boot-slide {
    0% { transform: translateX(-120%); }
    100% { transform: translateX(320%); }
}

.auth-page,
.device-gate-page,
body.device-gate-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100dvh;
    min-height: 100vh;
    padding: var(--space-5) var(--space-4);
}

.device-gate-shell,
.auth-shell {
    width: 100%;
    max-width: 400px;
}

.card {
    padding: var(--space-5);
    border-radius: var(--radius);
    background: var(--surface-1);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
}

.auth-shell .card {
    background: rgba(16, 22, 38, 0.55);
    border-color: var(--line-strong);
}

.device-gate-card { text-align: center; padding: 28px 22px 24px !important; }
.device-gate-icon { font-size: 3rem; margin-bottom: 12px; }
.device-gate-title { margin: 0 0 12px; font-size: 1.55rem; font-weight: 900; color: #fff; }
.device-gate-lead { margin: 0 0 12px; font-size: 0.95rem; line-height: 1.55; color: var(--text-secondary); }
.device-gate-lead strong { color: var(--accent); }
.device-gate-hint { margin: 0 0 18px; font-size: 0.82rem; color: var(--muted); }
.device-gate-logo { width: 72px; height: 72px; border-radius: 18px; opacity: 0.92; }

.auth-eyebrow {
    margin: 0 0 var(--space-2);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
}

.auth-title {
    margin: 0 0 8px;
    font-size: 1.65rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: var(--leading-tight);
}

.auth-lead {
    margin: 0 0 24px;
    font-size: 0.92rem;
    color: var(--muted);
    line-height: var(--leading-body);
}

.auth-form { display: flex; flex-direction: column; gap: 16px; }

.auth-label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--muted);
}

.auth-label input {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--line-strong);
    background: var(--surface-0);
    color: var(--text);
    font: inherit;
    font-size: 0.95rem;
}

.auth-label input:focus-visible {
    outline: none;
    border-color: var(--purple-hover);
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.25);
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.95rem 1.25rem;
    border: none;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
}

.btn-play {
    background: linear-gradient(135deg, #0df2c9 0%, #0bbfa0 100%);
    color: #021a15;
}

.btn-withdraw {
    background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
    color: #1a1200;
}

.app-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
}

.app-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
}

.app-modal__panel {
    position: relative;
    width: min(400px, 100%);
    padding: 24px;
    border-radius: var(--radius);
    background: var(--surface-1);
    border: 1px solid var(--line-strong);
}

.app-modal__title { margin: 0 0 12px; font-size: 1.2rem; font-weight: 900; }
.app-modal__text { margin: 0 0 20px; font-size: 0.95rem; line-height: 1.5; color: var(--text-secondary); }
.app-modal__actions { display: flex; flex-direction: column; gap: 10px; }

.register-error-icon {
    display: grid;
    place-items: center;
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
    border-radius: 50%;
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--danger);
    background: var(--danger-soft);
}

.register-error-title { text-align: center; color: var(--danger-fg) !important; }
