/* ═══════════════════════════════════════════════════
   Marvel Heroes Rift — Main Stylesheet
   ═══════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #080810;
  --bg2:       #0c0c18;
  --bg3:       #10101e;
  --border:    rgba(255,255,255,.08);
  --border-g:  rgba(212,165,32,.35);
  --gold:      #d4a520;
  --gold2:     #f0c040;
  --gold3:     #fde68a;
  --red:       #cc2233;
  --text:      #f0ead6;
  --muted:     #8a8070;
  --muted2:    #b8a890;
  --green:     #22c55e;
  --blue:      #60a5fa;
  --purple:    #a855f7;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }

@keyframes ping {
  0%   { box-shadow: 0 0 0 0 rgba(34,197,94,.6); }
  70%  { box-shadow: 0 0 0 8px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

/* ─── NAV ─── */
.site-nav {
  position: sticky;
  top: 0; z-index: 100;
  background: rgba(8,8,16,.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: 'Cinzel', serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--gold2);
  text-shadow: 0 0 20px rgba(240,192,64,.3);
  flex-shrink: 0;
}

.logo-emblem {
  width: 32px; height: 32px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
  color: var(--gold2);
  box-shadow: 0 0 12px rgba(212,165,32,.3);
}

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

.nav-link {
  color: var(--muted2);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding: 5px 13px;
  border-radius: 4px;
  transition: color .15s;
}
.nav-link:hover, .nav-link.active { color: var(--gold2); }

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

.nav-link-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: 20px;
  border: 1px solid var(--border);
  transition: border-color .15s;
}
.nav-link-user:hover { border-color: var(--border-g); }

.nav-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(212,165,32,.3), rgba(204,34,51,.2));
  border: 1px solid var(--border-g);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--gold2);
}

.nav-username { font-size: 12px; font-weight: 600; }

.nav-role-badge {
  font-size: 9px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 1px;
  color: var(--gold2);
  background: rgba(212,165,32,.12);
  border: 1px solid rgba(212,165,32,.25);
  padding: 2px 6px; border-radius: 3px;
}

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-family: inherit;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  cursor: pointer;
  border: none;
  border-radius: 5px;
  transition: all .15s;
  text-decoration: none;
}
.btn-sm  { font-size: 11px; padding: 7px 16px; }
.btn-md  { font-size: 12px; padding: 10px 22px; }
.btn-lg  { font-size: 13px; padding: 12px 28px; }
.btn-full { width: 100%; }

.btn-primary {
  background: linear-gradient(135deg, #a07010, var(--gold), #c8980a);
  color: #1a0f00;
  box-shadow: 0 0 16px rgba(212,165,32,.25);
}
.btn-primary:hover { box-shadow: 0 0 24px rgba(212,165,32,.45); filter: brightness(1.08); }

.btn-ghost {
  background: transparent;
  color: var(--muted2);
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--text); border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.04); }

.btn-danger {
  background: rgba(204,34,51,.15); color: #f87171;
  border: 1px solid rgba(204,34,51,.3);
}
.btn-danger:hover { background: rgba(204,34,51,.25); }

/* ─── HERO SECTION ─── */
.hero-section {
  position: relative;
  min-height: calc(100vh - 60px);
  display: flex; align-items: center; justify-content: center;
  text-align: center; overflow: hidden;
  padding: 80px 24px 72px;
}

.hero-glow {
  position: absolute; top: -100px; left: 50%;
  transform: translateX(-50%);
  width: 700px; height: 400px;
  background: radial-gradient(ellipse, rgba(204,34,51,.12) 0%, transparent 55%);
  pointer-events: none;
}

.hero-glow2 {
  position: absolute; bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 900px; height: 300px;
  background: radial-gradient(ellipse, rgba(212,165,32,.07) 0%, transparent 60%);
  pointer-events: none;
}

.hero-grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, black, transparent);
  pointer-events: none;
}

