/* ===================================================
   OnePSR v2 Design System
   Vanilla CSS · Inter · 8px grid · No Bootstrap
   =================================================== */

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }
ul { list-style: none; }

/* --- Color Scale --- */
:root {
  color-scheme: light dark;
  --ash-100: #F7F4F3;
  --ash-200: #EBE5E2;
  --ash-300: #D6CECC;
  --ash-400: #B8AEAB;
  --ash-500: #96908E;
  --ash-600: #6E6A68;
  --ash-700: #4E4A48;
  --ash-800: #302D2C;
  --ash-900: #181615;

  --ember-100: #FFF1EC;
  --ember-200: #FFD4C2;
  --ember-500: #F05020;
  --ember-600: #C03A12;
  --ember-700: #8E2A0C;

  --green-100: #EDFAF3;
  --green-500: #23E05A;
  --green-700: #0F7D30;
  --green-800: #084D1D;

  /* --- Semantic Tokens (Light) --- */
  --bg-page:        var(--ash-100);
  --bg-card:        #FFFFFF;
  --bg-card-hover:  var(--ash-100);
  --bg-nav:         rgba(247, 244, 243, 0.88);
  --text-primary:   var(--ash-900);
  --text-secondary: var(--ash-600);
  --text-tertiary:  var(--ash-500);
  --border-subtle:  var(--ash-200);
  --border-default: var(--ash-300);
  --accent:         var(--ember-500);
  --accent-hover:   var(--ember-600);
  --accent-soft-bg: var(--ember-100);
  --accent-soft-tx: var(--ember-700);
  --shadow-xs: 0 1px 2px rgba(24,22,21,0.06);
  --shadow-sm: 0 1px 4px rgba(24,22,21,0.08), 0 0 0 1px rgba(24,22,21,0.04);
  --shadow-md: 0 4px 20px rgba(24,22,21,0.10), 0 1px 4px rgba(24,22,21,0.06);

  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   16px;
  --radius-full: 9999px;
  --transition:  150ms ease;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-page:        var(--ash-900);
    --bg-card:        #232120;
    --bg-card-hover:  var(--ash-800);
    --bg-nav:         rgba(24, 22, 21, 0.90);
    --text-primary:   var(--ash-100);
    --text-secondary: var(--ash-400);
    --text-tertiary:  var(--ash-500);
    --border-subtle:  var(--ash-700);
    --border-default: var(--ash-700);
    --accent-soft-bg: #2E0D03;
    --accent-soft-tx: var(--ember-200);
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.30);
    --shadow-sm: 0 1px 4px rgba(0,0,0,0.28), 0 0 0 1px rgba(255,255,255,0.04);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.45), 0 1px 6px rgba(0,0,0,0.20);
  }
}

/* --- Base --- */
html { font-size: 16px; scroll-behavior: smooth; }
/* Prevent iOS auto-zoom on input focus (requires font-size >= 16px) */
input, select, textarea { font-size: 16px; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===================================================
   NAVBAR
   =================================================== */
.v2-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 16px 0;
  transition: background var(--transition), box-shadow var(--transition), padding var(--transition);
}

.v2-nav.scrolled {
  background: var(--bg-nav);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-sm);
  padding: 12px 0;
}

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

.nav-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.nav-logo img { height: 22px; width: auto; }

/* Default: show dark logo (for light bg), hide light logo */
img.logo-on-dark  { display: none; }
img.logo-on-light { display: block; }

/* System dark mode: swap */
@media (prefers-color-scheme: dark) {
  img.logo-on-dark  { display: block; }
  img.logo-on-light { display: none; }
}

/* Force light logo on pages with always-dark nav (e.g. profile hero) */
.nav-dark img.logo-on-dark  { display: block; }
.nav-dark img.logo-on-light { display: none; }

/* Once scrolled, the nav has a frosted bg — revert to system preference */
@media (prefers-color-scheme: light) {
  .nav-dark.scrolled img.logo-on-dark  { display: none; }
  .nav-dark.scrolled img.logo-on-light { display: block; }
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex: 1;
}

.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.nav-link:hover {
  color: var(--text-primary);
  background: var(--border-subtle);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
  position: relative;
  z-index: 101;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 200ms ease, opacity 200ms ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.v2-nav.sheet-open {
  z-index: 97;
}
.v2-nav.sheet-open .nav-actions {
  opacity: 0;
  pointer-events: none;
}
.nav-toggle.open {
  position: fixed;
  top: 8px;
  right: 16px;
  z-index: 200;
  background: rgba(24, 22, 21, 0.65);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-toggle.open span {
  background: #fff;
  width: 18px;
  height: 2.5px;
}

/* Bottom sheet */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(24, 22, 21, 0.5);
  z-index: 98;
  visibility: hidden;
  opacity: 0;
  transition: opacity 250ms ease, visibility 250ms ease;
}
.sheet-backdrop.open {
  visibility: visible;
  opacity: 1;
}

.nav-sheet {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--bg-card);
  border-radius: 20px 20px 0 0;
  padding: 12px 24px calc(32px + env(safe-area-inset-bottom));
  z-index: 99;
  transform: translateY(100%);
  transition: transform 320ms cubic-bezier(0.32, 0.72, 0, 1);
  display: flex;
  flex-direction: column;
}
.nav-sheet.open { transform: translateY(0); }

.sheet-handle {
  width: 40px;
  height: 4px;
  background: var(--border-default);
  border-radius: 2px;
  margin: 0 auto 20px;
  flex-shrink: 0;
}

.sheet-links {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
}

.sheet-link {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  padding: 14px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.sheet-link:last-child { border-bottom: none; }

.sheet-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 4px;
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-actions { margin-left: auto; }
  .nav-toggle { display: flex; }
}

/* ===================================================
   BUTTONS
   =================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
  line-height: 1;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(240,80,32,0.28);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border-default);
}
.btn-ghost:hover {
  background: var(--border-subtle);
  color: var(--text-primary);
}

.btn-outline-dark {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-default);
}
.btn-outline-dark:hover { background: var(--border-subtle); }

.btn-white {
  background: #fff;
  color: var(--ash-900);
  border-color: #fff;
}
.btn-white:hover {
  background: var(--ash-100);
  transform: translateY(-1px);
}

.btn-lg {
  font-size: 15px;
  padding: 12px 24px;
}

/* ===================================================
   HERO
   =================================================== */
.hero {
  padding: 128px 0 80px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

/* Hybrid: photo on right, page color holds the text left */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('/onepsr-bg.jpg');
  background-size: auto 140%;
  background-position: left center;
  background-repeat: no-repeat;
  opacity: 0.50;
  z-index: 0;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    var(--bg-page)       30%,
    rgba(247,244,243,0.97) 42%,
    rgba(247,244,243,0.75) 55%,
    rgba(247,244,243,0.20) 72%,
    rgba(247,244,243,0)    85%
  );
  z-index: 1;
}

@media (prefers-color-scheme: dark) {
  .hero::before { opacity: 0.60; }
  .hero::after {
    background: linear-gradient(
      105deg,
      var(--bg-page)    30%,
      rgba(24,22,21,0.97) 42%,
      rgba(24,22,21,0.75) 55%,
      rgba(24,22,21,0.20) 72%,
      rgba(24,22,21,0)    85%
    );
  }
}

