/* assets/style.css - consolidated sleek modern game style */
@import url('https://fonts.googleapis.com/css2?family=Oxanium:wght@500;700&display=swap');
/* Global Reset & Body */
*,
*::before,
*::after {
  box-sizing: border-box;
}
:root {
  --primary: #00ffea;
  --secondary: #ff3c7a;
  --accent: #00bcd4;
  --gold: #ffd700;
  --silver: #c0c0c0;
  --bronze: #cd7f32;
  --bg-dark: #1a1a2e;
  --bg-card: #1e1e2f;
  --text-main: #fff;
  --crystal: #9c27b0;
  --nova: #2af598;
  --eclipse: #0d1b2a;
  --celestial: #1c2526;
  --max-content-width: 1200px;
}
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  font-family: 'Oxanium', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  position: relative;
  transition: background 0.6s ease;
}
/* Header - Full-width with centered inner content
.site-header {
  width: 100vw;
  background-color: #0f0f1a;
  padding: 20px 0;
  text-align: center;
  border-bottom: 2px solid var(--accent);
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}
.site-header .inner {
  max-width: var(--max-content-width);
  margin: 0 auto;
  padding: 0 1rem;
  width: 100%;
}
.site-header h1 {
  font-size: 2.5rem;
  color: var(--accent);
  text-shadow: 0 0 10px rgba(0, 188, 212, 0.5);
}
.site-header nav ul {
  list-style: none;
  padding: 0;
  margin: 10px 0 0 0;
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}
.site-header nav ul li a {
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  color: var(--primary);
  text-decoration: none;
}
.site-header nav ul li a:hover {
  background: rgba(0, 188, 212, 0.2);
}*/
/* Main Content */
main.content {
  flex: 1;
  max-width: var(--max-content-width);
  margin: 2rem auto;
  padding: 0 1rem;
  width: 100%;
}
/* Hero Section */
.hero {
  text-align: center;
  padding: 3rem 1rem;
  background: #1c1c28;
  border-radius: 12px;
  margin-bottom: 2rem;
  box-shadow: 0 0 15px rgba(0, 188, 212, 0.33);
}
.hero h2 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
  color: var(--secondary);
}
.hero p {
  font-size: 1.2rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}
/* Buttons */
.btn,
button.btn {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  color: #000;
  font-weight: bold;
  border-radius: 8px;
  transition: all 0.3s;
  box-shadow: 0 0 8px rgba(0, 188, 212, 0.55);
  border: none;
  cursor: pointer;
}
.btn:hover,
button.btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(255, 60, 122, 0.55);
}
/* Card Leaderboard Styles for Ranks 4+ */
.cardleaderboard-section {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}
.cardleaderboard-cards-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  width: 100%;
  max-width: var(--max-content-width);
  padding: 0 1rem;
  align-items: start;
}
/* Individual card (default) */
.cardleaderboard-card {
  background-color: var(--bg-card);
  border-radius: 16px;
  padding: 15px;
  box-shadow: 0 0 15px rgba(0, 188, 212, 0.3);
  transition: transform 0.3s, box-shadow 0.3s;
  text-align: left;
  cursor: pointer;
  position: relative;
  z-index: 1;
  opacity: 1;
}
.cardleaderboard-card:hover {
  transform: scale(1.05);
  box-shadow: 0 0 25px rgba(0, 188, 212, 0.5);
}
/* Card header: rank + username */
.cardleaderboard-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.cardleaderboard-rank {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--gold);
  flex-shrink: 0;
}
.cardleaderboard-username {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  word-break: break-word;
  flex: 1;
}
.cardleaderboard-username:hover {
  color: var(--secondary);
  text-shadow: 0 0 5px var(--secondary);
}
/* Stats */
.cardleaderboard-stats p {
  margin: 3px 0;
  font-size: 0.92rem;
  color: #8fa3b8;
}
.cardleaderboard-label {
  font-weight: 700;
  color: var(--accent);
}
.cardleaderboard-power {
  color: #64c8ff;
  text-shadow: 0 0 3px #64c8ff;
}
.cardleaderboard-damage {
  color: var(--secondary);
  text-shadow: 0 0 3px var(--secondary);
}
/* Submission date */
.cardleaderboard-date {
  font-size: 0.78rem;
  color: #aaa;
  text-align: left;
  margin-top: 5px;
}
/* No submissions */
.cardleaderboard-no-submissions {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-main);
}
/* Leaderboard Cards */
.leaderboard {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.leaderboard-card {
  background-color: var(--bg-card);
  border-radius: 10px;
  padding: 20px;
  margin: 10px 0;
  width: 80%;
  max-width: 600px;
  box-shadow: 0 0 15px rgba(0, 188, 212, 0.3);
  transition: transform 0.3s, box-shadow 0.3s;
}
.leaderboard-card:hover {
  transform: scale(1.03);
  box-shadow: 0 0 25px rgba(0, 188, 212, 0.5);
}
.leaderboard-card h3 {
  color: var(--accent);
  font-size: 1.8rem;
  margin-bottom: 10px;
}
.leaderboard-card p {
  color: var(--text-main);
  font-size: 1.2rem;
  margin: 3px 0;
}
/* Small Leaderboard Cards Grid */
.leaderboard-cards-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  margin-top: 1rem;
  padding: 0 1rem;
  max-width: var(--max-content-width);
  margin-left: auto;
  margin-right: auto;
}
.leaderboard-card-small {
  background-color: var(--bg-card);
  border-radius: 10px;
  padding: 15px;
  box-shadow: 0 0 15px rgba(0, 188, 212, 0.3);
  transition: transform 0.3s, box-shadow 0.3s;
  text-align: center;
  cursor: pointer;
}
.leaderboard-card-small:hover {
  transform: scale(1.05);
  box-shadow: 0 0 25px rgba(0, 188, 212, 0.5);
}
.leaderboard-card-small h3 {
  color: var(--accent);
  font-size: 1.4rem;
  margin-bottom: 5px;
}
.leaderboard-card-small h3 a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.3s, text-shadow 0.3s;
}
.leaderboard-card-small h3 a:hover {
  color: var(--secondary);
  text-shadow: 0 0 8px var(--secondary);
}
/* Podium - Responsive & Prominent */
.podium {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  padding: 0 1rem;
  max-width: var(--max-content-width);
  margin-left: auto;
  margin-right: auto;
}
.podium-place {
  flex: 0 0 auto;
  width: 160px;
  max-width: 200px;
  min-width: 120px;
  text-align: center;
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 0 15px rgba(0,188,212,0.3);
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  position: relative;
  z-index: 1;
  opacity: 1;
  box-sizing: border-box;
}
.podium-place:hover {
  transform: scale(1.05);
  box-shadow: 0 0 25px rgba(0,188,212,0.5);
}
/* Heights + Crown Styling for top 3 */
.podium-place.first {
  height: 230px;
  order: 1;
  animation: glowPulse 2s infinite alternate;
  background: linear-gradient(135deg, rgba(255,223,0,0.15), rgba(255,223,0,0.05));
  border: 2px solid var(--gold);
  font-size: 48px;
  color: var(--gold);
  text-shadow: 0 0 15px var(--gold);
}
.podium-place.second {
  height: 220px;
  order: 2;
  animation: glowPulseSilver 2s infinite alternate;
  background: linear-gradient(135deg, rgba(192,192,192,0.15), rgba(192,192,192,0.05));
  border: 2px solid var(--silver);
  font-size: 40px;
  color: var(--silver);
  text-shadow: 0 0 12px var(--silver);
}
.podium-place.third {
  height: 210px;
  order: 3;
  animation: glowPulseBronze 2s infinite alternate;
  background: linear-gradient(135deg, rgba(205,127,50,0.15), rgba(205,127,50,0.05));
  border: 2px solid var(--bronze);
  font-size: 36px;
  color: var(--bronze);
  text-shadow: 0 0 10px var(--bronze);
}
/* Fix podium username links */
.podium-username,
.podium-username a {
  font-size: 1rem;
  font-weight: 800;
  color: var(--primary) !important;
  text-shadow: 0 0 5px var(--primary);
  margin-bottom: 0.3rem;
  text-decoration: none;
}
.podium-username:hover,
.podium-username a:hover {
  color: var(--secondary) !important;
  text-shadow: 0 0 8px var(--secondary);
}
/* Podium stats */
.podium-class,
.podium-power,
.podium-damage {
  font-size: 0.86rem;
  color: #8fa3b8;
  margin-bottom: 4px;
}
.podium-power {
  color: #64c8ff;
  font-weight: 700;
  text-shadow: 0 0 5px #64c8ff;
}
.podium-damage {
  color: var(--secondary);
  font-weight: 700;
  text-shadow: 0 0 5px var(--secondary);
}
/* Podium Glow Animations */
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 25px rgba(255,223,0,0.6), 0 0 60px rgba(255,223,0,0.2) inset; }
  50% { box-shadow: 0 0 35px rgba(255,223,0,0.8), 0 0 80px rgba(255,223,0,0.3) inset; }
}
@keyframes glowPulseSilver {
  0%, 100% { box-shadow: 0 0 15px rgba(192,192,192,0.6); }
  50% { box-shadow: 0 0 25px rgba(192,192,192,0.8); }
}
@keyframes glowPulseBronze {
  0%, 100% { box-shadow: 0 0 15px rgba(205,127,50,0.6); }
  50% { box-shadow: 0 0 25px rgba(205,127,50,0.8); }
}
/* Class Selector */
.class-selector {
  text-align: center;
  margin-bottom: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}
