/* ================================================================
   BarrierCraft — Design System v3
   ================================================================ */

:root {
  --bg-dark: #071218;
  --bg-deep: #0c2026;
  --bg-elevated: rgba(21, 34, 40, 0.85);
  --stone: #16252c;
  --stone-soft: #21363e;
  --sand: #eadfc0;
  --accent: #018695;
  --accent-soft: #53c9d3;
  --accent-light: #7adce5;
  --accent-deep: #015763;
  --accent-glow: rgba(83, 201, 211, 0.35);
  --wood: #8a6535;
  --wood-dark: #4f381d;
  --text: #f4f7fb;
  --muted: #bfd5e0;
  --border: rgba(255, 255, 255, 0.08);
  --panel: rgba(7, 18, 24, 0.78);
  --line: rgba(83, 201, 211, 0.18);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --radius-sm: 14px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-xl: 32px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --danger: #d63031;
  --danger-soft: rgba(214, 48, 49, 0.18);
  --success: #00b894;
  --success-soft: rgba(0, 184, 148, 0.18);
}

[hidden] {
  display: none !important;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-deep) var(--bg-dark);
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb {
  background: var(--accent-deep);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* Page load fade-in */
body {
  margin: 0;
  font-family: "Exo 2", sans-serif;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(79, 56, 29, 0.15), transparent 18%),
    radial-gradient(circle at top, rgba(1, 134, 149, 0.18), transparent 30%),
    linear-gradient(180deg, #061016 0%, #0a1a20 48%, #071018 100%);
  opacity: 0;
  animation: page-fade-in 0.5s ease forwards;
}

body.inner-page { min-height: 100vh; }

a, button { color: inherit; text-decoration: none; font: inherit; }
button { cursor: pointer; border: 0; background: none; }
img { display: block; max-width: 100%; }
code { font-family: "JetBrains Mono", "Fira Code", monospace; background: rgba(255,255,255,0.08); padding: 2px 6px; border-radius: 6px; font-size: 0.92em; }

/* ================================================================
   Utilities
   ================================================================ */

.section-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.icon-inline {
  display: inline-block;
  width: 1.1em;
  height: 1.1em;
  vertical-align: -0.15em;
  fill: currentColor;
  flex-shrink: 0;
}

/* ================================================================
   Navbar
   ================================================================ */

.navbar {
  position: fixed;
  top: 20px;
  left: 50%;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, calc(100% - 24px));
  padding: 14px 20px;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(21, 34, 40, 0.92), rgba(8, 18, 24, 0.92));
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  transition: background 0.4s var(--ease-out), border-color 0.4s var(--ease-out);
}

.brand { width: clamp(150px, 18vw, 260px); }

/* Navbar dropdown */
.nav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 30;
  min-width: 220px;
  padding: 8px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(21, 34, 40, 0.97), rgba(8, 18, 24, 0.97));
  backdrop-filter: blur(16px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-dropdown.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.92rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-dropdown-item svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  opacity: 0.6;
  flex-shrink: 0;
}

.nav-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.nav-dropdown-logout:hover {
  background: rgba(214, 48, 49, 0.15);
  color: #ff6b6b;
}

.nav-dropdown-divider {
  margin: 6px 0;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-links {
  display: flex;
  gap: 24px;
  color: var(--muted);
  font-weight: 700;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s ease;
}

.nav-links a.active { color: var(--accent-soft) !important; }

.nav-links a:hover,
.nav-links a:focus-visible,
.footer a:hover,
.footer a:focus-visible { color: var(--accent-soft); }

.nav-links svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  opacity: 0.7;
}

.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-search {
  height: 32px;
  width: 160px;
  padding: 0 14px 0 34px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03) url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.45)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E") no-repeat 10px center / 14px;
  color: var(--text);
  font-size: 0.9rem;
  transition: all 0.25s ease;
}

.nav-search:focus {
  width: 200px;
  background-color: rgba(255, 255, 255, 0.08);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(1, 134, 149, 0.2);
  outline: none;
}
.nav-search::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

/* ================================================================
   Buttons
   ================================================================ */

.nav-button,
.primary-button,
.secondary-button,
.chip-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  transition:
    transform 0.25s var(--ease-spring),
    box-shadow 0.25s var(--ease-out),
    background 0.25s ease,
    border-color 0.25s ease;
}

.nav-auth-button { order: -1; }

.nav-button,
.primary-button,
.chip-link.active {
  color: #041018;
  background: linear-gradient(180deg, #36bdcc 0%, var(--accent) 100%);
  box-shadow: 0 0 0 0 var(--accent-glow);
}

.secondary-button,
.chip-link {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(30, 48, 56, 0.92), rgba(14, 26, 31, 0.92));
}

.nav-button:hover,
.primary-button:hover,
.nav-button:focus-visible,
.primary-button:focus-visible {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 0 24px var(--accent-glow), 0 8px 28px rgba(0, 0, 0, 0.3);
}

.secondary-button:hover,
.chip-link:hover,
.secondary-button:focus-visible,
.chip-link:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(83, 201, 211, 0.3);
  box-shadow: 0 0 16px rgba(83, 201, 211, 0.12);
}

/* Tooltip on copy buttons */
[data-copy] { position: relative; }

[data-copy]::after {
  content: "Нажми, чтобы скопировать";
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(7, 18, 24, 0.95);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

[data-copy]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ================================================================
   Hero
   ================================================================ */

.hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.hero-media,
.hero-media video,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  background:
    linear-gradient(180deg, rgba(4, 10, 15, 0.38) 0%, rgba(4, 10, 15, 0.7) 58%, #071018 100%),
    radial-gradient(circle at 20% 20%, rgba(1, 134, 149, 0.24), transparent 28%),
    radial-gradient(circle at 80% 30%, rgba(138, 101, 53, 0.24), transparent 22%);
}

.hero-particles {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 140px 0 64px;
}

.hero-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero-logo {
  width: min(760px, 92vw);
  filter: drop-shadow(0 12px 30px rgba(0, 0, 0, 0.5));
  animation: hero-float 5.8s ease-in-out infinite;
}

.hero-text {
  color: var(--muted);
  line-height: 1.7;
}

.hero-cta-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 28px;
}

