:root {
  --ink: #f8fafc;
  --muted: #b9c7d8;
  --night: #04070d;
  --blue-950: #06122d;
  --blue-800: #0d3ba8;
  --green: #00c853;
  --green-soft: rgba(0, 200, 83, 0.22);
  --yellow: #f4d03f;
  --line: rgba(248, 250, 252, 0.16);
  --panel: rgba(8, 18, 36, 0.82);
  --panel-solid: #0b172a;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
  scroll-snap-type: y mandatory;
}

main {
  scroll-snap-type: y mandatory;
}

@media (pointer: fine) and (hover: hover) {
  body,
  button,
  .button,
  a,
  input,
  textarea,
  select,
  .tab-button,
  .nav-link-button,
  .map-card,
  .map-arrow,
  .social-button,
  .battle-tabs a,
  .ranking-list a,
  .clan-podium a,
  .result-card,
  .admin-stat,
  .map-viewer-close,
  .map-viewer-arrow,
  .map-viewer-control {
    cursor: url("assets/cursor/arena-cursor-default.svg") 10 10, auto;
  }

  button:hover,
  .button:hover,
  a:hover,
  .tab-button:hover,
  .nav-link-button:hover,
  .map-card:hover,
  .map-arrow:hover,
  .social-button:hover,
  .battle-tabs a:hover,
  .ranking-list a:hover,
  .clan-podium a:hover,
  .result-card:hover,
  .admin-stat:hover,
  .map-viewer-close:hover,
  .map-viewer-arrow:hover,
  .map-viewer-control:hover {
    cursor: url("assets/cursor/arena-cursor-hover.svg") 24 24, pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
  }

  button:active,
  .button:active,
  a:active,
  .tab-button:active,
  .nav-link-button:active,
  .map-card:active,
  .map-arrow:active,
  .social-button:active,
  .battle-tabs a:active,
  .ranking-list a:active,
  .clan-podium a:active,
  .result-card:active,
  .admin-stat:active,
  .map-viewer-close:active,
  .map-viewer-arrow:active,
  .map-viewer-control:active {
    cursor: url("assets/cursor/arena-cursor-active.svg") 24 24, pointer;
    transform: scale(0.98);
  }
}

.section,
.hero {
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

body:not(.is-loaded) {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

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

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(13, 59, 168, 0.34), rgba(0, 200, 83, 0.22)),
    radial-gradient(circle at 50% 36%, rgba(0, 200, 83, 0.18), transparent 34%),
    #030509;
  transition: opacity 520ms ease, visibility 520ms ease;
}

.is-loaded .page-loader {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.loader-card {
  width: min(460px, 100%);
  display: grid;
  justify-items: center;
  gap: 18px;
}

.loader-logo {
  width: min(360px, 82vw);
  height: auto;
  filter: drop-shadow(0 22px 38px rgba(0, 0, 0, 0.55));
  animation: loader-pulse 1.4s ease-in-out infinite;
}

.loader-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.loader-bar {
  width: min(320px, 74vw);
  height: 8px;
  overflow: hidden;
  border: 1px solid rgba(248, 250, 252, 0.18);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.08);
}

.loader-bar span {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue-800), var(--green), var(--yellow));
  animation: loader-bar 6.6s ease-in-out infinite;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding: 14px clamp(18px, 5vw, 72px);
  background: rgba(4, 7, 13, 0.76);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand,
.main-nav,
.hero-actions,
.quick-info,
.join-actions {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  min-width: 0;
  font-weight: 900;
  text-transform: uppercase;
}

.brand-logo {
  width: 78px;
  height: 48px;
  object-fit: contain;
}

.main-nav {
  gap: clamp(14px, 3vw, 32px);
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 800;
}

.main-nav a {
  transition: color 180ms ease;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--ink);
}

.hero {
  position: relative;
  min-height: 94svh;
  display: grid;
  align-content: end;
  gap: 30px;
  padding: 132px clamp(18px, 5vw, 72px) 52px;
  overflow: hidden;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(4, 7, 13, 0.94) 0%, rgba(4, 7, 13, 0.75) 39%, rgba(4, 7, 13, 0.22) 72%),
    linear-gradient(0deg, rgba(4, 7, 13, 1) 0%, rgba(4, 7, 13, 0) 34%);
  z-index: 1;
}

.hero-panel {
  position: relative;
  z-index: 2;
}

.hero-panel {
  width: min(680px, 100%);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--yellow);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(3rem, 7vw, 6.8rem);
  line-height: 0.92;
  letter-spacing: 0;
  text-transform: uppercase;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4.4vw, 4.1rem);
  line-height: 1.02;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.18rem;
}

.hero-copy {
  max-width: 600px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 900;
  text-transform: uppercase;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button.primary {
  background: var(--green);
  color: #041006;
  box-shadow: 0 14px 36px rgba(0, 200, 83, 0.24);
}

.button.secondary {
  background: rgba(248, 250, 252, 0.08);
  border-color: var(--line);
  color: var(--ink);
}

.button.danger {
  border-color: rgba(255, 87, 87, 0.42);
  color: #ffb4b4;
}

.quick-info {
  flex-wrap: wrap;
  gap: 1px;
  width: min(850px, 100%);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 12, 25, 0.76);
  box-shadow: var(--shadow);
}

.quick-info div {
  flex: 1 1 210px;
  min-height: 88px;
  padding: 18px;
  background: rgba(248, 250, 252, 0.04);
}