.class-selector label {
  font-weight: bold;
}
.class-selector select {
  padding: 0.5rem 1rem;
  font-size: 1rem;
  border-radius: 8px;
  border: none;
  background: #12121c;
  color: var(--primary);
  font-weight: bold;
  box-shadow: inset 0 0 5px rgba(0, 188, 212, 0.22);
  cursor: pointer;
  transition: all 0.3s ease;
}
.class-selector select:hover,
.class-selector select:focus {
  outline: none;
  box-shadow: 0 0 12px var(--primary), 0 0 15px var(--secondary);
}
/* Leaderboard Table */
.leaderboard-table-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 150px;
  padding: 0 1rem;
}
.leaderboard-table {
  width: 100%;
  max-width: var(--max-content-width);
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: 0 0 25px rgba(0,188,212,0.3);
}
.leaderboard-header,
.leaderboard-row {
  display: flex;
  padding: 12px 15px;
  align-items: center;
}
.leaderboard-header {
  background: #0f0f1a;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary);
  border-bottom: 2px solid rgba(0, 188, 212, 0.33);
}
.leaderboard-row {
  border-bottom: 1px solid rgba(0, 188, 212, 0.22);
  color: var(--text-main);
  transition: background 0.3s;
}
.leaderboard-row:nth-child(even) {
  background: rgba(0,0,0,0.15);
}
.leaderboard-row:hover {
  background: rgba(0,255,234,0.1);
}
.col {
  flex: 1;
  text-align: center;
}
.col.rank { flex: 0.5; }
.col.username { flex: 2; text-align: left; padding-left: 15px; position: relative; }
.col.username a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
  text-shadow: 0 0 5px var(--primary);
}
.col.username a:hover {
  color: var(--secondary);
  text-shadow: 0 0 8px var(--secondary);
}
.col.class { flex: 1.2; }
.col.server { flex: 1.5; }
.col.power { flex: 1.2; color: #64c8ff; font-weight: bold; }
.col.damage { flex: 1.2; color: var(--secondary); font-weight: bold; }
.unit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  padding: 10px 20px;
  border-radius: 12px;
  border: 2px solid var(--primary);
  font-weight: bold;
  cursor: pointer;
  background-color: #12121c;
  color: var(--primary);
  transition: all 0.25s ease;
  user-select: none;
}
.unit-btn:hover {
  box-shadow: 0 0 12px var(--primary), 0 0 15px var(--secondary);
  transform: scale(1.05);
}
.unit-btn input[type="radio"] {
  display: none;
}
.unit-btn input[type="radio"]:checked + span {
  color: #4caf50;
  border: 2px solid transparent;
  border-radius: 10px;
}

/* === FINAL TOOLTIP SOLUTION - Separate classes for donor tooltips to guarantee position === */

/* Critical: Allow hover events to pass through donor badges */
.cardleaderboard-card[class*="special-style-"]::after,
.podium-place[class*="special-style-"]::after,
.best-box[class*="special-style-"]::after,
.history-card[class*="special-style-"]::after {
  pointer-events: none !important;
}

/* Normal leaderboard cards: full-card hover area */
.cardleaderboard-card .tooltip-badge {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  border-radius: 16px;
}

/* Podium: small centered badge at top */
.podium-place .tooltip-badge {
  position: absolute;
  top: 0;
  left: 50%;
  width: 100%;
  height: 100%;
  z-index: 3;
}

/* === DONOR TOOLTIP FOR NORMAL CARDS (above) === */
.cardleaderboard-card .tooltip-badge .tooltiptext {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  top: -48px;
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  background: rgba(20, 20, 40, 0.92);
  color: var(--text-main);
  font-weight: 700;
  text-align: center;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.95rem;
  white-space: nowrap;
  border: 2px solid var(--primary);
  box-shadow: 0 0 15px rgba(0, 255, 234, 0.4);
  pointer-events: none;
  transition: all 0.2s ease;
  z-index: 9999;
}

.cardleaderboard-card .tooltip-badge .tooltiptext::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 8px solid transparent;
  border-top-color: var(--primary);
}

.cardleaderboard-card:hover .tooltip-badge .tooltiptext {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

/* === DONOR TOOLTIP FOR PODIUM - SEPARATE CLASS TO FORCE ABOVE === */
.podium-place .tooltip-badge .tooltiptext {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  top: -48px !important; /* Fixed negative top - guaranteed above */
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  background: rgba(20, 20, 40, 0.92);
  color: var(--text-main);
  font-weight: 700;
  text-align: center;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.95rem;
  white-space: nowrap;
  border: 2px solid var(--primary);
  box-shadow: 0 0 15px rgba(0, 255, 234, 0.4);
  pointer-events: none;
  transition: all 0.2s ease;
  z-index: 9999;
}

.podium-place .tooltip-badge .tooltiptext::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 8px solid transparent;
  border-top-color: var(--primary);
}

.podium-place .tooltip-badge:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

/* Podium "Updated: X ago" tooltip - BELOW (unchanged) */
.tooltiptext-card {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  background: rgba(20, 20, 40, 0.92);
  color: #aaa;
  font-size: 0.8rem;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--primary);
  box-shadow: 0 0 10px rgba(0, 255, 234, 0.3);
  pointer-events: none;
  transition: all 0.2s ease;
  z-index: 9999;
}

.tooltip-card:hover .tooltiptext-card {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

.tooltiptext-card::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-bottom-color: var(--primary);
}