.hero-hex {
  position: absolute; inset: 0; opacity: .03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='100'%3E%3Cpath fill='none' stroke='%23d4a520' stroke-width='1' d='M28 66L0 50V18L28 2l28 16v32L28 66zM28 100L0 84V52l28 16 28-16v32L28 100z'/%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-inner { position: relative; z-index: 1; max-width: 820px; margin: 0 auto; }

.hero-eyebrow {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  font-family: 'Cinzel', serif; font-size: 11px; font-weight: 700;
  letter-spacing: 3px; text-transform: uppercase; color: var(--gold);
  margin-bottom: 24px;
}
.hero-eyebrow::before, .hero-eyebrow::after {
  content: ''; width: 60px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.hero-eyebrow::after { transform: scaleX(-1); }

.hero-title {
  font-family: 'Cinzel', serif;
  font-size: 68px; font-weight: 900;
  line-height: 1.05; letter-spacing: -1px;
  color: var(--text);
  text-shadow: 0 0 80px rgba(240,192,64,.2), 0 2px 8px rgba(0,0,0,.8);
  margin-bottom: 10px;
}

.hero-title em {
  font-style: normal; display: block;
  font-size: 46px; letter-spacing: 8px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold3) 50%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-top: 4px;
}

.hero-sub {
  color: var(--muted2); font-size: 15px; line-height: 1.7;
  max-width: 500px; margin: 0 auto 32px;
}

.status-pill {
  display: inline-flex; align-items: center; gap: 10px;
  background: rgba(34,197,94,.07);
  border: 1px solid rgba(34,197,94,.2);
  border-radius: 100px; padding: 8px 20px;
  font-size: 12px; font-weight: 600; color: var(--green);
  margin-bottom: 36px; letter-spacing: .3px;
}
.status-pill.offline {
  background: rgba(204,34,51,.07); border-color: rgba(204,34,51,.2); color: #f87171;
}

.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--green); animation: ping 1.5s ease-in-out infinite; }
.pulse.offline { background: #ef4444; animation: none; }

.hero-actions {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; margin-bottom: 48px; flex-wrap: wrap;
}

.connect-bar {
  display: inline-flex; align-items: stretch;
  border: 1px solid var(--border); border-radius: 7px;
  overflow: hidden; background: rgba(0,0,0,.4);
  backdrop-filter: blur(10px);
  max-width: 680px; width: 100%;
}

.cb-label {
  display: flex; align-items: center; padding: 0 16px;
  font-size: 10px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--gold);
  border-right: 1px solid var(--border); white-space: nowrap;
  background: rgba(212,165,32,.05); flex-shrink: 0;
}

.cb-code {
  flex: 1; padding: 13px 16px;
  font-family: 'Consolas', monospace; font-size: 11.5px;
  color: #86efac; text-align: left; word-break: break-all; cursor: pointer;
}

.cb-copy {
  padding: 0 14px; border-left: 1px solid var(--border);
  color: var(--muted); cursor: pointer; font-size: 15px;
  display: flex; align-items: center; transition: color .15s;
  background: none; border-top: none; border-right: none; border-bottom: none;
}
.cb-copy:hover { color: var(--gold2); }

/* ─── EVENT BANNER ─── */
.event-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 24px;
  font-size: 13px;
}
.event-banner-inner {
  max-width: 1100px;
  margin: 0 auto;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.event-banner-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
  animation: ping 2s infinite;
}
.event-banner-body { color: var(--muted2); }
.event-banner-until { font-size: 11px; font-weight: 600; opacity: .8; }
.event-banner-close {
  background: none; border: none; color: var(--muted); cursor: pointer;
  font-size: 14px; padding: 2px 6px; border-radius: 4px; flex-shrink: 0;
}
.event-banner-close:hover { color: var(--text); }

/* ─── MOTD BANNER ─── */
.motd-banner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(212,165,32,.10);
  border: 1px solid var(--border-g);
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 13px;
  color: var(--gold3);
  max-width: 560px;
  margin: 0 auto 24px;
  text-align: left;
  line-height: 1.5;
}
.motd-icon { flex-shrink: 0; font-size: 16px; }

/* ─── STATS BAR ─── */
.stats-bar {
  border-top: 1px solid rgba(212,165,32,.12);
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(212,165,32,.04) 0%, transparent 100%);
}

