/* ─── CSS CUSTOM PROPERTIES ─────────────────────────────────────────────── */
:root {
  /* Backgrounds */
  --bg:          #0d0f14;
  --bg-card:     #13161c;
  --bg-inset:    #0a0c10;
  --bg-nav:      rgba(10, 12, 16, 0.94);

  /* Accent (blue; --gold name kept for compat) */
  --gold:        #3d8eff;
  --gold-bright: #9dc4ff;
  --gold-dim:    #6ba3eb;
  --gold-dark:   #2858a8;
  --gold-deep:   #1a2535;

  /* Text */
  --text:        #e8eaef;
  --text-dim:    rgba(232, 234, 239, 0.72);
  --text-muted:  rgba(232, 234, 239, 0.45);

  /* Status */
  --green:       #34d399;
  --green-dim:   #0f9a6a;
  --red:         #f87171;
  --red-dim:     #b91c1c;

  /* Borders */
  --border:      1px solid #2a3445;
  --border-gold: 1px solid #3d8eff;

  /* Shadows */
  --shadow-card: 0 4px 22px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 22px rgba(61, 142, 255, 0.14);

  /* Radius */
  --r-sm:  3px;
  --r-md:  6px;
  --r-lg:  10px;

  /* Nav height */
  --nav-h: 58px;

  /* Transitions */
  --t-fast: 0.12s ease;
  --t-mid:  0.22s ease;
}

/* ─── RESET ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', 'DM Sans', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  background-image: none;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: none;
}

/* Scrollbar */
::-webkit-scrollbar              { width: 8px; height: 8px; }
::-webkit-scrollbar-track        { background: var(--bg-inset); }
::-webkit-scrollbar-thumb        { background: var(--gold-dark); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover  { background: var(--gold-dim); }

/* ─── TYPOGRAPHY ─────────────────────────────────────────────────────────── */
h1, h2, h3, h4, .heading {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  color: var(--gold);
  line-height: 1.2;
}
h1 { font-size: clamp(28px, 5vw, 52px); letter-spacing: 4px; text-transform: uppercase; }
h2 { font-size: clamp(18px, 3vw, 28px); letter-spacing: 3px; text-transform: uppercase; }
h3 { font-size: 16px; letter-spacing: 2px; text-transform: uppercase; }
p  { color: var(--text-dim); }
a  { color: var(--gold); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--gold-bright); }

.section-label {
  font-family: 'Cinzel', serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--gold-dim);
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-label::before,
.section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--gold-dark);
}

/* ─── SHARED CARD / PANEL ─────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
  position: relative;
}
.card-gold {
  border-color: var(--gold-dim);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}
.card:hover { border-color: rgba(61, 142, 255, 0.38); }

/* Diamond corner accent */
.card-corner::before,
.card-corner::after {
  content: "";
  position: absolute;
  width: 7px; height: 7px;
  background: var(--gold-dim);
  transform: rotate(45deg);
  z-index: 2;
}
.card-corner::before { top: -4px; left: -4px; }
.card-corner::after  { top: -4px; right: -4px; }

/* ─── BUTTONS ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 22px;
  font-family: 'Cinzel', serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(0,0,0,0.2);
  border: var(--border-gold);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast), color var(--t-fast);
  white-space: nowrap;
  user-select: none;
}
.btn:hover {
  background: rgba(61, 142, 255, 0.06);
  border-color: var(--gold);
  box-shadow: 0 0 12px rgba(61, 142, 255, 0.18);
  color: var(--gold-bright);
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: rgba(61, 142, 255, 0.08);
  border-color: var(--gold);
  color: var(--gold-bright);
}
.btn-ghost {
  border-color: rgba(61, 142, 255, 0.22);
  color: var(--text-dim);
}
.btn-ghost:hover { color: var(--gold); border-color: var(--gold-dim); box-shadow: none; }

/* ─── FORM ELEMENTS ──────────────────────────────────────────────────────── */
select, input[type=text], input[type=number], input[type=search] {
  background: #080a10;
  color: var(--text);
  border: 1px solid var(--gold-dark);
  border-radius: var(--r-sm);
  padding: 7px 28px 7px 10px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  width: 100%;
  cursor: pointer;
  appearance: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%233d8eff'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  background-size: 10px 6px;
  background-color: var(--bg-inset);
}
input[type=text], input[type=search] { padding-right: 10px; cursor: text; }
select:focus, input:focus {
  outline: none;
  border-color: var(--gold-dim);
  box-shadow: 0 0 0 2px rgba(61, 142, 255, 0.2);
}
select option { background: var(--bg-inset); color: var(--text); }

/* ─── TOP NAVIGATION ─────────────────────────────────────────────────────── */
#topnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 1000;
  background: var(--bg-nav);
  border-bottom: 1px solid #1f2530;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 20px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
  margin-right: 8px;
}
.nav-logo img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(61, 142, 255, 0.32));
}
.nav-logo span {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  text-shadow: 0 0 14px rgba(61, 142, 255, 0.22);
  white-space: nowrap;
}
.nav-logo:hover span { color: var(--gold-bright); }

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