/* Form Section */
.form-section {
  background: var(--bg-card);
  padding: 2.5rem 1rem;
  border-radius: 12px;
  box-shadow: 0 0 25px rgba(0, 255, 234, 0.3);
  max-width: var(--max-content-width);
  margin: 0 auto 2rem auto;
  text-align: center;
}
.form-section h2 {
  font-size: 2rem;
  color: var(--primary);
  text-shadow: 0 0 8px rgba(0, 255, 234, 0.55);
  margin-bottom: 1.5rem;
}
.form-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  justify-content: center;
}
.form-row input,
.form-row select {
  flex: 1;
  padding: 0.7rem;
  border-radius: 8px;
  border: none;
  font-size: 1rem;
  background: #12121c;
  color: var(--text-main);
  box-shadow: inset 0 0 5px rgba(0, 188, 212, 0.22);
  transition: 0.3s;
}
.form-row input:focus,
.form-row select:focus {
  outline: none;
  box-shadow: 0 0 12px var(--primary), 0 0 15px var(--secondary);
}
/* Upload Boxes */
.upload-box {
  position: relative;
  flex: 1;
  min-height: 150px;
  border: 2px dashed var(--primary);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  background: #12121c;
  color: var(--primary);
  font-weight: bold;
  width: 250px;
}
.upload-box:hover {
  box-shadow: 0 0 15px rgba(0, 188, 212, 0.55), 0 0 25px rgba(255, 60, 122, 0.55);
  border-color: var(--secondary);
}
.upload-box input[type="file"] {
  display: none;
}
.upload-box .plus {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
  transition: color 0.3s, transform 0.3s;
}
.upload-box:hover .plus {
  color: var(--secondary);
  transform: scale(1.2);
}
.upload-box .file-name {
  font-size: 1rem;
  color: var(--primary);
  text-align: center;
}
.upload-box .remove-file {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(255,0,0,0.8);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 14px;
  cursor: pointer;
  padding: 2px 6px;
}
.img-preview {
  margin-top: 0.5rem;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.img-preview img {
  max-width: 100px;
  max-height: 100px;
  border-radius: 8px;
  object-fit: cover;
  transition: transform 0.3s, box-shadow 0.3s;
}
.img-preview img:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(255, 60, 122, 0.55);
}
/* Submission Warning */
.warning-box {
  background: #fbbf24;
  color: #1f2937;
  padding: 10px;
  border-radius: 6px;
  font-weight: bold;
  margin-bottom: 15px;
}
/* Best Submission Box */
.best-box {
  background: linear-gradient(145deg, #1f2937, #11141f);
  padding: 30px 1rem;
  border-radius: 20px;
  box-shadow: 0 0 40px rgba(0,188,212,0.6);
  margin-bottom: 50px;
  max-width: var(--max-content-width);
  margin-left: auto;
  margin-right: auto;
}
.best-box h2 {
  color: #00ffe0;
  font-size: 28px;
  margin-bottom: 20px;
  text-align: center;
}
.best-info {
  display: flex;
  gap: 25px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 20px;
}
.best-info div {
  flex: 1 1 200px;
  text-align: center;
}
.best-info span.value {
  font-weight: 700;
  font-size: 1.1em;
}
/* Best Images */
.best-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  justify-content: center;
  margin-top: 20px;
}
.best-images .img-box {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #11141f;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease;
  box-shadow: 0 0 12px rgba(0, 188, 212, 0.3);
}
.best-images .img-box:hover {
  transform: scale(1.05);
}
.best-images img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
/* Submission History */
.history-title {
  text-align: center;
  font-size: 24px;
  color: #00ffe0;
  margin-bottom: 20px;
}
.history-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: auto;
  max-width: var(--max-content-width);
  padding: 0 1rem;
}
.history-card {
  background: #2a2a3b;
  padding: 20px;
  border-radius: 12px;
  flex: 1 1 220px;
  box-shadow: 0 0 15px rgba(0,188,212,0.3);
  color: var(--text-main);
  cursor: pointer;
  transition: transform 0.2s;
}
.history-card:hover {
  transform: scale(1.03);
}
.history-card h3 {
  margin: 0;
  color: #00ffe0;
  font-size: 18px;
  text-align: center;
}
.history-card .info {
  margin-top: 8px;
  font-size: 14px;
  color: #aaa;
  text-align: center;
}
/* Modal */
.modal,
.img-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
.modal-content,
.img-modal-content {
  background: var(--bg-card);
  padding: 20px;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  color: white;
  position: relative;
}
.modal-content h2 {
  margin-top: 0;
  margin-bottom: 15px;
}
.close,
.img-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
}
.modal-images {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  justify-content: center;
}
.modal-images img {
  max-width: 100%;
  max-height: 60vh;
  object-fit: contain;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
}
.modal-images img:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(255, 60, 122, 0.55);
}
.img-modal-content {
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  border-radius: 8px;
  object-fit: contain;
  box-shadow: 0 0 25px rgba(0,188,212,0.4);
  transition: transform 0.3s, box-shadow 0.3s;
}
.img-nav-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 10px;
}
.img-nav-buttons button {
  padding: 8px 16px;
  font-size: 16px;
  background: #0d1117;
  color: var(--text-main);
  border: 1px solid #64c8ff;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.img-nav-buttons button:hover {
  background: #64c8ff;
  color: #000;
  transform: scale(1.05);
}
/* Footer */
.site-footer {
  width: 100vw;
  text-align: center;
  padding: 1rem 0;
  background-color: #12121c;
  border-top: 2px solid var(--accent);
  font-size: 0.9rem;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}
