:root {
  --green: #1aff4c;
  --red: #ff2b2b;
  --bg: #08140d;
  --yellow: #f9a825;
}

* {
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, sans-serif;
}

.navbar .logo {
  font-weight: 900;
  font-size: 24px;
  color: #1aff4c;
  letter-spacing: 2px;
  text-shadow: 0 0 8px #1aff4c;
}

main {
  flex: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 20px;
}

body {
  margin: 0;
  color: #fff;
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 0;
  background-size: cover;
  background-position: center;
  transition: background-position 0.6s ease;
}

header {
  text-align: center;
  margin-top: 20px;
  margin-bottom: 20px;
}

header h1 {
  margin: 0;
  color: var(--green);
  letter-spacing: 2px;
  text-shadow: 0 0 8px var(--green);
}

/* Event Tabs*/
.event-tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.event-tab {
  background: #08140d;
  color: #fff;
  border: 2px solid #1aff4c;
  padding: 8px 16px;
  cursor: pointer;
  border-radius: 8px;
  font-weight: 700;
  letter-spacing: 1px;
  transition: 0.2s;
}

.event-tab.active {
  background: #1aff4c;
  color: #000;
  box-shadow: 0 0 15px #1aff4c;
}

.event-tab:hover {
  box-shadow: 0 0 10px #1aff4c;
}

/* Countdown */
.countdown {
  margin-top: 5px;
  color: #eafff1;
  text-shadow: 0 0 4px rgba(26, 255, 76, 0.4);
}

.tk-card.rifle {
  background-image: url("../img/top-killer/top-rifle.png");
}

.tk-card.sniper {
  background-image: url("../img/top-killer/top-sniper.png");
}

.tk-card.grenade {
  background-image: url("../img/top-killer/top-grenade.png");
}

.tk-card.assister {
  background-image: url("../img/top-killer/top-assister.png");
}

/* Top Killer */
.topkiller-grid {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: flex-start;
  gap: 25px;
  flex-wrap: wrap;
  max-width: 1400px;
  margin: 0 auto;
  margin-bottom: 30px;
}

/* CARD */
.tk-card {
  position: relative;
  width: 270px;
  height: 430px;
  border-radius: 12px;
  overflow: hidden;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center center;
  box-shadow:
    0 0 10px rgba(0, 255, 76, 0.2),
    inset 0 0 20px rgba(0, 255, 76, 0.1);
  flex-shrink: 0;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;

  transition: all 0.3s ease;

  border: 1px solid rgba(26, 255, 76, 0.3);
  backdrop-filter: blur(6px);
  background-color: rgba(0, 0, 0, 0.4);
}

.tk-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;

  background: linear-gradient(
    120deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );

  transition: 0.5s;
}

.tk-card:hover::after {
  left: 100%;
}

.tk-card:hover {
  transform: translateY(-8px) scale(1.02);

  box-shadow:
    0 0 20px rgba(0, 255, 76, 0.6),
    0 0 40px rgba(0, 255, 76, 0.3);
}

/* Card Overlay */
.tk-overlay {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 35%;

  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.9) 40%,
    rgba(0, 0, 0, 0.65) 65%,
    rgba(26, 255, 76, 0.25) 100%
  );

  backdrop-filter: blur(8px);

  padding: 10px;
  text-align: center;
  color: #eafff1;
  font-weight: bold;

  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;

  border-top-left-radius: 12px;
  border-top-right-radius: 12px;

  border-top: 1px solid rgba(26, 255, 76, 0.3);
}

.tk-overlay * {
  line-height: 1.2;
}

.tk-overlay::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);

  width: 60%;
  height: 1px;

  background: linear-gradient(to right, transparent, var(--green), transparent);

  opacity: 0.6;
}

.tk-overlay .rank-icon {
  width: 28px;
  height: 28px;
  margin: 0 auto 4px;
  object-fit: contain;
  filter: drop-shadow(0 0 6px gold);
}

.tk-overlay .ign {
  font-size: 20px;
  font-weight: 800;

  color: var(--green);
  text-shadow:
    0 0 6px rgba(26, 255, 76, 0.8),
    0 0 12px rgba(26, 255, 76, 0.4);

  letter-spacing: 1px;
}