.stats-inner {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr);
}

.stat-item { padding: 28px 32px; border-right: 1px solid var(--border); }
.stat-item:last-child { border-right: none; }

.stat-num {
  font-family: 'Cinzel', serif;
  font-size: 38px; font-weight: 700;
  line-height: 1; letter-spacing: -1px; margin-bottom: 6px;
}
.stat-num.gold  { color: var(--gold2); text-shadow: 0 0 24px rgba(240,192,64,.35); }
.stat-num.green { color: var(--green); text-shadow: 0 0 24px rgba(34,197,94,.25); }

.stat-label { font-size: 11px; text-transform: uppercase; letter-spacing: 2px; color: var(--muted); }
.stat-sub   { font-size: 11px; color: var(--muted2); margin-top: 3px; }

/* ─── SECTION ─── */
.page-section {
  max-width: 1100px; margin: 0 auto; padding: 64px 24px;
}

.section-label {
  display: flex; align-items: center; gap: 12px;
  font-family: 'Cinzel', serif; font-size: 11px; font-weight: 700;
  letter-spacing: 3px; text-transform: uppercase; color: var(--gold);
  margin-bottom: 10px;
}
.section-label::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, rgba(212,165,32,.4), transparent);
}

.section-title { font-size: 26px; font-weight: 700; letter-spacing: -.4px; margin-bottom: 28px; }

.section-head {
  display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 28px;
}
.section-head a { font-size: 12px; color: var(--gold); }
.section-head a:hover { color: var(--gold2); }

/* ─── CARD ─── */
.card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden;
}

.card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,.02);
}

.card-head-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; color: var(--gold); }
.card-head-sub   { font-size: 11px; color: var(--muted); }

/* ─── NEWS ─── */
.news-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 2px; background: var(--border);
  border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
}

.news-card {
  background: var(--bg2); padding: 26px;
  cursor: pointer; position: relative; overflow: hidden; transition: background .2s;
}
.news-card:hover { background: var(--bg3); }
.news-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0; transition: opacity .2s;
}
.news-card:hover::before { opacity: 1; }
.news-card.featured { grid-row: span 2; border-right: 1px solid var(--border); }