.site-footer .inner {
  max-width: var(--max-content-width);
  margin: 0 auto;
  padding: 0 1rem;
}
/* Pagination */
.pagination {
  text-align: center;
  margin: 2rem 0;
}
.pagination .btn {
  margin: 0 10px;
}
/* Tablets (up to 1024px) */
@media (max-width: 1024px) {
  .leaderboard-cards-row,
  .cardleaderboard-cards-row {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}
/* Small Tablets / Large Phones (up to 900px) */
@media (max-width: 900px) {
  .leaderboard-cards-row,
  .cardleaderboard-cards-row {
    grid-template-columns: repeat(2, 1fr);
  }
}
/* Mobile (up to 768px) */
@media (max-width: 768px) {
  .leaderboard-cards-row,
  .cardleaderboard-cards-row {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .podium {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
  .podium-place {
    width: 80%;
    max-width: 300px;
    margin-bottom: 1rem;
  }
  .podium-place.first { height: 180px; }
  .podium-place.second { height: 170px; }
  .podium-place.third { height: 160px; }
  .leaderboard-table-wrapper {
    overflow-x: auto;
  }
  .leaderboard-table {
    min-width: 700px;
  }
}
/* Small Mobile (up to 480px) */
@media (max-width: 480px) {
  .podium-place { width: 90%; }
  .cardleaderboard-card,
  .leaderboard-card-small {
    padding: 10px;
    font-size: 0.9rem;
  }
  .cardleaderboard-stats p { font-size: 0.8rem; }
  .podium-class,
  .podium-power,
  .podium-damage { font-size: 0.8rem; }
  .leaderboard-card p { font-size: 1rem; }
  .hero h2 { font-size: 1.8rem; }
  .hero p { font-size: 1rem; }
}
/* Accessibility & Motion Preferences */
a:focus,
button:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
/* Special Styles for Donation Tiers - Base setup */
.cardleaderboard-card[class*="special-style-"],
.podium-place[class*="special-style-"],
.best-box[class*="special-style-"],
.history-card[class*="special-style-"] {
  position: relative;
  z-index: 1;
  overflow: visible;
  box-sizing: border-box;
}
.best-box[class*="special-style-"],
.history-card[class*="special-style-"] {
  padding: 30px;
  border-radius: 24px;
}
.cardleaderboard-card[class*="special-style-"] .cardleaderboard-header,
.cardleaderboard-card[class*="special-style-"] .cardleaderboard-stats,
.cardleaderboard-card[class*="special-style-"] .cardleaderboard-rank,
.cardleaderboard-card[class*="special-style-"] .cardleaderboard-username,
.podium-place[class*="special-style-"] .podium-username,
.podium-place[class*="special-style-"] .podium-class,
.podium-place[class*="special-style-"] .podium-power,
.podium-place[class*="special-style-"] .podium-damage,
.best-box[class*="special-style-"] h2,
.best-box[class*="special-style-"] .best-info div,
.best-box[class*="special-style-"] .best-info span.value,
.history-card[class*="special-style-"] h3,
.history-card[class*="special-style-"] .info {
  position: relative;
  z-index: 2;
}
.cardleaderboard-card[class*="special-style-"] .cardleaderboard-stats p { color: #8fa3b8; font-size: 0.92rem; }
.cardleaderboard-card[class*="special-style-"] .cardleaderboard-power { color: #64c8ff; text-shadow: 0 0 3px #64c8ff; }
.cardleaderboard-card[class*="special-style-"] .cardleaderboard-damage { color: var(--secondary); text-shadow: 0 0 3px var(--secondary); }
.podium-place[class*="special-style-"] .podium-class { color: #8fa3b8; font-size: 0.86rem; }
.podium-place[class*="special-style-"] .podium-power { color: #64c8ff; text-shadow: 0 0 5px #64c8ff; }
.podium-place[class*="special-style-"] .podium-damage { color: var(--secondary); text-shadow: 0 0 5px var(--secondary); }
/* Crystal Tier */
.cardleaderboard-card.special-style-crystal,
.podium-place.special-style-crystal,
.best-box.special-style-crystal,
.history-card.special-style-crystal {
  background: linear-gradient(135deg, rgba(156, 39, 176, 0.2), rgba(103, 26, 117, 0.4));
  border: 3px dotted var(--crystal);
  border-radius: 16px;
  box-shadow: 0 0 20px rgba(156, 39, 176, 0.8), inset 0 0 15px rgba(156, 39, 176, 0.5);
}
.best-box.special-style-crystal,
.history-card.special-style-crystal {
  border-radius: 24px;
}
.cardleaderboard-card.special-style-crystal::before,
.podium-place.special-style-crystal::before,
.best-box.special-style-crystal::before,
.history-card.special-style-crystal::before {
  content: '';
  position: absolute;
  top: -6px; left: -6px; right: -6px; bottom: -6px;
  border-radius: 16px;
  background: transparent;
  border: 1px dotted rgba(156, 39, 176, 0.5);
  z-index: -1;
  animation: crystalSparklePulse 2s infinite alternate ease-in-out;
}
.best-box.special-style-crystal::before,
.history-card.special-style-crystal::before {
  border-radius: 24px;
}
.cardleaderboard-card.special-style-crystal::after,
.podium-place.special-style-crystal::after,
.best-box.special-style-crystal::after,
.history-card.special-style-crystal::after {
  content: '💎';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%) translateY(-50%) scale(1.5);
  color: var(--crystal);
  font-size: 20px;
  text-shadow: 0 0 10px rgba(156, 39, 176, 1);
  z-index: 3;
  animation: crystalPulse 1.5s infinite alternate;
}
@keyframes crystalPulse {
  0% { transform: translateX(-50%) translateY(-50%) scale(1.5); }
  100% { transform: translateX(-50%) translateY(-50%) scale(1.7); }
}
@keyframes crystalSparklePulse {
  0%, 100% { box-shadow: 0 0 15px rgba(156, 39, 176, 0.6), 0 0 30px rgba(156, 39, 176, 0.2) inset; }
  50% { box-shadow: 0 0 25px rgba(156, 39, 176, 0.8), 0 0 40px rgba(156, 39, 176, 0.3) inset; }
}
.cardleaderboard-card.special-style-crystal .cardleaderboard-username,
.podium-place.special-style-crystal .podium-username {
  text-shadow: 0 0 8px rgba(156, 39, 176, 0.8);
}
/* Nova Tier */
.cardleaderboard-card.special-style-nova,
.podium-place.special-style-nova,
.best-box.special-style-nova,
.history-card.special-style-nova {
  background: linear-gradient(135deg, rgba(42, 245, 152, 0.2), rgba(28, 163, 101, 0.4));
  border: 3px dotted var(--nova);
  border-radius: 16px;
  box-shadow: 0 0 22px rgba(42, 245, 152, 0.85), inset 0 0 17px rgba(42, 245, 152, 0.55);
}
.best-box.special-style-nova,
.history-card.special-style-nova {
  border-radius: 24px;
}
.cardleaderboard-card.special-style-nova::before,
.podium-place.special-style-nova::before,
.best-box.special-style-nova::before,
.history-card.special-style-nova::before {
  content: '';
  position: absolute;
  top: -6px; left: -6px; right: -6px; bottom: -6px;
  border-radius: 16px;
  background: transparent;
  border: 1px solid rgba(42, 245, 152, 0.3);
  z-index: -1;
  animation: novaSparklePulse 1.8s infinite alternate ease-in-out;
}
.best-box.special-style-nova::before,
.history-card.special-style-nova::before {
  border-radius: 24px;
}
.cardleaderboard-card.special-style-nova::after,
.podium-place.special-style-nova::after,
.best-box.special-style-nova::after,
.history-card.special-style-nova::after {
  content: '✨';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%) translateY(-50%) scale(1.5);
  color: var(--nova);
  font-size: 20px;
  text-shadow: 0 0 10px rgba(42, 245, 152, 1);
  z-index: 3;
  animation: novaPulse 1.5s infinite alternate;
}
@keyframes novaPulse {
  0% { transform: translateX(-50%) translateY(-50%) scale(1.5); }
  100% { transform: translateX(-50%) translateY(-50%) scale(1.7); }
}
@keyframes novaSparklePulse {
  0%, 100% { box-shadow: 0 0 18px rgba(42, 245, 152, 0.65), 0 0 35px rgba(42, 245, 152, 0.25) inset; }
  50% { box-shadow: 0 0 28px rgba(42, 245, 152, 0.85), 0 0 45px rgba(42, 245, 152, 0.35) inset; }
}
.cardleaderboard-card.special-style-nova .cardleaderboard-username,
.podium-place.special-style-nova .podium-username {
  text-shadow: 0 0 8px rgba(42, 245, 152, 0.8);
}
/* Eclipse Tier */
.cardleaderboard-card.special-style-eclipse,
.podium-place.special-style-eclipse,
.best-box.special-style-eclipse,
.history-card.special-style-eclipse {
  background: linear-gradient(135deg, rgba(0, 255, 234, 0.2), rgba(0, 255, 234, 0.4));
  border: 3px dotted #00ffea;
  border-radius: 16px;
  box-shadow: 0 0 24px rgba(0, 255, 234, 0.9), inset 0 0 18px rgba(0, 255, 234, 0.6);
}
.best-box.special-style-eclipse,
.history-card.special-style-eclipse {
  border-radius: 24px;
}
.cardleaderboard-card.special-style-eclipse::before,
.podium-place.special-style-eclipse::before,
.best-box.special-style-eclipse::before,
.history-card.special-style-eclipse::before {
  content: '';
  position: absolute;
  top: -6px; left: -6px; right: -6px; bottom: -6px;
  border-radius: 16px;
  background: transparent;
  border: 1px dashed rgba(0, 255, 234, 0.4);
  z-index: -1;
  animation: eclipseSparklePulse 1.6s infinite alternate ease-in-out;
}
.best-box.special-style-eclipse::before,
.history-card.special-style-eclipse::before {
  border-radius: 24px;
}
.cardleaderboard-card.special-style-eclipse::after,
.podium-place.special-style-eclipse::after,
.best-box.special-style-eclipse::after,
.history-card.special-style-eclipse::after {
  content: '🪐';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%) translateY(-50%) scale(1.5);
  color: #00ffea;
  font-size: 20px;
  text-shadow: 0 0 12px rgba(0, 255, 234, 1);
  z-index: 3;
  animation: eclipsePulse 1.5s infinite alternate;
}
@keyframes eclipsePulse {
  0% { transform: translateX(-50%) translateY(-50%) scale(1.5); }
  100% { transform: translateX(-50%) translateY(-50%) scale(1.7); }
}
@keyframes eclipseSparklePulse {
  0%, 100% { box-shadow: 0 0 20px rgba(0, 255, 234, 0.7), 0 0 40px rgba(0, 255, 234, 0.3) inset; }
  50% { box-shadow: 0 0 30px rgba(0, 255, 234, 0.9), 0 0 50px rgba(0, 255, 234, 0.4) inset; }
}
.cardleaderboard-card.special-style-eclipse .cardleaderboard-username,
.podium-place.special-style-eclipse .podium-username {
  text-shadow: 0 0 8px rgba(0, 255, 234, 0.8);
}
/* Stellar Tier */
.cardleaderboard-card.special-style-stellar,
.podium-place.special-style-stellar,
.best-box.special-style-stellar,
.history-card.special-style-stellar {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(184, 134, 11, 0.4));
  border: 3px dotted #ffd700;
  border-radius: 16px;
  box-shadow: 0 0 26px rgba(255, 215, 0, 0.95), inset 0 0 20px rgba(255, 215, 0, 0.65);
}
.best-box.special-style-stellar,
.history-card.special-style-stellar {
  border-radius: 24px;
}
.cardleaderboard-card.special-style-stellar::before,
.podium-place.special-style-stellar::before,
.best-box.special-style-stellar::before,
.history-card.special-style-stellar::before {
  content: '';
  position: absolute;
  top: -6px; left: -6px; right: -6px; bottom: -6px;
  border-radius: 16px;
  background: transparent;
  border: 1px solid rgba(255, 215, 0, 0.4);
  z-index: -1;
  animation: stellarSparklePulse 1.4s infinite alternate ease-in-out;
}
.best-box.special-style-stellar::before,
.history-card.special-style-stellar::before {
  border-radius: 24px;
}
.cardleaderboard-card.special-style-stellar::after,
.podium-place.special-style-stellar::after,
.best-box.special-style-stellar::after,
.history-card.special-style-stellar::after {
  content: '⭐';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%) translateY(-50%) scale(1.5);
  color: #ffd700;
  font-size: 20px;
  text-shadow: 0 0 12px rgba(255, 215, 0, 1);
  z-index: 3;
  animation: stellarBounce 1.5s infinite alternate;
}
@keyframes stellarBounce {
  0% { transform: translateX(-50%) translateY(-50%) scale(1.5); }
  100% { transform: translateX(-50%) translateY(-50%) scale(1.8); }
}
@keyframes stellarSparklePulse {
  0%, 100% { box-shadow: 0 0 22px rgba(255, 215, 0, 0.75), 0 0 45px rgba(255, 215, 0, 0.35) inset; }
  50% { box-shadow: 0 0 32px rgba(255, 215, 0, 0.95), 0 0 55px rgba(255, 215, 0, 0.45) inset; }
}
.cardleaderboard-card.special-style-stellar .cardleaderboard-username,
.podium-place.special-style-stellar .podium-username {
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.8);
}
/* Cosmic Tier */
.cardleaderboard-card.special-style-cosmic,
.podium-place.special-style-cosmic,
.best-box.special-style-cosmic,
.history-card.special-style-cosmic {
  background: linear-gradient(135deg, #4b0082 0%, rgba(0, 183, 235, 0.3) 50%, #4b0082 100%);
  border: 4px double #00b7eb;
  border-radius: 16px;
  box-shadow: 0 0 28px rgba(0, 183, 235, 1), inset 0 0 22px rgba(0, 183, 235, 0.7);
}
.best-box.special-style-cosmic,
.history-card.special-style-cosmic {
  border-radius: 24px;
}
.cardleaderboard-card.special-style-cosmic::before,
.podium-place.special-style-cosmic::before,
.best-box.special-style-cosmic::before,
.history-card.special-style-cosmic::before {
  content: '';
  position: absolute;
  top: -6px; left: -6px; right: -6px; bottom: -6px;
  border-radius: 16px;
  background: transparent;
  border: 1px dashed rgba(0, 183, 235, 0.5);
  z-index: -1;
  animation: cosmicSparklePulse 1.2s infinite alternate ease-in-out;
}
.best-box.special-style-cosmic::before,
.history-card.special-style-cosmic::before {
  border-radius: 24px;
}
.cardleaderboard-card.special-style-cosmic::after,
.podium-place.special-style-cosmic::after,
.best-box.special-style-cosmic::after,
.history-card.special-style-cosmic::after {
  content: '💫';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%) translateY(-50%) scale(1.5);
  color: #00b7eb;
  font-size: 20px;
  text-shadow: 0 0 12px rgba(0, 183, 235, 1);
  z-index: 3;
  animation: cosmicPulse 1.5s infinite alternate;
}
@keyframes cosmicPulse {
  0% { transform: translateX(-50%) translateY(-50%) scale(1.5); }
  100% { transform: translateX(-50%) translateY(-50%) scale(1.8); }
}
@keyframes cosmicSparklePulse {
  0%, 100% { box-shadow: 0 0 25px rgba(0, 183, 235, 0.8), 0 0 50px rgba(0, 183, 235, 0.4) inset; }
  50% { box-shadow: 0 0 35px rgba(0, 183, 235, 1), 0 0 60px rgba(0, 183, 235, 0.5) inset; }
}
.cardleaderboard-card.special-style-cosmic .cardleaderboard-username,
.podium-place.special-style-cosmic .podium-username {
  text-shadow: 0 0 8px rgba(0, 183, 235, 0.8);
}
/* Celestial Tier */
.cardleaderboard-card.special-style-celestial,
.podium-place.special-style-celestial,
.best-box.special-style-celestial,
.history-card.special-style-celestial {
  background: linear-gradient(135deg, #e0e7ff 0%, rgba(161, 49, 255, 0.4) 50%, #34aff3 100%);
  border: none;
  box-shadow: 0 0 0 4px #e0e7ff, 0 0 30px rgba(224, 231, 255, 0.9), inset 0 0 25px rgba(224, 231, 255, 0.7);
  border-radius: 16px;
}
.best-box.special-style-celestial,
.history-card.special-style-celestial {
  border-radius: 24px;
}
.cardleaderboard-card.special-style-celestial::before,
.podium-place.special-style-celestial::before,
.best-box.special-style-celestial::before,
.history-card.special-style-celestial::before {
  content: '';
  position: absolute;
  top: -6px; left: -6px; right: -6px; bottom: -6px;
  border-radius: 16px;
  background: transparent;
  border: 1px solid rgba(224, 231, 255, 0.5);
  z-index: -1;
  animation: celestialSparklePulse 1s infinite alternate ease-in-out;
}
.best-box.special-style-celestial::before,
.history-card.special-style-celestial::before {
  border-radius: 24px;
}
.cardleaderboard-card.special-style-celestial::after,
.podium-place.special-style-celestial::after,
.best-box.special-style-celestial::after,
.history-card.special-style-celestial::after {
  content: '👑';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%) translateY(-50%) scale(1.5);
  color: #e0e7ff;
  font-size: 20px;
  text-shadow: 0 0 15px rgba(224, 231, 255, 1);
  z-index: 3;
  animation: celestialPulse 1.5s infinite alternate;
}
@keyframes celestialSparklePulse {
  0%, 100% { box-shadow: 0 0 30px rgba(224, 231, 255, 0.9), 0 0 60px rgba(224, 231, 255, 0.5) inset; }
  50% { box-shadow: 0 0 40px rgba(224, 231, 255, 1), 0 0 70px rgba(224, 231, 255, 0.6) inset; }
}
@keyframes celestialPulse {
  0% { transform: translateX(-50%) translateY(-50%) scale(1.5); }
  100% { transform: translateX(-50%) translateY(-50%) scale(1.8); }
}
.cardleaderboard-card.special-style-celestial .cardleaderboard-username,
.podium-place.special-style-celestial .podium-username {
  text-shadow: 0 0 8px rgba(224, 231, 255, 0.8);
}
/* Love Tier */
.cardleaderboard-card.special-style-love,
.podium-place.special-style-love,
.best-box.special-style-love,
.history-card.special-style-love {
  background: linear-gradient(135deg, rgba(255, 105, 180, 0.3), rgba(220, 20, 60, 0.3), rgba(255, 182, 193, 0.2));
  border: 4px double #ff69b4;
  border-radius: 16px;
  box-shadow: 0 0 25px rgba(255, 105, 180, 0.7), inset 0 0 18px rgba(255, 105, 180, 0.4);
}
.best-box.special-style-love,
.history-card.special-style-love {
  border-radius: 24px;
}
.cardleaderboard-card.special-style-love::before,
.podium-place.special-style-love::before,
.best-box.special-style-love::before,
.history-card.special-style-love::before {
  content: '';
  position: absolute;
  top: -6px; left: -6px; right: -6px; bottom: -6px;
  border-radius: 16px;
  background: transparent;
  border: 1px dotted rgba(255, 105, 180, 0.5);
  z-index: -1;
  animation: loveSparklePulse 2s infinite alternate ease-in-out;
}
.best-box.special-style-love::before,
.history-card.special-style-love::before {
  border-radius: 24px;
}
.cardleaderboard-card.special-style-love::after,
.podium-place.special-style-love::after,
.best-box.special-style-love::after,
.history-card.special-style-love::after {
  content: '❤️';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%) translateY(-50%) scale(1.5);
  color: #ff69b4;
  font-size: 20px;
  text-shadow: 0 0 12px rgba(255, 105, 180, 1);
  z-index: 3;
  animation: lovePulse 1.8s infinite alternate ease-in-out;
}
@keyframes lovePulse {
  0% { transform: translateX(-50%) translateY(-50%) scale(1.5); }
  100% { transform: translateX(-50%) translateY(-50%) scale(1.7); }
}
@keyframes loveSparklePulse {
  0%, 100% { box-shadow: 0 0 20px rgba(255, 105, 180, 0.6), 0 0 40px rgba(220, 20, 60, 0.2) inset; }
  50% { box-shadow: 0 0 30px rgba(255, 105, 180, 0.8), 0 0 50px rgba(220, 20, 60, 0.3) inset; }
}
.cardleaderboard-card.special-style-love .cardleaderboard-username,
.podium-place.special-style-love .podium-username {
  text-shadow: 0 0 8px rgba(255, 105, 180, 0.8);
}
/* Crimson Tier */
.cardleaderboard-card.special-style-crimson,
.podium-place.special-style-crimson,
.best-box.special-style-crimson,
.history-card.special-style-crimson {
  background: linear-gradient(135deg, rgba(139, 0, 0, 0.3), rgba(163, 0, 0, 0.3), rgba(75, 0, 130, 0.2));
  border: 4px double #FF4040;
  border-radius: 16px;
  box-shadow: 0 0 28px rgba(255, 64, 64, 0.9), inset 0 0 20px rgba(255, 64, 64, 0.5);
}
.best-box.special-style-crimson,
.history-card.special-style-crimson {
  border-radius: 24px;
}
.cardleaderboard-card.special-style-crimson::before,
.podium-place.special-style-crimson::before,
.best-box.special-style-crimson::before,
.history-card.special-style-crimson::before {
  content: '';
  position: absolute;
  top: -6px; left: -6px; right: -6px; bottom: -6px;
  border-radius: 16px;
  background: transparent;
  border: 1px dashed rgba(255, 64, 64, 0.4);
  z-index: -1;
  animation: crimsonSparklePulse 1.6s infinite alternate ease-in-out;
}
.best-box.special-style-crimson::before,
.history-card.special-style-crimson::before {
  border-radius: 24px;
}
.cardleaderboard-card.special-style-crimson::after,
.podium-place.special-style-crimson::after,
.best-box.special-style-crimson::after,
.history-card.special-style-crimson::after {
  content: '🔥';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%) translateY(-50%) scale(1.5);
  color: #FF4040;
  font-size: 20px;
  text-shadow: 0 0 12px rgba(255, 64, 64, 1);
  z-index: 3;
  animation: crimsonPulse 1.5s infinite alternate;
}
@keyframes crimsonPulse {
  0% { transform: translateX(-50%) translateY(-50%) scale(1.5); }
  100% { transform: translateX(-50%) translateY(-50%) scale(1.7); }
}
@keyframes crimsonSparklePulse {
  0%, 100% { box-shadow: 0 0 25px rgba(255, 64, 64, 0.8), 0 0 50px rgba(163, 0, 0, 0.3) inset; }
  50% { box-shadow: 0 0 35px rgba(255, 64, 64, 1), 0 0 60px rgba(163, 0, 0, 0.4) inset; }
}
.cardleaderboard-card.special-style-crimson .cardleaderboard-username,
.podium-place.special-style-crimson .podium-username {
  text-shadow: 0 0 8px rgba(255, 64, 64, 0.8);
}
/* Void Tier */
.cardleaderboard-card.special-style-void,
.podium-place.special-style-void,
.best-box.special-style-void,
.history-card.special-style-void {
  background: linear-gradient(135deg, rgba(10, 10, 10, 0.9), rgba(20, 25, 30, 0.7), rgba(30, 40, 50, 0.5));
  border: 3px ridge #d4d9ff;
  border-radius: 16px;
  box-shadow: 0 0 18px rgba(224, 231, 255, 0.5), inset 0 0 12px rgba(224, 231, 255, 0.3);
}
.best-box.special-style-void,
.history-card.special-style-void {
  border-radius: 24px;
}
.cardleaderboard-card.special-style-void::before,
.podium-place.special-style-void::before,
.best-box.special-style-void::before,
.history-card.special-style-void::before {
  content: '';
  position: absolute;
  top: -6px; left: -6px; right: -6px; bottom: -6px;
  border-radius: 16px;
  background: transparent;
  border: 1px solid rgba(224, 231, 255, 0.3);
  z-index: -1;
  animation: voidSparklePulse 2.2s infinite alternate ease-in-out;
}
.best-box.special-style-void::before,
.history-card.special-style-void::before {
  border-radius: 24px;
}
.cardleaderboard-card.special-style-void::after,
.podium-place.special-style-void::after,
.best-box.special-style-void::after,
.history-card.special-style-void::after {
  content: '🕳️';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%) translateY(-50%) scale(1.5);
  color: #d4d9ff;
  font-size: 20px;
  text-shadow: 0 0 10px rgba(224, 231, 255, 0.8);
  z-index: 3;
  animation: voidPulse 1.8s infinite alternate;
}
@keyframes voidPulse {
  0% { transform: translateX(-50%) translateY(-50%) scale(1.5); opacity: 0.8; }
  100% { transform: translateX(-50%) translateY(-50%) scale(1.7); opacity: 1; }
}
@keyframes voidSparklePulse {
  0%, 100% { box-shadow: 0 0 15px rgba(224, 231, 255, 0.4), 0 0 30px rgba(30, 40, 50, 0.2) inset; }
  50% { box-shadow: 0 0 25px rgba(224, 231, 255, 0.6), 0 0 40px rgba(30, 40, 50, 0.3) inset; }
}
.cardleaderboard-card.special-style-void .cardleaderboard-username,
.podium-place.special-style-void .podium-username {
  text-shadow: 0 0 8px rgba(224, 231, 255, 0.8);
}
/* Halloween Tier */
.cardleaderboard-card.special-style-halloween,
.podium-place.special-style-halloween,
.best-box.special-style-halloween,
.history-card.special-style-halloween {
  background: linear-gradient(135deg, rgba(153, 50, 204, 0.3), rgba(255, 140, 0, 0.3), rgba(0, 0, 0, 0.5));
  border: 4px double #ff8c00;
  border-radius: 16px;
  box-shadow: 0 0 25px rgba(255, 140, 0, 0.7), inset 0 0 18px rgba(255, 140, 0, 0.4);
}
.best-box.special-style-halloween,
.history-card.special-style-halloween {
  border-radius: 24px;
}
.cardleaderboard-card.special-style-halloween::before,
.podium-place.special-style-halloween::before,
.best-box.special-style-halloween::before,
.history-card.special-style-halloween::before {
  content: '';
  position: absolute;
  top: -6px; left: -6px; right: -6px; bottom: -6px;
  border-radius: 16px;
  background: transparent;
  border: 1px dotted rgba(192, 103, 0, 0.5);
  z-index: -1;
  animation: halloweenSparklePulse 2s infinite alternate ease-in-out;
}
.best-box.special-style-halloween::before,
.history-card.special-style-halloween::before {
  border-radius: 24px;
}
.cardleaderboard-card.special-style-halloween::after,
.podium-place.special-style-halloween::after,
.best-box.special-style-halloween::after,
.history-card.special-style-halloween::after {
  content: '🎃';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%) translateY(-50%) scale(1.5);
  color: #ff8c00;
  font-size: 20px;
  text-shadow: 0 0 12px rgba(255, 140, 0, 1);
  z-index: 3;
  animation: halloweenPulse 1.8s infinite alternate ease-in-out;
}
@keyframes halloweenPulse {
  0% { transform: translateX(-50%) translateY(-50%) scale(1.5); }
  100% { transform: translateX(-50%) translateY(-50%) scale(1.7); }
}
@keyframes halloweenSparklePulse {
  0%, 100% { box-shadow: 0 0 20px rgba(255, 140, 0, 0.6), 0 0 40px rgba(153, 50, 204, 0.2) inset; }
  50% { box-shadow: 0 0 30px rgba(255, 140, 0, 0.8), 0 0 50px rgba(153, 50, 204, 0.3) inset; }
}
.cardleaderboard-card.special-style-halloween .cardleaderboard-username,
.podium-place.special-style-halloween .podium-username {
  text-shadow: 0 0 8px rgba(255, 140, 0, 0.8);
}
/* Refined Christmas Tier - Red Dominant with Gold Accents */
.cardleaderboard-card.special-style-christmas,
.podium-place.special-style-christmas,
.best-box.special-style-christmas,
.history-card.special-style-christmas {
  background: linear-gradient(135deg, rgba(139, 0, 0, 0.5), rgba(178, 34, 34, 0.45), rgba(255, 255, 255, 0.1));
  border: 4px double #d4af37; /* Elegant gold border */
  border-radius: 16px;
  box-shadow: 0 0 30px rgba(255, 0, 0, 0.7), inset 0 0 20px rgba(255, 255, 255, 0.4);
}

