/* =====================================================================
   WEAPONS OF WAR — EVOLUTION  ·  Simple Theme
   Clean, flat, dark-gaming.  Blue + gold accents.
   Keeps the same CSS-variable names as the old theme so any inline
   styles still resolve.
   ===================================================================== */

:root {
  --bg-deep:        #05060d;
  --bg-base:        #080a15;
  --surface:        #0c0f1d;
  --surface-2:      #11142a;
  --surface-3:      #171b38;
  --border:         #232746;
  --border-subtle:  #171a30;

  --accent:         #5d7bff;   /* main blue */
  --accent-bright:  #8aa0ff;
  --accent-deep:    #3a4fa8;

  --gold:           #d4af37;
  --gold-bright:    #f5cf48;
  --gold-deep:      #a07e1f;

  --text-primary:   #eaecff;
  --text-secondary: #a9adce;
  --text-muted:     #6b6f95;

  --danger:         #ff4d5e;
  --success:        #45d67d;
  --warn:           #f7b733;

  --maxw:           1180px;
  --radius:         10px;
  --radius-lg:      16px;

  --shadow-md:      0 8px 24px rgba(0,0,0,0.45);
  --shadow-lg:      0 16px 44px rgba(0,0,0,0.6);
}

/* ---------- RESET ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-primary);
  background:
    linear-gradient(180deg, rgba(5,6,13,0.86) 0%, rgba(5,6,13,0.94) 60%, rgba(5,6,13,0.99) 100%),
    url('../img/bg/bg.jpg') center top / cover no-repeat fixed,
    var(--bg-deep);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
h1,h2,h3,h4 { font-family: 'Cinzel', serif; font-weight: 700; letter-spacing: .02em; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: var(--radius);
  font-size: 13px; font-weight: 600; letter-spacing: .04em;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .12s ease, background .18s ease, border-color .18s ease;
  text-transform: uppercase; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(180deg, var(--accent), var(--accent-deep));
  color: #fff; box-shadow: 0 6px 18px rgba(93,123,255,.28);
}
.btn-primary:hover { background: linear-gradient(180deg, var(--accent-bright), var(--accent)); }
.btn-gold {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold-deep));
  color: #1a1400;
}
.btn-ghost {
  background: rgba(255,255,255,.03); color: var(--text-primary);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-bright); }
.btn-block { width: 100%; }

/* Sidebar ornate buttons (reused by userpanel) — simplified */
.btn-ornate {
  display: block; width: 100%; text-align: center;
  padding: 11px 14px; margin-bottom: 9px; border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface-3), var(--surface-2));
  border: 1px solid var(--border); color: var(--text-primary);
  font-weight: 600; font-size: 13px; cursor: pointer; letter-spacing: .03em;
  transition: border-color .18s ease, transform .12s ease;
}
.btn-ornate:hover { border-color: var(--accent); transform: translateY(-1px); }
.btn-ornate.btn-download {
  background: linear-gradient(180deg, var(--accent), var(--accent-deep));
  border-color: var(--accent-deep); color: #fff;
}

/* ---------- TOP NAV ---------- */
.top-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(6,8,16,.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
}
.top-nav .inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 20px;
  height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.nav-brand { display: flex; align-items: center; gap: 12px; }
.nav-brand img { height: 40px; width: auto; }
.nav-brand .nav-brand-text {
  font-family: 'Cinzel', serif; font-weight: 700; font-size: 16px; letter-spacing: .06em;
  color: var(--text-primary); line-height: 1;
}
.nav-brand .nav-brand-text small {
  display: block; font-size: 10px; letter-spacing: .35em; color: var(--gold-bright);
  margin-top: 3px; font-family: 'Inter', sans-serif; font-weight: 600;
}
.nav-links { list-style: none; display: flex; align-items: center; gap: 6px; }
.nav-links a {
  padding: 8px 14px; border-radius: 8px; font-size: 13px; font-weight: 600;
  letter-spacing: .03em; color: var(--text-secondary); transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--text-primary); background: rgba(255,255,255,.04); }
