:root {
  --bg-dark: #07090e;
  --bg-surface: #0d111a;
  --bg-card: #121826;
  --bg-card-hover: #171f31;
  --border: rgba(212, 175, 55, 0.16);
  --border-strong: rgba(212, 175, 55, 0.4);
  --gold: #d4af37;
  --gold-light: #f5d061;
  --gold-dark: #a67c00;
  --crimson: #ef4444;
  --emerald: #10b981;
  --discord: #5865f2;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --font-display: 'Cinzel', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --radius: 12px;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.55);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg-dark);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

#ember-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

a { color: inherit; text-decoration: none; }
code {
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold-light);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 2;
}

.text-gold {
  background: linear-gradient(135deg, #f5d061, #d4af37, #b8860b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-sm { padding: 8px 14px; font-size: 0.85rem; }
.btn-lg { padding: 13px 26px; font-size: 0.98rem; }
.btn-block { width: 100%; padding: 12px 20px; font-size: 0.95rem; }

.btn-gold {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #0b0d12;
  box-shadow: 0 6px 22px rgba(212, 175, 55, 0.28);
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(212, 175, 55, 0.42);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border-strong);
  color: var(--gold-light);
}
.btn-outline:hover {
  background: rgba(212, 175, 55, 0.12);
  border-color: var(--gold-light);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
}
.btn-ghost:hover { color: var(--gold-light); }

.btn-discord {
  background: var(--discord);
  color: #fff;
}
.btn-discord:hover { filter: brightness(1.1); transform: translateY(-2px); }

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(7, 9, 14, 0.78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-icon { width: 36px; height: 36px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 1px;
  color: var(--gold-light);
}
.brand-domain { font-size: 0.7rem; color: var(--text-muted); letter-spacing: 0.5px; }

.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}
.nav-link:hover, .nav-link.active { color: var(--gold-light); }

.nav-actions { display: flex; align-items: center; gap: 10px; }
.server-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.28);
  font-size: 0.78rem;
  font-weight: 600;
  color: #6ee7b7;
}
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
.pill-sep { opacity: 0.4; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.hamburger span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; }

/* Hero */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding: 120px 0 70px;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: url('../assets/hero-bg.jpg') center/cover no-repeat;
  background-color: #090d16;
  filter: brightness(1.15) contrast(1.05);
  transform: scale(1.02);
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 9, 14, 0.72) 0%, rgba(7, 9, 14, 0.36) 52%, rgba(7, 9, 14, 0.14) 100%),
    linear-gradient(180deg, rgba(7, 9, 14, 0.22) 0%, rgba(7, 9, 14, 0.88) 100%);
}
.hero-content { max-width: 780px; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.16);
  border: 1px solid var(--border-strong);
  color: var(--gold-light);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  margin-bottom: 20px;
}
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold-light); }
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.12;
  margin-bottom: 18px;
  letter-spacing: 0.5px;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.85);
}
.hero-subtitle {
  font-size: 1.08rem;
  color: #e2e8f0;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.85);
  max-width: 620px;
  margin-bottom: 30px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 42px; }

.rates-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  background: rgba(13, 17, 26, 0.85);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  backdrop-filter: blur(10px);
}
.rate-item { display: flex; flex-direction: column; gap: 2px; }
.rate-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-muted); }
.rate-value { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; color: var(--gold-light); }

/* Sections */
.section { padding: 88px 0; position: relative; }
.section-alt { background: var(--bg-surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-header { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--gold);
  margin-bottom: 8px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 10px;
}
.section-desc { color: var(--text-muted); font-size: 0.98rem; }

/* Features */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.25s, border-color 0.25s, background 0.25s;
}
.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
}
.feature-icon { font-size: 1.8rem; margin-bottom: 14px; }
.feature-card h3 { font-family: var(--font-display); font-size: 1.15rem; margin-bottom: 8px; color: var(--gold-light); }
.feature-card p { color: var(--text-muted); font-size: 0.92rem; }

/* Classes */
.class-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
}
.class-tab {
  padding: 10px 20px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.class-tab.active, .class-tab:hover {
  background: rgba(212, 175, 55, 0.14);
  border-color: var(--gold);
  color: var(--gold-light);
}
.class-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 28px;
  align-items: center;
}
.class-info h3 { font-family: var(--font-display); font-size: 1.7rem; color: var(--gold-light); margin-bottom: 6px; }
.class-role { display: inline-block; font-size: 0.8rem; font-weight: 700; color: var(--emerald); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 14px; }
.class-info p { color: var(--text-muted); margin-bottom: 18px; }
.class-skills { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-pill {
  padding: 6px 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text);
}
.class-stats { display: flex; flex-direction: column; gap: 14px; }
.stat-row { display: flex; flex-direction: column; gap: 5px; }
.stat-head { display: flex; justify-content: space-between; font-size: 0.85rem; }
.stat-bar { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.stat-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--gold-dark), var(--gold-light)); }