.best-box.special-style-christmas,
.history-card.special-style-christmas {
  border-radius: 24px;
}

.cardleaderboard-card.special-style-christmas::before,
.podium-place.special-style-christmas::before,
.best-box.special-style-christmas::before,
.history-card.special-style-christmas::before {
  content: '';
  position: absolute;
  top: -6px; left: -6px; right: -6px; bottom: -6px;
  border-radius: 16px;
  background: transparent;
  border: 2px dotted rgba(255, 255, 255, 0.8); /* Snowy white dotted glow */
  z-index: -1;
  animation: christmasSnowSparkle 4s infinite ease-in-out;
}

.best-box.special-style-christmas::before,
.history-card.special-style-christmas::before {
  border-radius: 24px;
}

.cardleaderboard-card.special-style-christmas::after,
.podium-place.special-style-christmas::after,
.best-box.special-style-christmas::after,
.history-card.special-style-christmas::after {
  content: '🎄⭐'; /* Tree with gold star */
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%) translateY(-50%) scale(1.4);
  color: #d4af37; /* Gold */
  font-size: 22px;
  text-shadow: 0 0 15px rgba(255, 255, 255, 1), 0 0 25px rgba(255, 0, 0, 0.8);
  z-index: 3;
  animation: christmasGentlePulse 3s infinite ease-in-out;
}

