/* =============================================
   DayZ Stalker RP — Main Stylesheet
   Тема: Постапокалипсис / Зона
   ============================================= */

:root {
  --bg:         #0a0a0c;
  --bg2:        #0f0f13;
  --bg3:        #131320;
  --surface:    #1a1a22;
  --surface2:   #20202a;
  --border:     #2a2a3a;
  --border2:    #1e1e2e;
  --accent:     #9b6dbd;
  --accent2:    #7a4a9a;
  --accent3:    #b98fdf;
  --rad:        #8a7aab;
  --rad2:       #8a7aab;
  --danger:     #c0392b;
  --text:       #d8d4e8;
  --text2:      #8a7aab;
  --text3:      #554a6a;
  --mono:       'Share Tech Mono', monospace;
  --title:      'Russo One', sans-serif;
  --body:       'Exo 2', sans-serif;
  --radius:     6px;
  --shadow:     0 4px 20px rgba(0,0,0,.6);
}

/* ── Reset ────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  font-size: 15px;
  line-height: 1.6;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent3); }
img { display: block; max-width: 100%; }
code { font-family: var(--mono); color: var(--rad); background: rgba(120,120,130,.08); padding: 2px 6px; border-radius: 3px; font-size: .9em; }
h1,h2,h3,h4 { font-family: var(--title); line-height: 1.2; }

/* ── Background FX ────────────────────────────── */
.bg-overlay {
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(155,109,189,.04) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(232,181,50,.03) 0%, transparent 50%),
    var(--bg);
}
.scanlines {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: repeating-linear-gradient(
    0deg, transparent, transparent 2px,
    rgba(0,0,0,.07) 2px, rgba(0,0,0,.07) 4px
  );
}

