/* ============ RESET ============ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 50% -200px, rgba(212, 183, 90, 0.10), transparent 70%),
    var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}
body.no-scroll { overflow: hidden; }
html { scrollbar-gutter: stable; }
/* Reserve the first viewport while a route or its async content loads. */
#app { min-height: 100svh; }
.empty > img[src*="/assets/brand/emblem"] { height: 90px; object-fit: contain; }
/* Tournament copy can wrap differently before Montserrat finishes loading. */
@media (max-width: 900px) { .legacy-tourney-head { min-height: 83px; } }
@media (max-width: 600px) { .legacy-tourney-head { min-height: 104px; } }
@media (max-width: 360px) { .legacy-tourney-copy { min-height: 79px; } }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
input, select, textarea { font: inherit; color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); }
p { margin: 0; }
::selection { background: var(--primary); color: var(--text-on-gold); }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: #1f3a70; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-deep); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hide-scroll { scrollbar-width: none; }
.hide-scroll::-webkit-scrollbar { display: none; }

/* ============ TİPOGRAFİ ============ */
.section { margin: 26px 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: .2px;
  color: var(--text-strong);
}
.section-title .accent { color: var(--primary-light); }
.gold-text {
  background: var(--grad-gold);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.muted { color: var(--muted); }
.upper { text-transform: uppercase; }

/* ============ BUTONLAR ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px;
  border-radius: var(--radius);
  font-family: var(--font-display); font-weight: 700; font-size: 13px;
  text-transform: uppercase; letter-spacing: .3px; white-space: nowrap;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease, background .15s ease;
}
.btn:active { transform: scale(.97); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-gold {
  background: var(--grad-gold);
  color: var(--text-on-gold);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 -2px 0 rgba(0, 0, 0, .18), 0 4px 14px rgba(212, 183, 90, .28);
}
.btn-gold:hover { filter: brightness(1.08); box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 0 20px rgba(241, 218, 147, .55); }
.btn-dark {
  background: var(--grad-dark);
  color: var(--primary-light);
  box-shadow: inset 0 0 0 1px var(--border-strong);
}
.btn-dark:hover { background: var(--grad-gold-soft); color: #fff; }
.btn-outline { box-shadow: inset 0 0 0 1px var(--border-strong); color: var(--primary-light); }
.btn-outline:hover { background: rgba(var(--primary-rgb), .1); }
.btn-ghost { background: var(--chip); color: var(--text); }
.btn-ghost:hover { background: var(--chip-active); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12px; }
.btn-lg { height: 48px; padding: 0 28px; font-size: 15px; }
.btn-block { width: 100%; }
.icon-btn {
  width: 38px; height: 38px; display: inline-grid; place-items: center;
  border-radius: var(--radius); background: var(--grad-dark); box-shadow: inset 0 0 0 1px var(--border);
  color: var(--primary-light); transition: background .15s;
}
.icon-btn:hover { background: var(--grad-gold-soft); }
.icon-btn svg { width: 20px; height: 20px; }

/* hap (pill) */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 16px; border-radius: var(--radius-pill);
  background: var(--chip); color: var(--text);
  font-family: var(--font-display); font-weight: 700; font-size: 13px; text-transform: uppercase;
  box-shadow: inset 0 0 0 1px var(--border);
  transition: background .15s, box-shadow .15s, color .15s; white-space: nowrap;
}
.pill:hover { background: var(--chip-active); }
.pill.active { background: var(--grad-gold-soft); color: var(--primary-light); box-shadow: inset 0 0 0 2px var(--primary); }
.pill.solid.active { background: var(--grad-gold); color: var(--text-on-gold); box-shadow: none; }

.tag {
  display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 5px;
  font-size: 10px; font-weight: 800; font-family: var(--font-display); text-transform: uppercase; letter-spacing: .4px;
}
.tag-premium { background: var(--badge-premium); color: #fff; }
.tag-live { background: var(--live); color: #fff; }
.tag-top { background: var(--grad-gold); color: var(--text-on-gold); }
.tag-new { background: var(--success); color: #0d172a; }
.tag-jackpot { background: #3b8fe5; color: #fff; }

/* ============ FORMLAR ============ */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12px; color: var(--muted); font-weight: 500; }
.field label .req { color: var(--primary); }
.input {
  height: 44px; width: 100%; padding: 0 14px;
  background: var(--input); border: 1px solid var(--input-border); border-radius: var(--radius);
  color: var(--text); outline: none; transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .2); }
.input.invalid { border-color: var(--danger); }
.field .error { color: var(--danger); font-size: 12px; min-height: 0; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--primary) 50%), linear-gradient(135deg, var(--primary) 50%, transparent 50%); background-position: calc(100% - 18px) 19px, calc(100% - 13px) 19px; background-size: 5px 5px; background-repeat: no-repeat; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--text); cursor: pointer; margin-bottom: 12px; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); margin: 1px 0 0; flex: none; }

/* ============ ANİMASYON ============ */
@keyframes shine { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes spinSlow { to { transform: rotate(360deg); } }
.fade-up { animation: fadeUp .35s ease both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