.quick-info dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.quick-info dd {
  margin: 0;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.section {
  padding: clamp(64px, 9vw, 112px) clamp(18px, 5vw, 72px);
  scroll-snap-align: start;
}

.hero {
  scroll-snap-align: start;
}

.main {
  scroll-snap-type: y mandatory;
}

.section-heading {
  max-width: 900px;
  margin-bottom: 32px;
}

.feature-section {
  background:
    linear-gradient(135deg, rgba(13, 59, 168, 0.24), rgba(0, 200, 83, 0.08)),
    #060b16;
}

.feature-grid,
.rules-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.feature-card,
.rules-grid article {
  min-height: 230px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-solid);
}

.feature-card:nth-child(2) {
  background: #071f2b;
}

.feature-card:nth-child(3) {
  background: #11210f;
}

.card-index {
  display: inline-block;
  margin-bottom: 36px;
  color: var(--green);
  font-weight: 900;
}

.feature-card p,
.media-copy p,
.rules-grid p {
  color: var(--muted);
}

.media-section {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(320px, 1.14fr);
  gap: clamp(28px, 6vw, 80px);
  align-items: center;
  background: #04070d;
}

.media-copy p:last-child {
  max-width: 620px;
  margin: 22px 0 0;
  font-size: 1.06rem;
}

.media-frame {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #010205;
  box-shadow: var(--shadow);
}

.media-frame img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* Video styles for media frame */
.media-frame .media-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  transition: transform 280ms ease, box-shadow 280ms ease, filter 280ms ease;
  will-change: transform;
}

.media-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #010205;
  box-shadow: var(--shadow);
  transition: transform 280ms ease, box-shadow 280ms ease;
}

.media-frame:hover {
  transform: translateY(-6px);
  box-shadow: 0 48px 120px rgba(0,0,0,0.6), 0 0 36px rgba(0,200,83,0.08);
}

.media-frame:focus-within {
  box-shadow: 0 36px 96px rgba(0,0,0,0.55), 0 0 28px rgba(13,59,168,0.08);
}

.media-frame .media-video:hover {
  transform: scale(1.02);
  filter: saturate(1.04) brightness(1.02);
}

/* Accessible focus state for keyboard users */
.media-frame video:focus {
  outline: 3px solid rgba(0,200,83,0.12);
  outline-offset: 4px;
}

/* Audio badge on media frame */

.video-audio-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 6;
  background: rgba(2,8,12,0.6);
  border: 1px solid rgba(248,250,252,0.06);
  color: var(--ink);
  padding: 14px 14px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 900;
  font-size: 1.4rem;
  opacity: 1;
  transform: none;
  transition: background 160ms ease, transform 160ms ease;
}

.video-audio-badge.show {
  box-shadow: 0 8px 28px rgba(0,0,0,0.48), 0 0 10px rgba(0,200,83,0.06);
}

.video-audio-badge:focus {
  outline: 3px solid rgba(0,200,83,0.12);
  outline-offset: 2px;
}


.video-audio-badge .badge-icon {
  font-size: 1.6rem;
  line-height: 1;
}

.media-video-fallback {
  display: block;
}

.rules-section {
  background:
    linear-gradient(160deg, rgba(0, 200, 83, 0.12), transparent 42%),
    #07101f;
}

.rules-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.rules-grid article {
  min-height: 210px;
  border-left: 4px solid var(--green);
}

.join-section {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) auto;
  gap: clamp(22px, 4vw, 46px);
  align-items: center;
  padding: clamp(42px, 7vw, 76px) clamp(18px, 5vw, 72px);
  background:
    linear-gradient(90deg, rgba(13, 59, 168, 0.36), rgba(0, 200, 83, 0.2)),
    #050a14;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.join-logo {
  width: 160px;
  height: 96px;
  object-fit: contain;
}

.join-section h2 {
  max-width: 760px;
}

.join-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px clamp(18px, 5vw, 72px);
  color: var(--muted);
  background: #030509;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--yellow);
  font-weight: 900;
}

.app-page {
  min-height: 100svh;
  background:
    linear-gradient(135deg, rgba(13, 59, 168, 0.24), rgba(0, 200, 83, 0.12)),
    #04070d;
}

.app-shell {
  min-height: calc(100svh - 92px);
  padding: 128px clamp(18px, 5vw, 72px) 60px;
}

.nav-form {
  margin: 0;
}

.top-search-form {
  margin: 0;
}

.top-search-form input {
  width: clamp(150px, 18vw, 230px);
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(248, 250, 252, 0.22);
  border-radius: 8px;
  background: rgba(4, 7, 13, 0.72);
  color: var(--ink);
  font: inherit;
}

.top-search-form input:focus {
  outline: 2px solid rgba(0, 200, 83, 0.42);
  outline-offset: 2px;
}

.admin-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(244, 208, 63, 0.45);
  border-radius: 8px;
  background: rgba(244, 208, 63, 0.12);
  color: var(--yellow);
  font-size: 0.78rem;
  font-weight: 900;
}

.nav-link-button {
  appearance: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.nav-link-button:hover,
.nav-link-button:focus-visible {
  color: var(--ink);
}

.flash-list {
  width: min(960px, 100%);
  display: grid;
  gap: 10px;
  margin: 0 auto 24px;
}

.flash-message {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.08);
  color: var(--ink);
  font-weight: 800;
}

.flash-message.success {
  border-color: rgba(0, 200, 83, 0.42);
  background: rgba(0, 200, 83, 0.12);
}

.flash-message.error {
  border-color: rgba(255, 87, 87, 0.44);
  background: rgba(255, 87, 87, 0.12);
}

.flash-message.warning {
  border-color: rgba(244, 208, 63, 0.42);
  background: rgba(244, 208, 63, 0.12);
}

.auth-shell {
  display: grid;
  place-items: center;
}

.auth-card,
.profile-card {
  width: min(560px, 100%);
  padding: clamp(24px, 4vw, 36px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 18, 36, 0.9);
  box-shadow: var(--shadow);
}