.hero-version {
  color: var(--accent-soft);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-ip-button { min-width: 260px; }

.hero-intro {
  max-width: 720px;
  margin: 26px auto 0;
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 32px;
}

.hero-actions-center { justify-content: center; }

/* Hero stats */
.hero-stats {
  display: grid;
  gap: 18px;
  margin: 64px 0 0;
  padding: 0;
  list-style: none;
}

.hero-stats-wide {
  width: min(980px, 100%);
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.hero-stats-wrap {
  position: relative;
  width: min(980px, 100%);
}

/* Season countdown */
.season-countdown {
  position: absolute;
  inset: 20px 8px 8px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  border-radius: 42px;
  background: linear-gradient(180deg, rgba(156, 34, 34, 0.78), rgba(104, 16, 16, 0.72));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  text-align: center;
  isolation: isolate;
}

.season-countdown::before {
  content: "";
  position: absolute;
  inset: -14px;
  z-index: -1;
  border-radius: 56px;
  background: rgba(140, 22, 22, 0.32);
  filter: blur(18px);
  opacity: 0.95;
}

.season-countdown strong {
  color: #fff1f1;
  font-size: clamp(1.1rem, 2.5vw, 1.8rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Stat icon */
.stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 10px;
  border-radius: 12px;
  background: rgba(83, 201, 211, 0.12);
  color: var(--accent-soft);
}

.stat-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

/* Shared card base */
.hero-stats li,
.review-card,
.docs-card,
.rules-card,
.map-shell,
.metric-card,
.feature-card {
  border: 1px solid rgba(83, 201, 211, 0.3);
  background: linear-gradient(180deg, rgba(24, 39, 46, 0.95), rgba(9, 19, 24, 0.92));
  box-shadow: var(--shadow);
  transition:
    border-color 0.35s var(--ease-out),
    box-shadow 0.35s var(--ease-out),
    transform 0.35s var(--ease-spring);
}

.hero-stats li:hover,
.review-card:hover,
.docs-card:hover,
.rules-card:not(.rules-card-flat):hover,
.metric-card:hover,
.feature-card:hover {
  border-color: rgba(83, 201, 211, 0.5);
  box-shadow: 0 0 24px rgba(83, 201, 211, 0.1), var(--shadow);
  transform: translateY(-3px);
}

.hero-stats li {
  padding: 20px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    rgba(7, 18, 24, 0.82);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 24px 80px rgba(0, 0, 0, 0.38);
}

.hero-stats strong,
.metric-card strong,
.map-stat strong {
  display: block;
  font-size: 1.55rem;
  color: var(--accent-soft);
}

.hero-stats span,
.metric-card span,
.map-stat span {
  color: var(--muted);
}

/* Online pulse */
.online-pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.6);
  animation: pulse-dot 2s ease-in-out infinite;
  vertical-align: middle;
}

/* ================================================================
   Feature Cards (About section)
   ================================================================ */

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 38px;
}

.feature-card {
  padding: 24px;
  border-radius: 24px;
  text-align: center;
}

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(1, 134, 149, 0.24), rgba(83, 201, 211, 0.1));
  color: var(--accent-soft);
}

.feature-icon svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.feature-card h3 {
  margin: 0 0 8px;
  font-family: "Russo One", sans-serif;
  font-size: 1.1rem;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* ================================================================
   Section kicker & headings
   ================================================================ */

.section-kicker {
  margin: 0 0 14px;
  color: var(--accent-soft);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.about h2,
.reviews h2,
.join h2,
.footer h3,
.page-hero h1,
.rules-card h3,
.docs-card h3,
.map-panel h3 {
  margin: 0;
  font-family: "Russo One", sans-serif;
  line-height: 1.08;
}

/* ================================================================
   Sections
   ================================================================ */

.about, .reviews, .join, .page-section {
  position: relative;
  padding: 110px 0;
}

.about {
  border-top: 1px solid rgba(83, 201, 211, 0.22);
  border-bottom: 1px solid rgba(83, 201, 211, 0.16);
  box-shadow: inset 0 22px 40px rgba(0, 0, 0, 0.14), inset 0 -22px 40px rgba(0, 0, 0, 0.12);
}

.reviews {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(8, 19, 24, 0.72), rgba(10, 23, 29, 0.9));
}

.join { border-top: 1px solid rgba(83, 201, 211, 0.16); }

/* Pattern overlay */
.section-pattern {
  position: relative;
  overflow: hidden;
  background: #020608;
}

.section-pattern::before {
  content: "";
  position: absolute;
  top: 0;
  left: -64px;
  width: calc(100% + 64px);
  height: 100%;
  background: rgba(1, 134, 149, 0.88);
  -webkit-mask-image: url("/media/pattern.png");
  -webkit-mask-repeat: repeat;
  -webkit-mask-size: 64px 64px;
  -webkit-mask-position: 0 0;
  mask-image: url("/media/pattern.png");
  mask-repeat: repeat;
  mask-size: 64px 64px;
  mask-position: 0 0;
  filter: blur(1.2px);
  opacity: 0.96;
  will-change: transform;
}

.pattern-motion::before {
  animation: pattern-right 5.2s linear infinite;
}

.about-text-shell,
.reviews-shell,
.join-shell,
.page-hero,
.page-grid,
.map-grid,
.footer-grid {
  position: relative;
  z-index: 1;
}

.about h2, .reviews h2, .join h2, .page-hero h1 {
  max-width: 920px;
  font-size: clamp(2rem, 4.4vw, 4rem);
  color: #ffffff;
  text-shadow: 0 8px 26px rgba(0, 0, 0, 0.28);
}

.about-lead,
.join p,
.footer p,
.review-card p,
.page-hero p,
.docs-card p,
.rules-card p,
.map-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.about-lead {
  max-width: 660px;
  margin-top: 18px;
  font-size: 1rem;
  color: #e9f7fb;
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.22);
}

/* Section pseudo overlays */
.reviews::before,
.join::before,
.page-section::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.reviews::before,
.page-section::before {
  background:
    radial-gradient(circle at top left, rgba(1, 134, 149, 0.14), transparent 26%),
    radial-gradient(circle at bottom right, rgba(138, 101, 53, 0.2), transparent 28%);
}

.join::before {
  background:
    linear-gradient(180deg, rgba(1, 134, 149, 0.08), rgba(138, 101, 53, 0.16)),
    radial-gradient(circle at 50% 10%, rgba(255, 255, 255, 0.08), transparent 36%);
}

/* ================================================================
   Reviews / Marquee
   ================================================================ */

.reviews-shell { margin-bottom: 34px; }

.marquee {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}

