:root {
  /* Core Colors */
  --primary: #7e3cff;
  --primary-light: #b78cff;
  --primary-dark: #5d27b7;
  --accent-gold: #f0c35a;
  --accent-gold-light: #ffefba;
  --bg-deep: #120926;
  --bg-surface: rgba(255, 255, 255, 0.07);
  --text-main: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.65);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-glow: rgba(126, 60, 255, 0.25);

  /* Gradients */
  --purple-gradient: linear-gradient(135deg, #8a4dff 0%, #c4a1ff 100%);
  --gold-gradient: linear-gradient(135deg, #f3cd75 0%, #fff3cf 100%);
  --dark-gradient: linear-gradient(180deg, #1e0e45 0%, #120926 100%);
  --hero-rad-gradient: radial-gradient(circle at 50% -20%, #5127a3 0%, #120926 80%);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: 'Outfit', 'Noto Sans JP', sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

.container {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  background: var(--dark-gradient);
  padding-bottom: 50px;
}

/* Background Decorations */
.bg-decor {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.decor-orb {
  position: absolute;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(126, 60, 255, 0.12) 0%, transparent 70%);
  filter: blur(40px);
  border-radius: 50%;
  animation: float 20s infinite alternate ease-in-out;
}

.decor-orb-1 { top: -100px; right: -50px; }
.decor-orb-2 { top: 40%; left: -100px; animation-delay: -5s; }

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, 50px) scale(1.1); }
}

/* Glassmorphism Base */
.glass-card {
  background: var(--bg-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 1;
}

.gold-border-card {
  border: 1px solid rgba(240, 195, 90, 0.3);
  box-shadow: 0 4px 20px rgba(240, 195, 90, 0.1);
}

/* Hero Section */
.hero {
  padding: 50px 24px 30px;
  text-align: center;
  background: 
    linear-gradient(180deg, rgba(10, 5, 26, 0.4) 0%, rgba(10, 5, 26, 0.8) 100%),
    url('https://i.ibb.co/pYd2z29/BG.png') center/cover no-repeat;
  position: relative;
  overflow: hidden;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.hero-logo-container {
  margin-bottom: 12px;
  perspective: 1000px;
}

.hero-logo {
  max-width: 220px;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 0 15px rgba(126, 60, 255, 0.4));
  animation: logoFloat 6s infinite ease-in-out;
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0) rotateX(0); }
  50% { transform: translateY(-8px) rotateX(2deg); }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(90deg, transparent, rgba(240, 195, 90, 0.15), transparent);
  padding: 6px 24px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 1000;
  letter-spacing: 0.25em;
  margin-bottom: 16px;
  color: var(--accent-gold);
  text-transform: uppercase;
  position: relative;
  text-shadow: 0 0 10px rgba(240, 195, 90, 0.5);
}

.hero-schedule-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  letter-spacing: 0.1em;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0.8;
}

.hero-schedule-time span {
  color: var(--accent-gold);
  font-weight: 800;
}

.hero-badge::before,
.hero-badge::after {
  content: '';
  width: 40px;
  height: 1px;
  background: var(--gold-gradient);
  opacity: 0.6;
}

.hero-title {
  font-size: 42px;
  font-weight: 1000;
  line-height: 1;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.title-gradient {
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 10px rgba(240, 195, 90, 0.4));
}

.hero-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  max-width: 280px;
  margin: 0 auto;
  opacity: 0.8;
}

/* Info Grid / Summary Cards */
.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 24px;
}

.info-item {
  background: rgba(255, 255, 255, 0.03);
  padding: 12px 8px;
  border-radius: 16px;
  border: 1px solid var(--glass-border);
}

.info-label {
  display: block;
  font-size: 9px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.info-value {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: var(--accent-gold);
}

/* Tab Navigation */
.tab-navbar {
  display: flex;
  background: rgba(10, 5, 26, 0.85);
  margin: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.tab-item {
  flex: 1;
  text-align: center;
  padding: 16px 0;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-muted);
  cursor: pointer;
  letter-spacing: 1px;
  position: relative;
  transition: color 0.3s;
}

.tab-item.active {
  color: var(--accent-gold);
}

.tab-item.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 15%;
  right: 15%;
  height: 3px;
  background: var(--gold-gradient);
  border-radius: 3px 3px 0 0;
  box-shadow: 0 -2px 10px rgba(240, 195, 90, 0.5);
}