/* ── Container ────────────────────────────────── */
.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* ── Navbar ───────────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,10,12,.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; gap: 8px; max-width: 1600px; margin: 0 auto; padding: 0 20px;
}
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--title); font-size: 1.15rem;
  color: var(--text); white-space: nowrap; flex-shrink: 0;
}
.brand-icon { color: var(--rad); font-size: 1.3rem; animation: radGlow 3s ease-in-out infinite; }
@keyframes radGlow {
  0%,100% { text-shadow: 0 0 6px var(--rad); }
  50% { text-shadow: 0 0 16px var(--rad), 0 0 30px rgba(232,181,50,.4); }
}
.nav-links {
  display: flex; list-style: none; align-items: center; gap: 0;
  overflow-x: auto; scrollbar-width: none;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  color: var(--text2); padding: 6px 12px; border-radius: var(--radius);
  font-size: .88rem; letter-spacing: .03em; transition: all .2s;
  white-space: nowrap; display: block;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--accent); background: rgba(155,109,189,.08);
}
.nav-shop-link { color: var(--rad) !important; }
.nav-shop-link:hover { color: var(--rad2) !important; background: rgba(232,181,50,.08) !important; }
.nav-profile-link { display: flex; align-items: center; gap: 7px; }
.nav-avatar { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border); }
.nav-admin-link { color: var(--rad) !important; padding: 6px 12px !important; font-size: 1.15rem !important; }
.nav-logout { color: var(--danger) !important; }
.btn-steam-nav {
  display: flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, #1b2838, #2a475e);
  color: #c6d4df !important; padding: 6px 11px !important;
  border-radius: var(--radius); border: 1px solid #4a7fa0; font-size: .79rem;
}
.btn-steam-nav:hover { background: linear-gradient(135deg, #2a3f50, #3a6080) !important; }
.nav-burger {
  display: none; background: none; border: 1px solid var(--border);
  color: var(--text2); padding: 5px 9px; border-radius: var(--radius);
  cursor: pointer; font-size: .95rem; flex-shrink: 0;
}
@media (max-width: 1280px) {
  .nav-burger { display: block; }
  .nav-links {
    display: none; position: fixed; top: 58px; left: 0; right: 0;
    background: rgba(10,12,10,.98); flex-direction: column;
    padding: 8px 0; gap: 0; border-bottom: 1px solid var(--border);
    overflow-x: unset;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 20px; width: 100%; font-size: .9rem; }
}

/* ── Hero ─────────────────────────────────────── */
.hero {
  min-height: 88vh; display: flex; align-items: center;
  position: relative; overflow: hidden;
  background:
    radial-gradient(ellipse at center, rgba(155,109,189,.07) 0%, transparent 70%),
    linear-gradient(180deg, rgba(10,12,10,0) 60%, var(--bg) 100%),
    url('/img/hero-bg.svg') center/cover no-repeat;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: rgba(0,0,0,.62);
}
.hero-content {
  position: relative; z-index: 1;
  max-width: 640px;
}
.hero-badge {
  display: inline-block;
  background: rgba(120,120,130,.12); border: 1px solid rgba(120,120,130,.28);
  color: var(--rad); font-family: var(--mono); font-size: .75rem;
  letter-spacing: .15em; padding: 5px 14px; border-radius: 30px;
  margin-bottom: 20px;
  animation: pulse 3s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:.8} 50%{opacity:1} }
.hero-title {
  font-family: var(--title); font-size: clamp(2.6rem, 6vw, 5rem);
  color: #fff; text-shadow: 0 2px 20px rgba(0,0,0,.8);
  margin-bottom: 16px; line-height: 1.05;
}
.hero-title .accent { color: var(--accent); }
.hero-sub {
  color: var(--text2); font-size: 1.05rem; margin-bottom: 32px; line-height: 1.7;
}
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.hero-ip {
  display: flex; align-items: center; gap: 10px;
  background: rgba(0,0,0,.5); border: 1px solid var(--border);
  padding: 10px 16px; border-radius: var(--radius);
}
.ip-label { color: var(--text3); font-size: .8rem; }
.ip-val { color: var(--accent); font-size: 1rem; }
.btn-copy {
  background: rgba(155,109,189,.12); border: 1px solid var(--border);
  color: var(--accent); padding: 4px 10px; border-radius: 4px;
  cursor: pointer; font-size: .8rem; transition: all .2s;
}
.btn-copy:hover { background: rgba(155,109,189,.2); }
.hero-scroll {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  color: var(--text3); animation: bounce 2s infinite;
  font-size: 1.2rem;
}
@keyframes bounce { 0%,100%{transform:translateX(-50%) translateY(0)} 50%{transform:translateX(-50%) translateY(8px)} }

/* ── Buttons ──────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  color: #000 !important; font-weight: 700; font-family: var(--body);
  padding: 10px 22px; border-radius: var(--radius); border: none;
  cursor: pointer; font-size: .9rem; transition: all .2s; letter-spacing: .02em;
}
.btn-primary:hover { filter: brightness(1.15); transform: translateY(-1px); }

/* Stat num small (for long values like map name / version) */
.stat-num-sm { font-size: 1rem !important; word-break: break-word; line-height: 1.3; }

/* Mods list */
.mods-list { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border2); }
.mods-label { color: var(--text3); font-size: .78rem; font-family: var(--mono); letter-spacing: .06em; flex-shrink: 0; }
.mod-tag { background: rgba(155,109,189,.07); border: 1px solid var(--border2); color: var(--text2); font-size: .75rem; padding: 3px 9px; border-radius: 12px; font-family: var(--mono); transition: border-color .2s, color .2s; }
.mod-tag:hover { border-color: var(--accent2); color: var(--accent); }
.mods-collection { margin-top: 14px; }
.btn-collection { display: inline-flex; align-items: center; gap: 8px; background: linear-gradient(135deg, #1b2838, #2a475e); color: #c6d4df !important; padding: 9px 18px; border-radius: var(--radius); border: 1px solid #4a7fa0; font-size: .88rem; transition: all .2s; }
.btn-collection:hover { filter: brightness(1.2); }
.btn-primary.btn-large { padding: 13px 30px; font-size: 1rem; }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; border: 1px solid var(--border);
  color: var(--text2) !important; padding: 9px 20px; border-radius: var(--radius);
  cursor: pointer; font-size: .9rem; transition: all .2s;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent) !important; }
.btn-steam-large {
  display: inline-flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, #1b2838, #2a475e);
  color: #c6d4df !important; padding: 13px 28px;
  border-radius: var(--radius); border: 1px solid #4a7fa0;
  font-size: 1rem; font-weight: 600; transition: all .2s;
}
.btn-steam-large:hover { filter: brightness(1.2); transform: translateY(-1px); }
.btn-discord-footer {
  display: inline-block;
  background: #5865f2; color: #fff !important;
  padding: 8px 18px; border-radius: var(--radius);
  font-size: .88rem; margin-top: 8px;
}
.btn-danger-sm {
  background: rgba(192,57,43,.15); border: 1px solid rgba(192,57,43,.4);
  color: #e74c3c; padding: 4px 10px; border-radius: 4px;
  cursor: pointer; font-size: .8rem;
}
.btn-secondary-sm {
  background: rgba(155,109,189,.1); border: 1px solid var(--border);
  color: var(--accent); padding: 4px 10px; border-radius: 4px;
  cursor: pointer; font-size: .8rem;
}

