:root {
  --green: #1aff4c;
  --red: #ff2b2b;
  --bg: #08140d;
  --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;
}

body {
  background: var(--bg);
  color: #fff;
  font-family: "Segoe UI", sans-serif;
  margin: 0;
  padding: 0;
}

/* ================= HERO ================= */
.hero {
  position: relative;
  width: 100%;
  aspect-ratio: 1200 / 480;
  overflow: hidden;
}

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

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
  pointer-events: none;
  z-index: 0;
}

.slide.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

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

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

.secondary {
  border: 1px solid var(--green);
  color: var(--green);
}

.primary:hover {
  box-shadow: 0 0 10px var(--green);
}

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

/* ================= SECTION HEADER STYLE ================= */
.section-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #0f1f16;
  border: 1px solid rgba(26, 255, 76, 0.3);
  padding: 10px 20px;
  border-radius: 8px;
  color: var(--green);
  font-size: 20px;
  letter-spacing: 1px;
  box-shadow: 0 0 10px rgba(26, 255, 76, 0.2);
}

.section-title i {
  color: var(--green);
  text-shadow: 0 0 8px var(--green);
}

/* ================= STATS ================= */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 420px));
  justify-content: center;
  gap: 25px;
  padding: 50px 20px;
}

.stats-panel {
  background: #0b1a12;
  border-radius: 12px;
  border: 1px solid rgba(26, 255, 76, 0.3);
  overflow: hidden;
  box-shadow: 0 0 20px rgba(26, 255, 76, 0.2);
  display: flex;
  flex-direction: column;
}

.panel-header {
  background: linear-gradient(90deg, var(--green), transparent);
  padding: 12px 16px;
  font-weight: bold;
  color: #000;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(26, 255, 76, 0.2);
}

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

.stat-box {
  background: rgba(255, 255, 255, 0.05);
  padding: 15px;
  border-radius: 10px;
  border: 1px solid #1f1f1f;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: 0.3s;
}

.stat-box:hover {
  box-shadow: 0 0 15px var(--green);
}

.stat-box span {
  font-size: 12px;
  color: #aaa;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 6px;
}

.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: #ff4d4d;
}
.stat-box.highlight h3 {
  color: gold;
}
.stat-box.special h3 {
  color: #4da6ff;
}

/* ================= MAP STATS ================= */
.map-stats {
  padding: 40px 20px;
  text-align: center;
}

.map-stats h2 {
  font-size: 28px;
  margin-bottom: 24px;
  color: #1aff4c;
  letter-spacing: 2px;
  text-shadow: 0 0 8px #1aff4c;
}

.map-insight {
  width: 100%;
  text-align: center;
  font-size: 13px;
  color: #1aff4c;
  margin-top: 14px;
  margin-bottom: 6px;
  padding: 10px 12px;
  background: rgba(0, 255, 100, 0.06);
  border: 1px solid rgba(0, 255, 100, 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: 700px;
  height: 380px;
  margin: 0 auto;
  background: #0d1f16;
  padding: 70px 20px 60px;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0,255,100,0.2);
  overflow: hidden;
  isolation: isolate;
  padding-bottom: 75px;
}

/* Glow border */
.map-chart-wrapper::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
  border: 1px solid rgba(0,255,100,0.2);
  box-shadow: 0 0 20px rgba(0,255,100,0.3);
  animation: pulseGlow 2s infinite alternate;
  pointer-events: none;
}

@keyframes pulseGlow {
  from { box-shadow: 0 0 5px rgba(0,255,100,0.2); }
  to { box-shadow: 0 0 20px rgba(0,255,100,0.6); }
}

/* BEST MAP */
.best-map {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  color: #1aff4c;
  font-weight: 600;
  background: rgba(0, 255, 100, 0.08);
  border: 1px solid rgba(0, 255, 100, 0.25);
  padding: 8px 14px;
  border-radius: 8px;
  text-shadow: 0 0 8px rgba(0, 255, 100, 0.6);
  backdrop-filter: blur(6px);
  z-index: 5;
}

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

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