/* Section Common */
.section-title {
  font-size: 18px;
  font-weight: 900;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title::before {
  content: '';
  width: 4px;
  height: 18px;
  background: var(--gold-gradient);
  border-radius: 2px;
}

.tab-content {
  display: none;
  animation: slideUp 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  padding: 20px 16px 0;
}

.tab-content.active { display: block; }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- ABOUT TAB SPECIFIC --- */

/* Journey Map (Modern Flow) */
.journey-map {
  position: relative;
  padding-left: 24px;
  margin-top: 10px;
}

.journey-map::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent-gold), var(--primary), var(--accent-gold));
  opacity: 0.3;
}

.journey-node {
  position: relative;
  margin-bottom: 30px;
}

.journey-node::before {
  content: '';
  position: absolute;
  left: -22px;
  top: 4px;
  width: 10px;
  height: 10px;
  background: var(--bg-deep);
  border: 2px solid var(--accent-gold);
  border-radius: 50%;
  z-index: 2;
  box-shadow: 0 0 10px var(--accent-gold);
}

.journey-label {
  font-size: 10px;
  font-weight: 1000;
  color: var(--accent-gold);
  text-transform: uppercase;
  margin-bottom: 6px;
  letter-spacing: 1px;
}

.journey-box {
  background: rgba(255, 255, 255, 0.03);
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--glass-border);
}

