:root {
  --green: #1aff4c;
  --green-soft: rgba(26, 255, 76, 0.18);
  --green-faint: rgba(26, 255, 76, 0.07);
  --bg: #08140d;
  --panel: rgba(11, 26, 18, 0.92);
  --panel-2: rgba(15, 31, 22, 0.94);
  --text: #fff;
  --muted: #a7b0aa;
  --border: rgba(26, 255, 76, 0.22);
  --red: #ff2b2b;

  --rifle-color: #4caf50;
  --sniper-color: #2196f3;
  --grenade-color: #ff9800;
  --assist-color: #9c27b0;
  --hover-glow: #1aff4c;
  --banner-dark: rgba(0, 0, 0, 0.7);
  --section-gap: 20px;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", sans-serif;
  margin: 0;
  padding: 0;
  position: relative;
  overflow-x: hidden;
  min-height: 100vh;
  isolation: isolate;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(
      180deg,
      rgba(2, 8, 5, 0.8),
      rgba(4, 15, 9, 0.72) 28%,
      rgba(4, 15, 9, 0.82) 62%,
      rgba(2, 8, 5, 0.96)
    ),
    linear-gradient(
      90deg,
      rgba(0, 30, 15, 0.5),
      rgba(0, 255, 80, 0.055),
      rgba(0, 20, 10, 0.5)
    ),
    url("../img/background/bg-home.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  z-index: -10;
  pointer-events: none;
  transform: scale(1.03);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    transparent 10%,
    rgba(0, 0, 0, 0.1) 48%,
    rgba(0, 0, 0, 0.62) 100%
  );
  z-index: -9;
  pointer-events: none;
}

.tactical-overlay {
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(26, 255, 76, 0.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26, 255, 76, 0.024) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: -8;
  mask-image: radial-gradient(ellipse at center, black 0%, transparent 82%);
}

.media-page {
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
  padding: 30px 0 80px;
}

/* ---------- CENTERED TACTICAL SECTION DIVIDER ---------- */

.centered-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin: 35px 0 25px;
  width: 100%;
}

.centered-divider .line {
  flex: 1;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(26, 255, 76, 0.35),
    transparent
  );
}

.centered-divider .divider-text {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--green);
  text-transform: uppercase;
  background: rgba(15, 31, 22, 0.92);
  padding: 8px 18px;
  border-radius: 20px;
  border: 1px solid rgba(26, 255, 76, 0.25);
  box-shadow: 0 0 15px rgba(26, 255, 76, 0.1);
  white-space: nowrap;
}

.centered-divider .divider-vbar {
  color: rgba(26, 255, 76, 0.4);
  font-weight: 300;
}

.centered-divider .tag {
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.centered-divider .tag i {
  color: var(--green);
}

/* ================= POPUP MODAL ================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 20px;
  box-sizing: border-box;
  z-index: 9999;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s ease;
}

.modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-img {
  width: auto;
  max-width: min(600px, 90vw);
  max-height: calc(100vh - 120px);
  height: auto;
  object-fit: contain;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

.modal-btn {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 28px;
  border: 1px solid var(--green);
  background: rgba(11, 26, 18, 0.95);
  color: var(--green);
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  z-index: 10000;
  transition: 0.25s ease;
}

.modal-btn:hover {
  background: var(--green);
  color: #000;
  box-shadow: 0 0 14px var(--green);
}

/* ================= HERO ================= */
.hero {
  position: relative;
  width: 100%;
  aspect-ratio: 1200 / 480;
  overflow: hidden;
  background: #030805;
  border-bottom: 1px solid rgba(26, 255, 76, 0.25);
  box-shadow:
    0 25px 65px rgba(0, 0, 0, 0.5),
    inset 0 0 50px rgba(26, 255, 76, 0.025);
  isolation: isolate;
}

.hero-slider {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition:
    opacity 1s ease-in-out,
    transform 6s ease-out;
  pointer-events: none;
  z-index: 0;
  transform: scale(1);
}

.slide.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
  transform: scale(1.045);
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  filter: brightness(0.88) contrast(1.08) saturate(1.05);
  transition: filter 1s ease;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    linear-gradient(
      to bottom,
      transparent 45%,
      rgba(3, 12, 7, 0.15) 60%,
      rgba(3, 12, 7, 0.75) 88%,
      #08140d 100%
    ),
    radial-gradient(
      ellipse at center,
      transparent 45%,
      rgba(0, 0, 0, 0.25) 75%,
      rgba(0, 0, 0, 0.65) 100%
    );
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(0, 25, 12, 0.22),
    rgba(26, 255, 76, 0.035),
    rgba(0, 25, 12, 0.22)
  );
  mix-blend-mode: screen;
  opacity: 0.55;
}

/* ================= BUTTONS ================= */
.btn {
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: 0.25s ease;
}

.primary {
  background: var(--green);
  color: #000;
  border: 1px solid var(--green);
}