.auth-card h1 {
  margin-bottom: 14px;
  font-size: clamp(2.4rem, 6vw, 4.8rem);
}

.auth-copy {
  margin-bottom: 24px;
  color: var(--muted);
}

.social-login {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin-bottom: 22px;
}

.social-login-label {
  margin: 0;
  color: rgba(248, 250, 252, 0.72);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.google-signin-button {
  position: relative;
  width: min(400px, 100%);
  height: 44px;
  max-height: 44px;
  min-height: 44px;
  overflow: hidden;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}

.google-signin-button [data-google-signin-target] {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 44px !important;
  max-height: 44px !important;
}

.google-signin-button [data-google-signin-target] > div {
  height: 44px !important;
  max-height: 44px !important;
}

.google-signin-visible {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px;
  width: 100%;
  height: 44px;
  box-sizing: border-box;
  border: 1px solid #747775;
  border-radius: 4px;
  background: #fff;
  color: #1f1f1f;
  font-family: Arial, sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  pointer-events: none;
}

.google-signin-visible svg {
  width: 18px !important;
  height: 18px !important;
  display: block;
  flex: 0 0 18px;
}

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  margin: 2px 0 22px;
  color: rgba(248, 250, 252, 0.52);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(248, 250, 252, 0.2));
  content: "";
}

.auth-divider::after {
  background: linear-gradient(90deg, rgba(248, 250, 252, 0.2), transparent);
}

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

.auth-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 900;
  text-transform: uppercase;
}

.auth-form input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(4, 7, 13, 0.9);
  color: var(--ink);
  font: inherit;
}

.auth-form input[type="file"] {
  min-height: auto;
  padding: 12px;
}

.auth-form input:focus {
  outline: 2px solid rgba(0, 200, 83, 0.42);
  outline-offset: 2px;
}

.field-hint {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.auth-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.auth-links a {
  color: var(--yellow);
  font-weight: 900;
}

.admin-login-box {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.admin-login-box h2 {
  margin-bottom: 14px;
  font-size: 1.25rem;
  text-transform: uppercase;
}

.profile-hero {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: clamp(22px, 4vw, 42px);
  align-items: center;
  width: min(1180px, 100%);
  margin: 0 auto 28px;
}

.profile-avatar {
  width: 170px;
  height: 170px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 18, 36, 0.9);
  box-shadow: var(--shadow);
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar img[src="/assets/arena-logo.png"] {
  object-fit: contain;
  padding: 22px;
}

.profile-hero h1 {
  margin-bottom: 8px;
  font-size: clamp(2.5rem, 6vw, 5.6rem);
}

.profile-grid {
  width: min(1180px, 100%);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 0 auto;
}

.profile-card {
  width: 100%;
  min-height: 260px;
}

.profile-card h2 {
  margin-bottom: 20px;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
}

.account-list {
  display: grid;
  gap: 14px;
  margin: 0;
}

.account-list div {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.account-list dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.account-list dd {
  margin: 0;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.steam-id {
  display: inline-flex;
  max-width: 100%;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid rgba(0, 200, 83, 0.36);
  border-radius: 8px;
  background: rgba(0, 200, 83, 0.12);
  color: var(--ink);
  font-weight: 900;
  overflow-wrap: anywhere;
}

.audit-card {
  grid-column: 1 / -1;
}

.audit-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.audit-list li {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.audit-list span {
  font-weight: 900;
}

.audit-list time {
  color: var(--muted);
}

.battle-shell {
  position: relative;
  padding-top: 108px;
  background:
    linear-gradient(180deg, rgba(4, 7, 13, 0.18), rgba(4, 7, 13, 0.92) 62%, rgba(18, 0, 0, 0.92)),
    url("/assets/favela-night.png") center top / cover fixed no-repeat;
}

.battle-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 3px 3px;
  opacity: 0.42;
}

.battle-profile {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.battle-identity {
  min-height: 118px;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 16px 0 14px;
}

.battle-avatar {
  width: 68px;
  height: 68px;
  overflow: hidden;
  border: 1px solid rgba(248, 250, 252, 0.42);
  background: rgba(2, 6, 12, 0.78);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.4);
}

.battle-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.battle-avatar img[src="/assets/arena-logo.png"] {
  object-fit: contain;
  padding: 8px;
}

.battle-player h1 {
  margin: 0 0 2px;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 0.95;
  text-transform: none;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.6);
}

.battle-player p {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  margin: 0;
  color: var(--ink);
  font-weight: 900;
}

.mini-badge {
  display: inline-grid;
  place-items: center;
  width: 19px;
  height: 16px;
  border: 1px solid rgba(248, 250, 252, 0.5);
  background: rgba(0, 0, 0, 0.55);
  color: var(--yellow);
  font-size: 0.62rem;
  line-height: 1;
}

.battle-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 16px;
  border: 1px solid rgba(248, 250, 252, 0.2);
  background: rgba(0, 0, 0, 0.72);
}

.battle-tabs a {
  position: relative;
  min-height: 42px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-right: 1px solid rgba(248, 250, 252, 0.2);
  color: rgba(248, 250, 252, 0.76);
  font-weight: 900;
  text-transform: uppercase;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.battle-tabs a:last-child {
  border-right: 0;
}

.battle-tabs a::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background: linear-gradient(90deg, var(--yellow), var(--green));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms ease;
}

.battle-tabs a:hover,
.battle-tabs a:focus-visible {
  color: #fff;
  background: rgba(248, 250, 252, 0.1);
  transform: translateY(-2px);
}

.battle-tabs a:hover::after,
.battle-tabs a:focus-visible::after,
.battle-tabs a.is-active::after {
  transform: scaleX(1);
}

.battle-tabs a.is-active {
  background: linear-gradient(180deg, #fff, #dfe8f2);
  color: #04070d;
}

.battle-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1px;
  background: rgba(248, 250, 252, 0.18);
  border: 1px solid rgba(248, 250, 252, 0.18);
  box-shadow: var(--shadow);
}

.battle-panel {
  position: relative;
  min-height: 160px;
  overflow: hidden;
  padding: 34px 18px 18px;
  background: rgba(7, 14, 24, 0.82);
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.battle-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.09) 46%, transparent 62%);
  transform: translateX(-120%);
  transition: transform 520ms ease;
}