.hero .container { position: relative; z-index: 2; }

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft-bg);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 20px;
}

.hero-title {
  font-size: clamp(34px, 4.5vw, 56px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.035em;
  color: var(--text-primary);
  margin-bottom: 20px;
}
.hero-title em {
  font-style: normal;
  color: var(--accent);
}

.hero-subtitle {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 28px;
  max-width: 460px;
}

.hero-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 36px;
}

.hero-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
}

.check-dot {
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  background: var(--green-100);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green-700);
  font-size: 11px;
}

@media (prefers-color-scheme: dark) {
  .check-dot { background: var(--green-800); color: var(--green-500); }
}

.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }

/* Hero Visual */
.hero-visual {
  position: relative;
  height: 460px;
}

.mock-card {
  position: absolute;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(24,22,21,0.18), 0 2px 8px rgba(24,22,21,0.10);
  border: 1px solid var(--border-subtle);
}

.mock-main {
  width: 290px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-2deg);
  padding: 24px;
  z-index: 2;
}

.mock-main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.mock-verified {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green-700);
  background: var(--green-100);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}
@media (prefers-color-scheme: dark) {
  .mock-verified { color: var(--green-500); background: var(--green-800); }
}

.mock-time { font-size: 12px; color: var(--text-tertiary); }

.mock-score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.mock-score-team { text-align: center; }

.mock-num {
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text-primary);
}
.mock-num.dim { color: var(--text-tertiary); }

.mock-team-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  margin-top: 4px;
}
.mock-team-label.you { color: var(--accent); }

.mock-vs {
  font-size: 12px;
  font-weight: 600;
  color: var(--border-default);
}

.mock-gain {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--green-100);
  color: var(--green-700);
  border-radius: var(--radius-sm);
  padding: 10px;
  font-size: 13px;
  font-weight: 600;
}
@media (prefers-color-scheme: dark) {
  .mock-gain { background: var(--green-800); color: var(--green-500); }
}

/* Floating cards */
.mock-float {
  padding: 14px 16px;
  z-index: 1;
}
.mock-float-1 {
  width: 160px;
  top: 10%;
  right: 4%;
  animation: float 6s ease-in-out infinite;
}
.mock-float-2 {
  width: 152px;
  bottom: 10%;
  left: -2%;
  animation: float 5s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.mock-fl-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  margin-bottom: 4px;
}
.mock-fl-val {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1;
}
.mock-fl-sub {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 4px;
}
.mock-fl-sub.up { color: var(--green-700); font-weight: 600; }
@media (prefers-color-scheme: dark) {
  .mock-fl-sub.up { color: var(--green-500); }
}

/* ===================================================
   SHARED SECTION STYLES
   =================================================== */
section { padding: 80px 0; }

.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(26px, 3.5vw, 38px);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin-bottom: 14px;
  line-height: 1.15;
}

.section-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 560px;
}

.section-header { margin-bottom: 56px; }
.section-header.centered { text-align: center; }
.section-header.centered .section-subtitle { margin: 0 auto; }

/* ===================================================
   HOW IT WORKS
   =================================================== */
.how-section { background: var(--bg-card); border-top: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); }

.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.how-card {
  background: var(--bg-page);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  position: relative;
  transition: box-shadow var(--transition), transform var(--transition);
}
.how-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.how-step-num {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

.how-icon {
  width: 48px;
  height: 48px;
  background: var(--accent-soft-bg);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 20px;
  color: var(--accent);
}

.how-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.how-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ===================================================
   STATS
   =================================================== */
.stats-section {
  background: var(--bg-page);
  border-bottom: 1px solid var(--border-subtle);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.stat-item {
  padding: 40px 24px;
  text-align: center;
  border-right: 1px solid var(--border-subtle);
}
.stat-item:last-child { border-right: none; }

.stat-num {
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 6px;
}
.stat-num .accent { color: var(--accent); }

.stat-label {
  font-size: 13px;
  color: var(--text-tertiary);
  font-weight: 500;
}

/* ===================================================
   LEADERBOARD PREVIEW
   =================================================== */
.lb-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.lb-head {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lb-head-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.lb-head-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: opacity var(--transition);
}
.lb-head-link:hover { opacity: 0.75; }

.lb-col-headers {
  display: grid;
  grid-template-columns: 40px 1fr auto auto;
  gap: 12px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--border-subtle);
}

.lb-col-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.lb-col-label.right { text-align: right; }

.lb-row {
  display: grid;
  grid-template-columns: 40px 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition);
}
.lb-row:last-child { border-bottom: none; }
.lb-row:hover { background: var(--bg-card-hover); }

.lb-rank {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-tertiary);
  text-align: center;
}
.lb-rank.gold   { color: #C28200; }
.lb-rank.silver { color: var(--ash-500); }
.lb-rank.bronze { color: #8F5F00; }

.lb-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.lb-psr {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  text-align: right;
}

.lb-matches {
  font-size: 12px;
  color: var(--text-tertiary);
  text-align: right;
  min-width: 56px;
}

/* ===================================================
   FAQ
   =================================================== */
.faq-section { background: var(--bg-card); border-top: 1px solid var(--border-subtle); }

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 720px;
  margin: 0 auto;
}

.faq-item {
  background: var(--bg-page);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition);
}
.faq-item.open {
  border-color: var(--accent);
  border-left-width: 3px;
  background: var(--accent-soft-bg);
}

.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  background: none;
  border: none;
  text-align: left;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: background var(--transition);
}
.faq-q:hover { background: var(--bg-card-hover); }

.faq-icon {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  background: var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 15px;
  font-weight: 400;
  color: var(--text-secondary);
  transition: transform 250ms ease, background var(--transition), color var(--transition);
  line-height: 1;
}
.faq-item.open .faq-icon {
  transform: rotate(45deg);
  background: var(--accent-soft-bg);
  color: var(--accent);
}

.faq-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 300ms ease;
}
.faq-item.open .faq-body { max-height: 300px; }

.faq-body-inner {
  padding: 0 20px 18px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 14px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.75;
}

/* ===================================================
   CTA BANNER
   =================================================== */
.cta-section {
  background: radial-gradient(ellipse at 50% 140%, rgba(240, 80, 32, 0.18) 0%, var(--ash-900) 60%);
  padding: 80px 0;
}
@media (prefers-color-scheme: dark) {
  .cta-section {
    background: radial-gradient(ellipse at 50% 140%, rgba(240, 80, 32, 0.14) 0%, var(--ash-900) 60%);
    border-top: 1px solid var(--border-subtle);
  }
}

.cta-inner {
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
}

.cta-title {
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ash-100);
  margin-bottom: 14px;
  line-height: 1.15;
}

.cta-sub {
  font-size: 16px;
  color: var(--ash-500);
  margin-bottom: 32px;
  line-height: 1.6;
}

/* ===================================================
   FOOTER
   =================================================== */
.v2-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-subtle);
  padding: 36px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 28px;
}

.footer-logo {
  margin-bottom: 10px;
}
.footer-logo img { height: 20px; width: auto; }

.footer-tagline {
  font-size: 13px;
  color: var(--text-tertiary);
  line-height: 1.65;
  max-width: 260px;
}

.footer-col-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 16px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-links a {
  font-size: 14px;
  color: var(--text-secondary);
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--text-primary); }

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-copy { font-size: 13px; color: var(--text-tertiary); }

