/* =========================================
   ROYAL BET — Design System v2
   Theme: Deep Crimson · Black · Gold
   Font: Cinzel (display) + Inter (body)
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700;900&family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  /* ── Core Palette ── */
  --bg-base:        #0a0608;
  --bg-deep:        #060405;
  --bg-card:        #110b0d;
  --bg-card-2:      #160d10;
  --bg-surface:     rgba(255,255,255,0.04);
  --bg-surface-2:   rgba(255,255,255,0.07);

  /* Crimson brand */
  --red-core:       #c0162a;
  --red-vivid:      #e01f36;
  --red-soft:       #ff3d55;
  --red-glow:       rgba(192,22,42,0.35);
  --red-glow-soft:  rgba(224,31,54,0.18);

  /* Gold accent */
  --gold-core:      #d4a017;
  --gold-vivid:     #f0bb2a;
  --gold-light:     #ffe07a;
  --gold-glow:      rgba(212,160,23,0.30);
  --gold-glow-soft: rgba(240,187,42,0.14);

  /* Neutral */
  --white:          #ffffff;
  --text-primary:   rgba(255,255,255,0.95);
  --text-secondary: rgba(255,255,255,0.65);
  --text-muted:     rgba(255,255,255,0.40);
  --border:         rgba(255,255,255,0.10);
  --border-gold:    rgba(212,160,23,0.28);
  --border-red:     rgba(192,22,42,0.30);

  /* Typography */
  --font-display:   'Cinzel', 'Georgia', serif;
  --font-body:      'Inter', system-ui, -apple-system, sans-serif;

  /* Spacing & Shape */
  --radius-xs:      6px;
  --radius-sm:      10px;
  --radius-md:      16px;
  --radius-lg:      24px;
  --radius-xl:      36px;
  --radius-pill:    999px;

  /* Motion */
  --ease:           cubic-bezier(0.22, 1, 0.36, 1);
  --dur:            240ms;
  --transition:     var(--dur) var(--ease);

  /* Layout */
  --header-h:       76px;
  --container-max:  1200px;

  /* Shadows */
  --shadow-sm:  0 4px 16px rgba(0,0,0,0.35);
  --shadow-md:  0 8px 32px rgba(0,0,0,0.45);
  --shadow-lg:  0 16px 64px rgba(0,0,0,0.55);
  --shadow-xl:  0 24px 96px rgba(0,0,0,0.65);
  --glow-red:   0 0 40px rgba(192,22,42,0.45), 0 0 80px rgba(192,22,42,0.20);
  --glow-gold:  0 0 40px rgba(212,160,23,0.40), 0 0 80px rgba(212,160,23,0.18);

  /* Legacy aliases for backward compat */
  --clr-primary:    var(--gold-vivid);
  --clr-secondary:  var(--red-soft);
  --primary-color:  var(--gold-vivid);
  --clr-bg:         var(--bg-base);
  --clr-muted:      var(--text-secondary);
  --clr-border:     var(--border);
  --ui-accent:      var(--gold-vivid);
  --ui-accent-2:    var(--red-soft);
  --ui-accent-3:    #ff9f43;
  --ui-text:        var(--text-primary);
  --ui-muted:       var(--text-secondary);
  --ui-faint:       var(--text-muted);
  --ui-bg:          var(--bg-base);
  --ui-glow-accent: var(--glow-gold);
  --ui-accent-ink:  #0a0608;
  --font-sans:      var(--font-body);
  --border-color:   var(--border);
  --bg-dark:        var(--bg-deep);
  --bg-pane:        var(--bg-surface);
  --text-main:      var(--text-primary);
  --border-light:   var(--border);
  --border-hover:   rgba(255,255,255,0.18);
  --clr-primary-glow: var(--gold-glow);
  --clr-secondary-glow: var(--red-glow-soft);
  --shadow-soft:    var(--shadow-sm);
}

/* ── Reset ── */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

html { scroll-behavior:smooth; font-size:16px; -webkit-text-size-adjust:100%; }

body {
  font-family: var(--font-body);
  background-color: var(--bg-base);
  background-image:
    radial-gradient(ellipse 900px 600px at 0% 0%,   rgba(192,22,42,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 700px 500px at 100% 10%, rgba(212,160,23,0.10) 0%, transparent 55%),
    radial-gradient(ellipse 800px 700px at 50% 100%, rgba(192,22,42,0.08) 0%, transparent 60%);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Subtle repeating diamond texture */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 0 L40 20 L20 40 L0 20 Z' fill='none' stroke='rgba(255,255,255,0.025)' stroke-width='0.5'/%3E%3C/svg%3E");
  background-size: 40px 40px;
  pointer-events: none;
  z-index: -1;
}

h1,h2,h3,h4,h5,h6 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: 0.02em;
  font-weight: 700;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

p { word-wrap:break-word; overflow-wrap:break-word; }

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition), opacity var(--transition);
}