.marquee-track {
  display: flex;
  gap: 20px;
  width: max-content;
  animation: slide-left 36s linear infinite;
}

.review-card {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 18px;
  width: min(420px, calc(100vw - 56px));
  padding: 22px;
  border-radius: var(--radius-lg);
}

.review-card img {
  width: 76px;
  height: 76px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  image-rendering: pixelated;
}

.review-card h3 {
  margin: 0 0 8px;
  font-size: 1.25rem;
}

/* Skeleton loader */
.skeleton {
  border-radius: 12px;
  background: linear-gradient(90deg,
    rgba(255, 255, 255, 0.04) 25%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0.04) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

.skeleton-card {
  width: min(420px, calc(100vw - 56px));
  height: 120px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.skeleton-stat {
  height: 80px;
  border-radius: 24px;
}

.skeleton-text {
  height: 18px;
  width: 70%;
  border-radius: 8px;
  margin-bottom: 10px;
}

.skeleton-avatar {
  width: 76px;
  height: 76px;
  border-radius: 18px;
}

/* ================================================================
   Join
   ================================================================ */

.join-shell {
  padding: 24px 0 0;
  text-align: center;
}

.join-shell-flat {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.join-title-straight {
  margin-inline: auto;
  text-align: center;
  letter-spacing: 0;
}

.join-shell h2 {
  margin-inline: auto;
  text-align: center;
}

.join p {
  max-width: 640px;
  margin: 18px auto 0;
  font-size: 1.08rem;
}

.large {
  margin-top: 28px;
  padding-inline: 32px;
}

/* ================================================================
   Footer
   ================================================================ */

.footer {
  padding: 34px 0 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(9, 18, 22, 0.98), rgba(6, 12, 16, 0.98));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 28px;
  align-items: start;
}

.footer-brand img {
  width: clamp(170px, 22vw, 280px);
  margin-bottom: 18px;
}

.footer h3 {
  margin-bottom: 16px;
  font-size: 1.15rem;
}

.footer ul {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.footer li a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s ease;
}

.footer li svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  opacity: 0.6;
}

.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s var(--ease-spring), color 0.25s ease;
}

.socials a:hover {
  border-color: var(--accent-soft);
  background: rgba(83, 201, 211, 0.12);
  transform: translateY(-2px);
  color: var(--accent-soft);
}

.socials svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.footer-copy {
  margin: 26px auto 0;
  width: min(1180px, calc(100% - 32px));
  color: #7c96a4;
}

/* ================================================================
   Inner pages
   ================================================================ */

.page-main { padding-top: 130px; }

.page-hero { padding-bottom: 42px; }

.page-hero p {
  max-width: 760px;
  margin-top: 20px;
  font-size: 1.08rem;
}

.page-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.page-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.rules-card, .docs-card, .map-shell {
  padding: 28px;
  border-radius: 30px;
}

/* Docs */
.docs-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.docs-page-main { padding-top: 108px; }

.docs-layout-full {
  min-height: calc(100vh - 108px);
  width: 100%;
  padding: 0 20px 32px;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 40px;
}

.docs-sidebar { position: relative; }

.docs-sidebar-shell {
  position: sticky;
  top: 108px;
  max-height: calc(100vh - 140px);
  padding: 10px 40px 20px 0;
  border-right: 1px solid var(--line);
  background: transparent;
  overflow-y: auto;
}

.docs-sidebar-title,
.docs-section-kicker {
  margin: 0 0 14px;
  color: var(--accent-soft);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.docs-nav { display: grid; gap: 8px; }

.docs-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.docs-nav a svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  opacity: 0.6;
  flex-shrink: 0;
}

.docs-nav a.active {
  color: var(--text);
  background: linear-gradient(135deg, rgba(1, 134, 149, 0.24), rgba(83, 201, 211, 0.14));
  box-shadow: inset 0 0 0 1px rgba(83, 201, 211, 0.14);
}

.docs-nav a.active svg { opacity: 1; }

.docs-nav a:hover,
.docs-nav a:focus-visible {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  transform: translateX(2px);
}

.docs-content { display: grid; gap: 24px; }
.docs-content-full { align-content: start; }

.docs-section {
  padding: 10px 0 40px;
  border: none;
  background: transparent;
  box-shadow: none;
  animation: fadeIn 0.3s ease;
}

.docs-section h2 {
  margin: 0 0 24px;
  font-family: inherit;
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.02em;
  color: var(--text);
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.docs-section p {
  margin: 16px 0;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.8;
  font-size: 1.05rem;
}

.docs-section code {
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent-soft);
  padding: 3px 6px;
  border-radius: 6px;
  font-family: Consolas, monospace;
  font-size: 0.9em;
}

/* Rules */
.rules-grid-full { grid-template-columns: 1fr; }

.rules-card-flat {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding-inline: 0;
}

.rules-card h3, .docs-card h3, .map-panel h3 {
  font-size: 1.45rem;
  display: flex;
  align-items: center;
  gap: 12px;
}

.rules-card h3 svg, .docs-card h3 svg {
  width: 28px;
  height: 28px;
  fill: var(--accent-soft);
  flex-shrink: 0;
}

.rule-list, .docs-content-full ul, .map-list {
  display: grid;
  gap: 14px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.rule-list li, .map-list li {
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  transition: border-color 0.2s ease, background 0.2s ease;
  line-height: 1.65;
}

.docs-content-full ul li {
  position: relative;
  padding-left: 20px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.8;
  font-size: 1.05rem;
}

.docs-content-full ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.rule-list li:hover, .map-list li:hover {
  border-color: rgba(83, 201, 211, 0.18);
  background: rgba(255, 255, 255, 0.06);
}

/* Rule severity badges */
.rule-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  padding: 3px 10px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  vertical-align: middle;
}

.rule-badge-warn {
  background: rgba(255, 200, 50, 0.16);
  color: #ffc832;
  border: 1px solid rgba(255, 200, 50, 0.22);
}

.rule-badge-ban {
  background: var(--danger-soft);
  color: #ff6b6b;
  border: 1px solid rgba(214, 48, 49, 0.22);
}

.rule-badge-info {
  background: rgba(83, 201, 211, 0.14);
  color: var(--accent-soft);
  border: 1px solid rgba(83, 201, 211, 0.15);
}

/* Metrics */
.metric-grid, .map-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 26px;
}

.metric-card, .map-stat {
  padding: 18px 20px;
  border-radius: 22px;
}

