/* ══════════════════════════════════════════════════════════
   PROPHECY APP — Global Styles
   Luxury stationery × modern minimal
   ══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&display=swap');

/* ─── Variables ──────────────────────────────────────── */
:root {
  --cream:       #FDF8F0;
  --ivory:       #F0E8D6;
  --parchment:   #E2D0B0;
  --gold:        #C9A84C;
  --gold-light:  #E8C96B;
  --gold-dark:   #9A7030;
  --gold-glow:   rgba(201,168,76,0.25);

  --ink:         #1C1917;
  --ink-muted:   #57534E;
  --ink-faint:   #A8A29E;
  --ink-ghost:   #D6CFC4;

  --david:       #1E3A5F;
  --david-mid:   #2D5690;
  --david-light: #EBF0FA;
  --vukk:        #6B1F1F;
  --vukk-mid:    #9E2C2C;
  --vukk-light:  #FAF0F0;

  --white:       #FFFFFF;
  --r:           16px;
  --r-sm:        10px;
  --shadow:      0 2px 16px rgba(28,25,23,.07);
  --shadow-md:   0 8px 32px rgba(28,25,23,.12);
  --shadow-lg:   0 20px 60px rgba(28,25,23,.18);
  --shadow-gold: 0 4px 20px rgba(201,168,76,.35);
}

/* ─── Reset ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Paper texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='80' height='80' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

/* ─── Typography ─────────────────────────────────────── */
h1, h2, h3 { font-family: 'Playfair Display', serif; line-height: 1.2; }
h1 { font-size: clamp(26px,4vw,40px); font-weight: 700; }
h2 { font-size: clamp(20px,3vw,30px); font-weight: 600; }
h3 { font-size: 18px; font-weight: 600; }

/* ─── Layout ─────────────────────────────────────────── */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ─── Navbar ─────────────────────────────────────────── */
.navbar {
  background: rgba(253,248,240,.88);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--parchment);
  position: sticky;
  top: 0;
  z-index: 200;
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}

.brand-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: var(--shadow-gold);
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.navbar-nav a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all .2s;
}

.navbar-nav a:hover  { background: var(--ivory); color: var(--ink); }
.navbar-nav a.active { background: var(--ivory); color: var(--gold-dark); }

.user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 6px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
}
.user-badge.david { background: var(--david-light); color: var(--david); }
.user-badge.vukk  { background: var(--vukk-light);  color: var(--vukk);  }

.user-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: white;
}
.user-avatar.david { background: var(--david); }
.user-avatar.vukk  { background: var(--vukk); }

/* ─── Page Header ────────────────────────────────────── */
.page-header {
  padding: 44px 0 28px;
  animation: fadeSlideDown .6s ease both;
}
.page-header .label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}

/* ─── Cards ──────────────────────────────────────────── */
.card {
  background: white;
  border-radius: var(--r);
  box-shadow: var(--shadow);
  border: 1px solid var(--ivory);
  overflow: hidden;
  transition: transform .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card-body  { padding: 24px; }

/* ─── Envelope Card ──────────────────────────────────── */
.envelope-card { cursor: pointer; }

.env-visual {
  width: 100%;
  height: 150px;
  position: relative;
  background: linear-gradient(135deg, #F5EDD8 0%, #ECD9B0 60%, #E2C990 100%);
  border-bottom: 1px solid var(--parchment);
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
}

.env-svg { width: 85%; height: 85%; }

.wax-seal {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.2));
  animation: waxFloat 4s ease-in-out infinite;
}

.env-topic {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 4px;
}

.env-title {
  font-family: 'Playfair Display', serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 14px;
}