.battle-panel:hover {
  z-index: 2;
  background: rgba(13, 30, 50, 0.93);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.34);
  transform: translateY(-3px);
}

.battle-panel:hover::before {
  transform: translateX(120%);
}

.battle-panel h2 {
  position: absolute;
  inset: 0 0 auto;
  min-height: 28px;
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0 9px;
  border-bottom: 1px solid rgba(248, 250, 252, 0.18);
  background: rgba(0, 0, 0, 0.45);
  color: rgba(248, 250, 252, 0.92);
  font-size: 0.98rem;
  line-height: 1;
  text-transform: uppercase;
}

.overview-grid .rank-panel {
  grid-column: span 4;
}

.overview-grid .skill-panel {
  grid-column: span 4;
}

.overview-grid .soldier-panel {
  grid-column: span 4;
}

.overview-grid .service-panel,
.overview-grid .team-panel,
.overview-grid .dogtag-panel {
  grid-column: span 4;
}

.overview-grid .wide-panel,
.overview-grid .account-panel {
  grid-column: span 4;
}

.rank-medal {
  width: 116px;
  height: 116px;
  display: grid;
  place-items: center;
  margin: 20px auto 18px;
  clip-path: polygon(50% 0, 62% 29%, 96% 14%, 76% 44%, 100% 50%, 76% 56%, 96% 86%, 62% 71%, 50% 100%, 38% 71%, 4% 86%, 24% 56%, 0 50%, 24% 44%, 4% 14%, 38% 29%);
  background: linear-gradient(135deg, #8a5d10, #f4d03f 45%, #8a5d10);
  box-shadow: inset 0 0 0 4px rgba(0, 0, 0, 0.28);
}

.rank-medal span {
  color: #fff;
  font-size: 1.55rem;
  font-weight: 900;
  text-shadow: 0 2px 0 #7a1c1c;
}

.battle-progress {
  height: 18px;
  overflow: hidden;
  border: 1px solid rgba(248, 250, 252, 0.58);
  background: rgba(0, 0, 0, 0.46);
}

.battle-progress span {
  display: block;
  height: 100%;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.12) 0 2px, transparent 2px 4px),
    linear-gradient(90deg, #dd8500, var(--yellow));
  transition: width 320ms ease;
}

.p0 {
  width: 0%;
}

.p18 {
  width: 18%;
}

.p28 {
  width: 28%;
}

.p31 {
  width: 31%;
}

.p37 {
  width: 37%;
}

.p39 {
  width: 39%;
}

.p42 {
  width: 42%;
}

.p52 {
  width: 52%;
}

.p54 {
  width: 54%;
}

.p61 {
  width: 61%;
}

.p62 {
  width: 62%;
}

.p63 {
  width: 63%;
}

.p68 {
  width: 68%;
}

.p71 {
  width: 71%;
}

.p74 {
  width: 74%;
}

.p75 {
  width: 75%;
}

.p76 {
  width: 76%;
}

.p80 {
  width: 80%;
}

.p82 {
  width: 82%;
}

.p86 {
  width: 86%;
}

.p100 {
  width: 100%;
}

.panel-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.panel-row strong {
  color: #fff;
}

.skill-score {
  display: block;
  margin: 8px 0 10px;
  color: #fff;
  font-size: clamp(3.4rem, 7vw, 5rem);
  line-height: 1;
  text-align: center;
}

.skill-bar {
  width: min(155px, 100%);
  height: 10px;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 8px;
  margin: 0 auto 18px;
}

.skill-bar span {
  border: 1px solid #fff;
  background: rgba(255, 255, 255, 0.92);
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 -18px -18px;
  border-top: 1px solid rgba(248, 250, 252, 0.15);
}

.stat-strip div {
  min-height: 62px;
  display: grid;
  place-items: center;
  padding: 8px;
  border-right: 1px solid rgba(248, 250, 252, 0.15);
}

.stat-strip div:nth-child(3n) {
  border-right: 0;
}

.stat-strip span {
  color: var(--muted);
  text-transform: uppercase;
}

.stat-strip strong {
  color: #fff;
  font-size: 1.25rem;
}

.stat-strip-large {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: 10px 0 0;
  border: 1px solid rgba(248, 250, 252, 0.15);
}

.stat-strip-large div:nth-child(3n) {
  border-right: 1px solid rgba(248, 250, 252, 0.15);
}

.xp-progress-card {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
  padding: 14px;
  border: 1px solid rgba(244, 208, 63, 0.24);
  background: rgba(0, 0, 0, 0.28);
}

.xp-progress-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #fff;
  font-weight: 900;
  text-transform: uppercase;
}

.xp-progress-head strong {
  color: var(--yellow);
  text-align: right;
}

.xp-progress-card p,
.xp-progress-card small,
.xp-progress-percent {
  margin: 0;
  color: var(--muted);
  font-weight: 900;
}