.secondary {
  border: 1px solid var(--green);
  color: var(--green);
  background: rgba(11, 26, 18, 0.84);
}

.primary:hover {
  box-shadow: 0 0 14px rgba(26, 255, 76, 0.45);
}

.secondary:hover {
  background: var(--green);
  color: #000;
}

/* ================= STATS ================= */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  justify-content: center;
  gap: 22px;
  padding: 30px 0 15px;
}

.stats-panel {
  background: linear-gradient(
    145deg,
    rgba(15, 31, 22, 0.96),
    rgba(7, 18, 12, 0.96)
  );
  border-radius: 11px;
  border: 1px solid rgba(26, 255, 76, 0.18);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
  display: flex;
  flex-direction: column;
}

.panel-header {
  background: rgba(15, 31, 22, 0.86);
  padding: 12px 16px;
  font-weight: bold;
  color: var(--green);
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(26, 255, 76, 0.22);
}

.panel-content {
  padding: 15px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, 1fr);
}

.stat-box {
  background: rgba(2, 8, 5, 0.6);
  padding: 15px;
  border-radius: 8px;
  border: 1px solid rgba(26, 255, 76, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: 0.3s ease;
}

.stat-box:hover {
  border-color: rgba(26, 255, 76, 0.4);
  box-shadow: 0 0 15px rgba(26, 255, 76, 0.2);
}

.stat-box span {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.stat-box h3 {
  margin: 0;
  font-size: 20px;
  color: var(--green);
  font-weight: bold;
}

.stat-box.win h3 {
  color: #00ff88;
}
.stat-box.lose h3 {
  color: var(--red);
}
.stat-box.highlight h3 {
  color: gold;
}
.stat-box.special h3 {
  color: #4da6ff;
}

/* ================= MAP STATS ================= */
.map-stats {
  padding: 15px 0;
}

.map-insight {
  width: 100%;
  text-align: center;
  font-size: 13px;
  color: var(--green);
  margin-top: 14px;
  margin-bottom: 6px;
  padding: 10px 12px;
  background: rgba(26, 255, 76, 0.06);
  border: 1px solid rgba(26, 255, 76, 0.2);
  border-radius: 8px;
  white-space: normal;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.map-chart-wrapper {
  position: relative;
  max-width: 100%;
  height: 380px;
  margin: 0 auto;
  background: linear-gradient(
    145deg,
    rgba(15, 31, 22, 0.96),
    rgba(7, 18, 12, 0.96)
  );
  padding: 70px 20px 60px;
  border-radius: 11px;
  border: 1px solid rgba(26, 255, 76, 0.25);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
  overflow: hidden;
  isolation: isolate;
  padding-bottom: 75px;
}

/* BEST MAP */
.best-map {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 12px;
  color: var(--green);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: rgba(2, 8, 5, 0.88);
  border: 1px solid rgba(26, 255, 76, 0.38);
  padding: 6px 16px;
  border-radius: 20px;
  backdrop-filter: blur(5px);
  z-index: 5;
  width: max-content;
  max-width: 90%;
  box-sizing: border-box;
}

#mapChart {
  height: 100% !important;
  margin-top: 10px;
  margin-bottom: 10px;
}

/* ================= LEADERBOARD ================= */
.leaderboard-preview {
  padding: 15px 0;
}

.media-toolbar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0 18px;
}

.media-filter {
  padding: 8px 14px;
  border-radius: 7px;
  border: 1px solid rgba(26, 255, 76, 0.24);
  background: rgba(11, 26, 18, 0.84);
  color: #a8b0aa;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  transition: 0.25s ease;
}

.media-filter:hover,
.media-filter.active {
  background: var(--green);
  color: #000;
  border-color: var(--green);
  box-shadow: 0 0 14px rgba(26, 255, 76, 0.45);
}

.leaderboard-grid {
  display: flex;
  justify-content: center;
  gap: 22px;
  flex-wrap: wrap;
  align-items: stretch;
}

.leaderboard-card {
  flex: 1;
  max-width: 100%;
  min-width: 280px;
  background: linear-gradient(
    145deg,
    rgba(15, 31, 22, 0.96),
    rgba(7, 18, 12, 0.96)
  );
  padding: 18px 16px;
  border-radius: 11px;
  border: 1px solid rgba(26, 255, 76, 0.18);
  transition: 0.3s ease;
  display: flex;
  flex-direction: column;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
}

.leaderboard-card h3 {
  font-size: 18px;
  margin-top: 2px;
  color: #f2fff5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.leaderboard-card ul {
  padding: 0;
  margin: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* ================= PLAYER ITEMS ================= */
.player-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  margin: 6px 0;
  border-radius: 8px;
  background: rgba(2, 8, 5, 0.6);
  border: 1px solid rgba(26, 255, 76, 0.12);
  width: 100%;
  box-sizing: border-box;
  transition: 0.25s ease;
  flex: 1;
  gap: 6px;
  flex-wrap: nowrap !important;
}

.player-item:hover {
  border-color: rgba(26, 255, 76, 0.4);
  box-shadow: 0 0 15px rgba(26, 255, 76, 0.15);
}

.player-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.medal {
  font-size: 16px;
}

.rank-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.player-middle,
.ign {
  flex: 1;
  min-width: 0;
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  color: var(--text);
  text-align: left;
}

.player-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  flex-shrink: 0;
}

.value {
  font-size: 17px;
  font-weight: 800;
  color: var(--green);
  text-align: right;
  white-space: nowrap;
}

.extra {
  font-size: 9px;
  color: var(--muted);
  text-transform: uppercase;
  white-space: nowrap;
}

/* ================= ACHIEVEMENTS ================= */
.achievements {
  padding: 15px 0;
}

.achievement-card-container {
  max-width: 100%;
  margin: 10px auto 0;
  background: linear-gradient(
    145deg,
    rgba(15, 31, 22, 0.96),
    rgba(7, 18, 12, 0.96)
  );
  border: 1px solid rgba(26, 255, 76, 0.18);
  border-radius: 11px;
  padding: 25px 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
}

.achievement-timeline {
  position: relative;
  padding-left: 20px;
  padding-top: 15px;
  transition: opacity 0.2s ease;
  min-height: 400px;
}

.achievement-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 25px;
  text-align: left;
  position: relative;
}

.achievement-icon {
  min-width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #08140d;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
  border: 1px solid var(--border);
  box-shadow: 0 0 10px rgba(26, 255, 76, 0.2);
  left: -10px;
  position: relative;
}

.achievement-date {
  font-size: 11px;
  color: var(--muted);
  display: block;
  margin-bottom: 4px;
}

.achievement-content h4 {
  margin: 0;
  font-size: 16px;
  color: #f2fff5;
}

.achievement-content p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
}

/* ================= PAGINATION ================= */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}

.pagination button {
  width: 37px;
  height: 37px;
  border: 1px solid rgba(26, 255, 76, 0.3);
  border-radius: 7px;
  background: rgba(7, 18, 11, 0.85);
  color: var(--green);
  cursor: pointer;
  transition: 0.22s ease;
  display: grid;
  place-items: center;
}

.pagination button:hover:not(:disabled) {
  background: var(--green);
  color: #000;
  box-shadow: 0 0 13px rgba(26, 255, 76, 0.42);
}

.pagination button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

#pageInfo {
  font-size: 12px;
  color: var(--green);
  letter-spacing: 1px;
  font-weight: 800;
  text-transform: uppercase;
}

/* ================= CLAN FEATURES ================= */
.features {
  padding: 15px 0 30px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.feature-card {
  position: relative;
  min-height: 480px;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 11px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(26, 255, 76, 0.18);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
  transition: 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: rgba(26, 255, 76, 0.5);
  box-shadow:
    0 15px 34px rgba(0, 0, 0, 0.45),
    0 0 20px rgba(26, 255, 76, 0.13);
}

.feature-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(2, 8, 5, 0.94) 88%);
  color: #fff;
  padding: 22px;
  opacity: 0.9;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-sizing: border-box;
  text-align: left;
  transition: opacity 0.3s ease;
}

.feature-card:hover .feature-overlay {
  opacity: 1;
}

.feature-overlay h3 {
  margin: 0 0 6px 0;
  font-size: 18px;
  color: #f2fff5;
}

.feature-overlay p {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 14px;
  line-height: 1.4;
}

.feature-overlay .btn {
  align-self: flex-start;
  padding: 8px 14px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* ================= SKELETON ================= */
.skeleton {
  position: relative;
  overflow: hidden;
  background: rgba(26, 255, 76, 0.05);
  border-radius: 8px;
}

.skeleton::after {
  content: "";
  position: absolute;
  top: 0;
  left: -150px;
  width: 150px;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(26, 255, 76, 0.2),
    transparent
  );
  animation: shimmer 1.2s infinite;
}

@keyframes shimmer {
  100% {
    transform: translateX(300px);
  }
}

/* ================= MOBILE OPTIMIZATIONS ================= */
@media screen and (max-width: 700px) {
  .media-page {
    width: min(100% - 20px, 1240px);
    padding-top: 15px;
  }

  .centered-divider {
    gap: 8px;
    margin: 25px 0 18px;
  }

  .centered-divider .divider-text {
    font-size: 11px;
    padding: 6px 12px;
    letter-spacing: 1px;
  }

  .player-item {
    padding: 8px 10px;
    gap: 4px;
  }

  .player-left {
    gap: 4px;
  }

  .medal {
    font-size: 14px;
  }

  .rank-icon {
    width: 24px;
    height: 24px;
  }

  .player-middle,
  .ign {
    font-size: 13px;
  }

  .value {
    font-size: 13px;
  }

  .extra {
    font-size: 8px;
  }

  .best-map {
    font-size: 10px;
    padding: 5px 12px;
    text-align: center;
  }

  .feature-card {
    min-height: 480px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }
}