/* ===================================================
   RESPONSIVE
   =================================================== */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .hero-subtitle { max-width: 100%; }
  .hero { min-height: auto; padding: 140px 0 72px; }

  .hero::before { display: none; }
  .hero::after { display: none; }

  .how-grid { grid-template-columns: 1fr; gap: 16px; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(2) { border-right: none; }
  .stat-item:nth-child(3) {
    border-top: 1px solid var(--border-subtle);
    border-right: 1px solid var(--border-subtle);
  }
  .stat-item:nth-child(4) {
    border-top: 1px solid var(--border-subtle);
    border-right: none;
  }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .container { padding: 0 16px; }
  section { padding: 56px 0; }
  .hero { padding: 100px 0 56px; min-height: auto; }
  .hero-visual { height: 280px; }
  .mock-float { display: none; }
  .mock-main { width: 240px; }

  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-item { padding: 28px 16px; }
  .stat-num { font-size: 28px; }

  .lb-col-headers { display: none; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; gap: 6px; text-align: center; }
}

/* ===================================================
   INNER PAGE HERO
   =================================================== */
.inner-hero {
  padding: 140px 0 72px;
  border-bottom: 1px solid var(--border-subtle);
}

.inner-hero-content { max-width: 640px; }

.inner-hero-title {
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.1;
  margin-bottom: 16px;
}
.inner-hero-title em { font-style: normal; color: var(--accent); }

.inner-hero-sub {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 520px;
}

/* ===================================================
   FORMULA SECTION
   =================================================== */
.formula-section {
  background: var(--ash-900);
  padding: 80px 0;
  border-top: 1px solid var(--ash-800);
  border-bottom: 1px solid var(--ash-800);
}

.formula-header {
  max-width: 560px;
  margin-bottom: 48px;
}

.formula-title {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ash-100);
  line-height: 1.15;
  margin-bottom: 14px;
}

.formula-sub {
  font-size: 16px;
  color: var(--ash-500);
  line-height: 1.7;
}

.formula-display {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-bottom: 40px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--ash-700);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.formula-part {
  flex: 1;
  padding: 36px 28px;
  text-align: center;
  border-right: 1px solid var(--ash-800);
}

.formula-result {
  border-right: none;
  background: rgba(240,80,32,0.06);
}

.formula-symbol {
  font-size: 52px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--ash-300);
  line-height: 1;
  margin-bottom: 16px;
  font-style: italic;
}

.formula-word {
  font-size: 36px;
  font-style: normal;
  letter-spacing: -0.03em;
}

.formula-sym-sm {
  font-size: 38px;
  font-style: italic;
}

.formula-psr {
  font-size: 40px;
  font-style: normal;
  letter-spacing: -0.02em;
  color: var(--ember-500);
}

.formula-part-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ash-500);
  margin-bottom: 12px;
}

.formula-part-desc {
  font-size: 13px;
  color: var(--ash-600);
  line-height: 1.7;
}

.formula-op {
  font-size: 36px;
  font-weight: 300;
  color: var(--ash-700);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 0 4px;
}

.formula-note {
  font-size: 13px;
  color: var(--ash-600);
  border-top: 1px solid var(--ash-800);
  padding-top: 24px;
  line-height: 1.65;
}

/* ===================================================
   RATING TIER TABLE
   =================================================== */
.tier-table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.tier-table { display: grid; }

.tier-row {
  display: grid;
  grid-template-columns: 170px 170px 1fr;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition);
}
.tier-row:last-child { border-bottom: none; }
.tier-row:hover:not(.tier-head) { background: var(--bg-card-hover); }

.tier-head {
  background: var(--bg-page);
  padding: 11px 24px;
}
.tier-head span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.tier-avg {
  border-left: 3px solid var(--accent);
  padding-left: 21px;
  background: var(--accent-soft-bg);
}