@keyframes christmasGentlePulse {
  0% { transform: translateX(-50%) translateY(-50%) scale(1.4) translateY(0); opacity: 1; }
  50% { transform: translateX(-50%) translateY(-50%) scale(1.55) translateY(-10px); opacity: 0.9; }
  100% { transform: translateX(-50%) translateY(-50%) scale(1.4) translateY(0); opacity: 1; }
}

@keyframes christmasSnowSparkle {
  0%, 100% { box-shadow: 0 0 20px rgba(255, 255, 255, 0.8), inset 0 0 30px rgba(212, 175, 55, 0.2); }
  50% { box-shadow: 0 0 35px rgba(255, 255, 255, 1), inset 0 0 45px rgba(212, 175, 55, 0.4); }
}

.cardleaderboard-card.special-style-christmas .cardleaderboard-username,
.podium-place.special-style-christmas .podium-username {
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.9), 0 0 20px rgba(255, 215, 0, 0.7);
}
/* Twitch Tier */
.cardleaderboard-card.special-style-twitch,
.podium-place.special-style-twitch,
.best-box.special-style-twitch,
.history-card.special-style-twitch {
  background: linear-gradient(135deg, rgba(145, 70, 255, 0.25), rgba(99, 48, 179, 0.45));
  border: 4px double #9146FF;
  border-radius: 16px;
  box-shadow: 0 0 28px rgba(145, 70, 255, 1), inset 0 0 22px rgba(145, 70, 255, 0.7);
}
.best-box.special-style-twitch,
.history-card.special-style-twitch {
  border-radius: 24px;
}
.cardleaderboard-card.special-style-twitch::before,
.podium-place.special-style-twitch::before,
.best-box.special-style-twitch::before,
.history-card.special-style-twitch::before {
  content: '';
  position: absolute;
  top: -6px; left: -6px; right: -6px; bottom: -6px;
  border-radius: 16px;
  background: transparent;
  border: 1px dashed rgba(145, 70, 255, 0.5);
  z-index: -1;
  animation: twitchGlowPulse 1.6s infinite alternate ease-in-out;
}
.best-box.special-style-twitch::before,
.history-card.special-style-twitch::before {
  border-radius: 24px;
}
.cardleaderboard-card.special-style-twitch::after,
.podium-place.special-style-twitch::after,
.best-box.special-style-twitch::after,
.history-card.special-style-twitch::after {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  width: 32px;
  height: 32px;
  background: url("https://www.svgrepo.com/show/448251/twitch.svg") center/contain no-repeat;
  transform: translateX(-50%) translateY(-50%) scale(1.5);
  z-index: 3;
  animation: twitchPulse 1.5s infinite alternate;
}
@keyframes twitchPulse {
  0% { transform: translateX(-50%) translateY(-50%) scale(1.5); }
  100% { transform: translateX(-50%) translateY(-50%) scale(1.8); }
}
@keyframes twitchGlowPulse {
  0%, 100% { box-shadow: 0 0 25px rgba(145, 70, 255, 0.8), 0 0 50px rgba(145, 70, 255, 0.4) inset; }
  50% { box-shadow: 0 0 35px rgba(145, 70, 255, 1), 0 0 60px rgba(145, 70, 255, 0.5) inset; }
}
.cardleaderboard-card.special-style-twitch .cardleaderboard-username,
.podium-place.special-style-twitch .podium-username {
  text-shadow: 0 0 8px rgba(145, 70, 255, 0.8);
}
/* USD Tycoon Tier */
.cardleaderboard-card.special-style-usd,
.podium-place.special-style-usd,
.best-box.special-style-usd,
.history-card.special-style-usd {
  background: linear-gradient(135deg, rgba(240, 249, 255, 0.28), rgba(220, 252, 231, 0.22), rgba(167, 243, 208, 0.18));
  border: 4px double #34d399;
  border-radius: 16px;
  box-shadow: 0 0 38px rgba(52, 211, 153, 0.95), 0 0 65px rgba(255, 255, 255, 0.65), inset 0 0 30px rgba(255, 255, 255, 0.45), inset 0 0 15px rgba(52, 211, 153, 0.3);
  position: relative;
  overflow: visible;
}
.best-box.special-style-usd,
.history-card.special-style-usd {
  border-radius: 24px;
}
.cardleaderboard-card.special-style-usd::before,
.podium-place.special-style-usd::before,
.best-box.special-style-usd::before,
.history-card.special-style-usd::before {
  content: '';
  position: absolute;
  top: -6px; left: -6px; right: -6px; bottom: -6px;
  border-radius: 16px;
  background: transparent;
  border: 1px dashed rgba(52, 211, 153, 0.65);
  z-index: -1;
  animation: usdGlowPulse 1.8s infinite ease-in-out;
}
.best-box.special-style-usd::before,
.history-card.special-style-usd::before {
  border-radius: 24px;
}
.cardleaderboard-card.special-style-usd::after,
.podium-place.special-style-usd::after,
.best-box.special-style-usd::after,
.history-card.special-style-usd::after {
  content: '$';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%) translateY(-50%) scale(1.5);
  font-family: 'Georgia', serif;
  font-weight: 900;
  font-size: 32px;
  color: #ffffff;
  text-shadow: 0 0 12px #34d399, 0 0 24px #34d399, 0 0 36px #ffffff, 0 1px 0 #065f46, 1px 0 0 #065f46, -1px 0 0 #065f46, 0 -1px 0 #065f46;
   z-index: 3;
  animation: usdPulse 1.5s infinite alternate ease-in-out;
}
@keyframes usdPulse {
  0% { transform: translateX(-50%) translateY(-50%) scale(1.5); }
  100% { transform: translateX(-50%) translateY(-50%) scale(1.7); }
}
@keyframes usdGlowPulse {
  0%, 100% { box-shadow: 0 0 32px rgba(52, 211, 153, 0.9), 0 0 70px rgba(255, 255, 255, 0.4) inset; }
  50% { box-shadow: 0 0 48px rgba(52, 211, 153, 1), 0 0 90px rgba(255, 255, 255, 0.55) inset; }
}
.cardleaderboard-card.special-style-usd .cardleaderboard-username,
.podium-place.special-style-usd .podium-username {
  background: linear-gradient(90deg, #ffffff, #ecfdf5, #ffffff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 10px rgba(52, 211, 153, 0.8), 0 0 20px rgba(255, 255, 255, 0.6);
  font-weight: 900;
}
/* Floating $ signs for USD */
.cardleaderboard-card.special-style-usd .bling-usd,
.podium-place.special-style-usd .bling-usd,
.best-box.special-style-usd .bling-usd,
.history-card.special-style-usd .bling-usd {
  position: absolute;
  font-size: 16px;
  color: #ffffff;
  text-shadow: 0 0 8px #34d399, 0 0 16px #ffffff;
  pointer-events: none;
  opacity: 0;
  z-index: 2;
  animation: cashDrift 3.8s ease-in-out infinite;
}
@keyframes cashDrift {
  0% { transform: translateY(-130%) translateX(-18px) rotate(0deg); opacity: 0; }
  12% { opacity: 0.8; }
  88% { opacity: 0.6; }
  100% { transform: translateY(190%) translateX(22px) rotate(360deg); opacity: 0; }
}
.cardleaderboard-card.special-style-usd .bling-usd:nth-child(1),
.podium-place.special-style-usd .bling-usd:nth-child(1),
.best-box.special-style-usd .bling-usd:nth-child(1),
.history-card.special-style-usd .bling-usd:nth-child(1) { left: 18%; animation-delay: 0s; }
.cardleaderboard-card.special-style-usd .bling-usd:nth-child(2),
.podium-place.special-style-usd .bling-usd:nth-child(2),
.best-box.special-style-usd .bling-usd:nth-child(2),
.history-card.special-style-usd .bling-usd:nth-child(2) { left: 38%; animation-delay: 0.95s; }
.cardleaderboard-card.special-style-usd .bling-usd:nth-child(3),
.podium-place.special-style-usd .bling-usd:nth-child(3),
.best-box.special-style-usd .bling-usd:nth-child(3),
.history-card.special-style-usd .bling-usd:nth-child(3) { left: 58%; animation-delay: 1.9s; }
.cardleaderboard-card.special-style-usd .bling-usd:nth-child(4),
.podium-place.special-style-usd .bling-usd:nth-child(4),
.best-box.special-style-usd .bling-usd:nth-child(4),
.history-card.special-style-usd .bling-usd:nth-child(4) { left: 78%; animation-delay: 0.45s; }
/* Region Buttons */
.region-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}
.region-btn {
  padding: 0.5rem 1rem;
  font-size: 1rem;
  border-radius: 8px;
  border: none;
  background: #12121c;
  color: var(--primary);
  font-weight: bold;
  box-shadow: inset 0 0 5px rgba(0, 188, 212, 0.22);
  cursor: pointer;
  transition: all 0.3s ease;
}
.region-btn:hover {
  box-shadow: inset 0 0 8px rgba(0, 188, 212, 0.44);
}
.region-btn.selected {
  background: var(--primary);
  color: #12121c;
}
.region-btn:focus {
  outline: none;
}
/* Fade-in animation */
.fadein {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInCard 0.4s forwards;
}
@keyframes fadeInCard {
  to { opacity: 1; transform: translateY(0); }
}
/* Profile / History username tooltips */
.profile-username .tooltip-badge,
.history-username .tooltip-badge,
#modal-username .tooltip-badge {
  position: relative;
  display: inline-block;
  z-index: 3;
}
/* Allow clicks to pass through the full-card hover badge to underlying links */
.tooltip-badge,
.updated-tooltip-badge {
  pointer-events: none !important;
}