/* ── Sections ─────────────────────────────────── */
.section { padding: 70px 0; }
.section-title {
  font-size: clamp(1.5rem, 3vw, 2.1rem); color: var(--text);
  margin-bottom: 36px; position: relative;
}
.section-title::after {
  content: ''; display: block; width: 50px; height: 2px;
  background: var(--accent); margin-top: 10px;
}
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 36px;
}
.section-header .section-title { margin-bottom: 0; }
.section-sub { color: var(--text3); margin-bottom: 28px; }
.muted-text { color: var(--text3); font-style: italic; }

/* ── Server card ──────────────────────────────── */
.server-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 28px; box-shadow: var(--shadow);
}
.server-card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.server-card-header h2 { font-size: 1.2rem; }
.status-badge {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .12em;
  padding: 4px 12px; border-radius: 20px; font-weight: 700;
}
.status-badge.online {
  background: rgba(155,109,189,.15); color: var(--accent);
  border: 1px solid rgba(155,109,189,.3);
  animation: onlinePulse 2s ease-in-out infinite;
}
.status-badge.offline {
  background: rgba(192,57,43,.12); color: var(--danger);
  border: 1px solid rgba(192,57,43,.25);
}
@keyframes onlinePulse { 0%,100%{opacity:.8} 50%{opacity:1} }

/* ── Stats grids ──────────────────────────────── */
.stats-grid-4, .stats-grid-3 {
  display: grid; gap: 16px;
}
.stats-grid-4 { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.stats-grid-3 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

.stat-card {
  background: var(--surface2); border: 1px solid var(--border2);
  border-radius: 8px; padding: 20px; text-align: center;
  transition: border-color .2s, transform .2s;
}
.stat-card:hover { border-color: var(--border); transform: translateY(-2px); }
.accent-card { border-color: rgba(155,109,189,.25) !important; background: rgba(155,109,189,.05) !important; }
.stat-icon { font-size: 1.5rem; margin-bottom: 8px; }
.stat-num { font-family: var(--title); font-size: 1.8rem; color: var(--accent); }
.stat-lbl { color: var(--text3); font-size: .78rem; margin-top: 4px; letter-spacing: .04em; }

/* ── Factions ─────────────────────────────────── */
.factions-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px;
}
.faction-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 26px 22px; text-align: center;
  transition: transform .2s, border-color .2s;
}
.faction-card:hover { transform: translateY(-4px); }
.faction-icon { font-size: 2rem; margin-bottom: 12px; }
.faction-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.faction-card p { color: var(--text3); font-size: .88rem; }
.faction-card:hover { border-color: var(--accent2); }
.faction-join { border: 1px dashed var(--accent2) !important; background: rgba(155,109,189,.04) !important; text-decoration: none; }
.faction-join h3 { color: var(--accent); font-size: .95rem; letter-spacing: .05em; }
.faction-join:hover { border-color: var(--accent) !important; background: rgba(155,109,189,.1) !important; transform: translateY(-4px); }
.factions-join { display: none; }

/* ── News ─────────────────────────────────────── */
.news-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px;
}
.news-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 24px;
  transition: border-color .2s, transform .2s;
}
.news-card:hover { border-color: var(--accent2); transform: translateY(-2px); }
.news-tag {
  display: inline-block; font-size: .72rem; letter-spacing: .08em;
  padding: 3px 10px; border-radius: 20px; margin-bottom: 12px;
  font-family: var(--mono);
}
.tag-news { background: rgba(155,109,189,.1); color: var(--accent); border: 1px solid rgba(155,109,189,.2); }
.tag-update { background: rgba(232,181,50,.1); color: var(--rad); border: 1px solid rgba(232,181,50,.2); }
.tag-event { background: rgba(52,152,219,.1); color: #3498db; border: 1px solid rgba(52,152,219,.2); }
.news-title { font-size: 1.05rem; color: var(--text); margin-bottom: 10px; }
.news-excerpt { color: var(--text2); font-size: .88rem; margin-bottom: 14px; line-height: 1.6; }
.news-meta { display: flex; gap: 16px; color: var(--text3); font-size: .78rem; }

/* ── CTA ──────────────────────────────────────── */
.cta-section { background: rgba(155,109,189,.03); border-top: 1px solid var(--border); }
.cta-box {
  text-align: center; padding: 50px 30px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; max-width: 600px; margin: 0 auto;
}
.cta-box h2 { font-size: 1.9rem; margin-bottom: 12px; }
.cta-box p { color: var(--text2); margin-bottom: 28px; }

/* ── Profile ──────────────────────────────────── */
.profile-section { padding-top: 40px; }
.profile-header {
  display: flex; gap: 28px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 32px; margin-bottom: 40px;
  flex-wrap: wrap;
}
.profile-avatar-wrap { position: relative; flex-shrink: 0; }
.profile-avatar {
  width: 100px; height: 100px; border-radius: 10px;
  border: 2px solid var(--border);
}
.role-badge {
  position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%);
  font-size: .65rem; white-space: nowrap; padding: 2px 8px;
  border-radius: 10px; letter-spacing: .06em; font-family: var(--mono);
}
.role-admin { background: rgba(155,89,182,.2); color: #b97fe0; border: 1px solid #8e44ad; }
.role-curator { background: rgba(231,76,60,.15); color: #e74c3c; border: 1px solid #c0392b; }
.role-faction_leader { background: rgba(149,165,166,.15); color: #95a5a6; border: 1px solid #7f8c8d; }
.role-faction_deputy { background: rgba(149,165,166,.15); color: #95a5a6; border: 1px solid #7f8c8d; }
.role-player { background: rgba(155,109,189,.1); color: var(--accent); border: 1px solid var(--accent2); }
.role-faction-member { background: rgba(52,152,219,.15); color: #3498db; border: 1px solid #2980b9; }
.admin-table .role-badge, .faction-table .role-badge { position: static; transform: none; display: inline-block; }

.profile-info { flex: 1; min-width: 200px; }
.profile-name { font-size: 1.7rem; margin-bottom: 6px; }
.profile-faction { color: var(--rad); font-size: .88rem; margin-bottom: 10px; }
.profile-meta { display: flex; flex-wrap: wrap; gap: 16px; color: var(--text3); font-size: .82rem; margin-bottom: 12px; }
.profile-bio { color: var(--text2); font-size: .92rem; line-height: 1.6; }
.ban-notice {
  background: rgba(192,57,43,.12); border: 1px solid rgba(192,57,43,.3);
  color: #e74c3c; padding: 10px 14px; border-radius: 6px;
  margin-top: 12px; font-size: .88rem;
}
.stats-section { margin-top: 10px; }

/* K/D Bar */
.kd-bar-section { margin-top: 36px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 24px; }
.kd-bar-section h3 { font-size: 1rem; margin-bottom: 16px; color: var(--text2); }
.kd-bar-wrap { display: flex; align-items: center; gap: 16px; }
.kd-kills, .kd-deaths { font-family: var(--title); min-width: 80px; font-size: 1.1rem; }
.kd-kills { color: var(--accent); text-align: right; }
.kd-deaths { color: var(--danger); }
.kd-bar { flex: 1; height: 14px; background: rgba(192,57,43,.25); border-radius: 7px; overflow: hidden; }
.kd-fill { height: 100%; background: linear-gradient(90deg, var(--accent2), var(--accent)); border-radius: 7px; transition: width .5s ease; }

/* ── Leaderboard ──────────────────────────────── */
.lb-filters {
  display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px;
}
.lb-filter-btn {
  padding: 8px 18px; border-radius: 20px;
  border: 1px solid var(--border); color: var(--text2);
  font-size: .85rem; transition: all .2s;
}
.lb-filter-btn:hover, .lb-filter-btn.active {
  border-color: var(--accent); color: var(--accent);
  background: rgba(155,109,189,.08);
}
.lb-table-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid var(--border); }
.lb-table { width: 100%; border-collapse: collapse; }
.lb-table thead { background: var(--surface2); }
.lb-table th {
  padding: 12px 16px; text-align: left; font-size: .78rem;
  color: var(--text3); letter-spacing: .06em; font-family: var(--mono);
  border-bottom: 1px solid var(--border);
}
.lb-table td { padding: 12px 16px; border-bottom: 1px solid var(--border2); font-size: .9rem; }
.lb-table tbody tr:last-child td { border-bottom: none; }
.lb-table tbody tr:hover { background: rgba(155,109,189,.03); }
.rank-1 { background: rgba(232,181,50,.06) !important; }
.rank-2 { background: rgba(180,180,180,.04) !important; }
.rank-3 { background: rgba(180,100,30,.05) !important; }
.lb-rank { width: 50px; text-align: center; }
.medal { font-size: 1.2rem; }
.rank-num { color: var(--text3); font-family: var(--mono); }
.lb-name a { color: var(--text); }
.lb-name a:hover { color: var(--accent); }
.lb-main-stat { color: var(--accent); font-family: var(--title); font-size: 1rem; }

/* ── Stats search ─────────────────────────────── */
.search-form { max-width: 600px; margin-bottom: 32px; }
.search-row { display: flex; gap: 10px; }
.search-input {
  flex: 1; background: var(--surface); border: 1px solid var(--border);
  color: var(--text); padding: 11px 16px; border-radius: var(--radius);
  font-family: var(--mono); font-size: .9rem;
}
.search-input:focus { outline: none; border-color: var(--accent); }
.search-hint { color: var(--text3); font-size: .8rem; margin-top: 8px; }
.stats-result-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 28px;
}
.stats-result-header { margin-bottom: 28px; }
.stats-result-header h2 { font-size: 1.4rem; margin-bottom: 6px; }
.steam-id-display { display: block; color: var(--text3); font-size: .82rem; margin-top: 6px; }

/* ── Notices ──────────────────────────────────── */
.notice {
  padding: 14px 18px; border-radius: 8px; margin-bottom: 20px;
  font-size: .9rem;
}
.notice-warn { background: rgba(232,181,50,.1); border: 1px solid rgba(232,181,50,.25); color: var(--rad); }
.notice-info { background: rgba(52,152,219,.08); border: 1px solid rgba(52,152,219,.2); color: #3498db; }

/* ── Modal ────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.75); backdrop-filter: blur(4px);
  align-items: center; justify-content: center;
}
.modal {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 36px; max-width: 480px; width: 90%;
}
.modal h2 { font-size: 1.3rem; margin-bottom: 24px; }

/* ── Forms ────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; color: var(--text2); font-size: .85rem; margin-bottom: 6px; letter-spacing: .03em; }
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%; background: var(--bg3); border: 1px solid var(--border);
  color: var(--text); padding: 10px 14px; border-radius: var(--radius);
  font-family: var(--body); font-size: .9rem;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { outline: none; border-color: var(--accent); }
.form-group textarea { resize: vertical; min-height: 100px; }
.form-actions { display: flex; gap: 12px; margin-top: 8px; flex-wrap: wrap; }

/* ── Admin ────────────────────────────────────── */
.admin-stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px; margin-bottom: 32px;
}
.admin-nav { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 32px; }
.admin-nav-card {
  background: var(--surface); border: 1px solid var(--border);
  padding: 14px 22px; border-radius: 8px; color: var(--text2);
  transition: all .2s;
}
.admin-nav-card:hover { border-color: var(--accent); color: var(--accent); }
.admin-table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.admin-table th { background: var(--surface2); padding: 11px 14px; text-align: left; font-size: .78rem; color: var(--text3); letter-spacing: .06em; border-bottom: 1px solid var(--border); }
.admin-table td { padding: 11px 14px; border-bottom: 1px solid var(--border2); font-size: .88rem; }
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover { background: rgba(155,109,189,.03); }
.admin-form { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 32px; }
.banned-row { background: rgba(192,57,43,.06) !important; }

/* ── Error page ───────────────────────────────── */
.error-page { text-align: center; padding: 100px 20px; }
.error-code { font-family: var(--title); font-size: 8rem; color: var(--accent); opacity: .15; line-height: 1; margin-bottom: 16px; }
.error-page h1 { font-size: 1.8rem; margin-bottom: 28px; }

/* ── Footer ───────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  background: rgba(0,0,0,.3);
  padding: 50px 0 20px;
  margin-top: 40px;
}
.footer-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 32px; margin-bottom: 36px;
}
.footer-brand { font-size: 1.1rem; }
.footer-desc { color: var(--text3); font-size: .82rem; margin-top: 8px; }
.footer h4 { color: var(--text2); font-size: .85rem; letter-spacing: .06em; margin-bottom: 14px; font-family: var(--mono); }
.footer-nav { display: flex; flex-direction: column; gap: 8px; }
.footer-nav a { color: var(--text3); font-size: .88rem; }
.footer-nav a:hover { color: var(--accent); }
.footer-ip { color: var(--text3); font-size: .88rem; margin-bottom: 10px; }
.footer-bottom { border-top: 1px solid var(--border2); padding-top: 20px; text-align: center; }
.footer-bottom p { color: var(--text3); font-size: .78rem; letter-spacing: .04em; }

/* ── Nav dropdown ────────────────────────────── */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
  cursor: pointer; color: var(--text2); font-size: .9rem;
  padding: 4px 8px; border-radius: var(--radius);
  transition: color .2s; user-select: none;
}
.nav-dropdown-toggle:hover, .nav-dropdown-toggle.active { color: var(--accent); }
.nav-dropdown-menu {
  display: none; position: absolute; top: calc(100% + 10px); right: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); min-width: 160px; z-index: 200;
  box-shadow: var(--shadow); flex-direction: column;
  list-style: none; padding: 6px 0;
}
.nav-dropdown:hover .nav-dropdown-menu { display: flex; }
.nav-dropdown-menu li a {
  display: block; padding: 9px 16px; color: var(--text2); font-size: .88rem;
  transition: background .15s, color .15s;
}
.nav-dropdown-menu li a:hover { background: var(--bg3); color: var(--accent); }
.nav-shop-link { color: var(--rad) !important; }
.nav-shop-link:hover { color: var(--rad2) !important; }

/* ── Page (rules / lore) ──────────────────────── */
.page-section { padding-top: 40px; }
.page-container { max-width: 960px; }
.page-header { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.page-header .section-title { margin-bottom: 0; }
.page-content {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 36px 44px;
  color: var(--text2); line-height: 1.85; font-size: .97rem;
}
.page-content h1,.page-content h2,.page-content h3,.page-content h4 { scroll-margin-top: 80px; }
.page-content h1,.page-content h2,.page-content h3 { color: var(--text); font-family: var(--title); margin: 1.4em 0 .5em; }
.page-content p { margin-bottom: 1em; }
.page-content ul,.page-content ol { padding-left: 1.6em; margin-bottom: 1em; }
.page-content li { margin-bottom: .5em; }
.page-content hr { border: none; border-top: 1px solid var(--border); margin: 2em 0; }
.page-content strong { color: var(--text); }
.page-content table { border-collapse: collapse; width: 100%; margin-bottom: 1em; }
.page-content th,.page-content td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
.page-content th { background: var(--bg3); color: var(--text); }
@media (max-width: 600px) { .page-content { padding: 20px 16px; } }

/* ── Rules sidebar layout ─────────────────────── */
.rules-layout {
  display: grid;
  grid-template-columns: 256px 1fr;
  gap: 28px;
  align-items: start;
  max-width: 1200px;
}
.rules-sidebar {
  position: sticky;
  top: 74px;
  max-height: calc(100vh - 90px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.rules-sidebar-inner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 14px;
}
.rules-search-wrap { position: relative; margin-bottom: 14px; }
.rules-search {
  width: 100%; box-sizing: border-box;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text);
  padding: 8px 32px 8px 11px; font-size: .83rem; outline: none;
  transition: border-color .2s;
}
.rules-search:focus { border-color: var(--accent); }
.rules-search::placeholder { color: var(--text3); }
.rules-search-clear {
  position: absolute; right: 7px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--text3);
  cursor: pointer; font-size: .78rem; display: flex;
  align-items: center; padding: 2px; transition: color .15s;
}
.rules-search-clear:hover { color: var(--text); }
.rules-toc-label {
  font-size: .68rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text3); margin-bottom: 8px; font-family: var(--mono);
}
.rules-toc { display: flex; flex-direction: column; gap: 1px; }
.toc-link {
  display: block; color: var(--text2); font-size: .82rem;
  padding: 4px 8px; border-radius: 4px; text-decoration: none;
  border-left: 2px solid transparent; line-height: 1.4;
  transition: color .15s, background .15s, border-color .15s;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.toc-link:hover { color: var(--text); background: rgba(155,109,189,.08); }
.toc-link.active { color: var(--accent); border-left-color: var(--accent); background: rgba(155,109,189,.1); }
.toc-h1 { font-weight: 600; }
.toc-h2 { padding-left: 14px; }
.toc-h3 { padding-left: 24px; font-size: .77rem; color: var(--text3); }
.toc-h4 { padding-left: 34px; font-size: .74rem; color: var(--text3); }
.search-hl { background: rgba(200,160,40,.32); color: var(--text); border-radius: 2px; padding: 0 1px; }
.rules-main { min-width: 0; }
.rules-toc-toggle { display: none; }
@media (max-width: 920px) {
  .rules-layout { grid-template-columns: 1fr; }
  .rules-sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: 280px;
    z-index: 300; transform: translateX(-110%);
    transition: transform .25s ease;
    background: var(--bg); border-right: 1px solid var(--border);
    padding: 20px 16px; max-height: 100vh; overflow-y: auto;
    scrollbar-width: thin;
  }
  .rules-sidebar.open { transform: translateX(0); box-shadow: 4px 0 24px rgba(0,0,0,.5); }
  .rules-sidebar-inner { background: none; border: none; padding: 0; }
  .rules-toc-toggle {
    display: inline-flex; align-items: center; gap: 7px;
    background: var(--surface); border: 1px solid var(--border);
    color: var(--text2); padding: 6px 14px; border-radius: var(--radius);
    cursor: pointer; font-size: .83rem; transition: all .15s;
  }
  .rules-toc-toggle:hover { border-color: var(--accent); color: var(--accent); }
}

/* ── Guides ───────────────────────────────────── */
.guides-grid { display: flex; flex-direction: column; gap: 12px; }
.guide-card {
  display: flex; align-items: center; gap: 20px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 22px;
  text-decoration: none; transition: border-color .2s, transform .15s;
}
.guide-card:hover { border-color: var(--accent2); transform: translateX(4px); }
.guide-num { font-family: var(--mono); font-size: 1.3rem; color: var(--accent2); min-width: 36px; opacity: .7; }
.guide-body { flex: 1; }
.guide-title { color: var(--text); font-size: 1rem; font-family: var(--title); margin: 0 0 4px; }
.guide-preview { color: var(--text3); font-size: .85rem; margin: 0; }
.guide-empty { font-style: italic; }
.guide-arrow { color: var(--accent2); font-size: 1.1rem; }
.guide-card:hover .guide-arrow { color: var(--accent); }

/* ── Wiki ─────────────────────────────────────── */
.wiki-categories { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.wiki-cat-card {
  display: flex; align-items: center; gap: 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px;
  text-decoration: none; transition: border-color .2s, transform .15s;
}
.wiki-cat-card:hover { border-color: var(--accent2); transform: translateY(-2px); }
.wiki-cat-icon { font-size: 1.8rem; min-width: 36px; text-align: center; }
.wiki-cat-info { flex: 1; }
.wiki-cat-name { color: var(--text); font-size: .95rem; font-family: var(--title); }
.wiki-cat-count { color: var(--text3); font-size: .78rem; font-family: var(--mono); margin-top: 2px; }
.wiki-cat-arrow { color: var(--text3); }
.wiki-cat-card:hover .wiki-cat-arrow { color: var(--accent); }

.wiki-articles-list { display: flex; flex-direction: column; gap: 8px; }
.wiki-article-row {
  display: flex; align-items: baseline; gap: 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 20px;
  text-decoration: none; transition: border-color .2s;
}
.wiki-article-row:hover { border-color: var(--accent2); }
.wiki-article-title { color: var(--text); font-size: .95rem; font-family: var(--title); min-width: 180px; }
.wiki-article-preview { color: var(--text3); font-size: .82rem; flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.wiki-article-arrow { color: var(--text3); margin-left: auto; }
.wiki-article-row:hover .wiki-article-arrow { color: var(--accent); }

.wiki-admin-group { margin-bottom: 10px; }
.wiki-admin-cat-title { color: var(--text2); font-size: .92rem; font-family: var(--mono); margin: 20px 0 8px; letter-spacing: .05em; }

/* ── News ─────────────────────────────────────── */
.news-list { display: flex; flex-direction: column; gap: 20px; }
.news-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  text-decoration: none;
  color: var(--text);
  transition: border-color .2s, transform .15s;
}
.news-card:hover { border-color: var(--accent2); transform: translateY(-2px); }
.news-card-meta { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; flex-wrap: wrap; }
.news-category {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .08em;
  padding: 2px 8px; border-radius: 3px; text-transform: uppercase;
}
.news-cat-news    { background: rgba(155,109,189,.15); color: var(--accent); border: 1px solid var(--accent2); }
.news-cat-update  { background: rgba(232,181,50,.12); color: var(--rad);    border: 1px solid var(--rad2); }
.news-cat-event   { background: rgba(192,57,43,.12);  color: #e74c3c;       border: 1px solid #922b21; }
.news-date { color: var(--text3); font-size: .82rem; font-family: var(--mono); }
.news-card-title { color: var(--text); font-size: 1.15rem; margin: 0 0 10px; font-family: var(--title); }
.news-card-preview { color: var(--text2); font-size: .9rem; line-height: 1.6; margin: 0; }
.news-card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; }
.news-author { color: var(--text3); font-size: .82rem; }
.news-read-more { color: var(--accent2); font-size: .82rem; font-family: var(--mono); }
.news-card:hover .news-read-more { color: var(--accent); }

/* News detail */
.news-back { display: inline-block; color: var(--text3); font-size: .85rem; margin-bottom: 24px; }
.news-back:hover { color: var(--accent); }
.news-article { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 36px 40px; }
.news-article-title { color: var(--text); font-family: var(--title); font-size: 1.6rem; margin: 14px 0 28px; }
.news-article-body { color: var(--text2); line-height: 1.8; font-size: .96rem; }
.news-article-body p { margin-bottom: 1em; min-height: 1em; }
.news-article-body h1,.news-article-body h2,.news-article-body h3,.news-article-body h4 { color: var(--text); margin: 1.5em 0 .5em; font-family: var(--title); }
.news-article-body ul, .news-article-body ol { padding-left: 1.5em; margin-bottom: 1em; }
.news-article-body li { margin-bottom: .4em; }
.news-article-body strong { color: var(--text); font-weight: 600; }
.news-article-body em { font-style: italic; }
.news-article-body img { max-width: 100%; border-radius: var(--radius); margin: 1em 0; }
.news-article-body blockquote { border-left: 3px solid var(--accent); padding-left: 14px; color: var(--text3); margin: 1em 0; }
@media (max-width: 600px) {
  .news-article { padding: 20px 16px; }
}

/* ── Giveaway ─────────────────────────────────── */
.giveaway-active {
  background: var(--surface); border: 1px solid var(--accent2);
  border-radius: var(--radius); padding: 32px 36px;
  box-shadow: 0 0 30px rgba(155,109,189,.08);
}
.giveaway-badge {
  display: inline-block; background: rgba(192,57,43,.15); color: #e74c3c;
  border: 1px solid #922b21; font-family: var(--mono); font-size: .72rem;
  letter-spacing: .1em; padding: 3px 10px; border-radius: 3px; margin-bottom: 16px;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.6} }