.nav-link {
  padding: 6px 14px;
  font-family: 'Cinzel', serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-dim);
  text-decoration: none;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  transition: color var(--t-fast), background var(--t-fast), border-color var(--t-fast);
  white-space: nowrap;
  position: relative;
}
.nav-link:hover {
  color: var(--gold);
  background: rgba(61, 142, 255, 0.07);
  border-color: rgba(61, 142, 255, 0.22);
}
.nav-link.active {
  color: var(--gold-bright);
  background: rgba(61, 142, 255, 0.11);
  border-color: rgba(61, 142, 255, 0.32);
  text-shadow: 0 0 12px rgba(61, 142, 255, 0.28);
}

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

.nav-discord {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  font-family: 'Cinzel', serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold);
  border: var(--border-gold);
  border-radius: var(--r-sm);
  text-decoration: none;
  transition: all var(--t-fast);
  white-space: nowrap;
}
.nav-discord:hover {
  color: var(--gold-bright);
  background: rgba(61, 142, 255, 0.1);
  box-shadow: 0 0 10px rgba(61, 142, 255, 0.15);
}
.nav-discord svg { flex-shrink: 0; }

/* Hamburger button (mobile) */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: 1px solid #2a3445;
  border-radius: var(--r-sm);
  cursor: pointer;
  padding: 8px 9px;
  margin-left: auto;
  flex-shrink: 0;
}
.nav-hamburger span {
  display: block;
  height: 1.5px;
  background: var(--gold);
  border-radius: 1px;
  transition: transform var(--t-mid), opacity var(--t-mid);
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile slide panel */
.nav-mobile-panel {
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  background: rgba(8, 10, 14, 0.98);
  border-bottom: 1px solid #2a4058;
  backdrop-filter: blur(16px);
  padding: 16px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transform: translateY(calc(-100% - var(--nav-h) - 20px));
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 999;
}
.nav-mobile-panel.open { transform: translateY(0); }

.nav-mobile-panel .nav-link {
  padding: 11px 16px;
  font-size: 11px;
  border-color: rgba(61, 142, 255, 0.12);
  border-width: 1px;
}
.nav-mobile-panel .nav-discord {
  margin-top: 8px;
  padding: 11px 16px;
  font-size: 11px;
  justify-content: center;
}

/* ─── FOOTER ─────────────────────────────────────────────────────────────── */
#footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid #1f2530;
  background: rgba(0,0,0,0.4);
  padding: 28px 20px 24px;
}
.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-brand {
  font-family: 'Cinzel', serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold-dim);
}
.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-links a {
  font-family: 'Cinzel', serif;
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--t-fast);
}
.footer-links a:hover { color: var(--gold-dim); }
.footer-copy {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}
.footer-meta a {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.footer-meta a:hover {
  color: var(--gold-dim);
}

/* ─── PAGE WRAPPER ───────────────────────────────────────────────────────── */
.page-wrap {
  position: relative;
  z-index: 2;
  padding-top: var(--nav-h);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.page-content {
  flex: 1;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 20px 48px;
}

/* ─── NOTICE BAR ─────────────────────────────────────────────────────────── */
#noticeBar {
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  z-index: 900;
  background: #13161c;
  border-bottom: 1px solid #2a4058;
  padding: 8px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--gold);
  text-align: center;
  display: none;
}
#noticeBar.visible { display: flex; }
#noticeBar .notice-close {
  position: absolute;
  right: 16px;
  background: none;
  border: none;
  color: var(--gold-dim);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0;
}
#noticeBar .notice-close:hover { color: var(--gold); }

/* ─── MAINTENANCE OVERLAY ────────────────────────────────────────────────── */
#maintenanceOverlay {
  position: fixed; inset: 0;
  z-index: 9999;
  background: rgba(8, 10, 14, 0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  text-align: center;
  padding: 32px;
  display: none;
}
#maintenanceOverlay.active { display: flex; }
#maintenanceOverlay h2 { font-size: 20px; letter-spacing: 4px; }
#maintenanceOverlay p  { color: var(--text-dim); max-width: 400px; font-size: 13px; }
#maintenanceLogin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  margin-top: 8px;
  background: #5865f2;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
#maintenanceLogin:hover { filter: brightness(1.08); }

/* ─── SHIMMER FX (disabled) ──────────────────────────────────────────────── */
.fx-shimmer {
  display: none;
}

/* ─── UTILITIES ──────────────────────────────────────────────────────────── */
.gold    { color: var(--gold); }
.green   { color: var(--green); }
.red     { color: var(--red); }
.muted   { color: var(--text-muted); }
.dimtext { color: var(--text-dim); }
.upper   { text-transform: uppercase; letter-spacing: 1.5px; }
.cinzel  { font-family: 'Cinzel', serif; }

/* ─── RESPONSIVE ─────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .nav-links, .nav-discord { display: none; }
  .nav-hamburger { display: flex; }
  .page-content { padding: 24px 16px 40px; }
}
@media (max-width: 540px) {
  :root { --nav-h: 52px; }
  .nav-logo span { display: none; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
}