.tooltip-badge .tooltiptext,
.tooltip-badge .tooltiptext-updated,
.tooltip-badge .tooltiptext-donor-podium {
  pointer-events: auto; /* But allow interaction with the tooltip itself if needed */
}
/* Full-card hover area for "Updated" tooltip on BOTH cards and podium */
.cardleaderboard-card .tooltip-badge,
.podium-place .tooltip-badge {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 2; /* Below donor badge */
  border-radius: 16px;
  pointer-events: none; /* Crucial: allows clicks on username */
}

/* "Updated" tooltip - BELOW the card (consistent for both) */
.tooltiptext {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  top: calc(100% + 8px); /* Below */
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  background: rgba(20, 20, 40, 0.92);
  color: #aaa;
  font-size: 0.8rem;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--primary);
  box-shadow: 0 0 10px rgba(0, 255, 234, 0.3);
  pointer-events: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  z-index: 9999;
}

.tooltiptext::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-bottom-color: var(--primary);
}

/* Show on hover anywhere on the card/podium */
.cardleaderboard-card:hover .tooltip-badge .tooltiptext,
.podium-place:hover .tooltip-badge .tooltiptext {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) scale(1);
}
/* === UNIFIED COOL HEADER + NAV === */
.site-header {
  background: linear-gradient(to bottom, rgba(15,15,26,1), rgba(15,15,26,0.85));
  padding: 2.5rem 0 2rem;
  text-align: center;
  border-bottom: 2px solid rgba(0,255,234,0.2);
  box-shadow: 0 4px 20px rgba(0,255,234,0.15);
}