ul { list-style: none; }

img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-sm);
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--red-core); border-radius: var(--radius-pill); }
::-webkit-scrollbar-thumb:hover { background: var(--red-vivid); }

/* ── Container ── */
.container {
  width: min(92%, var(--container-max));
  margin: 0 auto;
}

/* ── Ambient background (used on sub-pages) ── */
.ambient-background {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.ambient-background .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.18;
}
.ambient-background .orb-1 { width:500px;height:500px;top:-120px;left:-120px;background:var(--red-core); }
.ambient-background .orb-2 { width:400px;height:400px;top:-100px;right:-150px;background:var(--gold-core); }
.ambient-background .orb-3 { width:600px;height:600px;bottom:-200px;left:40%;transform:translateX(-50%);background:var(--red-core); }

/* ── HEADER ── */
#main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-h);
  display: flex;
  align-items: center;
  z-index: 1000;
  background: rgba(6,4,5,0.80);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-gold);
  transition: background var(--transition), box-shadow var(--transition);
}

#main-header.scrolled {
  background: rgba(6,4,5,0.96);
  box-shadow: 0 4px 40px rgba(0,0,0,0.60);
}

.header-container {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  gap: 1.5rem;
}

.logo img {
  height: 42px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 12px var(--gold-glow));
  transition: filter var(--transition), transform var(--transition);
}
.logo img:hover { filter: drop-shadow(0 0 20px var(--gold-glow)); transform: scale(1.04); }

/* Nav */
.nav-list ul {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-list a {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-xs);
  transition: color var(--transition), background var(--transition);
}
.nav-list a:hover,
.nav-list li.active a {
  color: var(--gold-vivid);
  background: rgba(212,160,23,0.08);
}

/* Header Auth */
.header-auth {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.btn-login {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  padding: 0.55rem 1rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: transparent;
  letter-spacing: 0.04em;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
}
.btn-login:hover {
  border-color: var(--gold-vivid);
  background: rgba(212,160,23,0.08);
  transform: translateY(-1px);
}

.btn-signup {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bg-deep);
  background: linear-gradient(135deg, var(--gold-vivid) 0%, var(--gold-light) 100%);
  padding: 0.6rem 1.15rem;
  border-radius: var(--radius-pill);
  border: none;
  box-shadow: var(--glow-gold), var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
}
.btn-signup:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 0 55px rgba(212,160,23,0.55), var(--shadow-md);
}

/* Mobile toggle */
.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  width: 42px;
  height: 42px;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-shrink: 0;
}
.mobile-menu-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.mobile-menu-toggle.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.mobile-menu-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-menu-toggle.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.82);
  backdrop-filter: blur(8px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
}
.mobile-menu-overlay.active { opacity:1; visibility:visible; }
body.no-scroll { overflow: hidden; }

/* ── Gradient text helper ── */
.gradient-text {
  background: linear-gradient(90deg, var(--gold-vivid) 0%, var(--gold-light) 50%, var(--gold-vivid) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ── Section title ── */
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 0.75rem;
  letter-spacing: 0.04em;
  text-align: center;
}

.section-prefix {
  display: block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-vivid);
  margin-bottom: 10px;
  text-align: center;
}

/* ── Divider ornament ── */
.ornament-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 1.25rem auto;
  opacity: 0.5;
}
.ornament-divider::before,
.ornament-divider::after {
  content: "";
  flex: 1;
  max-width: 120px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-core));
}
.ornament-divider::after { background: linear-gradient(90deg, var(--gold-core), transparent); }
.ornament-divider i { color: var(--gold-vivid); font-size: 0.8rem; }

/* ── FOOTER ── */
#main-footer {
  background: var(--bg-deep);
  border-top: 1px solid var(--border-gold);
  padding: 5rem 0 2rem;
  margin-top: 0;
  position: relative;
  overflow: hidden;
}
#main-footer::before {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-core), var(--red-core), var(--gold-core), transparent);
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand img { height: 45px; margin-bottom: 1.25rem; }
.footer-desc {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.75;
  max-width: 300px;
}

.footer-nav h4,
.footer-contact h4 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gold-vivid);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 1.25rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border-gold);
}

.footer-nav ul { display:flex; flex-direction:column; gap:0.65rem; }
.footer-nav a {
  font-size: 0.88rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color var(--transition), gap var(--transition);
}
.footer-nav a:hover { color: var(--gold-vivid); gap: 10px; }