.xp-segmented-wrapper {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.xp-scale-label {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.8rem;
  font-weight: 900;
  white-space: nowrap;
}

.xp-segmented-bar {
  display: grid;
  grid-template-columns: repeat(100, minmax(0, 1fr));
  gap: 1px;
  width: 100%;
  min-width: 0;
  align-items: center;
}

.xp-segment {
  display: block;
  height: 12px;
  min-height: 100%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.72);
  box-sizing: border-box;
  opacity: 1;
  transition: background 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.xp-segment.is-filled {
  border-color: rgba(255, 255, 255, 0.3);
  background-color: var(--segment-color, #20c96b);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 7px rgba(0, 203, 110, 0.14);
  opacity: 1;
  visibility: visible;
}

.xp-progress-percent {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
  text-align: center;
}

.soldier-card {
  min-height: 220px;
  display: grid;
  place-items: end center;
}

.soldier-card img {
  width: min(310px, 95%);
  filter: drop-shadow(0 18px 34px rgba(0, 0, 0, 0.55));
}

.service-row {
  display: grid;
  grid-template-columns: 28px 1fr 38px;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.service-icon {
  color: #fff;
  font-size: 1.6rem;
  font-weight: 900;
  text-align: center;
}

.team-panel {
  display: grid;
  justify-items: center;
}

.donut {
  width: 74px;
  height: 74px;
  margin-top: 18px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 12px rgba(0, 0, 0, 0.68);
}

.donut.win-46 {
  background: conic-gradient(#0aa7df 46%, #d8471c 0);
}

.donut.win-0 {
  background: conic-gradient(#0aa7df 0%, #d8471c 0);
}

.team-panel p {
  margin: 10px 0 0;
  color: var(--muted);
  text-align: center;
  text-transform: uppercase;
}

.team-panel strong {
  display: block;
  color: #fff;
  font-size: 1.45rem;
}

.panel-divider {
  width: calc(100% + 36px);
  height: 1px;
  margin: 18px -18px 0;
  background: rgba(248, 250, 252, 0.15);
}

.dogtag {
  width: min(300px, 100%);
  min-height: 92px;
  display: grid;
  align-content: center;
  gap: 5px;
  margin: 34px auto 0;
  padding: 18px 24px;
  border-radius: 52px 10px 10px 52px;
  background:
    radial-gradient(circle at 26px 26px, rgba(255, 255, 255, 0.16) 0 7px, transparent 8px),
    linear-gradient(135deg, #787878, #272727 56%, #8b8b8b);
  color: #151515;
  transform: rotate(-7deg);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
}

.dogtag span {
  color: rgba(0, 0, 0, 0.68);
  font-weight: 900;
}

.dogtag strong {
  color: rgba(0, 0, 0, 0.72);
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.mini-ranking {
  display: grid;
  gap: 12px;
}

.mini-ranking div {
  position: relative;
  min-height: 56px;
  display: grid;
  align-content: center;
  gap: 2px;
  overflow: hidden;
  padding: 8px 12px;
  border: 1px solid rgba(248, 250, 252, 0.14);
  background: rgba(255, 255, 255, 0.035);
}

.mini-ranking span {
  color: var(--muted);
}

.mini-ranking strong {
  position: relative;
  z-index: 1;
  color: #fff;
  font-size: 1.1rem;
  text-transform: uppercase;
}

.mini-ranking i {
  position: absolute;
  inset: auto auto 0 0;
  height: 4px;
  background: var(--yellow);
}

.battle-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.battle-list div {
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(248, 250, 252, 0.14);
}

.battle-list dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.battle-list dd {
  margin: 0;
  color: #fff;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.stats-page .stats-main {
  grid-column: span 12;
  min-height: 220px;
}

.stats-page > .battle-panel:not(.stats-main) {
  grid-column: span 12;
}

.card-page .battle-panel {
  grid-column: span 4;
}

.unlock-tile,
.assignment-tile,
.loadout-tile,
.award-tile {
  min-height: 210px;
}

.unlock-tile p,
.assignment-tile p,
.loadout-tile p {
  color: var(--muted);
}

.unlock-tile strong,
.assignment-tile strong {
  display: block;
  margin-top: 10px;
  color: #fff;
}

.loadout-tile > span {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--yellow);
  font-weight: 900;
  text-transform: uppercase;
}

.award-tile {
  display: grid;
  justify-items: center;
  align-content: center;
  text-align: center;
}

.award-star {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin-bottom: 18px;
  clip-path: polygon(50% 0, 61% 34%, 98% 34%, 68% 55%, 79% 91%, 50% 69%, 21% 91%, 32% 55%, 2% 34%, 39% 34%);
  background: linear-gradient(135deg, #dd8500, var(--yellow));
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.36);
}

.award-tile strong {
  color: #fff;
  font-size: 1.8rem;
}

.settings-panel {
  grid-column: span 6;
}

.empty-panel {
  grid-column: span 12;
  display: grid;
  align-content: center;
  min-height: 220px;
}

.empty-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.battle-audit {
  margin-top: 4px;
}

.community-hub {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.community-title {
  max-width: 760px;
  margin-bottom: 22px;
}

.community-title h1 {
  margin-bottom: 12px;
  font-size: clamp(3rem, 7vw, 6rem);
}

.community-title p:last-child {
  color: var(--muted);
  font-size: 1.05rem;
}

.ranking-frame {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.78fr);
  gap: 16px;
  align-items: start;
  width: min(980px, 100%);
  margin: 0 auto 18px;
}

.community-search-top {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  width: min(980px, 100%);
  margin: 0 auto 18px;
}

.ranking-card {
  min-height: 540px;
}

.ranking-card-wide {
  min-width: 0;
}

.community-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-bottom: 14px;
}

.community-search input {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(248, 250, 252, 0.22);
  border-radius: 8px;
  background: rgba(4, 7, 13, 0.86);
  color: var(--ink);
  font: inherit;
}

.ranking-list,
.clan-podium {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ranking-table {
  display: grid;
  gap: 7px;
}

.ranking-table-head,
.ranking-table-row {
  display: grid;
  grid-template-columns: 44px 58px minmax(130px, 1fr) repeat(4, minmax(78px, 0.7fr));
  gap: 8px;
  align-items: center;
}

.ranking-table-head {
  min-height: 34px;
  padding: 0 8px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.ranking-table-row {
  min-height: 58px;
  padding: 7px 8px;
  border: 1px solid rgba(248, 250, 252, 0.14);
  background: rgba(255, 255, 255, 0.04);
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.ranking-table-row:hover {
  border-color: rgba(0, 200, 83, 0.45);
  background: rgba(0, 200, 83, 0.1);
  transform: translateX(4px);
}

.ranking-table-row img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border: 1px solid rgba(248, 250, 252, 0.18);
}

.ranking-table-row strong,
.ranking-table-row span {
  overflow-wrap: anywhere;
}

.ranking-list li,
.clan-podium li {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.rank-number {
  display: grid;
  place-items: center;
  min-height: 42px;
  border: 1px solid rgba(244, 208, 63, 0.36);
  background: rgba(244, 208, 63, 0.12);
  color: var(--yellow);
  font-weight: 900;
}

.ranking-list a,
.clan-podium a,
.empty-rank,
.result-card {
  min-height: 58px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid rgba(248, 250, 252, 0.14);
  background: rgba(255, 255, 255, 0.04);
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.ranking-list a:hover,
.clan-podium a:hover,
.result-card:hover {
  border-color: rgba(0, 200, 83, 0.45);
  background: rgba(0, 200, 83, 0.1);
  transform: translateX(4px);
}

.ranking-list img,
.clan-podium img,
.result-card img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border: 1px solid rgba(248, 250, 252, 0.18);
  background: rgba(0, 0, 0, 0.35);
}

.ranking-list span,
.clan-podium span,
.result-card span {
  color: #fff;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-list strong,
.clan-podium strong,
.result-card strong,
.empty-rank strong {
  color: var(--muted);
  font-size: 0.84rem;
  white-space: nowrap;
}

.empty-rank {
  grid-template-columns: minmax(0, 1fr) auto;
  color: var(--muted);
}

.community-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.result-grid {
  display: grid;
  gap: 10px;
}

.empty-copy {
  margin: 0;
  color: var(--muted);
}

.clan-register {
  margin-bottom: 28px;
}

.clan-banner {
  min-height: 170px;
  display: grid;
  place-items: center;
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid rgba(248, 250, 252, 0.18);
  background:
    linear-gradient(135deg, rgba(13, 59, 168, 0.34), rgba(0, 200, 83, 0.18)),
    rgba(4, 7, 13, 0.82);
}

.clan-banner img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.clan-banner span {
  color: var(--muted);
  font-weight: 900;
}

.clan-join-form {
  display: flex;
  justify-content: flex-end;
  margin: -8px 0 16px;
}

.clan-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.clan-form label:nth-of-type(3),
.clan-form label:nth-of-type(4),
.clan-form label:nth-of-type(5),
.clan-form button {
  grid-column: 1 / -1;
}

.admin-grid {
  display: grid;
  gap: 16px;
}

.admin-panel {
  min-height: 220px;
}

.admin-table {
  display: grid;
  gap: 10px;
}

.admin-row,
.admin-member-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(248, 250, 252, 0.14);
  background: rgba(255, 255, 255, 0.04);
}

.admin-row span,
.admin-member-row span {
  overflow-wrap: anywhere;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-actions form {
  margin: 0;
}

.admin-members {
  margin-top: 18px;
}

.admin-member-row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(120px, 180px) auto;
  margin-bottom: 10px;
}

.admin-member-row input {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(248, 250, 252, 0.22);
  border-radius: 8px;
  background: rgba(4, 7, 13, 0.86);
  color: var(--ink);
}

.auth-form select,
.compact-form input {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(248, 250, 252, 0.22);
  border-radius: 8px;
  background: rgba(4, 7, 13, 0.86);
  color: var(--ink);
  font: inherit;
}

.compact-form {
  margin-top: 14px;
}

.admin-stats-grid,
.social-actions {
  display: grid;
  gap: 16px;
}

.admin-stats-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 16px;
}

.admin-stat {
  min-height: 116px;
  display: grid;
  align-content: center;
  gap: 8px;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.admin-stat:hover {
  border-color: rgba(244, 208, 63, 0.45);
  box-shadow: 0 18px 42px rgba(244, 208, 63, 0.08);
  transform: translateY(-3px);
}

.admin-stat span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-stat strong {
  color: #fff;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}

.status-pill {
  width: max-content;
  padding: 5px 9px;
  border: 1px solid rgba(248, 250, 252, 0.18);
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.08);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.status-approved {
  border-color: rgba(0, 200, 83, 0.48);
  background: rgba(0, 200, 83, 0.15);
  color: #b9ffd5;
}

.status-pending {
  border-color: rgba(244, 208, 63, 0.52);
  background: rgba(244, 208, 63, 0.14);
  color: #ffe992;
}

.status-rejected {
  border-color: rgba(248, 113, 113, 0.5);
  background: rgba(248, 113, 113, 0.13);
  color: #fecaca;
}

.maps-section,
.social-section {
  background:
    linear-gradient(180deg, rgba(8, 18, 36, 0.88), rgba(4, 7, 13, 0.98)),
    var(--night);
}

.map-carousel {
  position: relative;
  perspective: 1200px;
}

.map-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(330px, 42vw);
  gap: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 16px 6px 28px;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: rgba(244, 208, 63, 0.7) rgba(255, 255, 255, 0.08);
}

.map-card {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  border: 1px solid rgba(248, 250, 252, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(13, 59, 168, 0.3), rgba(0, 200, 83, 0.16)),
    rgba(4, 7, 13, 0.92);
  box-shadow: var(--shadow);
  isolation: isolate;
  scroll-snap-align: start;
  transform-style: preserve-3d;
  transition: transform 260ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.map-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(4, 7, 13, 0.92), rgba(4, 7, 13, 0.12) 58%, rgba(4, 7, 13, 0.72));
  z-index: 1;
  transition: background 220ms ease;
  pointer-events: none;
}

.map-card:hover {
  border-color: rgba(0, 200, 83, 0.54);
  box-shadow: 0 30px 90px rgba(0, 200, 83, 0.18);
  transform: translateY(-8px) rotateX(var(--tilt-x, 5deg)) rotateY(var(--tilt-y, -7deg));
}

.map-card:hover::after {
  background: linear-gradient(0deg, rgba(4, 7, 13, 0.96), rgba(4, 7, 13, 0.24) 62%, rgba(4, 7, 13, 0.62));
}

.map-media {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 900;
  text-transform: uppercase;
  transform: translateZ(0);
  transition: transform 520ms ease, filter 220ms ease;
}

.map-media.map-trigger {
  border: none;
  padding: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.map-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.body-no-scroll {
  overflow: hidden;
}

.map-viewer-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.78);
}

.map-viewer-modal[hidden] {
  display: none !important;
}

.map-viewer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

.map-viewer-dialog {
  position: relative;
  z-index: 51;
  width: min(100%, 1200px);
  max-height: min(100%, 90vh);
  display: grid;
  gap: 14px;
  padding: 18px;
  background: rgba(7, 10, 18, 0.98);
  border: 1px solid rgba(248, 250, 252, 0.14);
  border-radius: 16px;
  box-shadow: 0 0 80px rgba(0, 0, 0, 0.4);
}

.map-viewer-close {
  position: absolute;
  right: 16px;
  top: 16px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(248, 250, 252, 0.14);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.map-viewer-header h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.3rem, 2vw, 2rem);
}

.map-viewer-content {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
}

.map-viewer-arrow {
  width: 56px;
  height: 56px;
  border: 1px solid rgba(248, 250, 252, 0.14);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
}

.map-viewer-image-wrap {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(13, 59, 168, 0.28), rgba(244, 208, 63, 0.13)),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.04) 0 12px, rgba(255, 255, 255, 0.01) 12px 24px);
  cursor: grab;
  touch-action: none;
}

#map-viewer-image {
  position: absolute;
  top: 50%;
  left: 50%;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transform-origin: center;
  transition: transform 180ms ease;
  user-select: none;
  pointer-events: none;
}

.map-viewer-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.map-viewer-control,
#map-viewer-open-full {
  border: 1px solid rgba(248, 250, 252, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
}

@media (max-width: 860px) {
  .map-viewer-content {
    grid-template-columns: 1fr;
  }

  .map-viewer-arrow {
    width: 48px;
    height: 48px;
  }
}

.map-card:hover .map-media {
  filter: saturate(1.2);
  transform: translateZ(42px) scale(1.09);
}

.map-overlay {
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  display: grid;
  gap: 8px;
  padding: clamp(18px, 4vw, 34px);
  transform: translateY(10px) translateZ(55px);
  transition: transform 220ms ease;
  pointer-events: none;
}

.map-card:hover .map-overlay {
  transform: translateY(0);
}

.map-overlay small {
  color: var(--yellow);
  font-weight: 900;
  text-transform: uppercase;
}

.map-overlay h2,
.map-overlay h3,
.map-overlay p {
  margin: 0;
}

.map-overlay h2,
.map-overlay h3 {
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  line-height: 0.95;
}

.map-overlay p {
  max-width: 620px;
  color: var(--muted);
}

.map-card-building .map-media {
  background:
    linear-gradient(135deg, rgba(13, 59, 168, 0.28), rgba(244, 208, 63, 0.13)),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.04) 0 12px, rgba(255, 255, 255, 0.01) 12px 24px);
  letter-spacing: 0.08em;
  text-align: center;
  padding: 24px;
}