.nav-links a.active { color: var(--accent-bright); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.lang-selector {
  font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 6px;
}
.lang-flag { width: 16px; height: 11px; border-radius: 2px; background: linear-gradient(180deg,#5d7bff,#3a4fa8); display: inline-block; }

/* user menu / dropdown */
.user-menu { position: relative; }
.user-dropdown {
  position: absolute; right: 0; top: calc(100% + 8px);
  min-width: 190px; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-md); padding: 6px;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: all .15s ease; z-index: 60;
}
.user-dropdown.active { opacity: 1; visibility: visible; transform: translateY(0); }
.user-dropdown a {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border-radius: 7px; font-size: 13px; color: var(--text-secondary);
}
.user-dropdown a:hover { background: rgba(255,255,255,.05); color: var(--text-primary); }

/* mobile nav toggle */
.nav-toggle { display: none; background: none; border: 0; color: var(--text-primary); font-size: 20px; cursor: pointer; }

/* ---------- HERO (simple) ---------- */
.hero { position: relative; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0;
  background: url('../img/bg/bg.jpg') center 20% / cover no-repeat;
  transform: scale(1.04);
}
.hero-overlay {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% 25%, rgba(93,123,255,.12), transparent 62%),
    linear-gradient(180deg, rgba(5,6,13,.70) 0%, rgba(5,6,13,.80) 45%, rgba(5,6,13,.92) 80%, var(--bg-deep) 100%);
}
.hero-content {
  position: relative; z-index: 2;
  max-width: var(--maxw); margin: 0 auto; padding: 56px 20px 60px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
}
.hero-logo { width: 100%; max-width: 420px; height: auto; margin-bottom: 10px;
  filter: drop-shadow(0 14px 40px rgba(0,0,0,.7)); }
/* Logo already carries the wordmark, so the H1 is visually hidden (kept for SEO/a11y) */
.hero-title-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.hero-sub {
  margin-top: 14px; font-size: clamp(13px, 2vw, 16px); letter-spacing: .28em;
  text-transform: uppercase; color: var(--text-secondary);
}
.hero-cta { margin-top: 30px; display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.hero-cta .btn { padding: 14px 30px; font-size: 14px; }

/* server-status pills under hero */
.hero-status {
  margin-top: 34px; display: flex; gap: 14px; flex-wrap: wrap; justify-content: center;
}
.status-pill {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 20px; border-radius: 999px;
  background: rgba(10,13,26,.7); border: 1px solid var(--border);
  backdrop-filter: blur(6px);
}
.status-pill .stats-mini-value,
.status-pill .pill-value { font-family: 'Cinzel', serif; font-size: 18px; font-weight: 700; color: var(--text-primary); }
.status-pill .pill-label { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--text-muted); }
.stat-dot {
  display: inline-block; width: 11px; height: 11px; border-radius: 50%;
  background: var(--text-muted);
}
.stat-dot.online  { background: var(--success); box-shadow: 0 0 10px rgba(69,214,125,.7); }
.stat-dot.offline { background: var(--danger);  box-shadow: 0 0 10px rgba(255,77,94,.6); }

/* ---------- QUICK ACTION STRIP ---------- */
.action-row {
  max-width: var(--maxw); margin: -28px auto 0; padding: 0 20px;
  position: relative; z-index: 5;
  display: grid; grid-template-columns: 1fr; gap: 16px;
}
.action-panel {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.action-item {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  transition: border-color .18s, transform .12s;
}
.action-item:hover { border-color: var(--accent); transform: translateY(-2px); }
.action-icon {
  width: 44px; height: 44px; border-radius: 10px; flex: 0 0 44px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: var(--accent-bright);
  border: 1px solid var(--border); background: var(--surface-2);
}
.action-info { flex: 1; min-width: 0; }
.action-title { font-weight: 700; font-size: 14px; color: var(--text-primary); }
.action-sub { font-size: 12px; color: var(--text-muted); }

/* legacy server-status-top block (still present if used) */
.server-status-top {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
}
.server-status-top-header {
  font-size: 11px; letter-spacing: .2em; color: var(--text-muted);
  text-transform: uppercase; margin-bottom: 12px; text-align: center;
}
.stats-mini { display: grid; gap: 10px; }
.stats-mini-item { text-align: center; }
.stats-mini-value { font-family: 'Cinzel', serif; font-size: 20px; font-weight: 700; color: var(--text-primary); }
.stats-mini-label { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); margin-top: 2px; }

/* ---------- MAIN GRID ---------- */
.main-grid {
  max-width: var(--maxw); margin: 40px auto 0; padding: 0 20px;
  display: grid; grid-template-columns: 1fr 320px; gap: 26px;
  align-items: start;
}
.main-content { min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.main-sidebar { display: flex; flex-direction: column; gap: 20px; }

/* ---------- SECTION BLOCK (card) ---------- */
.section-block {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 22px;
}
.section-block-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.section-block-title {
  font-size: 18px; color: var(--text-primary); position: relative; padding-left: 14px;
}
.section-block-title::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 4px; height: 18px; border-radius: 2px;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold-deep));
}
.section-block-action { font-size: 12px; color: var(--accent-bright); font-weight: 600; }
.section-block-action:hover { color: var(--text-primary); }