.news-tag {
  display: inline-block; font-size: 9px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 1.5px;
  padding: 3px 9px; border-radius: 3px; margin-bottom: 12px;
}
.tag-gold   { background: rgba(212,165,32,.15); color: var(--gold2);  border: 1px solid rgba(212,165,32,.28); }
.tag-red    { background: rgba(204,34,51,.15);  color: #f87171;       border: 1px solid rgba(204,34,51,.28); }
.tag-green  { background: rgba(34,197,94,.1);   color: #4ade80;       border: 1px solid rgba(34,197,94,.22); }
.tag-blue   { background: rgba(96,165,250,.1);  color: #93c5fd;       border: 1px solid rgba(96,165,250,.22); }
.tag-purple { background: rgba(168,85,247,.1);  color: #c084fc;       border: 1px solid rgba(168,85,247,.22); }

.news-date  { font-size: 11px; color: var(--muted); margin-bottom: 8px; display: block; }
.news-title { font-size: 15px; font-weight: 700; margin-bottom: 8px; line-height: 1.4; letter-spacing: -.1px; }
.news-card.featured .news-title { font-size: 20px; margin-bottom: 12px; }
.news-body  { font-size: 12.5px; color: var(--muted2); line-height: 1.7; }

/* ─── TWO-COL ─── */
.two-col { display: grid; grid-template-columns: 1fr 340px; gap: 24px; }

/* ─── INFO ROWS ─── */
.info-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 11px 20px; border-bottom: 1px solid var(--border); font-size: 12.5px;
}
.info-row:last-child { border-bottom: none; }
.info-key  { color: var(--muted2); }
.info-val  { font-weight: 600; }
.info-val.green  { color: var(--green); }
.info-val.gold   { color: var(--gold2); }
.info-val.red    { color: #f87171; }
.info-val.muted  { color: var(--muted); }

/* ─── TIPS ─── */
.tip-row {
  display: flex; gap: 14px; padding: 15px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 12.5px; color: var(--muted2); line-height: 1.6;
  align-items: flex-start;
}
.tip-row:last-child { border-bottom: none; }
.tip-num { font-family: 'Cinzel', serif; font-size: 11px; font-weight: 700; color: var(--gold); flex-shrink: 0; width: 20px; margin-top: 2px; }

/* ─── LOGIN CARD (sidebar) ─── */
.login-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.login-card-top {
  background: linear-gradient(135deg, rgba(212,165,32,.07) 0%, rgba(204,34,51,.05) 100%);
  border-bottom: 1px solid var(--border); padding: 22px 24px 18px;
}
.login-card-top h3 { font-family: 'Cinzel', serif; font-size: 15px; font-weight: 700; color: var(--gold2); margin-bottom: 4px; letter-spacing: 1px; }
.login-card-top p  { font-size: 12px; color: var(--muted2); }
.login-card-body   { padding: 20px 24px 22px; }

/* ─── FORMS ─── */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); margin-bottom: 7px; }

.input {
  width: 100%; background: rgba(0,0,0,.4); border: 1px solid var(--border);
  border-radius: 5px; padding: 10px 13px; font-size: 13px; color: var(--text);
  outline: none; transition: border-color .15s, box-shadow .15s; font-family: inherit;
}
.input:focus { border-color: rgba(212,165,32,.5); box-shadow: 0 0 0 3px rgba(212,165,32,.08); }
.input::placeholder { color: var(--muted); }

/* ─── PAGE HEADER (dossier) ─── */
.page-header {
  background: linear-gradient(180deg, rgba(212,165,32,.05) 0%, transparent 100%);
  border-bottom: 1px solid var(--border); padding: 36px 24px 28px;
  position: relative; overflow: hidden;
}
.page-header::before {
  content: ''; position: absolute; inset: 0; opacity: .025;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='100'%3E%3Cpath fill='none' stroke='%23d4a520' stroke-width='1' d='M28 66L0 50V18L28 2l28 16v32L28 66z'/%3E%3C/svg%3E");
  pointer-events: none;
}
.page-header-inner { position: relative; max-width: 1100px; margin: 0 auto; }

.breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--muted); margin-bottom: 14px;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--gold2); }
.breadcrumb span { color: var(--gold); }

.page-title { font-family: 'Cinzel', serif; font-size: 30px; font-weight: 900; letter-spacing: 1px; margin-bottom: 4px; }
.page-sub   { font-size: 13px; color: var(--muted2); }

.account-strip {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--border);
  border: 1px solid var(--border); border-radius: 8px; overflow: hidden; margin-top: 28px;
}
.astat { background: var(--bg2); padding: 16px 20px; }
.astat-val { font-family: 'Cinzel', serif; font-size: 22px; font-weight: 700; line-height: 1; color: var(--gold2); margin-bottom: 4px; }
.astat-val.white { color: var(--text); }
.astat-label { font-size: 10px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); }

/* ─── TABS ─── */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 32px; }
.tab {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px;
  padding: 12px 20px; cursor: pointer; color: var(--muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color .15s, border-color .15s;
  display: flex; align-items: center; gap: 8px; user-select: none;
}
.tab:hover { color: var(--muted2); }
.tab.active { color: var(--gold2); border-bottom-color: var(--gold); }
.tab-count { font-size: 10px; background: rgba(255,255,255,.07); border-radius: 3px; padding: 1px 6px; color: var(--muted); }
.tab.active .tab-count { background: rgba(212,165,32,.15); color: var(--gold); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ─── HERO ROSTER ─── */
.hero-roster {
  display: grid; grid-template-columns: repeat(6, 1fr);
  gap: 2px; background: var(--border);
  border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin-bottom: 40px;
}

.hcard {
  background: var(--bg2); padding: 18px 10px 16px;
  text-align: center; cursor: pointer; position: relative; overflow: hidden; transition: background .2s;
}
.hcard:hover { background: var(--bg3); }
.hcard::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0; transition: opacity .2s;
}
.hcard:hover::before { opacity: .6; }

.hcard-initials {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, rgba(212,165,32,.12), rgba(204,34,51,.1));
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800; color: var(--muted2);
  margin: 0 auto 10px; transition: border-color .2s;
}
.hcard:hover .hcard-initials { border-color: rgba(212,165,32,.4); }