.journey-box h4 { font-size: 15px; margin-bottom: 4px; color: #fff; }
.journey-box p { font-size: 12px; color: var(--text-muted); line-height: 1.5; }

/* Route Comparison */
.routes-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.route-panel {
  padding: 20px 12px;
  border-radius: 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.route-panel.gold { 
  background: linear-gradient(135deg, rgba(240, 195, 90, 0.2) 0%, rgba(240, 195, 90, 0.03) 100%); 
  border: 1px solid rgba(240, 195, 90, 0.3); 
}
.route-panel.purple { 
  background: linear-gradient(135deg, rgba(126, 60, 255, 0.2) 0%, rgba(126, 60, 255, 0.03) 100%); 
  border: 1px solid rgba(126, 60, 255, 0.3); 
}

.route-tag { font-size: 9px; font-weight: 900; opacity: 0.8; margin-bottom: 8px; display: block; color: #fff; }
.route-slots { font-size: 32px; font-weight: 1000; line-height: 1; margin: 4px 0; color: #fff; text-shadow: 0 0 10px rgba(255,255,255,0.2); }
.route-slots span { font-size: 13px; font-weight: 700; margin-left: 2px; }
.route-desc { font-size: 11px; line-height: 1.4; margin-top: 10px; color: var(--text-muted); }

/* Bonus Cards */
.bonus-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bonus-card {
  display: flex;
  gap: 16px;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  padding: 16px;
  border-radius: 20px;
}

.bonus-icon {
  width: 44px;
  height: 44px;
  background: rgba(126, 60, 255, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.bonus-content h4 { font-size: 14px; margin-bottom: 2px; color: var(--accent-gold-light); }
.bonus-content p { font-size: 11px; color: var(--text-muted); }

/* --- RANKING TAB SPECIFIC --- */

/* Podium TOP 3 */
.podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 16px;
  padding: 30px 10px 10px;
  margin-bottom: 30px;
  box-sizing: border-box;
}

.podium-item {
  flex: 1;
  text-align: center;
  position: relative;
  min-width: 0; /* Important for flex content truncation */
}

.rank-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  margin: 0 auto 8px;
  border: 2px solid var(--glass-border);
  position: relative;
  background: #222;
  box-shadow: 0 5px 15px rgba(0,0,0,0.4);
}

.rank-crown {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 16px;
  filter: drop-shadow(0 0 5px rgba(0,0,0,0.5));
}

.podium-item.rank-1 { transform: scale(1.1); z-index: 2; }
.podium-item.rank-1 .rank-avatar { width: 70px; height: 70px; border-color: var(--accent-gold); box-shadow: 0 0 20px rgba(240, 195, 90, 0.4); }
.podium-item.rank-1 .rank-crown { font-size: 24px; top: -18px; }
.podium-item.rank-2 .rank-avatar { border-color: #c0c0c0; }
.podium-item.rank-3 .rank-avatar { border-color: #cd7f32; }

.rank-name { 
  font-size: 10px; 
  font-weight: 1000; 
  display: block; 
  white-space: nowrap; 
  overflow: hidden; 
  text-overflow: ellipsis; 
  margin-bottom: 4px;
  max-width: 100%;
  padding: 0 4px;
  box-sizing: border-box;
}

.rank-score { 
  font-size: 9px; 
  color: var(--accent-gold); 
  font-weight: 800; 
  background: rgba(240,195,90,0.1); 
  padding: 2px 6px; 
  border-radius: 4px; 
  display: inline-block;
  max-width: 95%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.podium-base {
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  margin-top: 8px;
}

.podium-item.rank-1 .podium-base { background: var(--gold-gradient); box-shadow: 0 0 10px rgba(240, 195, 90, 0.3); }

/* Status Bar */
.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.phrase-badge {
  background: var(--purple-gradient);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 1000;
  color: #fff;
  box-shadow: 0 4px 12px rgba(126, 60, 255, 0.3);
}

.period-info {
  text-align: right;
}

.period-label { font-size: 9px; color: var(--text-muted); display: block; }
.period-value { font-size: 11px; font-weight: 800; color: #fff; }

/* Tournament Board */
.slots-container {
  margin-top: 10px;
}

.slots-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.slot-item {
  aspect-ratio: 1;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.3s;
  overflow: hidden;
}

.slot-item.route-score {
  border-style: dashed;
  background: rgba(126, 60, 255, 0.05);
}

.slot-label { font-size: 8px; color: var(--text-muted); text-align: center; line-height: 1.2; word-break: break-all; padding: 0 4px; z-index: 2; position: relative; }

.slot-item.locked::before {
  content: '🔒';
  font-size: 10px;
  opacity: 0.2;
  margin-bottom: 2px;
}

/* Unlocked Slot (Winner exists) */
.slot-item.unlocked {
  border-color: var(--accent-gold);
  background: var(--bg-deep);
  box-shadow: 0 0 15px rgba(240, 195, 90, 0.3);
}

.slot-avatar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
  z-index: 1;
}

.slot-item.unlocked .slot-label {
  color: #fff;
  font-weight: 1000;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
  background: rgba(0,0,0,0.4);
  width: 100%;
  padding: 2px 0;
  position: absolute;
  bottom: 0;
}

.slot-item.unlocked::before { display: none; }

/* Ranking Row in Next Star League */
.ranking-list-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 15px;
}

.ranking-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border: 1px solid var(--glass-border);
}

.rank-number {
  font-size: 14px;
  font-weight: 1000;
  width: 24px;
  text-align: center;
  color: var(--text-muted);
}

.rank-number.top-rank { color: var(--accent-gold); }

.user-thumb {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #333;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,0.1);
}

.user-info { flex: 1; }
.user-name { font-size: 13px; font-weight: 800; color: #fff; }
.user-score { font-size: 11px; color: var(--accent-gold); font-weight: 900; }

/* Legend */
.legend {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  justify-content: center;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--text-muted);
}

.dot { width: 8px; height: 8px; border-radius: 2px; }

/* FAQ & Footer */
.faq-item { margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.faq-item:last-child { border-bottom: none; }
.faq-q { color: var(--accent-gold); font-size: 14px; font-weight: 900; margin-bottom: 6px; display: flex; gap: 6px; }
.faq-q::before { content: 'Q.'; }
.faq-a { color: var(--text-muted); font-size: 12px; line-height: 1.7; }

.footer { text-align: center; padding: 50px 0 80px; }
.footer p { font-size: 10px; color: var(--text-muted); opacity: 0.4; line-height: 1.8; }

/* CTA Area */
.cta-box {
  background: var(--purple-gradient);
  padding: 30px 20px;
  border-radius: 28px;
  text-align: center;
  margin: 30px 0;
  box-shadow: 0 20px 40px rgba(126, 60, 255, 0.3);
  position: relative;
  overflow: hidden;
}

.cta-box h3 { font-size: 18px; font-weight: 1000; margin-bottom: 6px; line-height: 1.3; }
.cta-box p { font-size: 12px; opacity: 0.9; margin-bottom: 20px; }

.cta-btn {
  display: inline-block;
  background: #fff;
  color: var(--primary);
  padding: 14px 32px;
  border-radius: 999px;
  font-weight: 1000;
  text-decoration: none;
  font-size: 14px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  transition: transform 0.2s;
}

/* Reward specific styles */
.reward-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.reward-card-simple {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.03);
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s;
}

/* Highlighted (Top) Reward Card */
.reward-card-highlight {
  background: linear-gradient(135deg, rgba(240, 195, 90, 0.15) 0%, rgba(126, 60, 255, 0.1) 100%);
  border: 1px solid rgba(240, 195, 90, 0.5);
  box-shadow: 0 0 20px rgba(240, 195, 90, 0.15), inset 0 0 10px rgba(240, 195, 90, 0.1);
  padding: 18px 14px;
}

.reward-card-highlight::after {
  content: '';
  position: absolute;
  top: -100%;
  left: -100%;
  width: 50%;
  height: 300%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(45deg);
  animation: rewardShine 4s infinite;
}

@keyframes rewardShine {
  0% { left: -100%; top: -100%; }
  20%, 100% { left: 100%; top: 100%; }
}

.reward-card-highlight:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 10px 30px rgba(240, 195, 90, 0.3);
}

.reward-rank {
  font-size: 11px;
  font-weight: 1000;
  width: 56px;
  height: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
  line-height: 1.1;
  text-align: center;
  gap: 1px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.1);
}

.reward-rank.gold { 
  background: linear-gradient(135deg, #fceabb 0%, #f1da36 50%, #f1da36 51%, #fceabb 100%);
  color: #5c4100;
  text-shadow: 0 1px 0 rgba(255,255,255,0.4);
}
.reward-rank.silver { 
  background: linear-gradient(135deg, #f5f7fa 0%, #b8c6db 100%);
  color: #2c3e50;
}
.reward-rank.bronze { 
  background: linear-gradient(135deg, #e6b980 0%, #eacda3 100%);
  color: #3e2723;
}

.reward-text h4 { font-size: 14px; font-weight: 1000; margin-bottom: 4px; letter-spacing: -0.02em; }
.reward-text p { font-size: 11px; color: var(--text-muted); line-height: 1.4; }

.price-tag {
  font-size: 16px;
  font-weight: 1000;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
  filter: drop-shadow(0 0 5px rgba(240, 195, 90, 0.2));
}

.prize-large {
  font-size: 20px;
  display: block;
  margin-top: 4px;
}

/* Rule specific styles */
.rule-summary-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  padding: 20px;
  border-radius: 20px;
  margin-bottom: 20px;
}

.rule-summary-card h3 {
  font-size: 16px;
  margin-bottom: 8px;
  color: var(--accent-gold);
}

.rule-summary-card p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.rule-points {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rule-point-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.rule-point-badge {
  background: rgba(240, 195, 90, 0.1);
  color: var(--accent-gold);
  font-size: 10px;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 2px;
}

.rule-point-text {
  font-size: 11px;
  color: #fff;
  line-height: 1.5;
}

/* Overview Slider Styles */
.overview-slider-section {
  padding-bottom: 24px;
}

.slider-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: 16px;
}

.overview-slider {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.overview-slider::-webkit-scrollbar {
  display: none;
}

.slide {
  flex: 0 0 100%;
  width: 100%;
  scroll-snap-align: start;
}

.slide img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}

.slider-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
}

.dot.active {
  background: var(--accent-gold);
  transform: scale(1.2);
  box-shadow: 0 0 10px rgba(240, 195, 90, 0.4);
}

/* Lightbox Modal Styles */
.lightbox {
  display: none;
  position: fixed;
  z-index: 2000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity 0.3s ease;
  align-items: center;
  justify-content: center;
}

.lightbox.active {
  display: flex;
  opacity: 1;
}

.lightbox-content-container {
  max-width: 90%;
  max-height: 90%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-content {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.lightbox.active .lightbox-content {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 2001;
  transition: color 0.3s ease;
}

.lightbox-close:hover {
  color: var(--accent-gold);
}

/* Lightbox Navigation Styles */
.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: 30px;
  font-weight: bold;
  padding: 20px;
  cursor: pointer;
  z-index: 2005;
  user-select: none;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.lightbox-arrow:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--accent-gold);
  border-color: var(--accent-gold);
}

.lightbox-arrow.prev { left: 20px; }
.lightbox-arrow.next { right: 20px; }

.lightbox-counter {
  position: absolute;
  top: 25px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  background: rgba(0, 0, 0, 0.5);
  padding: 4px 12px;
  border-radius: 20px;
  z-index: 2001;
  letter-spacing: 1px;
}

/* Mobile adjustments for lightbox */
@media screen and (max-width: 480px) {
  .lightbox-arrow {
    padding: 10px;
    width: 44px;
    height: 44px;
    font-size: 20px;
  }
  .lightbox-arrow.prev { left: 10px; }
  .lightbox-arrow.next { right: 10px; }
  .lightbox-close { right: 20px; }
}

/* Modal: Detailed Ranking */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 3000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active { display: flex; }

.modal-content {
  width: 100%;
  max-width: 600px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--accent-gold);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 { font-size: 16px; color: var(--accent-gold); margin: 0; }
.modal-close { background: none; border: none; color: #fff; font-size: 32px; cursor: pointer; }

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px 16px 16px; /* more right padding */
}

/* Custom scrollbar for better visibility/less overlap */
.modal-body::-webkit-scrollbar { width: 5px; }
.modal-body::-webkit-scrollbar-track { background: transparent; }
.modal-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }
.modal-body::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

.modal-subtitle {
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 15px;
  text-align: center;
}

.table-scroll {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.detailed-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  white-space: nowrap;
}

.detailed-table th {
  background: rgba(126, 60, 255, 0.1);
  color: var(--primary-light);
  padding: 12px 8px;
  text-align: center;
  font-weight: 800;
  position: sticky;
  top: 0;
  z-index: 10;
}

.detailed-table td {
  padding: 12px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  text-align: center;
  color: #fff;
}

.detailed-table tr:nth-child(even) { background: rgba(255, 255, 255, 0.02); }

.detailed-table .sticky-col {
  position: sticky;
  left: 0;
  background: #110822; /* Deepened to match modal bg more closely */
  z-index: 5;
  text-align: left;
  padding-left: 12px;
  max-width: 120px; /* narrowed */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detailed-table th.sticky-col { z-index: 15; }

.detailed-table .rank-col { color: var(--accent-gold); font-weight: 900; min-width: 40px; }
.detailed-table .total-col { 
  color: var(--accent-gold); 
  font-weight: 1000; 
  background: rgba(240, 195, 90, 0.05); 
  min-width: 90px; /* ensured width */
  padding-right: 12px;
}

/* Buttons */
.btn-outline-gold {
  background: transparent;
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold);
  padding: 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 0 10px rgba(240, 195, 90, 0.1);
}

.btn-outline-gold:hover {
  background: rgba(240, 195, 90, 0.1);
  box-shadow: 0 0 20px rgba(240, 195, 90, 0.2);
}

@media screen and (max-width: 480px) {
  .modal-content { max-height: 90vh; }
  .modal-body { padding: 10px; }
}