/* ---------- NEWS ---------- */
.news-tabs { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.news-tab {
  padding: 6px 14px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: transparent; border: 1px solid var(--border); color: var(--text-secondary); cursor: pointer;
}
.news-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.news-list { display: flex; flex-direction: column; gap: 8px; }
.news-list.news-tab-content { display: none; }
.news-list.news-tab-content.active { display: flex; }
.news-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border-radius: var(--radius);
  background: var(--surface-2); border: 1px solid var(--border-subtle);
  transition: border-color .15s;
}
.news-row:hover { border-color: var(--accent); }
.news-row-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.news-row-text { color: var(--text-primary); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.news-row-date { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.news-badge {
  font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 5px; color: #fff; flex: 0 0 auto;
}
.badge-news { background: var(--accent-deep); }
.badge-updates { background: #2c7a4b; }
.badge-events { background: var(--gold-deep); color: #1a1400; }
.badge-maintenance { background: #8a4b2c; }
.news-empty { color: var(--text-muted); padding: 20px; text-align: center; font-size: 13px; }

/* ---------- RANKINGS ---------- */
.rankings-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.rank-table-mini, .rank-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rank-table-mini th, .rank-table th {
  text-align: left; font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-muted); padding: 8px 10px; border-bottom: 1px solid var(--border);
}
.rank-table-mini td, .rank-table td {
  padding: 9px 10px; border-bottom: 1px solid var(--border-subtle); color: var(--text-secondary);
}
.rank-table tbody tr:hover, .rank-table-mini tbody tr:hover { background: rgba(255,255,255,.02); }
.rank-pos { color: var(--gold-bright); font-weight: 700; }
.rank-score { color: var(--accent-bright); font-weight: 700; text-align: right; }

.rank-podium { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 22px; }
.rank-top-card {
  display: flex; align-items: center; gap: 16px; padding: 18px;
  background: linear-gradient(180deg, var(--surface-3), var(--surface));
  border: 1px solid var(--border); border-radius: var(--radius-lg);
}
.rank-top-medal { text-align: center; color: var(--gold-bright); font-size: 26px; }
.rank-top-medal span { display: block; font-size: 12px; color: var(--text-muted); }
.rank-top-class { width: 48px; height: 48px; }
.rank-top-info { flex: 1; min-width: 0; }
.rank-top-name { font-family: 'Cinzel', serif; font-size: 17px; color: var(--text-primary); }
.rank-top-class-lvl { font-size: 12px; color: var(--text-muted); margin: 2px 0 6px; }
.rank-top-score { font-size: 15px; color: var(--accent-bright); font-weight: 700; }
.rank-top-score span { font-size: 11px; color: var(--text-muted); font-weight: 400; }

/* ---------- PAGE HEADER ---------- */
.page-header { text-align: center; margin-bottom: 28px; }
.page-header-label { font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-bright); }
.page-header-title { font-size: clamp(24px, 4vw, 36px); color: var(--text-primary); margin-top: 6px; }
.page-header-divider { width: 80px; height: 3px; margin: 14px auto 0; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent); }

/* ---------- DOWNLOADS ---------- */
.download-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.download-card {
  display: flex; align-items: center; gap: 16px; padding: 18px 20px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  transition: border-color .18s, transform .12s;
}
.download-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.download-icon {
  width: 48px; height: 48px; flex: 0 0 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-size: 22px;
  color: var(--accent-bright); background: var(--surface-2); border: 1px solid var(--border);
}
.download-info { flex: 1; min-width: 0; }
.download-title { font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.download-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--text-muted); }
.download-arrow { color: var(--text-muted); font-size: 15px; }

/* ---------- ARTICLE ---------- */
.article-body {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px; color: var(--text-secondary); font-size: 15px; line-height: 1.8;
}
.article-body b, .article-body strong { color: var(--text-primary); }

/* ---------- USER PANEL (sidebar) ---------- */
.user-panel-loggedin { border-color: var(--accent-deep); }
.user-panel .user-greeting { text-align: center; margin-bottom: 16px; }
.user-greeting-name { font-family: 'Cinzel', serif; font-size: 18px; color: var(--text-primary); margin-top: 6px; }
.user-panel-actions { display: flex; flex-direction: column; }
.user-panel-msg { color: var(--text-secondary); font-size: 13px; text-align: center; margin-bottom: 14px; }
.user-panel-msg a { color: var(--accent-bright); font-weight: 600; }
.user-panel-or { text-align: center; font-size: 12px; color: var(--text-muted); margin: 4px 0 8px; }

/* ---------- FOOTER ---------- */
footer { margin-top: 56px; border-top: 1px solid var(--border-subtle); background: rgba(5,6,13,.6); }
.footer-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 44px 20px 30px;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px;
}
.footer-brand { font-family: 'Cinzel', serif; font-size: 20px; color: var(--text-primary); margin-bottom: 10px; }
.footer-col h4 { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-bright); margin-bottom: 14px; }
.footer-col a { display: block; color: var(--text-secondary); font-size: 13px; padding: 4px 0; }
.footer-col a:hover { color: var(--text-primary); }
.socials { display: flex; gap: 10px; }
.social-btn {
  width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-secondary); font-size: 15px;
  transition: border-color .18s, color .18s;
}
.social-btn:hover { border-color: var(--accent); color: var(--accent-bright); }
.footer-bottom {
  text-align: center; padding: 18px; font-size: 12px; color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
}