.tier-range {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.tier-badge {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.badge-pro      { background: var(--ember-500); color: #fff; }
.badge-expert   { background: var(--ember-100); color: var(--ember-700); }
.badge-advanced { background: var(--green-100); color: var(--green-700); }
.badge-high-int { background: var(--ash-200);   color: var(--ash-700); }
.badge-int      { background: var(--ash-200);   color: var(--ash-700); }
.badge-novice   { background: var(--ash-100);   color: var(--ash-600); }
.badge-newbie   { background: transparent; color: var(--ash-500); border: 1px solid var(--border-subtle); }

@media (prefers-color-scheme: dark) {
  .badge-expert   { background: #2E0D03; color: var(--ember-200); }
  .badge-advanced { background: var(--green-800); color: var(--green-500); }
  .badge-high-int { background: var(--ash-800); color: var(--ash-300); }
  .badge-int      { background: var(--ash-800); color: var(--ash-300); }
  .badge-novice   { background: var(--ash-800); color: var(--ash-500); }
  .badge-newbie   { background: transparent; color: var(--ash-600); border-color: var(--ash-700); }
}

.tier-desc-col {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===================================================
   CALIBRATION BANNER
   =================================================== */
.calibration-banner {
  display: flex;
  align-items: center;
  gap: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.calibration-icon {
  width: 56px;
  height: 56px;
  background: var(--accent-soft-bg);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
}

.calibration-body { flex: 1; }

.calibration-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.calibration-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.calibration-stat {
  text-align: center;
  flex-shrink: 0;
  padding-left: 28px;
  border-left: 1px solid var(--border-subtle);
}

.calibration-num {
  font-size: 52px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 4px;
}

.calibration-label {
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 500;
  white-space: nowrap;
}

/* ===================================================
   RESPONSIVE — RATING SYSTEM PAGE
   =================================================== */
@media (max-width: 900px) {
  .inner-hero { padding: 120px 0 56px; }

  .formula-display {
    flex-direction: column;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--ash-700);
    border-radius: var(--radius-lg);
    overflow: hidden;
  }

  .formula-part {
    border-right: none;
    border-bottom: 1px solid var(--ash-800);
    text-align: left;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 24px;
  }
  .formula-part:last-child { border-bottom: none; }
  .formula-result { background: rgba(240,80,32,0.06); }

  .formula-symbol {
    font-size: 32px;
    margin-bottom: 0;
    flex-shrink: 0;
    min-width: 80px;
    text-align: center;
  }
  .formula-word   { font-size: 26px; min-width: 80px; }
  .formula-sym-sm { font-size: 30px; }
  .formula-psr    { font-size: 28px; }

  .formula-op { display: none; }

  .tier-row          { grid-template-columns: 130px 1fr; }
  .tier-desc-col     { display: none; }
  .tier-head span:last-child { display: none; }
  .tier-avg          { padding-left: 21px; }

  .calibration-banner { flex-wrap: wrap; }
  .calibration-stat {
    border-left: none;
    border-top: 1px solid var(--border-subtle);
    padding-left: 0;
    padding-top: 20px;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
  }
  .calibration-num { font-size: 36px; margin-bottom: 0; }
}

@media (max-width: 600px) {
  .inner-hero { padding: 100px 0 48px; }
  .tier-row { grid-template-columns: 110px 1fr; gap: 8px; padding: 12px 16px; }
  .tier-head { padding: 10px 16px; }
  .tier-avg  { padding-left: 13px; }
  .calibration-banner { padding: 24px; }
  .calibration-icon { display: none; }
}

/* ===================================================
   LEADERBOARD PAGE
   =================================================== */

.lb-tab-bar {
  display: flex;
  gap: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 4px;
  width: fit-content;
  margin-bottom: 32px;
  box-shadow: var(--shadow-xs);
}

.lb-tab {
  font-size: 14px;
  font-weight: 600;
  padding: 9px 28px;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  line-height: 1;
}

.lb-tab.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(240,80,32,0.28);
}

.lb-tab:not(.active):hover {
  background: var(--border-subtle);
  color: var(--text-primary);
}

.lb-page-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.lb-page-col-headers {
  display: grid;
  grid-template-columns: 48px 1fr 150px 90px;
  gap: 12px;
  padding: 11px 24px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-page);
}

.lb-page-col-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.lb-page-col-label.right { text-align: right; }

.lb-page-row {
  display: grid;
  grid-template-columns: 48px 1fr 150px 90px;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition);
  color: inherit;
  text-decoration: none;
}
.lb-page-row:last-child { border-bottom: none; }
.lb-page-row:hover { background: var(--bg-card-hover); }

.lb-page-rank {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-tertiary);
  text-align: center;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-page-rank.gold   { color: #C28200; }
.lb-page-rank.silver { color: var(--ash-500); }
.lb-page-rank.bronze { color: #8F5F00; }

.lb-page-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.lb-page-gender {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  margin-left: 7px;
  vertical-align: middle;
}
.lb-gender-m { background: var(--ash-200); color: var(--ash-700); }
.lb-gender-f { background: var(--ember-100); color: var(--ember-700); }
@media (prefers-color-scheme: dark) {
  .lb-gender-m { background: var(--ash-800); color: var(--ash-400); }
  .lb-gender-f { background: #2E0D03; color: var(--ember-200); }
}

.lb-page-city {
  font-size: 13px;
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lb-page-matches {
  font-size: 13px;
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.lb-page-psr {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.lb-empty {
  padding: 56px 24px;
  text-align: center;
  font-size: 14px;
  color: var(--text-tertiary);
}

@media (max-width: 900px) {
  .lb-page-col-headers,
  .lb-page-row {
    grid-template-columns: 44px 1fr 90px;
  }
  .lb-page-city,
  .lb-page-matches,
  .lb-hide-tablet {
    display: none;
  }
}

@media (max-width: 600px) {
  .lb-page-col-headers,
  .lb-page-row {
    padding: 12px 16px;
    gap: 8px;
    grid-template-columns: 36px 1fr auto;
  }
  .lb-tab { padding: 9px 20px; }
  .lb-page-name { font-size: 13px; }
  .lb-page-psr  { font-size: 14px; }
}

/* ===================================================
   PLAYER PROFILE PAGE
   =================================================== */

.profile-hero {
  background: var(--ash-900);
  padding: 140px 0 64px;
  border-bottom: 1px solid var(--ash-800);
}

.profile-hero-inner {
  max-width: 540px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 24px;
}

.profile-avatar {
  width: 88px;
  height: 88px;
  border-radius: var(--radius-full);
  background: var(--ember-500);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.profile-name {
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ash-100);
  line-height: 1.1;
  margin: 0;
}

.profile-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--ash-500);
  margin: -8px 0 0;
}

.profile-meta-sep { color: var(--ash-700); }

/* PSR Rating Boxes */
.profile-ratings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
}

.profile-rating-box {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--ash-700);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.profile-rating-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ash-500);
  margin-bottom: 8px;
}

.profile-rating-value {
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--ash-100);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.profile-rating-unit {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ember-500);
  margin-bottom: 8px;
}

.profile-rating-record {
  font-size: 13px;
  font-weight: 500;
  color: var(--ash-400);
}

.profile-rating-wr {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  margin-top: 4px;
}
.profile-rating-wr.wr-good { background: rgba(15,125,48,0.20); color: #23E05A; }
.profile-rating-wr.wr-bad  { background: rgba(142,12,12,0.20); color: #F02020; }

.profile-rating-unrated {
  font-size: 15px;
  font-weight: 600;
  color: var(--ash-600);
  letter-spacing: 0.01em;
  margin: 8px 0;
}

.profile-rating-progress {
  width: 72%;
  height: 3px;
  background: var(--ash-700);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin: 6px 0;
}

.profile-rating-bar {
  height: 100%;
  background: var(--ember-500);
  border-radius: var(--radius-full);
}

.profile-rating-left {
  font-size: 11px;
  color: var(--ash-600);
}

/* Profile Stats */
.profile-stats {
  display: flex;
  width: 100%;
  border: 1px solid var(--ash-700);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.profile-stat {
  flex: 1;
  padding: 20px 16px;
  text-align: center;
  border-right: 1px solid var(--ash-700);
}
.profile-stat:last-child { border-right: none; }

.profile-stat-num {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ash-100);
  line-height: 1;
  margin-bottom: 4px;
}

.profile-stat-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ash-600);
}

/* Profile Name + Share inline wrapper */
.profile-name-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* Share icon button — sits beside the name */
.profile-share-btn {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--ash-700);
  background: transparent;
  color: var(--ash-500);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  margin-top: 4px;
}
.profile-share-btn:hover {
  border-color: var(--ash-400);
  color: var(--ash-200);
}

/* ===================================================
   MATCH HISTORY SECTION
   =================================================== */
.match-section { padding: 64px 0 80px; }

.match-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.match-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-subtle);
}

.match-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.match-card-sub {
  font-size: 13px;
  color: var(--text-tertiary);
}

.match-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: background var(--transition);
}
.match-row:last-child { border-bottom: none; }
.match-row:hover { background: var(--bg-card-hover); }