/* Map */
.map-grid { display: block; }
.map-page-main { padding-top: 108px; }
.map-grid-full { width: 100%; }

.map-shell {
  position: relative;
  overflow: hidden;
  min-height: 760px;
  padding: 10px;
}

.map-shell-full {
  height: calc(100vh - 140px);
  padding: 0;
  margin: 0 20px 20px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.map-page-main + .footer { border-top: 0; }

body:has(.map-page-main) .navbar { border-color: transparent; }

.dynmap-frame {
  display: block;
  width: 100%;
  min-height: 740px;
  border: 0;
  border-radius: 0;
  background: #091319;
}

/* ================================================================
   Toast
   ================================================================ */

.copy-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(7, 18, 24, 0.95);
  backdrop-filter: blur(12px);
  color: var(--text);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.copy-toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ================================================================
   Auth Layout
   ================================================================ */

.auth-layout {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 24px;
  align-items: start;
}

.auth-single-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 24px;
  align-items: start;
}

.auth-page-shell {
  width: min(780px, 100%);
  margin: 0 auto;
}

body:has(#login-form) .page-main,
body:has(#register-form) .page-main {
  display: flex;
  align-items: center;
  min-height: 100vh;
}

body:has(#login-form) .page-section,
body:has(#register-form) .page-section {
  padding-top: 0;
  padding-bottom: 0;
}

.auth-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(23, 38, 45, 0.95), rgba(10, 19, 24, 0.95));
  box-shadow: var(--shadow);
}

.auth-tabs-panel, .auth-card { padding: 30px; }
.account-dashboard { padding: 30px; }

.auth-title {
  margin: 0;
  font-family: "Russo One", sans-serif;
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.auth-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.auth-tab,
.auth-provider-button,
.auth-inline-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s var(--ease-spring);
}

.auth-tab:hover,
.auth-provider-button:hover,
.auth-inline-button:hover {
  border-color: rgba(83, 201, 211, 0.3);
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.auth-tab.active,
.auth-provider-button.primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-soft) 100%);
  color: #041018;
  font-weight: 800;
}

.auth-provider-button svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  flex-shrink: 0;
}

.auth-note, .auth-message, .auth-state, .auth-card p {
  color: var(--muted);
  line-height: 1.7;
}

.auth-note { margin: 18px 0 0; }

.auth-card h2 {
  margin: 0 0 20px;
  font-family: "Russo One", sans-serif;
}

.auth-form { display: grid; gap: 14px; }

.auth-form label {
  display: grid;
  gap: 8px;
  font-weight: 700;
  color: var(--muted);
}

.auth-form input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-family: inherit;
  font-size: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-form input:focus {
  outline: none;
  border-color: rgba(83, 201, 211, 0.5);
  box-shadow: 0 0 0 3px rgba(83, 201, 211, 0.12);
}

.auth-form input::placeholder {
  color: rgba(191, 213, 224, 0.4);
}

.auth-honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

.auth-divider {
  position: relative;
  margin: 22px 0;
  text-align: center;
  color: #7c96a4;
}

.auth-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.auth-divider span {
  position: relative;
  padding: 0 12px;
  background: rgba(7, 18, 24, 0.9);
}

.auth-provider-grid { display: grid; gap: 12px; }

.auth-provider-button {
  width: 100%;
  font-weight: 700;
}

.auth-inline-button {
  width: 100%;
  margin-top: 16px;
}

.auth-underlink { margin-top: 18px; }
.auth-underlink a { color: var(--accent-soft); }

.auth-oauth-complete { margin-top: 18px; }

/* Account */
.account-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.account-logout-button { margin-top: 4px; }

.account-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: 20px;
}

.account-summary-card, .account-links-card { height: 100%; }

.account-summary-grid { display: grid; gap: 12px; }

.account-stat {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  transition: background 0.2s ease;
}

.account-stat:hover { background: rgba(255, 255, 255, 0.08); }

.account-stat strong { color: var(--text); }

/* Security alert */
.account-security-alert {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 20px;
  padding: 18px 20px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(132, 23, 23, 0.9), rgba(95, 13, 13, 0.82));
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.global-security-banner {
  position: fixed;
  right: 18px;
  bottom: 18px;
  left: auto;
  z-index: 40;
}

.global-security-alert {
  grid-template-columns: 1fr;
  width: min(420px, calc(100vw - 24px));
  padding: 16px 18px;
  border: 1px solid rgba(255, 151, 151, 0.18);
  border-radius: 18px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.24);
}

.global-security-alert strong { font-size: 0.98rem; }
.global-security-alert p { font-size: 0.92rem; }

.global-security-alert .account-security-actions { justify-content: flex-end; }

.account-security-alert strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.05rem;
}

.account-security-alert p {
  margin: 0;
  color: #f4dede;
}

.account-security-actions { display: flex; gap: 10px; }

.account-profile-badge {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.06);
}

.account-profile-badge img {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  image-rendering: pixelated;
}

.account-profile-badge strong,
.account-profile-badge span { display: block; }

.account-profile-badge span {
  color: var(--muted);
  margin-top: 4px;
}

/* Auth messages */
.auth-message.prominent {
  margin-bottom: 24px;
  padding: 18px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(83, 201, 211, 0.2);
  font-size: 1rem;
  font-weight: 700;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
}

.auth-success-panel {
  margin-bottom: 18px;
  padding: 20px 22px;
  border: 1px solid rgba(83, 201, 211, 0.22);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(1, 134, 149, 0.22), rgba(83, 201, 211, 0.08));
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}

.auth-success-panel h3 {
  margin: 0 0 10px;
  font-family: "Russo One", sans-serif;
}

.auth-success-panel p { margin: 0; }
.auth-success-panel p + p { margin-top: 8px; }

.auth-message {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
}

.auth-message.error {
  background: rgba(140, 22, 22, 0.22);
  color: #ffd1d1;
}

.auth-message.success {
  background: rgba(1, 134, 149, 0.2);
  color: #d9fbff;
}

.auth-linked-list { display: grid; gap: 10px; margin-top: 14px; }

.auth-linked-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
}

/* ================================================================
   Full-Width Account Dashboard
   ================================================================ */