.hcard-name { font-size: 10px; font-weight: 600; color: var(--text); line-height: 1.3; margin-bottom: 6px; }

.hcard-lvl {
  display: inline-block; font-family: 'Cinzel', serif; font-size: 11px; font-weight: 700;
  color: var(--muted); background: rgba(255,255,255,.05); border: 1px solid var(--border);
  border-radius: 3px; padding: 1px 6px; margin-bottom: 8px;
}
.hcard-lvl.max { color: var(--gold2); background: rgba(212,165,32,.1); border-color: rgba(212,165,32,.3); }

.xp-bar  { height: 2px; background: rgba(255,255,255,.06); border-radius: 2px; overflow: hidden; }
.xp-fill { height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--gold), var(--gold2)); }

.hcard-unknown { opacity: .35; cursor: default; }

/* ─── TEAM-UPS ─── */
.teamup-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 40px;
}

.tucard {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 10px; padding: 16px 12px; text-align: center;
  cursor: pointer; transition: border-color .2s, background .2s;
}
.tucard:hover { border-color: rgba(96,165,250,.3); background: var(--bg3); }

.tucard-initials {
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(96,165,250,.08); border: 1px solid rgba(96,165,250,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; color: var(--blue);
  margin: 0 auto 10px;
}

.tucard-name { font-size: 11px; font-weight: 600; color: var(--text); margin-bottom: 4px; line-height: 1.3; }
.tucard-sub  { font-size: 10px; color: var(--muted); }

/* ─── ACHIEVEMENTS ─── */
.ach-overview {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 8px; padding: 18px 22px;
  display: flex; align-items: center; gap: 20px; margin-bottom: 24px;
}
.ach-bar-wrap { flex: 1; }
.ach-bar-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted2); margin-bottom: 8px; }
.ach-bar { height: 5px; background: rgba(255,255,255,.06); border-radius: 5px; overflow: hidden; }
.ach-bar-fill { height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--gold), var(--gold2)); }

.ach-score     { text-align: right; flex-shrink: 0; }
.ach-score-val { font-family: 'Cinzel', serif; font-size: 26px; font-weight: 700; color: var(--gold2); line-height: 1; }
.ach-score-lbl { font-size: 10px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); margin-top: 3px; }

.ach-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 2px; background: var(--border);
  border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
}

.ach-card {
  background: var(--bg2); padding: 16px 20px;
  display: flex; align-items: flex-start; gap: 14px; transition: background .15s;
}
.ach-card:hover { background: var(--bg3); }
.ach-card.locked { opacity: .4; }