/* Rankings */
.rankings-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.rank-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.rank-tab {
  padding: 9px 16px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
}
.rank-tab.active { background: var(--gold); color: #090b10; border-color: var(--gold); }
.rank-search input {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 14px;
  border-radius: 8px;
  min-width: 240px;
  outline: none;
}
.rank-search input:focus { border-color: var(--gold); }

.table-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
}
.rank-table { width: 100%; border-collapse: collapse; text-align: left; }
.rank-table th, .rank-table td { padding: 14px 18px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); font-size: 0.92rem; }
.rank-table th { color: var(--gold-light); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.8px; background: rgba(0, 0, 0, 0.25); }
.rank-table tr:last-child td { border-bottom: none; }
.rank-table tr:hover td { background: rgba(212, 175, 55, 0.04); }
.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.06);
}
.rank-1 { background: rgba(245, 208, 97, 0.2); color: var(--gold-light); border: 1px solid var(--gold); }
.rank-2 { background: rgba(203, 213, 225, 0.18); color: #e2e8f0; }
.rank-3 { background: rgba(217, 119, 6, 0.2); color: #fbbf24; }

/* Events */
.events-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.event-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s, border-color 0.25s;
}
.event-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
}
.event-media {
  width: 100%;
  height: 190px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.event-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.event-card:hover .event-media img {
  transform: scale(1.05);
}
.event-body { padding: 22px 24px 24px; }
.event-time { font-size: 0.82rem; font-weight: 700; color: var(--gold-light); margin-bottom: 6px; }
.event-card h3 { font-family: var(--font-display); font-size: 1.25rem; margin-bottom: 8px; }
.event-card p { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 14px; }
.event-tag { display: inline-block; padding: 4px 10px; border-radius: 6px; font-size: 0.75rem; font-weight: 700; }
.tag-gold { background: rgba(212, 175, 55, 0.16); color: var(--gold-light); }
.tag-red { background: rgba(239, 68, 68, 0.16); color: #fca5a5; }
.tag-green { background: rgba(16, 185, 129, 0.16); color: #6ee7b7; }

/* Download */
.download-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-bottom: 24px;
}
.download-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
}
.download-card.featured { border-color: var(--gold); box-shadow: 0 0 32px rgba(212, 175, 55, 0.1); }
.dl-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--gold);
  color: #090b10;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  margin-bottom: 12px;
}
.download-card h3 { font-family: var(--font-display); font-size: 1.35rem; margin-bottom: 6px; }
.dl-meta { font-size: 0.82rem; color: var(--gold-light); margin-bottom: 12px; }
.download-card p { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 20px; }
.dl-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.dl-buttons .btn { padding: 11px 20px; }

.sys-req {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 26px;
}
.sys-req h4 { font-family: var(--font-display); color: var(--gold-light); margin-bottom: 10px; }
.req-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; font-size: 0.9rem; color: var(--text-muted); }

/* Store */
.store-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.store-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  display: flex;
  flex-direction: column;
}
.store-card.popular { border-color: var(--gold); transform: translateY(-4px); }
.store-card h3 { font-family: var(--font-display); font-size: 1.3rem; margin-bottom: 8px; }
.store-price { font-family: var(--font-display); font-size: 2.2rem; font-weight: 800; color: var(--gold-light); margin-bottom: 18px; }
.store-card ul { list-style: none; margin-bottom: 24px; flex: 1; display: flex; flex-direction: column; gap: 10px; color: var(--text-muted); font-size: 0.92rem; }
.store-card ul li::before { content: "✓ "; color: var(--emerald); font-weight: 700; }

/* Footer */
.footer { border-top: 1px solid var(--border); background: #05070b; padding: 48px 0 24px; }
.footer-inner { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; margin-bottom: 32px; }
.footer-brand { max-width: 360px; }
.footer-brand p { color: var(--text-muted); font-size: 0.88rem; margin-top: 8px; }
.footer-links { display: flex; gap: 48px; }
.footer-links h4 { font-family: var(--font-display); color: var(--gold-light); margin-bottom: 10px; font-size: 0.95rem; }
.footer-links a { display: block; color: var(--text-muted); font-size: 0.88rem; margin-bottom: 6px; }
.footer-links a:hover { color: var(--gold-light); }
.footer-bottom { text-align: center; border-top: 1px solid rgba(255, 255, 255, 0.06); padding-top: 20px; font-size: 0.82rem; color: var(--text-muted); }

/* Modals */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal.open { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.75); backdrop-filter: blur(6px); }
.modal-box {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
  z-index: 2;
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.6rem;
  cursor: pointer;
}
.modal-box h3 { font-family: var(--font-display); font-size: 1.45rem; margin-bottom: 4px; }
.modal-sub { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.form-group input, .form-group select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.92rem;
  outline: none;
}
.form-group input:focus, .form-group select:focus { border-color: var(--gold); }
.form-feedback { font-size: 0.85rem; margin-bottom: 12px; min-height: 20px; }
.form-feedback.ok { color: var(--emerald); }
.form-feedback.err { color: var(--crimson); }

/* Account Panel */
.modal-wide { max-width: 500px; }
.account-summary {
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
}
.acc-row { display: flex; flex-direction: column; gap: 2px; }
.acc-row span { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-muted); }
.acc-row strong { font-size: 0.92rem; color: var(--text); word-break: break-word; }
.text-emerald { color: var(--emerald) !important; }
.acc-section-title { font-family: var(--font-display); color: var(--gold-light); font-size: 1.05rem; margin-bottom: 12px; }
.acc-actions { display: flex; gap: 10px; align-items: center; }
.acc-actions .btn-gold { flex: 1; padding: 11px 18px; }
.acc-actions .btn-outline { padding: 11px 16px; }

/* Responsive */
@media (max-width: 960px) {
  .features-grid, .store-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .class-panel { grid-template-columns: 1fr; }
  .rates-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .req-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 16px 20px;
    gap: 14px;
  }
  .nav-links.open { display: flex; }
  .hamburger { display: flex; }
}

@media (max-width: 640px) {
  .features-grid, .events-grid, .download-grid, .store-grid { grid-template-columns: 1fr; }
  .rates-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .server-pill { display: none; }
}