/* ---------- MODALS ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(3,4,10,.72); backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.active { display: flex; }
.modal {
  width: 100%; max-width: 420px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 30px; box-shadow: var(--shadow-lg);
}
.modal h3 { font-size: 22px; color: var(--text-primary); }
.modal-sub { color: var(--text-muted); font-size: 13px; margin-bottom: 20px; }
.modal-close {
  position: absolute; top: 16px; right: 18px; cursor: pointer;
  color: var(--text-muted); font-size: 16px;
}
.modal-close:hover { color: var(--text-primary); }
.form-field { margin-bottom: 14px; }
.form-field label { display: block; font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; }
.form-field input {
  width: 100%; padding: 11px 14px; border-radius: var(--radius);
  background: var(--bg-base); border: 1px solid var(--border); color: var(--text-primary);
  font-size: 14px; outline: none; transition: border-color .15s;
}
.form-field input:focus { border-color: var(--accent); }
.modal-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; }

/* ---------- REVEAL ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 960px) {
  .main-grid { grid-template-columns: 1fr; }
  .rankings-row, .rank-podium { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; position: absolute; top: 66px; left: 0; right: 0; flex-direction: column;
    background: var(--surface-2); border-bottom: 1px solid var(--border); padding: 10px 20px; gap: 4px;
  }
  .nav-toggle { display: block; }
  .action-panel { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .hero-content { padding: 48px 20px 40px; }
}