.header-inner {
  max-width: var(--max-content-width);
  margin: 0 auto;
  padding: 0 1rem;
}

.page-title {
  font-size: 3.4rem;
  font-weight: 700;
  color: var(--primary);
  text-shadow: 0 0 20px rgba(0,255,234,0.8), 0 0 40px rgba(0,255,234,0.4);
  margin: 0;
  letter-spacing: 4px;
  animation: glowPulse 4s infinite alternate ease-in-out;
}

@keyframes glowPulse {
  0% { text-shadow: 0 0 20px rgba(0,255,234,0.8), 0 0 40px rgba(0,255,234,0.4); }
  100% { text-shadow: 0 0 25px rgba(0,255,234,1), 0 0 50px rgba(0,255,234,0.5); }
}
/* === NAV WITH MANUAL EMOJI ICONS - Text on hover === */
.site-nav {
  background: rgba(15,15,26,0.9);
  backdrop-filter: blur(8px);
  padding: 1rem 0;
  border-bottom: 1px solid rgba(0,255,234,0.1);
}

.site-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  gap: 4rem;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0.8rem 1rem;
  border-radius: 16px;
  transition: all 0.4s ease, gap 0.4s ease;
  overflow: hidden;
}

.site-nav .nav-icon {
  font-size: 2rem; /* Bigger for emoji */
  transition: transform 0.4s ease;
}

.site-nav .nav-text {
  opacity: 0;
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: opacity 0.4s ease, max-width 0.4s ease;
}

/* Hover & active */
.site-nav a:hover,
.site-nav a.active {
  color: var(--secondary);
  background: rgba(0,255,234,0.12);
  text-shadow: 0 0 12px var(--secondary);
  gap: 0.8rem;
  transform: translateY(-3px);
}

.site-nav a:hover .nav-text,
.site-nav a.active .nav-text {
  opacity: 1;
  max-width: 200px;
}

.site-nav a:hover .nav-icon,
.site-nav a.active .nav-icon {
  transform: scale(1.15) translateY(-3px);
}

/* No focus outline */
.site-nav a:focus {
  outline: none;
}

.site-nav a:focus-visible {
  box-shadow: 0 0 0 3px rgba(0,255,234,0.3);
}

/* Mobile: always show text */
@media (max-width: 768px) {
  .site-nav a {
    gap: 0.6rem;
  }
  .site-nav .nav-text {
    opacity: 1;
    max-width: 200px;
  }
}
.podium-message {
    font-size: 16px;
}
/* === TEMPORARY CHRISTMAS SITE-WIDE THEME - REMOVE AFTER HOLIDAYS === */
body.christmas-mode {
  --primary: #66df5f;     /* Festive red instead of cyan */
  --secondary: #ffd700;   /* Gold instead of pink */
  --accent: #ffffff;      /* White/snow */
  --bg-dark: #0f0f1a;     /* Slightly darker for contrast */
  --bg-card: #1a0f1a;     /* Subtle red tint */
  background: linear-gradient(to bottom, #0a0a1a, #1a0f1a), url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="%23fff" opacity="0.4"/><circle cx="20" cy="80" r="1.5" fill="%23fff" opacity="0.6"/><circle cx="80" cy="30" r="1" fill="%23fff" opacity="0.5"/></svg>') repeat; /* Subtle falling snow effect */
  background-size: cover, 100px 100px;
}

body.christmas-mode .site-header {
  border-bottom: 2px solid #ffd700;
  box-shadow: 0 4px 30px rgba(255, 215, 0, 0.3);
}

body.christmas-mode .page-title {
  color: #66df5f;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.8), 0 0 40px rgba(255, 215, 0, 0.6);
}

body.christmas-mode .btn {
  background: linear-gradient(90deg, #66df5f, #ffd700);
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.7);
}

body.christmas-mode .site-nav a:hover,
body.christmas-mode .site-nav a.active {
  color: #ffffff;
  text-shadow: 0 0 12px #ffd700;
}