.ach-icon {
  width: 44px; height: 44px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.ach-icon.gold   { background: rgba(212,165,32,.12); border: 1px solid rgba(212,165,32,.25); }
.ach-icon.silver { background: rgba(148,163,184,.1);  border: 1px solid rgba(148,163,184,.2); }
.ach-icon.bronze { background: rgba(180,120,60,.1);   border: 1px solid rgba(180,120,60,.2); }
.ach-icon.none   { background: rgba(255,255,255,.04); border: 1px solid var(--border); filter: grayscale(1); }

.ach-info { flex: 1; min-width: 0; }
.ach-name  { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.ach-name.muted { color: var(--muted2); }
.ach-desc  { font-size: 11px; color: var(--muted2); line-height: 1.5; margin-bottom: 8px; }
.ach-meta  { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ach-pts   { font-size: 10px; font-weight: 700; color: var(--gold); background: rgba(212,165,32,.1); border: 1px solid rgba(212,165,32,.2); padding: 2px 7px; border-radius: 3px; }
.ach-date  { font-size: 10px; color: var(--muted); }
.ach-prog-bar  { height: 3px; background: rgba(255,255,255,.06); border-radius: 3px; overflow: hidden; margin-top: 8px; }
.ach-prog-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--blue), #93c5fd); }
.ach-prog-text { font-size: 10px; color: var(--muted); margin-top: 4px; }

/* ─── REDEEM ─── */
.redeem-wrap { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.redeem-msg  { font-size: 13px; margin-top: 8px; }
.redeem-ok   { color: var(--green); }
.redeem-err  { color: #f87171; }

/* ─── NOTICE ─── */
.notice { border-radius: 6px; padding: 12px 16px; font-size: 13px; margin-bottom: 20px; border: 1px solid; }
.notice.ok   { background: rgba(34,197,94,.08);  border-color: rgba(34,197,94,.2);  color: #4ade80; }
.notice.warn { background: rgba(250,204,21,.08);  border-color: rgba(250,204,21,.2);  color: #fde047; }
.notice.bad  { background: rgba(239,68,68,.08);   border-color: rgba(239,68,68,.2);   color: #f87171; }
.notice.gold { background: rgba(212,165,32,.08);  border-color: rgba(212,165,32,.2);  color: var(--gold2); }

/* ─── LEADERBOARD ─── */
.lb-table { width: 100%; border-collapse: collapse; }
.lb-table th { padding: 10px 16px; text-align: left; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); border-bottom: 1px solid var(--border); }
.lb-table td { padding: 12px 16px; font-size: 13px; border-bottom: 1px solid var(--border); }
.lb-table tr:last-child td { border-bottom: none; }
.lb-table tr:hover td { background: rgba(255,255,255,.02); }

.lb-medal { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; font-size: 11px; font-weight: 800; }
.lb-medal.gold   { background: rgba(212,165,32,.2); color: var(--gold2); border: 1px solid rgba(212,165,32,.4); }
.lb-medal.silver { background: rgba(148,163,184,.15); color: #cbd5e1;    border: 1px solid rgba(148,163,184,.3); }
.lb-medal.bronze { background: rgba(180,120,60,.15); color: #d4a85a;     border: 1px solid rgba(180,120,60,.3); }

/* ─── JOIN STEPS ─── */
.join-steps {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 2px; background: var(--border); border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
}
.join-step { background: var(--bg2); padding: 28px 24px; }
.join-step-num { font-family: 'Cinzel', serif; font-size: 32px; font-weight: 700; color: rgba(212,165,32,.2); line-height: 1; margin-bottom: 16px; }
.join-step-title { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.join-step-body  { font-size: 12.5px; color: var(--muted2); line-height: 1.65; }

/* ─── LOGIN PAGE ─── */
.login-page {
  min-height: calc(100vh - 60px);
  display: flex; align-items: center; justify-content: center;
  padding: 48px 24px; position: relative; overflow: hidden;
}
.login-page::before {
  content: ''; position: absolute; top: -100px; left: 50%; transform: translateX(-50%);
  width: 600px; height: 400px;
  background: radial-gradient(ellipse, rgba(212,165,32,.08) 0%, transparent 60%);
  pointer-events: none;
}

.login-box { position: relative; width: 100%; max-width: 400px; background: var(--bg2); border: 1px solid var(--border-g); border-radius: 12px; overflow: hidden; }

.login-box-top {
  background: linear-gradient(135deg, rgba(212,165,32,.08) 0%, rgba(204,34,51,.06) 100%);
  border-bottom: 1px solid var(--border); padding: 28px 28px 22px; text-align: center;
}
.login-box-emblem {
  width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Cinzel', serif; font-size: 16px; font-weight: 900; color: var(--gold2);
  box-shadow: 0 0 20px rgba(212,165,32,.25); margin: 0 auto 16px;
}
.login-box-title { font-family: 'Cinzel', serif; font-size: 20px; font-weight: 700; color: var(--gold2); letter-spacing: 1px; margin-bottom: 4px; }
.login-box-sub   { font-size: 12px; color: var(--muted2); }
.login-box-body  { padding: 24px 28px 28px; }

.form-msg { font-size: 13px; margin-top: 12px; text-align: center; }
.form-msg.ok  { color: var(--green); }
.form-msg.err { color: #f87171; }

/* ─── FOOTER ─── */
.site-footer { border-top: 1px solid var(--border); padding: 28px 24px; }
.footer-inner { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }
.footer-logo  { font-family: 'Cinzel', serif; font-size: 13px; letter-spacing: 2px; color: var(--gold); opacity: .6; }
.footer-copy  { font-size: 11px; color: var(--muted); }

/* ─── TOAST ─── */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--bg2); border: 1px solid var(--border-g); border-radius: 7px;
  padding: 12px 20px; font-size: 13px; color: var(--gold2);
  opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 200;
}
.toast.show { opacity: 1; }

/* ─── LANG SWITCHER ─── */
.lang-switcher { display: flex; align-items: center; }
.lang-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 22px; border-radius: 4px;
  background: rgba(212,165,32,.1); border: 1px solid rgba(212,165,32,.25);
  color: var(--gold2); font-size: 11px; font-weight: 700; letter-spacing: .5px;
  font-family: 'Inter', sans-serif; transition: background .15s, border-color .15s;
}
.lang-btn:hover { background: rgba(212,165,32,.2); border-color: var(--gold); }

/* ─── LEADERBOARD TABS ─── */
.lb-tabs {
  display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px;
}
.lb-tab {
  padding: 3px 10px; border-radius: 4px; border: 1px solid var(--border);
  background: transparent; color: var(--muted2); font-size: 11px;
  font-family: 'Inter', sans-serif; cursor: pointer; transition: all .15s;
  font-weight: 600; letter-spacing: .3px;
}
.lb-tab:hover { border-color: var(--gold); color: var(--gold2); }
.lb-tab.active { background: rgba(212,165,32,.15); border-color: var(--gold); color: var(--gold2); }

.lb-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.lb-table th { color: var(--muted); font-weight: 600; font-size: 10px; text-transform: uppercase; letter-spacing: .8px; padding: 0 0 8px; border-bottom: 1px solid var(--border); }
.lb-table td { padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,.04); vertical-align: middle; }
.lb-table tr:last-child td { border-bottom: none; }
.lb-medal {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%; font-size: 10px; font-weight: 700;
}
.lb-medal.gold   { background: rgba(212,165,32,.2); color: #f0c040; border: 1px solid #d4a520; }
.lb-medal.silver { background: rgba(180,180,200,.15); color: #c0c0d0; border: 1px solid #8888a0; }
.lb-medal.bronze { background: rgba(180,100,40,.2); color: #c87030; border: 1px solid #8b4513; }

/* ─── ERROR PAGE ─── */
.error-page {
  min-height: calc(100vh - 64px); display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
}
.error-inner { text-align: center; max-width: 420px; }
.error-code {
  font-family: 'Cinzel', serif; font-size: 96px; font-weight: 900;
  color: var(--gold); line-height: 1; margin-bottom: 12px;
  text-shadow: 0 0 60px rgba(212,165,32,.3);
}
.error-title { font-size: 22px; font-weight: 700; color: var(--text); margin-bottom: 12px; }
.error-body  { font-size: 14px; color: var(--muted2); margin-bottom: 28px; line-height: 1.7; }

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .hero-title { font-size: 42px; }
  .hero-title em { font-size: 30px; }
  .stats-inner { grid-template-columns: repeat(2, 1fr); }
  .news-grid { grid-template-columns: 1fr; }
  .news-card.featured { grid-row: auto; border-right: none; }
  .two-col { grid-template-columns: 1fr; }
  .hero-roster { grid-template-columns: repeat(4, 1fr); }
  .teamup-grid { grid-template-columns: repeat(3, 1fr); }
  .join-steps  { grid-template-columns: 1fr; }
  .account-strip { grid-template-columns: repeat(2, 1fr); }
  .ach-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .nav-links { display: none; }
  .hero-title { font-size: 32px; }
  .hero-title em { font-size: 22px; letter-spacing: 4px; }
  .hero-roster { grid-template-columns: repeat(3, 1fr); }
  .teamup-grid { grid-template-columns: repeat(2, 1fr); }
  .account-strip { grid-template-columns: 1fr 1fr; }
  .stats-inner { grid-template-columns: 1fr 1fr; }
}