.tk-overlay .count,
.tk-overlay .reward {
  font-size: 14px;
  font-weight: 700;

  color: #eafff1;
  text-shadow: 0 0 4px rgba(26, 255, 76, 0.4);
}

.tk-overlay .category {
  font-size: 16px;
  font-weight: 700;

  color: var(--green);
  text-shadow:
    0 0 6px rgba(26, 255, 76, 0.8),
    0 0 12px rgba(26, 255, 76, 0.4);

  margin-top: 6px;
}

.tk-overlay .count::before {
  content: "Count: ";
  font-weight: 600;
  color: rgba(26, 255, 76, 0.8);
}

.tk-overlay .reward::before {
  content: "Rewards: ";
  font-weight: 600;
  color: rgba(26, 255, 76, 0.8);
}

.tk-overlay .count::before,
.tk-overlay .reward::before {
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;

  color: rgba(26, 255, 76, 0.7);
}

/* Mobile View */
@media (max-width: 480px) {
  .topkiller-grid {
    flex-direction: column;
    width: 100%;
    max-width: 360px;
    gap: 16px;
    margin: 0 auto 20px auto;
    padding: 0 12px;
  }

  .tk-card {
    width: 100%;
    height: auto;
    aspect-ratio: 252 / 429;

    box-shadow:
      0 4px 10px rgba(0, 0, 0, 0.6),
      0 0 10px rgba(26, 255, 76, 0.2);
  }

  .tk-card:active {
    transform: scale(0.98);
  }

  .tk-overlay {
    height: auto;
    min-height: 28%;
    padding: 10px 8px;
    gap: 4px;
  }

  .tk-overlay .rank-icon {
    width: 32px;
    height: 32px;
  }

  .tk-overlay .ign {
    font-size: 17px;
    font-weight: 800;
  }

  .tk-overlay .count,
  .tk-overlay .reward {
    font-size: 13px;
  }

  .tk-overlay .category {
    font-size: 15px;
  }

  .event-tabs {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 0 10px;
    margin-bottom: 15px;
  }

  .event-tab {
    flex: 1 1 auto;
    text-align: center;
    padding: 8px 14px;
    font-size: 13px;
    min-height: 36px;
  }

  main {
    padding: 15px 10px;
  }

  .tk-overlay.skeleton {
    height: 30%;
    padding: 6px;
    gap: 4px;
  }

  .tk-overlay .ign.skeleton {
    height: 18px;
  }
  .tk-overlay .count.skeleton,
  .tk-overlay .reward.skeleton {
    height: 14px;
  }
  .tk-overlay .category.skeleton {
    height: 18px;
  }
}

/* Skeleton Animation */
.skeleton {
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  animation: pulse 1.2s infinite ease-in-out;
  color: transparent !important;
}

/* Pulse effect */
@keyframes pulse {
  0%,
  100% {
    opacity: 0.4;
  }
  50% {
    opacity: 0.8;
  }
}

/* Skeleton for full overlay of card */
.tk-overlay.skeleton {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  padding: 8px;
  height: 35%;
}

/* Rank icon placeholder */
.tk-overlay .rank-icon.skeleton {
  width: 28px;
  height: 28px;
  margin: 0 auto;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.2);
}

/* IGN placeholder */
.tk-overlay .ign.skeleton {
  height: 22px;
  width: 80%;
  margin: 0 auto;
  border-radius: 4px;
  background-color: rgba(255, 255, 255, 0.2);
}

/* Count & Reward placeholders */
.tk-overlay .count.skeleton,
.tk-overlay .reward.skeleton {
  height: 16px;
  width: 50%;
  margin: 0 auto;
  border-radius: 4px;
  background-color: rgba(255, 255, 255, 0.2);
}

/* Category placeholder */
.tk-overlay .category.skeleton {
  height: 20px;
  width: 70%;
  margin: 0 auto;
  border-radius: 4px;
  background-color: rgba(255, 255, 255, 0.2);
}

footer {
  padding: 20px 0;
}
