/* ============================================================================
   LastBet — Design Tokens
   Paleta premium navy + ouro metálico. Fiel ao mockup do produto.
   ========================================================================= */

:root {
  /* Surfaces */
  --bg-deep:        #03060F;
  --bg-base:        #050914;
  --bg-elev-1:      #0B1322;
  --bg-elev-2:      #131C2E;
  --bg-elev-3:      #1B253B;
  --bg-overlay:     rgba(5, 9, 20, 0.72);

  /* Text */
  --text-primary:   #F8FAFC;
  --text-secondary: #CBD5E1;
  --text-muted:     #64748B;
  --text-faint:     #334155;

  /* Gold scale (do mais escuro p/ luz) */
  --gold-900:       #4A380A;
  --gold-800:       #6B4E0F;
  --gold-700:       #8B6914;
  --gold-600:       #A88735;
  --gold-500:       #C9A84C;   /* primary */
  --gold-400:       #D4AF37;
  --gold-300:       #E8C75A;
  --gold-200:       #F2D875;
  --gold-100:       #FFD700;   /* sparkle */
  --gold-050:       #FFF1B8;

  /* Accents */
  --rose:           #E11D48;
  --emerald:        #10B981;
  --sky:            #38BDF8;
  --violet:         #8B5CF6;

  /* Gradients */
  --grad-gold:      linear-gradient(135deg, #8B6914 0%, #D4AF37 35%, #FFD700 50%, #D4AF37 65%, #8B6914 100%);
  --grad-gold-soft: linear-gradient(135deg, #C9A84C 0%, #E8C75A 100%);
  --grad-bg:        radial-gradient(ellipse at 50% 0%, #131C2E 0%, #050914 60%, #03060F 100%);
  --grad-bg-player: radial-gradient(circle at 50% 35%, #1a2333 0%, #050914 75%, #03060F 100%);

  /* Shadows */
  --shadow-gold:    0 8px 28px rgba(212, 175, 55, 0.28);
  --shadow-gold-lg: 0 16px 48px rgba(212, 175, 55, 0.32);
  --shadow-deep:    0 12px 36px rgba(0, 0, 0, 0.6);
  --glow-gold:      0 0 30px rgba(255, 215, 0, 0.45);

  /* Type */
  --font-sans:   'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif:  'Playfair Display', Georgia, serif;
  --font-mono:   'JetBrains Mono', 'SF Mono', Menlo, monospace;

  /* Spacing scale (4px base) */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-7: 32px;
  --sp-8: 40px;
  --sp-9: 56px;
  --sp-10: 72px;

  /* Radii */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-pill: 999px;

  /* Borders */
  --border-faint:    1px solid rgba(248, 250, 252, 0.06);
  --border-soft:     1px solid rgba(248, 250, 252, 0.10);
  --border-gold:     1px solid rgba(212, 175, 55, 0.30);
  --border-gold-2:   1px solid rgba(212, 175, 55, 0.55);

  /* Motion */
  --ease-out:       cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out:    cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast:       150ms;
  --dur-base:       260ms;
  --dur-slow:       480ms;

  /* Z-index */
  --z-base:    1;
  --z-overlay: 100;
  --z-modal:   200;
  --z-toast:   300;

  /* Safe areas */
  --safe-top:    env(safe-area-inset-top, 0);
  --safe-bottom: env(safe-area-inset-bottom, 0);

  /* App chrome heights */
  --nav-h: 64px;
  --topbar-h: 56px;
}

/* ============================================================================
   Resets premium
   ========================================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-size: 16px;
  line-height: 1.5;
}

body {
  overflow: hidden;
  width: 100vw;
  height: 100dvh;
  background: var(--grad-bg);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

input, textarea { user-select: text; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }
::-webkit-scrollbar { display: none; }
* { scrollbar-width: none; }

/* ============================================================================
   Tipografia
   ========================================================================= */
.t-display {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(2rem, 7vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.t-h1 { font-size: 1.625rem; font-weight: 700; letter-spacing: -0.01em; }
.t-h2 { font-size: 1.25rem; font-weight: 600; }
.t-h3 { font-size: 1.0625rem; font-weight: 600; }
.t-body { font-size: 0.9375rem; color: var(--text-secondary); line-height: 1.55; }
.t-small { font-size: 0.8125rem; color: var(--text-muted); }
.t-tiny  { font-size: 0.7rem; color: var(--text-muted); letter-spacing: 0.06em; text-transform: uppercase; }
.t-mono  { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.t-gold {
  background: var(--grad-gold);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ============================================================================
   Componentes premium reutilizáveis
   ========================================================================= */
.btn-gold {
  background: var(--grad-gold-soft);
  color: #0A1628;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 14px 24px;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-gold);
  transition: transform var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out);
  text-transform: uppercase;
  font-size: 0.875rem;
}
.btn-gold:active { transform: translateY(2px); box-shadow: 0 4px 14px rgba(212,175,55,0.2); }
.btn-gold:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-ghost {
  border: var(--border-gold);
  color: var(--gold-300);
  padding: 12px 22px;
  border-radius: var(--r-md);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.input-premium {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: var(--border-soft);
  border-radius: var(--r-md);
  padding: 14px 18px;
  color: var(--text-primary);
  font-size: 1rem;
  outline: none;
  transition: border-color var(--dur-fast), background var(--dur-fast);
}
.input-premium:focus { border-color: var(--gold-500); background: rgba(212,175,55,0.05); }
.input-premium::placeholder { color: var(--text-muted); }

.card {
  background: var(--bg-elev-1);
  border: var(--border-faint);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
}
.card-gold {
  background: linear-gradient(180deg, rgba(212,175,55,0.06) 0%, rgba(212,175,55,0.02) 100%);
  border: var(--border-gold);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.badge-gold {
  background: rgba(212,175,55,0.12);
  color: var(--gold-300);
  border: 1px solid rgba(212,175,55,0.25);
}
.badge-streak {
  background: linear-gradient(135deg, rgba(255,87,34,0.12), rgba(212,175,55,0.12));
  color: var(--gold-200);
  border: 1px solid rgba(212,175,55,0.3);
}

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(212,175,55,0.25) 50%, transparent 100%);
  margin: var(--sp-5) 0;
}

/* Subtle gold "embossed" effect for headings */
.gold-embossed {
  background: linear-gradient(180deg, #FFE48F 0%, #D4AF37 45%, #8B6914 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 1px 0 rgba(0,0,0,0.4));
}

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.4s infinite;
  border-radius: var(--r-md);
}
@keyframes skeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Fade-in helper */
.fade-in { animation: fadeIn var(--dur-base) var(--ease-out) both; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Spinner */
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(212,175,55,0.25);
  border-top-color: var(--gold-300);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }
