:root {
  --bg: #07080b;
  --bg-alt: #0c0e14;
  --card: #10131a;
  --card-2: #151922;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(225, 29, 46, 0.38);
  --text: #f4f6f9;
  --muted: #98a2b3;
  --red: #e11d2e;
  --red-bright: #ff2e41;
  --red-dark: #99111f;
  --green: #22c55e;
  --gold: #f5b942;
  --font-display: 'Russo One', 'Impact', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

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

/* Dark Taiga + Blood-Crimson Atmospheric Backdrop */
.wild-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  background:
    radial-gradient(ellipse 900px 560px at 14% 12%, rgba(225, 29, 46, 0.16), transparent 64%),
    radial-gradient(ellipse 760px 520px at 88% 8%, rgba(71, 85, 105, 0.16), transparent 62%),
    radial-gradient(ellipse 680px 420px at 50% 95%, rgba(153, 17, 31, 0.13), transparent 68%),
    linear-gradient(180deg, #090b0f 0%, #07080b 45%, #050608 100%);
}

/* Subtle crimson claw-slash geometric texture */
.claw-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.28;
  background-image:
    repeating-linear-gradient(
      -52deg,
      transparent 0px,
      transparent 96px,
      rgba(225, 29, 46, 0.055) 96px,
      rgba(225, 29, 46, 0.055) 98px
    );
}

.container {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

/* TOPBAR */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(7, 8, 11, 0.86);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: inherit;
}
.brand-logo-wrap {
  width: 44px;
  height: 44px;
  border-radius: 9px;
  background: radial-gradient(circle at center, #08090c 52%, rgba(225, 29, 46, 0.28) 100%);
  border: 1px solid rgba(225, 29, 46, 0.45);
  display: grid;
  place-items: center;
  padding: 2px;
  box-shadow: 0 0 18px rgba(225, 29, 46, 0.22);
}
.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.brand-title {
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 0.04em;
  line-height: 1.1;
}
.brand-red { color: var(--red-bright); }
.brand-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.nav-links {
  display: flex;
  gap: 22px;
}
.nav-links a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--red-bright); }

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.online-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 6px;
  background: rgba(16, 19, 26, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12.5px;
  color: #e2e8f0;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  display: inline-block;
  flex-shrink: 0;
}
.dot.pulse {
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.75);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-family: var(--font-body);
  font-weight: 800;
  letter-spacing: 0.03em;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, background 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 8px 14px; font-size: 12.5px; }
.btn-lg { padding: 15px 26px; font-size: 14.5px; }
.btn-block { width: 100%; padding: 13px 18px; font-size: 14px; }

.btn-primary {
  background: linear-gradient(135deg, var(--red-bright) 0%, var(--red) 55%, var(--red-dark) 100%);
  color: #ffffff;
  border-color: rgba(255, 110, 120, 0.38);
  box-shadow: 0 8px 26px rgba(225, 29, 46, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #ff4254 0%, #e11d2e 60%, #b91c1c 100%);
  box-shadow: 0 10px 32px rgba(225, 29, 46, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.btn-secondary {
  background: linear-gradient(180deg, #1b202b 0%, #12161e 100%);
  color: #f1f5f9;
  border-color: rgba(255, 255, 255, 0.16);
}
.btn-secondary:hover {
  background: linear-gradient(180deg, #232a38 0%, #171c26 100%);
  border-color: rgba(225, 29, 46, 0.65);
}
.btn-ghost {
  background: transparent;
  color: #cbd5e1;
  border-color: rgba(255, 255, 255, 0.14);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.26);
}

/* HERO */
.hero { padding: 42px 0 60px; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.24fr) minmax(340px, 0.86fr);
  gap: 34px;
  align-items: start;
}

.hero-emblem-row {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 18px;
}
.hero-emblem-shield {
  width: 172px;
  height: 172px;
  flex-shrink: 0;
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 48%, #040507 0%, #07080b 62%, rgba(225, 29, 46, 0.22) 100%);
  border: 1px solid rgba(225, 29, 46, 0.42);
  padding: 10px;
  display: grid;
  place-items: center;
  box-shadow:
    0 18px 46px rgba(0, 0, 0, 0.72),
    0 0 38px rgba(225, 29, 46, 0.22),
    inset 0 0 24px rgba(0, 0, 0, 0.9);
}
.hero-emblem-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.95));
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 6px;
  background: rgba(225, 29, 46, 0.12);
  border: 1px solid rgba(225, 29, 46, 0.36);
  color: #fecdd3;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.hero-copy h1 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: clamp(30px, 4.1vw, 48px);
  line-height: 1.02;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.75);
}
.h1-white { color: #ffffff; display: block; }
.h1-red {
  color: var(--red-bright);
  display: block;
  text-shadow: 0 0 28px rgba(225, 29, 46, 0.42), 0 4px 16px rgba(0, 0, 0, 0.85);
}
.hero-tagline {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: #cbd5e1;
}
.hero-lead {
  font-size: 15.5px;
  color: #a6b0c0;
  max-width: 610px;
  margin: 0 0 24px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.stat-card {
  background: linear-gradient(180deg, rgba(21, 25, 34, 0.92), rgba(13, 16, 23, 0.95));
  border: 1px solid var(--border);
  border-left: 3px solid var(--red);
  border-radius: 8px;
  padding: 13px 15px;
}
.stat-value {
  font-family: var(--font-display);
  font-size: 24px;
  color: #ffffff;
  letter-spacing: 0.02em;
}
.stat-value.red-val { color: var(--red-bright); }
.stat-label {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.active-scenes {
  margin-top: 16px;
  padding: 13px 15px;
  border-radius: 8px;
  background: rgba(16, 19, 26, 0.85);
  border: 1px solid var(--border);
}
.active-scenes-title {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 8px;
  font-weight: 700;
}
.scene-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.scene-chip {
  font-size: 12px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 6px;
  background: rgba(225, 29, 46, 0.14);
  border: 1px solid rgba(225, 29, 46, 0.36);
  color: #ffe4e6;
}

/* AUTH / CABINET PANEL */
.auth-panel {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #131721 0%, #0d1017 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(225, 29, 46, 0.14);
}
.panel-accent-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--red-dark), var(--red-bright), var(--red-dark));
}
.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: #080a0f;
  padding: 4px;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-bottom: 16px;
}
.tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 9px 10px;
  border-radius: 6px;
  font-family: var(--font-display);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.tab.active {
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(225, 29, 46, 0.35);
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.form-stack.compact { margin-top: 10px; gap: 8px; }
.form-intro {
  font-size: 12.5px;
  color: #a1abbc;
  margin-bottom: 2px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.field span {
  font-size: 11.5px;
  font-weight: 700;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
input[type="text"], input[type="password"] {
  width: 100%;
  background: #080a0f;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus {
  border-color: var(--red-bright);
  box-shadow: 0 0 0 3px rgba(225, 29, 46, 0.18);
}

.form-msg {
  min-height: 18px;
  font-size: 12.5px;
  font-weight: 600;
  color: #fca5a5;
}
.form-msg.ok { color: #86efac; }

/* CABINET */
.cab-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.cab-nick {
  font-family: var(--font-display);
  font-size: 21px;
  letter-spacing: 0.02em;
}
.cab-sub { font-size: 12px; color: var(--muted); }
.level-badge {
  padding: 6px 12px;
  border-radius: 6px;
  background: rgba(225, 29, 46, 0.18);
  border: 1px solid rgba(225, 29, 46, 0.48);
  color: #ffe4e6;
  font-family: var(--font-display);
  font-size: 13px;
}
.cab-callout {
  font-size: 12.5px;
  background: rgba(225, 29, 46, 0.1);
  border: 1px solid rgba(225, 29, 46, 0.28);
  color: #f1f5f9;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 14px;
}
.cab-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-bottom: 14px;
}
.cab-metric {
  background: #080a0f;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
}
.cab-metric span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cab-metric strong { font-size: 16px; color: #ffffff; }
.cab-metric strong.gold { color: var(--gold); }

.inline-form { display: flex; gap: 8px; }
.inline-form input { flex: 1; }
.pass-details {
  margin-top: 8px;
  background: #080a0f;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
}
.pass-details summary {
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 700;
  color: #cbd5e1;
}
.cab-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* SECTIONS */
.section { padding: 62px 0; }
.section-alt {
  background: rgba(12, 14, 20, 0.84);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-head { margin-bottom: 28px; }
.section-head h2 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  position: relative;
  display: inline-block;
  padding-left: 14px;
}
.section-head h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 4px;
  background: var(--red-bright);
  border-radius: 2px;
}
.section-head p { margin: 0; color: var(--muted); font-size: 15px; }

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.feature-card {
  background: linear-gradient(180deg, rgba(18, 22, 31, 0.94), rgba(12, 15, 21, 0.96));
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  transition: border-color 0.16s, transform 0.16s, box-shadow 0.16s;
}
.feature-card:hover {
  border-color: rgba(225, 29, 46, 0.52);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}
.feat-tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--red-bright);
  background: rgba(225, 29, 46, 0.12);
  border: 1px solid rgba(225, 29, 46, 0.3);
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 10px;
}
.feature-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
}
.feature-card p { margin: 0; font-size: 13.5px; color: #a7b2c3; }
code, kbd {
  font-family: Consolas, monospace;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
  background: #080a0f;
  border: 1px solid rgba(225, 29, 46, 0.36);
  color: #fecdd3;
}

/* STEPS */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}
.step-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-top: 2px solid var(--red);
  border-radius: 10px;
  padding: 20px;
}
.step-num {
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1;
  color: var(--red-bright);
  margin-bottom: 10px;
}
.step-card h3 { margin: 0 0 6px; font-size: 16.5px; }
.step-card p { margin: 0; font-size: 13.5px; color: var(--muted); }

.hotkeys-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
}
.hotkeys-title {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.05em;
  color: #f8fafc;
  margin-bottom: 12px;
}
.hotkeys-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 16px;
  font-size: 13px;
  color: #cbd5e1;
}

/* LEADERBOARD */
.table-wrap {
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
}
.lb-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.lb-table th, .lb-table td {
  padding: 13px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.lb-table th {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: #0a0c12;
}
.lb-table tr:last-child td { border-bottom: 0; }
.lb-table tbody tr:hover { background: rgba(225, 29, 46, 0.07); }
.rank-1 { color: #fbbf24; font-weight: 800; }
.rank-2 { color: #e2e8f0; font-weight: 800; }
.rank-3 { color: #fb923c; font-weight: 800; }
.muted { color: var(--muted); }
.center { text-align: center !important; }

/* FOOTER */
.footer {
  border-top: 1px solid var(--border);
  padding: 22px 0;
  font-size: 13px;
  color: var(--muted);
  background: #050608;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.footer-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .cards-grid, .steps-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
}
@media (max-width: 620px) {
  .hero-emblem-row { flex-direction: column; text-align: center; }
  .hero-emblem-shield { width: 150px; height: 150px; }
  .cards-grid, .steps-grid, .stats-row { grid-template-columns: 1fr; }
  .topbar-actions .online-pill { display: none; }
}