.account-full-width {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.account-header {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 28px 0;
}

.account-header-avatar {
  width: 96px;
  height: 96px;
  border-radius: 24px;
  border: 2px solid var(--line);
  image-rendering: pixelated;
  flex-shrink: 0;
}

.account-header-info h1 {
  margin: 0;
  font-family: "Russo One", sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.account-header-info p {
  margin: 6px 0 0;
  color: var(--muted);
}

.account-header-actions {
  margin-left: auto;
  display: flex;
  gap: 10px;
}

.account-panels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 8px;
}

.account-panel {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.account-panel h2 {
  margin: 0 0 16px;
  font-family: "Russo One", sans-serif;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.account-panel h2 svg {
  width: 22px;
  height: 22px;
  fill: var(--accent-soft);
}

.account-panel-span-2 { grid-column: span 2; }

/* Profile settings form */
.profile-form { display: grid; gap: 14px; }

.profile-form label {
  display: grid;
  gap: 6px;
  font-weight: 700;
  color: var(--muted);
  font-size: 0.92rem;
}

.profile-form textarea {
  width: 100%;
  min-height: 80px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-family: inherit;
  font-size: inherit;
  resize: vertical;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.profile-form textarea:focus {
  outline: none;
  border-color: rgba(83, 201, 211, 0.5);
  box-shadow: 0 0 0 3px rgba(83, 201, 211, 0.12);
}

.profile-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.profile-toggle input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* ================================================================
   Public Profile Page
   ================================================================ */

.profile-hero-banner {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(1, 134, 149, 0.12), rgba(83, 201, 211, 0.04));
  box-shadow: var(--shadow);
}

.profile-hero-avatar {
  height: 250px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 20px 30px rgba(0,0,0,0.5));
  image-rendering: pixelated;
  flex-shrink: 0;
  margin-right: 20px;
}

.profile-hero-info h1 {
  margin: 0;
  font-family: "Russo One", sans-serif;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
}

.profile-hero-bio {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
  max-width: 600px;
}

.profile-hero-meta {
  display: flex;
  gap: 20px;
  margin-top: 14px;
  color: #7c96a4;
  font-size: 0.88rem;
}

.profile-hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.profile-hero-meta svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Comments section */
.profile-comments-section {
  margin-top: 32px;
}

.profile-comments-section h2 {
  margin: 0 0 20px;
  font-family: "Russo One", sans-serif;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-comments-section h2 svg {
  width: 24px;
  height: 24px;
  fill: var(--accent-soft);
}

.comment-form {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.comment-form textarea {
  flex: 1;
  min-height: 52px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-family: inherit;
  font-size: inherit;
  resize: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.comment-form textarea:focus {
  outline: none;
  border-color: rgba(83, 201, 211, 0.5);
  box-shadow: 0 0 0 3px rgba(83, 201, 211, 0.12);
}

.comment-list {
  display: grid;
  gap: 14px;
}

.comment-card {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.2s ease;
}

.comment-card:hover {
  border-color: rgba(83, 201, 211, 0.15);
}

.comment-card img {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  image-rendering: pixelated;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.comment-header a {
  font-weight: 800;
  color: var(--text);
  transition: color 0.2s ease;
}

.comment-header a:hover { color: var(--accent-soft); }

.comment-date {
  color: #7c96a4;
  font-size: 0.82rem;
}

.comment-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.profile-private-message {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}

.profile-private-message h2 {
  margin: 0 0 12px;
  font-family: "Russo One", sans-serif;
}

.comment-empty {
  text-align: center;
  padding: 40px 20px;
  color: #7c96a4;
}

.not-found-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 200px);
  text-align: center;
  padding: 0 20px;
}

.not-found-code {
  font-family: "Russo One", sans-serif;
  font-size: clamp(6rem, 14vw, 12rem);
  color: var(--accent-deep);
  line-height: 1;
  text-shadow: 0 0 80px rgba(1, 87, 99, 0.3);
}

.not-found-title {
  margin: 0;
  font-family: "Russo One", sans-serif;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
}

.not-found-text {
  margin: 12px 0 28px;
  color: var(--muted);
  max-width: 480px;
}

/* ================================================================
   Scroll Reveal
   ================================================================ */

[data-reveal] {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 0.7s var(--ease-out),
    transform 0.7s var(--ease-out);
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal="delay-1"] { transition-delay: 0.1s; }
[data-reveal="delay-2"] { transition-delay: 0.2s; }
[data-reveal="delay-3"] { transition-delay: 0.3s; }
[data-reveal="delay-4"] { transition-delay: 0.4s; }

/* ================================================================
   Count-Up Animation
   ================================================================ */

[data-count-up] {
  display: inline-block;
  min-width: 2ch;
}

/* ================================================================
   Keyframes
   ================================================================ */

@keyframes slide-left {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-50% - 10px)); }
}

@keyframes pattern-right {
  from { transform: translateX(0); }
  to { transform: translateX(64px); }
}

@keyframes hero-float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-10px) scale(1.02); }
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(52, 211, 153, 0.6); }
  50% { opacity: 0.5; box-shadow: 0 0 16px rgba(52, 211, 153, 0.3); }
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes page-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ================================================================
   Responsive
   ================================================================ */

@media (max-width: 1080px) {
  .nav-links { gap: 16px; font-size: 0.95rem; }

  .hero-stats-wide, .metric-grid, .map-stats, .features-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-grid, .footer-grid { grid-template-columns: 1fr; }
  .auth-layout { grid-template-columns: 1fr; }
  .auth-single-layout { grid-template-columns: 1fr; }
  .account-grid, .account-security-alert { grid-template-columns: 1fr; }
  .docs-layout { grid-template-columns: 1fr; }

  .docs-sidebar-shell {
    position: static;
    min-height: auto;
    max-height: none;
    padding: 0 0 20px;
    border-right: none;
    border-bottom: 1px solid var(--line);
    overflow: visible;
  }
}