.env-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.meta-tag {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 100px;
  background: var(--ivory);
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}
.meta-tag.exp   { background: #FEF3C7; color: #92400E; }
.meta-tag.open  { background: #D1FAE5; color: #065F46; }
.meta-tag.david { background: var(--david-light); color: var(--david); }
.meta-tag.vukk  { background: var(--vukk-light);  color: var(--vukk);  }

/* ─── Bet Card ───────────────────────────────────────── */
.bet-vs {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 14px;
  align-items: stretch;
  margin: 14px 0;
}

.bet-side {
  padding: 14px;
  border-radius: var(--r-sm);
}
.bet-side.david {
  background: var(--david-light);
  border-left: 3px solid var(--david);
}
.bet-side.vukk {
  background: var(--vukk-light);
  border-left: 3px solid var(--vukk);
}

.bet-side-name {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.bet-side.david .bet-side-name { color: var(--david); }
.bet-side.vukk  .bet-side-name { color: var(--vukk);  }

.bet-side-text {
  font-size: 13px;
  color: var(--ink-muted);
  line-height: 1.5;
}

.vs-divider {
  display: flex;
  align-items: center;
  justify-content: center;
}

.vs-badge {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 800;
  color: white;
  letter-spacing: .04em;
  box-shadow: var(--shadow-gold);
}

.stake-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  background: linear-gradient(135deg, #FEFCE8, #FEF3C7);
  border: 1px solid #FDE68A;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  color: #92400E;
}

.winner-banner {
  padding: 12px 16px;
  border-radius: var(--r-sm);
  text-align: center;
  font-weight: 700;
  font-size: 14px;
  margin-top: 12px;
}
.winner-banner.david { background: var(--david-light); color: var(--david); border: 1px solid rgba(30,58,95,.2); }
.winner-banner.vukk  { background: var(--vukk-light);  color: var(--vukk);  border: 1px solid rgba(107,31,31,.2); }
.winner-banner.draw  { background: #F3F4F6; color: #374151; border: 1px solid #E5E7EB; }

/* ─── Grid ───────────────────────────────────────────── */
.grid     { display: grid; gap: 20px; }
.grid-2   { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.grid-3   { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

/* ─── Buttons ────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all .2s;
  white-space: nowrap;
  line-height: 1;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: white;
  box-shadow: var(--shadow-gold);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(201,168,76,.5); }

.btn-secondary {
  background: var(--ivory);
  color: var(--ink);
  border: 1px solid var(--parchment);
}
.btn-secondary:hover { background: var(--parchment); }

.btn-ghost { background: transparent; color: var(--ink-muted); }
.btn-ghost:hover { background: var(--ivory); color: var(--ink); }

.btn-david { background: var(--david); color: white; }
.btn-david:hover { background: var(--david-mid); transform: translateY(-1px); }
.btn-vukk  { background: var(--vukk);  color: white; }
.btn-vukk:hover  { background: var(--vukk-mid);  transform: translateY(-1px); }

.btn-danger  { background: #FEE2E2; color: #991B1B; border: 1px solid #FECACA; }
.btn-success { background: #D1FAE5; color: #065F46; border: 1px solid #A7F3D0; }

.btn-sm { padding: 6px 14px; font-size: 12px; border-radius: 8px; }
.btn-lg { padding: 14px 32px; font-size: 16px; border-radius: 14px; }
.btn-full { width: 100%; justify-content: center; }

/* ─── Forms ──────────────────────────────────────────── */
.form-group  { margin-bottom: 22px; }
.form-row    { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-muted);
  margin-bottom: 8px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--parchment);
  border-radius: var(--r-sm);
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  background: white;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
  appearance: none;
}
.form-control:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px var(--gold-glow);
}
textarea.form-control {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}
.form-hint {
  font-size: 11px;
  color: var(--ink-faint);
  margin-top: 6px;
}

/* Author toggle */
.author-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}
.author-opt input[type="radio"] { display: none; }
.author-opt label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border: 2px solid var(--parchment);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all .2s;
  background: var(--cream);
  font-weight: 500;
  font-size: 14px;
}
.author-opt label:hover { border-color: var(--ink-ghost); background: var(--ivory); }
.author-opt.david-o input:checked + label { border-color: var(--david); background: var(--david-light); color: var(--david); }
.author-opt.vukk-o  input:checked + label { border-color: var(--vukk);  background: var(--vukk-light);  color: var(--vukk);  }
.author-opt.both-o  input:checked + label { border-color: var(--gold);  background: #FEFCE8; color: var(--gold-dark); }
.author-dot { width: 12px; height: 12px; border-radius: 50%; }
.author-dot.david { background: var(--david); }
.author-dot.vukk  { background: var(--vukk); }
.author-dot.both  { background: linear-gradient(135deg, var(--david), var(--vukk)); }

/* ─── Tabs ───────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 4px;
  background: var(--ivory);
  padding: 4px;
  border-radius: 14px;
  margin-bottom: 36px;
}

.tab-btn {
  flex: 1;
  padding: 11px 20px;
  border-radius: 11px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-muted);
  cursor: pointer;
  transition: all .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.tab-btn.active {
  background: white;
  color: var(--ink);
  box-shadow: var(--shadow);
}

.tab-count {
  background: var(--ivory);
  color: var(--ink-faint);
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 11px;
}
.tab-btn.active .tab-count {
  background: #FEF3C7;
  color: var(--gold-dark);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ─── Section ────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-line {
  height: 1px;
  background: linear-gradient(to right, var(--parchment), transparent);
  margin-bottom: 28px;
}

/* ─── Stats ──────────────────────────────────────────── */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}
.stat-card {
  background: white;
  border-radius: var(--r-sm);
  padding: 20px;
  border: 1px solid var(--ivory);
  text-align: center;
  box-shadow: var(--shadow);
}
.stat-number {
  font-family: 'Playfair Display', serif;
  font-size: 34px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 4px;
}
.stat-label { font-size: 12px; color: var(--ink-faint); font-weight: 500; }

/* ─── Badges ─────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.badge-sealed   { background: var(--ivory); color: var(--ink-muted); }
.badge-expired  { background: #FEF3C7; color: #92400E; }
.badge-opened   { background: #D1FAE5; color: #065F46; }
.badge-active   { background: #DBEAFE; color: #1E40AF; }
.badge-resolved { background: #F3F4F6; color: #374151; }

/* ─── Alert ──────────────────────────────────────────── */
.alert {
  padding: 14px 20px;
  border-radius: var(--r-sm);
  font-size: 14px;
  margin-bottom: 24px;
  border-left: 4px solid;
  animation: fadeIn .3s ease;
}
.alert-success { background: #D1FAE5; color: #065F46; border-color: #10B981; }
.alert-error   { background: #FEE2E2; color: #991B1B; border-color: #EF4444; }
.alert-info    { background: #DBEAFE; color: #1E3A8A; border-color: #3B82F6; }
.alert-warn    { background: #FEF3C7; color: #92400E; border-color: #F59E0B; }

/* ─── Divider ────────────────────────────────────────── */
.divider { height: 1px; background: var(--ivory); margin: 20px 0; }

/* ─── Empty ──────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--ink-muted);
}
.empty-icon { font-size: 60px; margin-bottom: 16px; opacity: .5; display: block; }
.empty-state h3 { margin-bottom: 8px; color: var(--ink); }
.empty-state p  { font-size: 14px; color: var(--ink-faint); margin-bottom: 24px; }

/* ─── Login ──────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 420px;
  background: white;
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: scaleIn .6s cubic-bezier(.34,1.56,.64,1) both;
}
.login-header {
  background: linear-gradient(145deg, #1C1917 0%, #2C2018 50%, #3C2A10 100%);
  padding: 48px 40px 44px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.login-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% -10%, rgba(201,168,76,.4), transparent 65%);
}
.login-header::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 40px;
  background: white;
  border-radius: 20px 20px 0 0;
}
.login-logo {
  width: 80px; height: 80px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border-radius: 22px;
  display: flex; align-items: center; justify-content: center;
  font-size: 40px;
  margin: 0 auto 20px;
  position: relative;
  box-shadow: 0 8px 32px rgba(201,168,76,.5);
  animation: logoFloat 3s ease-in-out infinite;
}
.login-header h1 { color: white; font-size: 30px; position: relative; margin-bottom: 6px; }
.login-header p   { color: rgba(255,255,255,.45); font-size: 14px; position: relative; }
.login-body { padding: 40px; }

.user-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}
.user-option { position: relative; }
.user-option input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.user-option label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 12px;
  border: 2px solid var(--parchment);
  border-radius: 14px;
  cursor: pointer;
  transition: all .25s;
  background: var(--cream);
}
.user-option label:hover { border-color: var(--ink-ghost); background: var(--ivory); }
.user-option input:checked + label {
  background: white;
  box-shadow: var(--shadow-md);
}
.user-option.david-opt input:checked + label { border-color: var(--david); }
.user-option.vukk-opt  input:checked + label { border-color: var(--vukk); }

.uopt-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700; color: white;
  transition: transform .25s;
}
.user-option input:checked + label .uopt-avatar { transform: scale(1.12); }
.david-opt .uopt-avatar { background: linear-gradient(135deg, var(--david), var(--david-mid)); }
.vukk-opt  .uopt-avatar { background: linear-gradient(135deg, var(--vukk),  var(--vukk-mid));  }
.uopt-name { font-size: 14px; font-weight: 700; color: var(--ink); }

/* ─── Prediction View ────────────────────────────────── */
.pred-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 28px;
}
.pred-card {
  padding: 28px;
  border-radius: var(--r);
  animation: fadeSlideUp .6s ease .2s both;
}
.pred-card.david { background: var(--david-light); border: 1.5px solid rgba(30,58,95,.15); }
.pred-card.vukk  { background: var(--vukk-light);  border: 1.5px solid rgba(107,31,31,.15); }
.pred-author {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pred-card.david .pred-author { color: var(--david); }
.pred-card.vukk  .pred-author { color: var(--vukk); }
.pred-text {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  font-style: italic;
  line-height: 1.7;
  color: var(--ink);
}
.pred-single { grid-column: 1 / -1; max-width: 560px; margin: 0 auto; }

/* Envelope open reveal */
.env-open-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 0 20px;
}
.env-open-wrap {
  position: relative;
  width: 260px;
  animation: envelopeReveal .8s cubic-bezier(.34,1.56,.64,1) both;
}

/* ─── View detail ────────────────────────────────────── */
.detail-header {
  padding: 48px 0 0;
  animation: fadeSlideDown .5s ease both;
}
.breadcrumb {
  font-size: 13px;
  color: var(--ink-faint);
  margin-bottom: 16px;
}
.breadcrumb a { color: var(--gold-dark); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

.detail-card {
  background: white;
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--ivory);
  padding: 40px;
  margin-bottom: 24px;
  animation: fadeSlideUp .5s ease .1s both;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

/* Resolve form */
.resolve-options {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}
.resolve-opt input[type="radio"] { display: none; }
.resolve-opt label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px;
  border: 2px solid var(--parchment);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all .2s;
  background: var(--cream);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}
.resolve-opt label:hover { border-color: var(--ink-ghost); background: var(--ivory); }
.resolve-opt.d input:checked + label { border-color: var(--david); background: var(--david-light); color: var(--david); }
.resolve-opt.v input:checked + label { border-color: var(--vukk);  background: var(--vukk-light);  color: var(--vukk); }
.resolve-opt.draw input:checked + label { border-color: var(--gold); background: #FEFCE8; color: var(--gold-dark); }

/* ─── Animations ─────────────────────────────────────── */
@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(.88); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}
@keyframes waxFloat {
  0%, 100% { transform: translateX(-50%) rotate(-2deg) scale(1); }
  50%       { transform: translateX(-50%) rotate(2deg) scale(1.04); }
}
@keyframes envelopeReveal {
  from { opacity: 0; transform: scale(.7) rotate(-8deg); }
  to   { opacity: 1; transform: scale(1) rotate(0deg); }
}
@keyframes cardStagger {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.card-anim { animation: cardStagger .5s ease both; }
.card-anim:nth-child(1) { animation-delay: .05s; }
.card-anim:nth-child(2) { animation-delay: .10s; }
.card-anim:nth-child(3) { animation-delay: .15s; }
.card-anim:nth-child(4) { animation-delay: .20s; }
.card-anim:nth-child(5) { animation-delay: .25s; }
.card-anim:nth-child(6) { animation-delay: .30s; }
.card-anim:nth-child(7) { animation-delay: .35s; }
.card-anim:nth-child(8) { animation-delay: .40s; }

/* Shimmer loader */
@keyframes shimmer {
  0%   { background-position: -400% 0; }
  100% { background-position:  400% 0; }
}
.shimmer {
  background: linear-gradient(90deg, var(--ivory) 25%, var(--parchment) 50%, var(--ivory) 75%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}

/* Stat card stagger */
.stat-card:nth-child(1) { animation: cardStagger .4s .05s ease both; }
.stat-card:nth-child(2) { animation: cardStagger .4s .10s ease both; }
.stat-card:nth-child(3) { animation: cardStagger .4s .15s ease both; }
.stat-card:nth-child(4) { animation: cardStagger .4s .20s ease both; }

/* ─── Responsive ─────────────────────────────────────── */
@media (max-width: 900px) {
  .stats-bar   { grid-template-columns: repeat(2,1fr); }
  .form-row    { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .pred-grid        { grid-template-columns: 1fr; }
  .bet-vs           { grid-template-columns: 1fr; }
  .vs-divider       { display: none; }
  .author-toggle    { grid-template-columns: 1fr; }
  .resolve-options  { grid-template-columns: 1fr; }
  .navbar-nav       { display: none; }
  .detail-card      { padding: 24px; }
  .tabs             { flex-direction: column; }
}

/* ─── Scrollbar ──────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--cream); }
::-webkit-scrollbar-thumb { background: var(--parchment); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-ghost); }

/* ─── Misc ───────────────────────────────────────────── */
.spacer { height: 64px; }
.text-center  { text-align: center; }
.text-muted   { color: var(--ink-muted); }
.text-faint   { color: var(--ink-faint); }
.text-gold    { color: var(--gold-dark); }
.text-david   { color: var(--david); }
.text-vukk    { color: var(--vukk); }
.fw-600       { font-weight: 600; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