.giveaway-title { font-family: var(--title); font-size: 1.6rem; color: var(--text); margin: 0 0 12px; }
.giveaway-prize { color: var(--rad); font-size: 1.05rem; margin-bottom: 12px; }
.giveaway-prize strong { color: var(--rad); }
.giveaway-desc { color: var(--text2); margin-bottom: 20px; line-height: 1.6; }
.giveaway-meta {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px; margin: 20px 0;
}
.giveaway-meta-item {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 16px;
}
.giveaway-meta-item.accent { border-color: var(--accent2); }
.giveaway-meta-label { color: var(--text3); font-size: .75rem; font-family: var(--mono); display: block; margin-bottom: 4px; }
.giveaway-meta-val { color: var(--text); font-size: 1rem; font-family: var(--title); }
.giveaway-meta-item.accent .giveaway-meta-val { color: var(--accent); font-size: 1.3rem; }
.giveaway-how { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; margin-top: 20px; }
.giveaway-how h3 { color: var(--text2); font-size: .9rem; font-family: var(--mono); margin: 0 0 8px; letter-spacing: .05em; }
.giveaway-how p { color: var(--text3); font-size: .88rem; line-height: 1.6; margin: 0; }
.giveaway-how strong { color: var(--accent); }

.giveaway-past-list { display: flex; flex-direction: column; gap: 10px; }
.giveaway-past-card {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 20px; flex-wrap: wrap;
}
.giveaway-past-title { color: var(--text); font-family: var(--title); font-size: .95rem; }
.giveaway-past-prize { color: var(--rad); font-size: .85rem; margin: 2px 0; }
.giveaway-past-date { color: var(--text3); font-size: .78rem; font-family: var(--mono); }
.giveaway-past-winner { text-align: right; }
.winner-label { color: var(--text3); font-size: .75rem; font-family: var(--mono); display: block; margin-bottom: 2px; }
.winner-name { color: var(--accent); font-family: var(--title); font-size: 1rem; }

/* ── Scrollbar ────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent2); }

/* ── Selection ────────────────────────────────── */
::selection { background: rgba(109,189,60,.25); color: #fff; }