@media (max-width: 960px) {
  .navbar {
    flex-wrap: wrap;
    justify-content: center;
    border-radius: var(--radius-lg);
  }

  .nav-links {
    order: 3;
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-links svg { display: none; }

  .hero-content, .page-main { padding-top: 180px; }
}

@media (max-width: 640px) {
  .navbar {
    top: 12px;
    width: calc(100% - 16px);
    padding: 14px;
  }

  .brand { width: 170px; }
  .nav-links { gap: 14px; font-size: 0.92rem; }

  .nav-button, .hero-cta-row .primary-button, .chip-link {
    width: 100%;
  }

  .hero-logo { width: min(92vw, 460px); }

  .hero-cta-row, .page-chips {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-stats-wide, .metric-grid, .map-stats, .features-grid {
    grid-template-columns: 1fr;
  }

  .season-countdown {
    inset: 16px 6px 6px;
    padding: 16px;
    border-radius: 34px;
  }

  .season-countdown::before {
    inset: -10px;
    border-radius: 44px;
    filter: blur(14px);
  }

  .about, .reviews, .join, .page-section { padding: 88px 0; }

  .rules-card, .docs-card, .map-shell,
  .docs-section, .review-card,
  .auth-tabs-panel, .auth-card { padding: 22px; }

  .docs-layout-full { padding: 0 12px 24px; }
  .review-card { grid-template-columns: 1fr; }
  .map-shell { min-height: 460px; }
  .map-shell-full { min-height: calc(100vh - 180px); }
  .dynmap-frame { min-height: 440px; }

  [data-copy]::after { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  body { animation: none; opacity: 1; }

  .marquee-track, .pattern-motion::before, .hero-logo { animation: none; }

  .nav-button, .primary-button, .secondary-button,
  .chip-link, .copy-toast { transition: none; }

  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ================================================================
   Music Page
   ================================================================ */

.music-page-header {
  text-align: center;
  margin-bottom: 40px;
}

.music-page-header h1 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.music-page-subtitle {
  color: var(--muted);
  max-width: 500px;
  margin: 12px auto 0;
}

.music-upload-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 28px;
  margin-bottom: 32px;
}

.music-upload-card h2 {
  margin-bottom: 16px;
  font-size: 1.15rem;
}

.music-upload-form {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.music-upload-fields {
  display: flex;
  gap: 12px;
  flex: 1;
  min-width: 280px;
  flex-wrap: wrap;
}

.music-upload-fields .form-input {
  flex: 1;
  min-width: 180px;
}

.music-file-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.92rem;
  flex: 1;
  min-width: 200px;
}

.music-file-label:hover {
  border-color: var(--accent);
  color: var(--accent-soft);
}

.music-file-label svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.music-progress {
  margin-top: 12px;
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
}

.music-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
  transition: width 0.2s ease;
}

.music-upload-msg {
  margin-top: 8px;
  font-size: 0.9rem;
  min-height: 22px;
}

.music-track-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.music-track-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.music-track-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.music-play-btn {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  border: none;
  color: #fff;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.music-play-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 0 16px rgba(1, 134, 149, 0.4);
}

.music-play-btn svg {
  width: 18px;
  height: 18px;
}

.music-track-info {
  flex: 1;
  min-width: 0;
}

.music-track-title {
  font-weight: 700;
  font-size: 1.05rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-track-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
  font-size: 0.85rem;
  color: var(--muted);
  flex-wrap: wrap;
}

.music-track-uploader {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color 0.2s ease;
}

.music-track-uploader:hover {
  color: var(--accent-soft);
}

.music-track-uploader img {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  image-rendering: pixelated;
}

.music-track-progress-wrap {
  margin-top: 8px;
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  cursor: pointer;
  overflow: hidden;
}

.music-track-progress {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
  border-radius: 3px;
  transition: width 0.1s linear;
}

.music-download-btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  transition: all 0.2s ease;
}

.music-download-btn:hover {
  color: var(--accent-soft);
  border-color: var(--accent);
}

.music-download-btn svg {
  width: 18px;
  height: 18px;
}

/* ================================================================
   Report Modal
   ================================================================ */

.report-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.report-modal {
  background: linear-gradient(180deg, rgba(21, 34, 40, 0.97), rgba(8, 18, 24, 0.97));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 32px;
  max-width: 440px;
  width: calc(100% - 32px);
  animation: slideUp 0.25s ease;
}

.report-modal h3 { margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }

.report-modal textarea {
  width: 100%;
  min-height: 100px;
  margin: 12px 0;
  padding: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
}

.report-modal textarea:focus {
  border-color: #ff4444;
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 68, 68, 0.15);
}

.report-modal-actions { display: flex; gap: 12px; justify-content: flex-end; }

.report-btn-cancel {
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
}
.report-btn-cancel:hover { border-color: rgba(255, 255, 255, 0.2); color: var(--text); }

.report-btn-submit {
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  border: none;
  background: linear-gradient(135deg, #e53e3e, #c53030);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.report-btn-submit:hover { box-shadow: 0 0 16px rgba(229, 62, 62, 0.3); transform: translateY(-1px); }
.report-btn-submit:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.profile-report-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 68, 68, 0.3);
  background: rgba(255, 68, 68, 0.08);
  color: #ff6b6b;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: auto;
}
.profile-report-btn:hover {
  background: rgba(255, 68, 68, 0.15);
  border-color: rgba(255, 68, 68, 0.5);
  box-shadow: 0 0 12px rgba(255, 68, 68, 0.15);
}
.profile-report-btn svg { width: 14px; height: 14px; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

.profile-music-section { margin-top: 32px; }
.profile-music-section h2 { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.profile-music-section h2 svg { width: 20px; height: 20px; }
/* ================================================================
   Music & 3D Skin Enhancements
   ================================================================ */

.profile-skin-wrapper {
  position: relative;
  width: 280px;
  height: 380px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  margin-right: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: hero-float 6s ease-in-out infinite;
}

#skin-container {
  width: 100%;
  height: 100%;
  cursor: grab;
}

#skin-container:active {
  cursor: grabbing;
}

.music-track-actions {
  display: flex;
  gap: 8px;
  margin-left: 16px;
}

.music-action-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
}

.music-action-btn svg {
  width: 18px;
  height: 18px;
}