/* hide text while loading */
#bestMap.skeleton {
  color: transparent;
}

/* shimmer effect */
#mapChart.skeleton::after,
#bestMap.skeleton::after {
  content: "";
  position: absolute;
  top: 0;
  left: -150px;
  width: 150px;
  height: 100%;

  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(26, 255, 76, 0.15) 20%,
    rgba(26, 255, 76, 0.35) 50%,
    rgba(26, 255, 76, 0.15) 80%,
    transparent 100%
  );

  animation: shimmer 1.2s infinite;
}

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

/* ================= LEADERBOARD TABS ================= */
.tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}

.tab-btn {
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: bold;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid rgba(26, 255, 76, 0.3);
  background: #0b1a12;
  color: var(--green);
  transition: 0.3s;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

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

.tab-btn.active {
  background: var(--green);
  color: #000;
  box-shadow: 0 0 20px var(--green);
  border: 1px solid var(--green);
}

/* ================= ACHIEVEMENTS ================= */
.achievements {
  padding: 40px 20px;
  text-align: center;
}

.achievements h2 {
  font-size: 28px;
  margin-bottom: 24px;
  color: var(--green);
  letter-spacing: 2px;
  text-shadow: 0 0 8px var(--green);
}

/* CARD CONTAINER */
.achievement-card-container {
  max-width: 750px;
  margin: 30px auto 0;
  background: #0f1f16;
  border-radius: 15px;
  padding: 25px 20px;
  box-shadow: 0 0 15px rgba(26, 255, 76, 0.15);
  transition: 0.3s;
}

.achievement-card-container:hover {
  box-shadow: 0 0 20px rgba(26, 255, 76, 0.3);
}

/* TIMELINE LINE */
.achievement-timeline {
  position: relative;
  padding-left: 20px;
  padding-top: 15px;
  transition: opacity 0.2s ease;
  min-height: 450px;
}

/* ITEM */
.achievement-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 25px;
  text-align: left;
  position: relative;
  padding-top: 5px;
}

.achievement-item:last-child {
  margin-bottom: 0;
}

/* ICON */
.achievement-icon {
  min-width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #08140d;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
  box-shadow: 0 0 8px rgba(26, 255, 76, 0.4);
  position: relative;
  left: -10px;
  margin-top: 2px;
}

/* MEDAL COLORS */
.achievement-icon.gold {
  color: gold;
  box-shadow: 0 0 12px gold;
}

.achievement-icon.silver {
  color: silver;
  box-shadow: 0 0 12px silver;
}

.achievement-icon.bronze {
  color: #cd7f32;
  box-shadow: 0 0 12px #cd7f32;
}

/* DATE */
.achievement-date {
  font-size: 11px;
  color: #aaa;
  display: block;
  margin-bottom: 4px;
}

/* TEXT */
.achievement-content h4 {
  margin: 0;
  font-size: 16px;
  color: var(--green);
}

.achievement-content p {
  margin: 4px 0 0;
  font-size: 13px;
  color: #ccc;
}

/* PARTICIPANT STYLE */
.achievement-icon.participant {
  color: #00e5ff;
  box-shadow: 0 0 10px #00e5ff;
}

/* MOBILE */
@media screen and (max-width: 768px) {
  .achievement-card-container {
    padding: 20px 15px;
  }

  .achievement-icon {
    width: 35px;
    height: 35px;
    font-size: 14px;
  }

  .achievement-content h4 {
    font-size: 14px;
  }

  .achievement-content p {
    font-size: 12px;
  }

  .achievement-timeline {
    max-height: 320px;
    overflow-y: auto;
    padding-right: 5px;
  }

  .achievement-timeline::-webkit-scrollbar {
    width: 4px;
  }

  .achievement-timeline::-webkit-scrollbar-thumb {
    background: var(--green);
    border-radius: 10px;
  }

  .achievement-item.skeleton {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .achievement-item.skeleton .achievement-icon {
    width: 35px;
    height: 35px;
  }

  .achievement-item.skeleton .achievement-date {
    width: 50px;
    height: 8px;
  }

  .achievement-item.skeleton h4 {
    width: 100px;
    height: 10px;
  }

  .achievement-item.skeleton p {
    width: 160px;
    height: 8px;
  }
}

/* Shimmer effect for all skeletons */
.achievement-item.skeleton,
.achievement-item.skeleton .achievement-icon,
.achievement-item.skeleton .achievement-date,
.achievement-item.skeleton h4,
.achievement-item.skeleton p {
  position: relative;
  overflow: hidden;
  background: rgba(26, 255, 76, 0.05);
}

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

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

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

/* Buttons */
.pagination button {
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: bold;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid rgba(26, 255, 76, 0.3);
  background: #0b1a12;
  color: var(--green);
  transition: 0.3s;
  letter-spacing: 1px;
  text-transform: uppercase;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

/* Hover effect */
.pagination button:hover:not(:disabled) {
  background: var(--green);
  color: #000;
  box-shadow: 0 0 12px var(--green);
}

/* Disabled state */
.pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}

/* Page info */
#pageInfo {
  font-size: 13px;
  color: var(--green);
  text-shadow: 0 0 6px var(--green);
  letter-spacing: 1px;
}

.pagination button:active {
  transform: scale(0.95);
}

/* ================= FEATURES ================= */
.features {
  padding: 40px 20px;
  text-align: center;
}

.features h2 {
  font-size: 28px;
  margin-bottom: 24px;
  color: var(--green);
  letter-spacing: 2px;
  text-shadow: 0 0 8px var(--green);
}

/* GRID */
.feature-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
}

.feature-card {
  position: relative;
  width: 252px;
  height: 429px;
  background-size: cover;
  background-position: center;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition:
    transform 0.3s,
    box-shadow 0.3s;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.feature-card:hover {
  transform: scale(1.05);
  box-shadow:
    0 15px 30px rgba(0, 255, 76, 0.5),
    0 0 20px rgba(0, 255, 76, 0.5);
}

.feature-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 20px;
  opacity: 0;
  transform: translateY(100%);
  transition: all 0.4s ease-in-out;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  box-sizing: border-box;
  text-align: center;
}

.feature-card:hover .feature-overlay {
  opacity: 1;
  transform: translateY(0);
}

.feature-overlay h3 {
  margin: 0 0 10px 0;
  font-size: 20px;
  font-weight: bold;
}

.feature-overlay p {
  font-size: 14px;
  margin-bottom: 12px;
}

.feature-overlay .btn {
  align-self: center;
  padding: 8px 16px;
  font-size: 14px;
  border-radius: 6px;
  text-decoration: none;
}

/* ================= COMING SOON OVERLAY ================= */
.feature-card.coming-soon {
  position: relative;
  cursor: not-allowed;
}

.feature-card.coming-soon::before {
  content: "COMING SOON";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  color: var(--green);
  font-size: 24px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 2px;
  text-transform: uppercase;
  border-radius: 12px;
  z-index: 10;
  pointer-events: none;
  box-shadow: 0 0 10px var(--green);
}

/* ================= FEATURES MOBILE ================= */
@media screen and (max-width: 768px) {
  .feature-grid {
    justify-content: center;
  }

  .feature-card {
    width: 200px;
    height: 340px;
  }

  .feature-overlay {
    opacity: 0.9;
    transform: translateY(100%);
    background: rgba(0, 0, 0, 0.5);
  }

  .feature-card.active .feature-overlay {
    transform: translateY(0);
  }

  .feature-card:active {
    transform: scale(1.03);
    box-shadow:
      0 15px 30px rgba(0, 255, 76, 0.5),
      0 0 20px rgba(0, 255, 76, 0.5);
  }
}

/* ================= LEADERBOARD ================= */
.leaderboard-preview {
  padding: 40px 20px;
  text-align: center;
}

.leaderboard-preview h2 {
  font-size: 28px;
  margin-bottom: 24px;
  color: var(--green);
  letter-spacing: 2px;
  text-shadow: 0 0 8px var(--green);
}

.leaderboard-grid {
  display: flex;
  justify-content: center;
  gap: var(--section-gap);
  flex-wrap: wrap;
  align-items: stretch;
}

.leaderboard-card {
  flex: 1;
  max-width: 420px;
  min-width: 250px;
  background: #0f1f16;
  padding: 18px 16px;
  border-radius: 12px;
  transition: 0.3s;
  display: flex;
  flex-direction: column;
  text-align: center;
  box-shadow: 0 0 10px rgba(0,255,100,0.2);
}

.leaderboard-card h3 {
  font-size: 20px;
  margin-top: 2px;
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

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

.leaderboard-card li {
  list-style: none;
}

@media screen and (max-width: 768px) {
  .leaderboard-card h3 {
    font-size: 16px;
    gap: 6px;
    white-space: normal;
    flex-wrap: wrap;
    justify-content: center;
  }

  .leaderboard-card h3 i {
    margin-right: 4px;
  }
}

/* ================= PLAYER ITEMS ================= */
.player-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  margin: 6px 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  width: 100%;
  box-sizing: border-box;
  transition: 0.3s;
  flex: 1;
}

.player-item:first-child {
  margin-top: 0;
}

.player-item:last-child {
  margin-bottom: 0;
}

.player-item:hover {
  box-shadow: 0 0 15px var(--hover-glow);
}

.player-item.fade-in {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeUp 0.3s forwards;
}

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

/* LEFT SECTION: medal + icon */
.player-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 80px;
}

/* Medal icon */
.medal {
  font-size: 24px;
}

/* Rank icon */
.rank-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

/* MIDDLE SECTION: IGN */
.player-middle,
.ign {
  flex: 1;
  min-width: 0;
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 8px;
}

/* RIGHT SECTION: value & extra info */
.player-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  min-width: 70px;
  margin-left: 8px;
}

.value {
  font-weight: bold;
  text-align: right;
  min-width: 50px;
}

.extra {
  font-size: 11px;
  opacity: 0.7;
}

.ign:hover {
  overflow: visible;
  white-space: normal;
  position: relative;
  z-index: 2;
}

/* ================= RESPONSIVE FIX ================= */
@media screen and (max-width: 768px) {
  .player-item {
    flex-direction: row;
    padding: 10px 12px;
    gap: 6px;
  }

  .player-left {
    min-width: 55px;
    gap: 6px;
  }

  .player-right {
    min-width: 65px;
    margin-left: 6px;
  }

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

  .value {
    font-size: 13px;
  }
}

/* ================= SKELETON ================= */
.skeleton {
  position: relative;
  overflow: hidden;
  background: rgba(0, 128, 0, 0.1);
}

/* shimmer effect */
.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);
  }
}

/* stats and ranking specific skeleton */
.player-item.skeleton {
  height: 50px;
  border-radius: 10px;
}

.stat-card.skeleton {
  height: 90px;
}

/* achievement-specific skeleton */
.achievement-item.skeleton {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 25px;
}

.achievement-item.skeleton .achievement-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(26, 255, 76, 0.15);
  box-shadow: 0 0 8px rgba(26, 255, 76, 0.2);
}

.achievement-item.skeleton .achievement-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.achievement-item.skeleton .achievement-date {
  width: 60px;
  height: 10px;
  border-radius: 4px;
  background: rgba(26, 255, 76, 0.15);
}

.achievement-item.skeleton h4 {
  width: 120px;
  height: 12px;
  border-radius: 4px;
  background: rgba(26, 255, 76, 0.15);
}

.achievement-item.skeleton p {
  width: 200px;
  height: 10px;
  border-radius: 4px;
  background: rgba(26, 255, 76, 0.15);
}