.footer-contact ul { display:flex; flex-direction:column; gap:0.85rem; }
.footer-contact li {
  font-size: 0.88rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 10px;
}
.footer-contact li i { color: var(--gold-vivid); width: 16px; flex-shrink:0; }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.80rem;
  color: var(--text-muted);
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-links a { color: var(--gold-core); font-size: 0.82rem; }
.footer-links a:hover { color: var(--gold-vivid); }

/* ── Mobile bottom bar ── */
.mobile-bottom-bar { display: none; }

/* ── Utility helpers ── */
.text-white   { color: #fff !important; }
.text-center  { text-align: center !important; }
.m-0          { margin: 0 !important; }
.ms-1         { margin-left: 0.25rem !important; }
.ms-2         { margin-left: 0.5rem !important; }
.me-2         { margin-right: 0.5rem !important; }
.mb-5         { margin-bottom: 3rem !important; }
.mt-3         { margin-top: 1rem !important; }
.pt-3         { padding-top: 1rem !important; }
.d-flex       { display: flex !important; }
.gap-3        { gap: 1rem !important; }
.hide-mobile  { display: table-cell; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .nav-list {
    position: fixed;
    top: var(--header-h);
    right: -100%;
    width: 300px;
    height: calc(100dvh - var(--header-h));
    background: rgba(6,4,5,0.97);
    border-left: 1px solid var(--border-gold);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    transition: right 280ms var(--ease);
    z-index: 999;
    overflow-y: auto;
  }
  .nav-list.active { right: 0; }
  .nav-list ul { flex-direction:column; gap:0.5rem; align-items:flex-start; }
  .nav-list a { font-size: 0.9rem; padding: 0.65rem 1rem; width: 100%; }
  .header-auth .btn-signup { display: none; }
  .mobile-menu-toggle { display: flex; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root { --header-h: 68px; }
  .footer-top { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .hide-mobile { display: none !important; }

  /* Footer refinements */
  #main-footer { padding: 3rem 0 1.5rem; }
  .footer-brand img { height: 38px; }
  .footer-desc { font-size: 0.82rem; }
  .footer-nav h4,
  .footer-contact h4 { font-size: 0.85rem; margin-bottom: 1rem; padding-bottom: 0.5rem; }
  .footer-nav a { font-size: 0.82rem; }
  .footer-contact li { font-size: 0.82rem; }
  .footer-bottom { font-size: 0.72rem; }

  .mobile-bottom-bar {
    position: fixed;
    bottom: 0; left: 0;
    width: 100%;
    background: rgba(6,4,5,0.96);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--border-gold);
    display: flex;
    padding: 0.6rem;
    gap: 0.6rem;
    z-index: 1000;
  }
  .mobile-bottom-bar a {
    flex: 1;
    text-align: center;
    padding: 0.75rem;
    border-radius: var(--radius-pill);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
  }
  .mobile-bottom-bar .btn-login {
    background: rgba(255,255,255,0.05);
    color: var(--text-primary);
    border: 1px solid var(--border);
  }
  .mobile-bottom-bar .btn-register {
    background: linear-gradient(135deg, var(--gold-vivid), var(--gold-light));
    color: var(--bg-deep);
    border: none;
    box-shadow: var(--glow-gold);
  }
  body { padding-bottom: 72px; }

  /* Section title responsive */
  .section-title { font-size: clamp(1.5rem, 3.5vw, 2.2rem); }
}

@media (max-width: 480px) {
  :root { --header-h: 62px; }

  /* Header */
  .header-container { padding: 0 1rem; gap: 0.75rem; }
  .logo img { height: 34px; }

  /* Nav drawer */
  .nav-list { width: 260px; padding: 1.5rem 1.25rem; }
  .nav-list a { font-size: 0.85rem; padding: 0.55rem 0.85rem; }

  /* Footer */
  #main-footer { padding: 2.5rem 0 1rem; }
  .footer-brand img { height: 32px; margin-bottom: 1rem; }
  .footer-desc { font-size: 0.78rem; max-width: 100%; }
  .footer-nav a { font-size: 0.78rem; }
  .footer-contact li { font-size: 0.78rem; gap: 8px; }
  .footer-bottom { font-size: 0.68rem; gap: 0.5rem; padding-top: 1rem; }
  .footer-links a { font-size: 0.72rem; }

  /* Mobile bottom bar */
  .mobile-bottom-bar { padding: 0.5rem; gap: 0.5rem; }
  .mobile-bottom-bar a { padding: 0.65rem; font-size: 0.78rem; }
  body { padding-bottom: 64px; }

  /* Container */
  .container { width: min(94%, var(--container-max)); }

  /* Section title ultra-small */
  .section-title { font-size: 1.4rem !important; }
  .section-prefix { font-size: 0.62rem; }
}