.map-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(248, 250, 252, 0.24);
  border-radius: 50%;
  background: rgba(4, 7, 13, 0.82);
  color: #fff;
  font-size: 2.4rem;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.map-arrow:hover {
  border-color: rgba(244, 208, 63, 0.58);
  background: rgba(244, 208, 63, 0.16);
  transform: translateY(-50%) scale(1.08);
}

.map-arrow-left {
  left: -8px;
}

.map-arrow-right {
  right: -8px;
}

.social-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.social-button {
  min-height: 104px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 1px solid rgba(248, 250, 252, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-weight: 900;
  text-transform: uppercase;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.social-button span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.social-button span img {
  display: block;
  width: 24px;
  height: 24px;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.social-button:hover {
  transform: translateY(-4px);
}

.social-button.youtube:hover {
  border-color: rgba(255, 0, 0, 0.55);
  box-shadow: 0 18px 48px rgba(255, 0, 0, 0.12);
}

.social-button.instagram:hover {
  border-color: rgba(244, 208, 63, 0.55);
  box-shadow: 0 18px 48px rgba(244, 208, 63, 0.12);
}

.social-button.discord:hover {
  border-color: rgba(88, 101, 242, 0.7);
  box-shadow: 0 18px 48px rgba(88, 101, 242, 0.16);
}

.request-row {
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
}

.ban-history-panel {
  grid-column: span 12;
}

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

.ban-card,
.ban-empty-card {
  border: 1px solid rgba(248, 250, 252, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.2);
  animation: ban-fade-in 360ms ease both;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.ban-card {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.ban-card:hover,
.ban-empty-card:hover {
  background: rgba(13, 30, 50, 0.88);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.3);
  transform: translateY(-3px);
}

.ban-card.is-active {
  border-color: rgba(248, 113, 113, 0.52);
}

.ban-card.is-expired {
  border-color: rgba(148, 163, 184, 0.34);
}

.ban-card-status {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.ban-card-status span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #94a3b8;
  box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.12);
}

.ban-card.is-active .ban-card-status span {
  background: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.ban-card time {
  color: #fff;
  font-size: 1.35rem;
  font-weight: 900;
}

.ban-detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.ban-detail-list div {
  min-width: 0;
}

.ban-detail-list dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.ban-detail-list dd {
  margin: 2px 0 0;
  color: #fff;
  overflow-wrap: anywhere;
}

.ban-empty-card {
  min-height: 150px;
  display: grid;
  place-items: center;
  justify-items: center;
  gap: 10px;
  padding: 24px;
  color: #fff;
  text-align: center;
}

.ban-empty-card span {
  font-size: 2rem;
}

@keyframes ban-fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Rules tabs */
.rules-tabs {
  margin-top: 18px;
}
.tabs-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.tab-button {
  background: rgba(255,255,255,0.03);
  color: #fff;
  border: 1px solid rgba(248,250,252,0.08);
  padding: 10px 14px;
  border-radius: 6px;
  font-weight: 900;
  cursor: pointer;
  text-transform: none;
}
.tab-button[aria-selected="true"] {
  background: rgba(244,208,63,0.12);
  border-color: rgba(244,208,63,0.36);
}
.tabs-panels {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(248,250,252,0.06);
  padding: 18px;
  border-radius: 8px;
}
.tab-panel p { margin: 0 0 10px 0; color: var(--muted); }
.tab-panel p strong { color: #fff; }

@media (max-width: 960px) {
  .feature-grid,
  .rules-grid,
  .media-section,
  .join-section,
  .profile-grid,
  .profile-hero {
    grid-template-columns: 1fr;
  }

  .join-actions {
    justify-content: flex-start;
  }

  .profile-avatar {
    width: 140px;
    height: 140px;
  }
}

@media (max-width: 980px) {
  .battle-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ranking-frame,
  .community-results,
  .community-search-top,
  .clan-form,
  .admin-stats-grid,
  .ban-card-grid,
  .social-actions {
    grid-template-columns: 1fr;
  }

  .map-track {
    grid-auto-columns: minmax(280px, 78vw);
  }

  .ranking-table-head {
    display: none;
  }

  .ranking-table-row {
    grid-template-columns: 48px 54px minmax(0, 1fr);
  }

  .admin-row,
  .admin-member-row,
  .request-row {
    grid-template-columns: 1fr;
  }

  .ranking-table-row span:nth-of-type(n + 3) {
    grid-column: 3;
  }

  .overview-grid .rank-panel,
  .overview-grid .skill-panel,
  .overview-grid .soldier-panel,
  .overview-grid .service-panel,
  .overview-grid .team-panel,
  .overview-grid .dogtag-panel,
  .overview-grid .wide-panel,
  .overview-grid .account-panel,
  .card-page .battle-panel,
  .settings-panel {
    grid-column: span 6;
  }

  .stat-strip-large {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .site-header {
    position: absolute;
    align-items: flex-start;
    flex-direction: column;
  }

  .main-nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .hero {
    min-height: 92svh;
    padding-top: 168px;
    background:
      linear-gradient(0deg, rgba(4, 7, 13, 1) 0%, rgba(4, 7, 13, 0.18) 40%),
      linear-gradient(90deg, rgba(4, 7, 13, 0.9), rgba(4, 7, 13, 0.42)),
      url("assets/arena-hero-brand.png") center / cover no-repeat;
  }

  .brand-logo {
    width: 70px;
    height: 42px;
  }
}

@media (max-width: 700px) {
  .xp-segmented-wrapper {
    gap: 6px;
  }

  .xp-segmented-bar {
    gap: 1px;
  }

  .xp-segment {
    height: 8px;
    border-width: 1px;
  }

  .xp-scale-label {
    font-size: 0.72rem;
  }
}

@media (max-width: 680px) {
  .battle-shell {
    padding-top: 162px;
  }

  .battle-identity {
    grid-template-columns: 1fr;
  }

  .battle-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .community-search,
  .ranking-list a,
  .clan-podium a,
  .empty-rank,
  .result-card {
    grid-template-columns: 1fr;
  }

  .ranking-list img,
  .clan-podium img,
  .result-card img {
    width: 54px;
    height: 54px;
  }

  .overview-grid .rank-panel,
  .overview-grid .skill-panel,
  .overview-grid .soldier-panel,
  .overview-grid .service-panel,
  .overview-grid .team-panel,
  .overview-grid .dogtag-panel,
  .overview-grid .wide-panel,
  .overview-grid .account-panel,
  .card-page .battle-panel,
  .settings-panel {
    grid-column: span 12;
  }

  .stat-strip,
  .stat-strip-large {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat-strip div:nth-child(3n),
  .stat-strip-large div:nth-child(3n) {
    border-right: 1px solid rgba(248, 250, 252, 0.15);
  }
}

@media (max-width: 520px) {
  .hero-actions,
  .button,
  .join-actions {
    width: 100%;
  }

  .button {
    padding-inline: 14px;
  }

  .feature-card,
  .rules-grid article,
  .auth-card,
  .profile-card {
    min-height: auto;
    padding: 18px;
  }

  .app-shell {
    padding-top: 168px;
  }

  .audit-list li {
    align-items: flex-start;
    flex-direction: column;
  }
}

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

  .loader-logo,
  .loader-bar span {
    animation: none;
  }

  .button,
  .main-nav a,
  .page-loader {
    transition: none;
  }
}

@keyframes loader-pulse {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.025);
  }
}

@keyframes loader-bar {
  0% {
    transform: translateX(-110%);
  }

  100% {
    transform: translateX(245%);
  }
}