.music-action-btn:hover {
  background: var(--line);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.music-action-btn.copy-link-btn:hover {
  border-color: var(--accent-soft);
  color: var(--accent-soft);
}

.music-action-btn.delete-track-btn:hover {
  border-color: #ff4444;
  background: rgba(255, 68, 68, 0.1);
}

@media (max-width: 960px) {
  .profile-hero-banner {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  .profile-skin-wrapper {
    margin-right: 0;
    margin-bottom: 32px;
  }

  .account-panels {
    grid-template-columns: 1fr !important;
  }

  .account-panel-span-2 {
    grid-column: span 1 !important;
  }
}

/* ================================================================
   Form Input (universal)
   ================================================================ */

.form-input {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-family: inherit;
  font-size: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  outline: none;
}

.form-input:focus {
  border-color: rgba(83, 201, 211, 0.5);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(83, 201, 211, 0.12);
}

.form-input::placeholder {
  color: rgba(191, 213, 224, 0.4);
}

/* ================================================================
   Button loading state
   ================================================================ */

button:disabled,
.primary-button:disabled,
.secondary-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ================================================================
   Auth form improvements
   ================================================================ */

.auth-form input,
.auth-form textarea {
  -webkit-appearance: none;
  appearance: none;
}

/* Password field wrapper for eye toggle */
.input-password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-password-wrapper input {
  width: 100%;
  padding-right: 48px;
}

.input-eye-toggle {
  position: absolute;
  right: 14px;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  transition: color 0.2s ease;
  flex-shrink: 0;
}

.input-eye-toggle:hover { color: var(--text); }

.input-eye-toggle svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  pointer-events: none;
}

/* Auth page field labels with icons */
.auth-field-label {
  display: grid;
  gap: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* Auth page back link */
.auth-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 0.2s ease;
}

.auth-back-link:hover { color: var(--text); }

.auth-back-link svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Auth header logo */
.auth-logo-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.auth-logo-wrap img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.auth-logo-wrap h1 {
  margin: 0;
  font-family: "Russo One", sans-serif;
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  color: var(--text);
}

/* Strength indicator for password */
.password-strength {
  display: flex;
  gap: 4px;
  margin-top: 6px;
}

.password-strength-bar {
  flex: 1;
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  transition: background 0.3s ease;
}

.password-strength-bar.weak   { background: var(--danger); }
.password-strength-bar.medium { background: #ffc832; }
.password-strength-bar.strong { background: var(--success); }

.password-strength-label {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 4px;
  min-height: 1em;
  transition: color 0.3s ease;
}

/* Auth split layout */
.auth-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

.auth-split-visual {
  position: relative;
  background: linear-gradient(160deg, rgba(1, 134, 149, 0.3), rgba(8, 18, 24, 1));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px;
}

.auth-split-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 40%, rgba(1, 134, 149, 0.25), transparent 50%),
    radial-gradient(circle at 70% 70%, rgba(138, 101, 53, 0.2), transparent 40%);
}

.auth-split-visual-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--text);
}

.auth-split-visual-content img {
  width: min(340px, 80%);
  margin: 0 auto 32px;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.5));
  animation: hero-float 5.8s ease-in-out infinite;
}

.auth-split-visual-content h2 {
  font-family: "Russo One", sans-serif;
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  margin: 0 0 12px;
}

.auth-split-visual-content p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 340px;
  margin: 0 auto;
}

.auth-split-form {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  background: linear-gradient(180deg, #071218 0%, #0a1a20 100%);
  overflow-y: auto;
}

.auth-split-form-inner {
  width: 100%;
  max-width: 440px;
}

@media (max-width: 860px) {
  .auth-split {
    grid-template-columns: 1fr;
  }
  .auth-split-visual {
    display: none;
  }
  .auth-split-form {
    min-height: 100vh;
    padding: 32px 24px;
  }
}

/* ================================================================
   Inline toast notification (non-blocking)
   ================================================================ */

/* Global Toast Container (bottom-left) */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  display: flex;
  flex-direction: column-reverse; /* Newest on top if stacking, or just reverse order */
  gap: 12px;
  z-index: 10005;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 280px;
  max-width: 400px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: rgba(13, 25, 30, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(83, 201, 211, 0.2);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
  animation: toast-in 0.4s cubic-bezier(0.19, 1, 0.22, 1);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.toast.hide {
  opacity: 0;
  transform: translateX(-30px);
}

.toast-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
}

.toast.success { border-left: 4px solid #00b894; }
.toast.success .toast-icon { color: #00b894; }
.toast.error { border-left: 4px solid #d63031; }
.toast.error .toast-icon { color: #d63031; }
.toast.info { border-left: 4px solid var(--accent-soft); }
.toast.info .toast-icon { color: var(--accent-soft); }
.toast.warning { border-left: 4px solid #ffc832; }
.toast.warning .toast-icon { color: #ffc832; }

@keyframes toast-in {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ================================================================
   Branded Provider Buttons
   ================================================================ */

.auth-provider-button {
  position: relative;
  overflow: hidden;
}

.auth-provider-button::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.auth-provider-button:hover::before {
  opacity: 1;
}

/* Google */
.auth-provider-google {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text);
}
.auth-provider-google:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 20px rgba(66, 133, 244, 0.15);
}
.auth-provider-google svg {
  fill: none;
}

/* Discord */
.auth-provider-discord {
  background: rgba(88, 101, 242, 0.12);
  border-color: rgba(88, 101, 242, 0.25);
  color: #c5caf6;
}
.auth-provider-discord:hover {
  background: rgba(88, 101, 242, 0.22);
  border-color: rgba(88, 101, 242, 0.45);
  color: #fff;
  box-shadow: 0 0 20px rgba(88, 101, 242, 0.2);
}

/* Telegram */
.auth-provider-telegram {
  background: rgba(38, 166, 222, 0.1);
  border-color: rgba(38, 166, 222, 0.22);
  color: #7dd3f7;
}
.auth-provider-telegram:hover {
  background: rgba(38, 166, 222, 0.2);
  border-color: rgba(38, 166, 222, 0.4);
  color: #fff;
  box-shadow: 0 0 20px rgba(38, 166, 222, 0.18);
}

/* ================================================================
   Provider Linking Cards (Account Page)
   ================================================================ */

.provider-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.3s var(--ease-out);
}

.provider-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
}

.provider-card-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  flex-shrink: 0;
}

.provider-card-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.provider-card-icon-google {
  background: rgba(66, 133, 244, 0.12);
  color: #8ab4f8;
}

.provider-card-icon-discord {
  background: rgba(88, 101, 242, 0.12);
  color: #a5b4fc;
}

.provider-card-icon-telegram {
  background: rgba(38, 166, 222, 0.12);
  color: #7dd3f7;
}

.provider-card-info {
  flex: 1;
  min-width: 0;
}

.provider-card-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
}

.provider-card-status {
  font-size: 0.82rem;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.provider-card-status.connected {
  color: #7dffd3;
}

.provider-card-status.disconnected {
  color: var(--muted);
  opacity: 0.7;
}

.provider-card-status .status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.provider-card-status.connected .status-dot {
  background: #34d399;
  box-shadow: 0 0 6px rgba(52, 211, 153, 0.5);
}

.provider-card-status.disconnected .status-dot {
  background: rgba(255, 255, 255, 0.2);
}

.provider-card-action {
  flex-shrink: 0;
}

.provider-link-btn {
  padding: 8px 16px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s var(--ease-spring);
  border: 1px solid rgba(83, 201, 211, 0.3);
  background: rgba(83, 201, 211, 0.08);
  color: var(--accent-soft);
}

.provider-link-btn:hover {
  background: rgba(83, 201, 211, 0.18);
  border-color: rgba(83, 201, 211, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(83, 201, 211, 0.12);
}

.provider-unlink-btn {
  padding: 8px 16px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s var(--ease-spring);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
}

.provider-unlink-btn:hover {
  background: rgba(214, 48, 49, 0.1);
  border-color: rgba(214, 48, 49, 0.3);
  color: #ff6b6b;
  transform: translateY(-1px);
}

/* ================================================================
   Auth Split Glassmorphism Enhancements
   ================================================================ */

.auth-split-form-inner {
  position: relative;
}

.auth-split-visual-content::after {
  content: "";
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(83, 201, 211, 0.2), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: glow-pulse 4s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.5; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.2); }
}

/* Animated gradient border for auth form on focus-within */
.auth-split-form-inner:focus-within {
  --glow: rgba(83, 201, 211, 0.08);
}

/* Provider grid in auth pages */
.auth-provider-grid {
  display: grid;
  gap: 10px;
}

/* Loading shimmer on provider buttons */
.auth-provider-button.loading {
  pointer-events: none;
  opacity: 0.7;
}

.auth-provider-button.loading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 25%,
    rgba(255, 255, 255, 0.08) 50%,
    transparent 75%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: inherit;
}

/* Telegram widget container */
.telegram-widget-container {
  display: flex;
  justify-content: center;
  padding: 8px 0;
}

/* ================================================================
   Modals
   ================================================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.modal {
  background: rgba(14, 27, 34, 0.95);
  border: 1px solid rgba(83, 201, 211, 0.2);
  border-radius: 20px;
  width: 90%;
  max-width: 440px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.05);
  transform: translateY(0);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

.modal-overlay.hidden .modal {
  transform: translateY(20px);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(83, 201, 211, 0.1);
  background: linear-gradient(180deg, rgba(83, 201, 211, 0.05), transparent);
}

.modal-header h2 {
  margin: 0;
  font-family: inherit;
  font-size: 1.25rem;
  font-weight: 700;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  transition: color 0.2s;
}

.modal-close:hover {
  color: var(--text);
}

/* ================================================================
   Hero Stats Redesign
   ================================================================ */

.hero-stats {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 0;
  margin: 64px auto 0;
  list-style: none;
}

.hero-stats li {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(8, 19, 24, 0.6);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(83, 201, 211, 0.15);
  border-radius: 20px;
  padding: 24px 32px;
  min-width: 160px;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05), 0 8px 32px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.hero-stats li:hover {
  transform: translateY(-4px);
  border-color: rgba(83, 201, 211, 0.4);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1), 0 12px 40px rgba(0, 0, 0, 0.3), 0 0 20px rgba(83, 201, 211, 0.15);
}

.stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(83,201,211,0.2), rgba(1,134,149,0.1));
  color: var(--accent);
  margin-bottom: 12px;
}

.stat-icon svg {
  width: 24px;
  height: 24px;
}

.hero-stats strong {
  font-family: 'Russo One', sans-serif;
  font-size: 2.2rem;
  color: var(--text);
  line-height: 1;
  margin-bottom: 6px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-stats span {
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
/* Search suggestions dropdown */
.search-wrapper {
  position: relative;
}

.search-suggestions {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  width: 250px;
  background: rgba(12, 32, 38, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(83, 201, 211, 0.2);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  z-index: 100;
  animation: slide-down-fade 0.2s ease-out;
}

.search-suggestions.hidden {
  display: none;
}

.search-suggestion-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
  color: var(--muted);
  font-weight: 600;
}

.search-suggestion-item:hover,
.search-suggestion-item.active {
  background: rgba(83, 201, 211, 0.15);
  color: var(--accent-light);
}

.search-suggestion-item img {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  image-rendering: pixelated;
}

@keyframes slide-down-fade {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
  .search-suggestions {
    position: fixed;
    top: 70px;
    left: 12px;
    right: 12px;
    width: auto;
  }
}
/* Auth field disabled & title tooltip */
.auth-form input:disabled,
.auth-form button:disabled:not(.primary-button:disabled[type="submit"]) {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(1);
}

.auth-form input:disabled:hover {
  border-color: rgba(255, 255, 255, 0.1) !important;
  box-shadow: none !important;
}

/* OAuth Completion Panel - Full Screen Overlay */
.auth-oauth-complete {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: radial-gradient(circle at center, rgba(14, 27, 34, 0.92), rgba(6, 12, 16, 0.98));
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-oauth-complete[hidden] {
  display: none !important;
}

.auth-oauth-complete-inner {
  position: relative;
  background: linear-gradient(135deg, rgba(20, 36, 44, 0.95), rgba(10, 20, 26, 0.98));
  border: 1px solid rgba(83, 201, 211, 0.3);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
  padding: 42px;
  border-radius: 32px;
  width: 100%;
  max-width: 500px;
  text-align: center;
  animation: modal-pop 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

@keyframes modal-pop {
  from { opacity: 0; transform: scale(0.95) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.auth-oauth-complete-inner form {
  text-align: left;
}

.auth-oauth-complete::before {
  display: none; /* remove old pseudo if any */
}

.auth-oauth-complete h2 {
  font-family: "Russo One", sans-serif;
  color: #fff !important;
  font-size: 1.8rem !important;
  margin-bottom: 12px !important;
}

.auth-oauth-complete p {
  color: var(--muted) !important;
  font-size: 0.98rem !important;
  margin-bottom: 32px !important;
}

.auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(83, 201, 211, 0.1);
  border: 1px solid rgba(83, 201, 211, 0.2);
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-soft);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

/* ================================================================
   Full Screen Map Page
   ================================================================ */

.map-page-main {
  padding-top: 100px;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.map-grid-full {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0 16px 16px; /* Small "card" margin for premium look */
  min-height: 0;
}

.map-shell-full {
  flex: 1;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden;
  border-radius: 20px;
  background: var(--bg-dark);
}

.dynmap-frame {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

@media (max-width: 768px) {
  .map-page-main { padding-top: 80px; }
  .map-grid-full { padding: 0 8px 8px; }
}