.match-indicator {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.match-indicator.win    { background: #EDFAF3; color: #0F7D30; }
.match-indicator.loss   { background: #FFF1F1; color: #8E0C0C; }
.match-indicator.cancel { background: var(--ash-200); color: var(--ash-600); }
@media (prefers-color-scheme: dark) {
  .match-indicator.win    { background: #084D1D; color: #23E05A; }
  .match-indicator.loss   { background: #2E0303; color: #F02020; }
  .match-indicator.cancel { background: var(--ash-700); color: var(--ash-500); }
}

/* match-modal cancel state */
.match-modal-header.cancel { background: var(--ash-200); }
@media (prefers-color-scheme: dark) {
  .match-modal-header.cancel { background: var(--ash-700); }
}
.match-modal-dot.cancel { background: var(--ash-400); }
.match-modal-result-label.cancel { color: var(--ash-600); }

.match-info { flex: 1; min-width: 0; }

.match-opponent {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.match-opp-prefix {
  font-weight: 400;
  color: var(--text-tertiary);
  font-size: 13px;
}

.match-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 3px;
}

.match-type-pill {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--border-subtle);
  color: var(--text-tertiary);
}

.match-date-text { font-size: 12px; color: var(--text-tertiary); }

.match-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  flex-shrink: 0;
}

.match-score-val {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.match-psr { font-size: 12px; font-weight: 600; }
.match-psr.positive { color: #0F7D30; }
.match-psr.negative { color: #8E0C0C; }
.match-psr.muted    { color: var(--text-tertiary); font-weight: 500; }
@media (prefers-color-scheme: dark) {
  .match-psr.positive { color: #23E05A; }
  .match-psr.negative { color: #F02020; }
}

.match-empty {
  padding: 56px 24px;
  text-align: center;
  font-size: 14px;
  color: var(--text-tertiary);
}

/* Filter tabs */
.match-filter-tabs {
  display: flex;
  gap: 2px;
}

.match-filter-tab {
  border: none;
  background: none;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  line-height: 1.4;
}

.match-filter-tab:hover {
  background: var(--border-subtle);
  color: var(--text-secondary);
}

.match-filter-tab.active {
  background: var(--accent);
  color: #fff;
}

/* Filter empty state */
.match-filter-empty {
  padding: 48px 24px;
  text-align: center;
}

.match-empty-primary {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.match-empty-hint {
  margin-top: 6px;
}

.match-empty-hint button {
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
  color: var(--accent);
  cursor: pointer;
  font-weight: 600;
}

.match-empty-hint button:hover {
  text-decoration: underline;
}

.match-footer {
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-tertiary);
  border-top: 1px solid var(--border-subtle);
}

.match-share-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 0;
  transition: opacity var(--transition);
}
.match-share-btn:hover { opacity: 0.7; }

/* ===================================================
   SHARE CARD
   =================================================== */
.share-card {
  width: 100%;
  aspect-ratio: 4/5;
  background: linear-gradient(160deg, #1c0905 0%, #2d1008 45%, #111 100%);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

.share-card-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.share-card-overlay {
  position: absolute;
  inset: 0;
  background: transparent;
  transition: background 0.2s;
  z-index: 1;
}
.share-card.has-photo .share-card-overlay {
  background: rgba(0,0,0,0.52);
}

.share-card-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 24px;
  box-sizing: border-box;
}

.share-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  margin-bottom: auto;
}

.share-card-brand-logo {
  height: 18px;
  width: auto;
  display: block;
}

.share-card-period {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 10px;
  color: rgba(255,255,255,0.65);
  white-space: nowrap;
}

.share-card-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 16px;
  margin-bottom: 24px;
}

.share-stat-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 4px;
}

.share-stat-value {
  font-size: 30px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1;
}
.share-stat-value.positive { color: #F05020; }
.share-stat-value.negative { color: #F05020; }
.share-stat-large { font-size: 40px; }

.share-card-footer-brand {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.35);
  text-align: center;
}

.share-photo-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.share-photo-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--border-subtle);
  border: none;
  border-radius: var(--radius-full);
  padding: 6px 12px;
  cursor: pointer;
  transition: background var(--transition);
}
.share-photo-btn:hover { background: var(--ash-200); }

.share-photo-remove {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 0;
  transition: color var(--transition);
}
.share-photo-remove:hover { color: #F02020; }

.share-style-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

.share-style-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.share-style-toggle {
  display: flex;
  gap: 3px;
  background: var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 3px;
}

.share-style-btn {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  background: none;
  border: none;
  border-radius: var(--radius-full);
  padding: 4px 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.share-style-btn.active {
  background: #fff;
  color: #111;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

/* Dark text variant — light background so text is readable */
.share-card.text-dark:not(.has-photo) {
  background: linear-gradient(160deg, #f0ebe8 0%, #e4dbd6 45%, #d8cecc 100%);
}
.share-card.text-dark .share-card-period {
  color: rgba(0,0,0,0.55);
}
.share-card.text-dark .share-stat-label {
  color: rgba(0,0,0,0.55);
}
.share-card.text-dark .share-stat-value {
  color: #111;
}
.share-card.text-dark .share-stat-value.positive { color: #C03A12; }
.share-card.text-dark .share-stat-value.negative { color: #C03A12; }
.share-card.text-dark .share-card-footer-brand {
  color: rgba(0,0,0,0.4);
}

/* ===================================================
   MATCH DETAIL MODAL
   =================================================== */
.match-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(24,22,21,0.60);
  z-index: 200;
  visibility: hidden;
  opacity: 0;
  transition: opacity 200ms ease, visibility 200ms ease;
}
.match-modal-backdrop.open { visibility: visible; opacity: 1; }

.match-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%) scale(0.97);
  width: min(480px, calc(100vw - 32px));
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  z-index: 201;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 200ms ease, transform 200ms ease, visibility 200ms ease;
  box-shadow: 0 24px 64px rgba(0,0,0,0.28), 0 4px 16px rgba(0,0,0,0.12);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}
.match-modal.open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.match-modal-header {
  padding: 24px 24px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.match-modal-header.win  { background: #EDFAF3; }
.match-modal-header.loss { background: #FFF1F1; }
@media (prefers-color-scheme: dark) {
  .match-modal-header.win  { background: #084D1D; }
  .match-modal-header.loss { background: #2E0303; }
}

.match-modal-result-wrap { display: flex; align-items: center; gap: 12px; }

.match-modal-dot {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}
.match-modal-dot.win  { background: #0F7D30; color: #fff; }
.match-modal-dot.loss { background: #8E0C0C; color: #fff; }

.match-modal-result-label {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.match-modal-result-label.win  { color: #0F7D30; }
.match-modal-result-label.loss { color: #8E0C0C; }
.match-modal-result-sub {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 2px;
}
@media (prefers-color-scheme: dark) {
  .match-modal-result-label.win  { color: #23E05A; }
  .match-modal-result-label.loss { color: #F02020; }
}

.match-modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: rgba(24,22,21,0.08);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  flex-shrink: 0;
  transition: background var(--transition);
}
.match-modal-close:hover { background: rgba(24,22,21,0.15); }
@media (prefers-color-scheme: dark) {
  .match-modal-close { background: rgba(255,255,255,0.08); }
  .match-modal-close:hover { background: rgba(255,255,255,0.15); }
}

.match-modal-score-row {
  padding: 28px 24px;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  text-align: center;
}

.match-modal-score {
  font-size: 52px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.match-modal-score-sub {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 8px;
}

.match-modal-fields { display: grid; grid-template-columns: 1fr 1fr; }

.match-modal-field {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-subtle);
}
.match-modal-field:nth-child(odd) { border-right: 1px solid var(--border-subtle); }

.match-modal-field-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 5px;
}

.match-modal-field-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}
.match-modal-field-value.positive { color: #0F7D30; }
.match-modal-field-value.negative { color: #8E0C0C; }
.match-modal-field-value.muted    { color: var(--text-tertiary); font-weight: 500; }
@media (prefers-color-scheme: dark) {
  .match-modal-field-value.positive { color: #23E05A; }
  .match-modal-field-value.negative { color: #F02020; }
}

/* Copy Toast */
.copy-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--ash-800);
  color: var(--ash-100);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease, transform 200ms ease;
  box-shadow: var(--shadow-md);
  white-space: nowrap;
}
.copy-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Profile Responsive */
@media (max-width: 600px) {
  .profile-hero { padding: 100px 0 48px; }
  .profile-rating-value { font-size: 36px; }
  .profile-stat-num { font-size: 22px; }
  .match-row { padding: 14px 16px; gap: 12px; }
  .match-card-header { padding: 14px 16px; }
  .match-modal-score { font-size: 40px; }
  .match-modal-fields { grid-template-columns: 1fr; }
  .match-modal-field:nth-child(odd) { border-right: none; }
}

/* ===================================================
   AUTH PAGES (Login, Register, Forgot Password, etc.)
   =================================================== */
/* Light mode (default) */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 24px 64px;
  background: var(--ash-100);
  position: relative;
  overflow: hidden;
}

/* Subtle ember tint behind card — very soft in light mode */
.auth-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 48%, rgba(240, 80, 32, 0.07) 0%, transparent 60%);
  z-index: 0;
  pointer-events: none;
}

/* Grain texture overlay */
.auth-page::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
  z-index: 0;
  pointer-events: none;
}

.auth-page > * { position: relative; z-index: 1; }

/* Light mode card */
.auth-card {
  background: #ffffff;
  border: 1px solid var(--ash-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 40px;
  width: 100%;
  max-width: 420px;
}

.auth-logo {
  display: inline-block;
  margin-bottom: 4px;
}
.auth-logo img { display: block; height: 22px; width: auto; }

.auth-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ash-900);
  margin-bottom: 6px;
  margin-top: 20px;
}

.auth-subtitle {
  font-size: 14px;
  color: var(--ash-600);
  margin-bottom: 28px;
}

/* Dark mode overrides */
@media (prefers-color-scheme: dark) {
  .auth-page {
    background: var(--ash-900);
  }

  .auth-page::before {
    background: radial-gradient(ellipse at 50% 48%, rgba(240, 80, 32, 0.22) 0%, rgba(240, 80, 32, 0.06) 40%, transparent 68%);
  }

  .auth-page::after { opacity: 1.4; }

  .auth-card {
    background: #232120;
    border-color: rgba(255, 255, 255, 0.07);
    box-shadow: 0 8px 40px rgba(0,0,0,0.45), 0 1px 0 rgba(255,255,255,0.05);
  }

  .auth-title { color: var(--ash-100); }
  .auth-subtitle { color: var(--ash-500); }

  .auth-card .form-label { color: var(--ash-200); }

  .auth-card .form-input {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.10);
    color: var(--ash-100);
  }
  .auth-card .form-input::placeholder { color: var(--ash-600); }
  .auth-card .form-input:focus {
    background: rgba(255, 255, 255, 0.07);
  }

  .auth-card .form-check-label { color: var(--ash-400); }

  .auth-card .auth-switch {
    color: var(--ash-500);
    border-top-color: rgba(255, 255, 255, 0.07);
  }
}

/* Form fields */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  font-size: 16px;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--bg-page);
  border: 1.5px solid var(--border-default);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
  appearance: none;
}
.form-input::placeholder { color: var(--text-tertiary); }
.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(240, 80, 32, 0.12);
}
.form-input.error {
  border-color: #F02020;
}

.form-error {
  font-size: 12px;
  color: #F02020;
  margin-top: 5px;
}

.form-hint {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 5px;
}

/* Verify email page */
.verify-email-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--accent-soft-bg);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.verify-email-hint {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

/* "Log out and try again" inline button */
.auth-switch-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
  color: var(--accent);
  font-weight: 500;
  cursor: pointer;
  transition: color var(--transition);
}
.auth-switch-btn:hover { color: var(--accent-hover); }

/* Mobile gradient overrides for verify email elements */
@media (max-width: 767px) {
  .auth-split .verify-email-icon {
    background: rgba(255,255,255,0.12);
    color: #fff;
  }
  .auth-split .verify-email-hint { color: rgba(255,255,255,0.55); }
  .auth-split .auth-subtitle strong { color: #fff; }
  .auth-split .auth-switch-btn { color: #fff; }
  .auth-split .auth-switch-btn:hover { color: rgba(255,255,255,0.80); }
}

.form-input-readonly {
  opacity: 0.6;
  cursor: default;
}

/* Password input with show/hide toggle */
.input-password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-password-wrap .form-input {
  padding-right: 44px;
}

.input-password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 4px;
  color: var(--ash-500);
  display: flex;
  align-items: center;
  transition: color var(--transition);
}
.input-password-toggle:hover { color: var(--ash-300); }

/* Checkbox row */
.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
}

.form-check-input {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--border-default);
  border-radius: 4px;
  background: var(--bg-page);
  accent-color: var(--accent);
  flex-shrink: 0;
  cursor: pointer;
}

.form-check-label {
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
}

/* Submit button — full width */
.btn-auth {
  width: 100%;
  justify-content: center;
  font-size: 15px;
  padding: 12px 24px;
}

/* Divider between form action row items */
.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

/* Small link style */
.auth-link {
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
  transition: color var(--transition);
}
.auth-link:hover { color: var(--accent-hover); }

/* Session / alert banners */
.auth-alert {
  font-size: 13px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
}
.auth-alert-success {
  background: var(--green-100);
  color: var(--green-700);
  border: 1px solid #b8eed0;
}
@media (prefers-color-scheme: dark) {
  .auth-alert-success {
    background: var(--green-800);
    color: var(--green-500);
    border-color: var(--green-700);
  }
}

/* Bottom "switch" link — e.g. "Don't have an account?" */
.auth-switch {
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--border-subtle);
}

.auth-switch a {
  color: var(--accent);
  font-weight: 500;
}
.auth-switch a:hover { color: var(--accent-hover); }

@media (max-width: 480px) {
  .auth-card { padding: 28px 20px; }
  .auth-page { padding: 88px 16px 48px; }
}

/* ===================================================
   AUTH SPLIT LAYOUT (Login, Register, Forgot, etc.)
   =================================================== */
.auth-split {
  min-height: 100vh;
  display: flex;
  flex-direction: row;
}

/* Left brand panel */
.auth-panel {
  flex: 0 0 42%;
  position: relative;
  overflow: hidden;
  background: var(--ash-900);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px 48px 56px;
}

/* Court photo */
.auth-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--auth-panel-bg, url('/onepsr-bg.jpg'));
  background-size: cover;
  background-position: center;
  opacity: 0.28;
  z-index: 0;
}

/* Ember + dark gradient overlay */
.auth-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(240, 80, 32, 0.22) 0%, rgba(15, 12, 10, 0.70) 100%);
  z-index: 0;
}

.auth-panel > * { position: relative; z-index: 1; }

.auth-panel-logo img { height: 26px; width: auto; display: block; }

.auth-panel-tagline {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.25;
  color: var(--ash-400);
  margin: 0;
}

.auth-panel-tagline strong {
  color: #ffffff;
  display: block;
  margin-bottom: 4px;
}

/* Right form panel */
.auth-form-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 56px;
  background: #ffffff;
  min-height: 100vh;
  overflow-y: auto;
}

@media (prefers-color-scheme: dark) {
  .auth-form-panel { background: var(--ash-900); }
}

/* Card in split context: no chrome */
.auth-split .auth-card {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  max-width: 400px;
  width: 100%;
}

@media (prefers-color-scheme: dark) {
  .auth-split .auth-card { background: transparent; }
}

/* Mobile: full dark-ember gradient, logo+tagline top, form on gradient */
@media (max-width: 767px) {
  .auth-split {
    flex-direction: column;
    background: linear-gradient(160deg, #3D1A0A 0%, #211009 50%, #181615 100%);
    min-height: 100dvh;
  }

  .auth-panel {
    flex: none;
    height: auto;
    padding: 52px 24px 20px;
    background: transparent;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
  }

  .auth-panel::before { display: none; }
  .auth-panel::after  { display: none; }

  .auth-panel-tagline {
    display: block;
    font-size: 20px;
    text-align: center;
    margin-top: 10px;
  }

  .auth-form-panel {
    flex: 1;
    background: transparent;
    padding: 28px 24px 48px;
    min-height: auto;
    align-items: stretch;
  }

  .auth-split .auth-card {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    width: 100%;
    max-width: 100%;
    margin-top: 0;
  }

  /* Form elements on dark gradient */
  .auth-split .auth-title    { color: #fff; margin-top: 0; }
  .auth-split .auth-subtitle { color: rgba(255,255,255,0.55); }

  .auth-split .form-label { color: rgba(255,255,255,0.88); }

  .auth-split .form-input {
    background: rgba(255,255,255,0.09);
    border-color: rgba(255,255,255,0.18);
    color: #fff;
  }
  .auth-split .form-input::placeholder { color: rgba(255,255,255,0.36); }
  .auth-split .form-input:focus {
    background: rgba(255,255,255,0.13);
    border-color: rgba(255,255,255,0.42);
    box-shadow: 0 0 0 3px rgba(255,255,255,0.08);
  }
  .auth-split .form-input.error  { border-color: #FF8080; }
  .auth-split .form-error        { color: #FFB0B0; }

  .auth-split .input-password-toggle       { color: rgba(255,255,255,0.50); }
  .auth-split .input-password-toggle:hover { color: rgba(255,255,255,0.85); }

  .auth-split .auth-link       { color: rgba(255,255,255,0.65); }
  .auth-split .auth-link:hover { color: #fff; }

  .auth-split .form-check-label { color: rgba(255,255,255,0.70); }
  .auth-split .form-check-input {
    border-color: rgba(255,255,255,0.24);
    background: rgba(255,255,255,0.08);
  }

  .auth-split .auth-switch   { color: rgba(255,255,255,0.50); border-top-color: rgba(255,255,255,0.12); }
  .auth-split .auth-switch a { color: #fff; font-weight: 600; }
  .auth-split .auth-switch a:hover { color: rgba(255,255,255,0.80); }
}

/* ===================================================
   AUTH FULL-GRADIENT LAYOUT (Login, Register, etc.)
   =================================================== */
.auth-fullgradient {
  min-height: 100vh;
  min-height: 100dvh;
  background: linear-gradient(150deg, #F05020 0%, #8E2A0C 45%, #181615 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px 24px 48px;
}

.auth-fullgradient-inner {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.auth-fullgradient-header {
  text-align: center;
  margin-bottom: 40px;
}

.auth-fullgradient-logo {
  display: inline-block;
  margin-bottom: 16px;
}
.auth-fullgradient-logo img {
  height: 32px;
  width: auto;
  display: block;
}

.auth-fullgradient .auth-panel-tagline {
  font-size: 22px;
  text-align: center;
}

.auth-fullgradient-form {
  width: 100%;
}

/* Form elements on gradient */
.auth-fullgradient .form-label {
  color: rgba(255,255,255,0.9);
}

.auth-fullgradient .form-input {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.22);
  color: #fff;
}
.auth-fullgradient .form-input::placeholder {
  color: rgba(255,255,255,0.40);
}
.auth-fullgradient .form-input:focus {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.50);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.10);
}
.auth-fullgradient .form-input.error {
  border-color: #FF8080;
}
.auth-fullgradient .form-error {
  color: #FFB0B0;
}

.auth-fullgradient .input-password-toggle {
  color: rgba(255,255,255,0.55);
}
.auth-fullgradient .input-password-toggle:hover {
  color: rgba(255,255,255,0.9);
}

.auth-fullgradient .auth-link {
  color: rgba(255,255,255,0.75);
}
.auth-fullgradient .auth-link:hover { color: #fff; }

.auth-fullgradient .form-check-label {
  color: rgba(255,255,255,0.8);
}
.auth-fullgradient .form-check-input {
  border-color: rgba(255,255,255,0.30);
  background: rgba(255,255,255,0.10);
}

.auth-fullgradient .auth-switch {
  color: rgba(255,255,255,0.6);
  border-top-color: rgba(255,255,255,0.15);
}
.auth-fullgradient .auth-switch a {
  color: #fff;
  font-weight: 600;
}
.auth-fullgradient .auth-switch a:hover {
  color: rgba(255,255,255,0.8);
}

.auth-fullgradient .auth-alert-success {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border-color: rgba(255,255,255,0.25);
}

/* ===================================================
   UTILITIES (compat shims)
   =================================================== */
.d-none   { display: none !important; }
.d-block  { display: block !important; }
.btn-neon { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-neon:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-neon:disabled { background: var(--ash-400); border-color: var(--ash-400); cursor: not-allowed; }
.btn-light { background: var(--bg-page); color: var(--text-tertiary); border-color: var(--border-default); }
.btn-danger { background: #F02020; color: #fff; border-color: #F02020; }
.btn-danger:hover { background: #C01010; border-color: #C01010; }
.btn-secondary { background: var(--ash-600); color: #fff; border-color: var(--ash-600); }
.btn-secondary:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-full { width: 100%; justify-content: center; }

/* --- Bootstrap shims for JS-injected HTML (match.js / quick-log.js) --- */
.d-flex  { display: flex !important; }
.flex-column { flex-direction: column !important; }
.align-items-center { align-items: center !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }
.flex-shrink-0 { flex-shrink: 0 !important; }
.w-100 { width: 100% !important; }
.h-100 { height: 100% !important; }
.gap-2 { gap: 8px !important; }
.gap-3 { gap: 12px !important; }
.position-relative { position: relative !important; }
.position-absolute { position: absolute !important; }
.top-50  { top: 50% !important; }
.end-0   { right: 0 !important; }
.translate-middle { transform: translate(-50%, -50%) !important; }
.me-1 { margin-right: 4px !important; }
.me-2 { margin-right: 8px !important; }
.mt-1 { margin-top: 4px !important; }
.mt-2 { margin-top: 8px !important; }
.mb-2 { margin-bottom: 8px !important; }
.p-3  { padding: 12px !important; }
.py-3 { padding-top: 12px !important; padding-bottom: 12px !important; }
.px-4 { padding-left: 16px !important; padding-right: 16px !important; }
.fw-bold { font-weight: 700 !important; }
.small  { font-size: 12px !important; }
.text-muted    { color: var(--text-tertiary) !important; }
.text-dark     { color: var(--text-primary) !important; }
.text-danger   { color: #F02020 !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-center { text-align: center !important; }
.overflow-hidden { overflow: hidden !important; }
.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.border-dashed { border-style: dashed !important; }

/* list-group (for player search results injected by match.js) */
.list-group {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.list-group-item {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 13px;
  color: var(--text-primary);
  background: var(--bg-card);
}
.list-group-item:last-child { border-bottom: none; }
.list-group-item-action { cursor: pointer; }
.list-group-item-action:hover { background: var(--bg-card-hover); }

/* btn-outline-secondary (used in JS-injected slot add buttons) */
.btn-outline-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px dashed var(--border-default);
  border-radius: var(--radius-sm);
  padding: 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--transition);
  letter-spacing: 0.04em;
}
.btn-outline-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-close {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-tertiary);
  font-size: 14px;
  padding: 4px;
  line-height: 1;
}

/* Verify PIN box (JS-injected) */
.bg-warning.bg-opacity-10.border-warning {
  background: var(--accent-soft-bg) !important;
  border-color: var(--ember-200) !important;
}
.border-success { border-color: #23E05A !important; }
.bg-success { background: var(--green-100) !important; }
.bg-success.text-white { background: #0F7D30 !important; color: #fff !important; }
.rounded-circle { border-radius: 50% !important; }
.rounded-3 { border-radius: var(--radius-md) !important; }
.bg-secondary.bg-opacity-10 { background: var(--ash-200) !important; }
.is-invalid { border-color: #F02020 !important; }
.form-control {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
}
.form-control:focus { outline: none; border-color: var(--accent); }
.form-control.is-invalid { border-color: #F02020; }
.form-control-sm { font-size: 12px; padding: 6px 10px; }
.input-group { display: flex; }
.input-group .form-control { flex: 1; border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-group .btn { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.input-group-sm .form-control { font-size: 12px; padding: 6px 10px; }
.badge { display: inline-block; padding: 2px 7px; border-radius: var(--radius-full); font-size: 10px; font-weight: 700; }
.btn-warning { background: var(--ember-200); color: var(--ash-900); border: 1px solid var(--ember-200); font-weight: 700; cursor: pointer; }
.btn-warning:hover { background: var(--ember-500); color: #fff; }
.btn-sm { font-size: 12px; padding: 5px 10px; }
.fa-solid, .fa-regular { display: inline-block; }
.spinner-border { display: inline-block; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 0.75s linear infinite; }
.spinner-border-sm { width: 12px; height: 12px; }
@keyframes spin { to { transform: rotate(360deg); } }
.fa-spin { animation: spin 1s linear infinite; }

/* ===== BLOG ===== */
.blog-breadcrumb { font-size: 13px; margin-bottom: 16px; }
.blog-breadcrumb a { color: var(--accent); font-weight: 600; text-decoration: none; }
.blog-breadcrumb a:hover { text-decoration: underline; }
.blog-breadcrumb .sep { color: var(--text-tertiary); margin: 0 8px; }
.blog-cat-badge { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--accent-soft-tx); background: var(--accent-soft-bg); border: 1px solid rgba(240,80,32,0.3); border-radius: var(--radius-full); padding: 4px 12px; margin-bottom: 18px; }
.blog-hero-meta { display: flex; align-items: center; gap: 20px; font-size: 13px; color: var(--text-tertiary); flex-wrap: wrap; margin-top: 20px; }
.blog-hero-meta-item { display: flex; align-items: center; gap: 6px; }
.blog-hero-meta-item svg { opacity: 0.7; }

.blog-article { padding: 64px 0; background: var(--bg-main); }
.blog-article-inner { max-width: 760px; margin: 0 auto; padding: 0 24px; }
.blog-article-card { background: var(--bg-card); border-radius: var(--radius-lg); border: 1px solid var(--border-default); padding: 48px 52px; }
@media (max-width: 640px) { .blog-article-card { padding: 28px 20px; } }

.blog-lead { font-size: 18px; line-height: 1.8; color: var(--text-secondary); margin-bottom: 20px; }
.blog-p { font-size: 15px; line-height: 1.8; color: var(--text-secondary); margin-bottom: 16px; }
.blog-p strong { color: var(--text-primary); }
.blog-p:last-child { margin-bottom: 0; }

.blog-divider { border: none; border-top: 1px solid var(--border-default); margin: 32px 0; }

.blog-step { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 32px; }
.blog-step-num { width: 40px; height: 40px; border-radius: 50%; background: var(--ember-500); color: #fff; font-size: 17px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.blog-step-content { flex: 1; }
.blog-step-title { font-size: 17px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }

.blog-highlight { background: var(--ember-50); border-left: 4px solid var(--ember-500); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 16px 20px; margin: 24px 0; }
.blog-highlight-text { font-size: 14px; font-weight: 600; color: var(--text-primary); display: flex; gap: 10px; align-items: flex-start; line-height: 1.6; }
.blog-highlight-text svg { flex-shrink: 0; margin-top: 1px; color: var(--ember-500); }
@media (prefers-color-scheme: dark) { .blog-highlight { background: rgba(240,80,32,0.08); } }

.blog-h2 { font-size: 21px; font-weight: 700; color: var(--text-primary); margin: 0 0 14px 0; }
.blog-list { font-size: 15px; color: var(--text-secondary); line-height: 2.2; padding-left: 20px; margin-bottom: 0; }
.blog-list strong { color: var(--text-primary); }

.blog-system-h2 { font-size: 21px; font-weight: 700; color: var(--text-primary); margin: 0 0 6px 0; }
.blog-system-meta { font-size: 12px; color: var(--text-secondary); letter-spacing: 0.5px; margin-bottom: 14px; }
.blog-system-meta strong { color: var(--text-primary); }

.blog-table-wrap { overflow-x: auto; margin-bottom: 24px; border-radius: var(--radius-md); border: 1px solid var(--border-default); }
.blog-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.blog-table thead tr { background: var(--ash-800); }
.blog-table thead th { padding: 12px 14px; text-align: left; font-weight: 600; font-size: 11px; letter-spacing: 0.5px; color: rgba(255,255,255,0.85); text-transform: uppercase; }
.blog-table thead th:not(:first-child) { text-align: center; }
.blog-table tbody td { padding: 11px 14px; color: var(--text-secondary); border-top: 1px solid var(--border-default); }
.blog-table tbody td:first-child { font-weight: 700; color: var(--text-primary); }
.blog-table tbody td:not(:first-child) { text-align: center; }
.blog-table tbody tr:nth-child(even) { background: var(--bg-main); }

.blog-cta { text-align: center; margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--border-default); }
.blog-cta-label { font-size: 16px; font-weight: 700; color: var(--text-primary); margin-bottom: 16px; }
.blog-cta-note { font-size: 13px; color: var(--text-secondary); margin-top: 12px; margin-bottom: 0; }

.blog-back { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--ember-500); text-decoration: none; margin-top: 28px; }
.blog-back:hover { color: var(--ember-600); }

.blog-index-section { padding: 64px 0; background: var(--bg-main); }
.blog-post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.blog-post-card { background: var(--bg-card); border: 1px solid var(--border-default); border-radius: var(--radius-lg); overflow: hidden; text-decoration: none; display: flex; flex-direction: column; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.blog-post-card:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(0,0,0,0.1); }
.blog-card-thumb { height: 180px; background: linear-gradient(135deg, var(--ash-800) 0%, #26231f 100%); display: flex; align-items: center; justify-content: center; flex-shrink: 0; position: relative; }
.blog-card-thumb svg { color: #fff; opacity: 0.15; }
.blog-card-category { position: absolute; top: 12px; left: 12px; font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; background: var(--ember-500); color: #fff; border-radius: var(--radius-full); padding: 3px 10px; }
.blog-card-body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.blog-card-title { font-size: 16px; font-weight: 700; color: var(--text-primary); line-height: 1.4; margin-bottom: 10px; }
.blog-card-excerpt { font-size: 13px; color: var(--text-secondary); line-height: 1.6; flex: 1; margin-bottom: 16px; }
.blog-card-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; border-top: 1px solid var(--border-default); font-size: 12px; color: var(--text-secondary); }
.blog-card-read { font-size: 12px; font-weight: 700; color: var(--ember-500); letter-spacing: 0.5px; display: flex; align-items: center; gap: 4px; }

