/* ==========================================================================
   TJN Esports Stylesheet
   Theme: Jai Nepal Esports (Crimson Red, Navy Blue, Clash Gold)
   ========================================================================== */

/* Design Tokens & Custom Properties */
:root {
  /* Color Palette */
  --bg-base: #06070a;
  --bg-surface: #0e111a;
  --bg-surface-elevated: #151a29;
  
  --color-nepal-red: #c0140a;
  --color-nepal-blue: #003893;
  --color-clash-gold: #ffb40e;
  --color-clash-gold-hover: #ffc33b;
  
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  
  /* Fonts */
  --font-header: 'Unbounded', sans-serif;
  --font-accent: 'Oxanium', sans-serif;
  --font-body: 'Jost', sans-serif;
  
  /* Gradients */
  --grad-hero: linear-gradient(135deg, var(--color-clash-gold) 0%, var(--color-nepal-red) 100%);
  --grad-glow: linear-gradient(90deg, var(--color-nepal-red), var(--color-clash-gold), var(--color-nepal-blue));
  --grad-dark-card: linear-gradient(180deg, rgba(21, 26, 41, 0.6) 0%, rgba(14, 17, 26, 0.9) 100%);
  
  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-medium: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Spacing */
  --container-width: 1280px;
}

/* Reset & Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  position: relative;
  line-height: 1.6;
}

/* Scroll Progress Bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--color-nepal-red), var(--color-nepal-blue), var(--color-clash-gold));
  z-index: 10000;
  transition: width 0.1s ease-out;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Utility Containers */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-surface-elevated);
  border-radius: 4px;
  border: 1px solid var(--bg-base);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-nepal-red);
}

/* ==========================================================================
   Background System (Spotlights & Grids)
   ========================================================================== */
.bg-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -10;
  overflow: hidden;
  pointer-events: none;
}

.bg-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 50px 50px;
  opacity: 0.8;
  mask-image: radial-gradient(circle, black 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(circle, black 40%, transparent 100%);
  animation: gridMove 60s linear infinite;
}

@keyframes gridMove {
  0% { background-position: 0 0; }
  100% { background-position: 50px 50px; }
}

.bg-spotlight {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.15;
  mix-blend-mode: screen;
  pointer-events: none;
  will-change: transform;
  transform: translateZ(0);
}

.bg-spotlight.red {
  top: -10%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: var(--color-nepal-red);
  animation: floatSpotlight1 25s ease-in-out infinite alternate;
}

.bg-spotlight.blue {
  bottom: -10%;
  left: -10%;
  width: 700px;
  height: 700px;
  background: var(--color-nepal-blue);
  animation: floatSpotlight2 30s ease-in-out infinite alternate;
}

.bg-spotlight.gold {
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 500px;
  background: var(--color-clash-gold);
  opacity: 0.08;
  animation: pulseSpotlight 15s ease-in-out infinite alternate;
}

@keyframes floatSpotlight1 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-100px, 80px) scale(1.2); }
}

@keyframes floatSpotlight2 {
  0% { transform: translate(0, 0) scale(1.1); }
  100% { transform: translate(80px, -120px) scale(0.9); }
}

@keyframes pulseSpotlight {
  0% { opacity: 0.05; transform: translate(-50%, -50%) scale(0.9); }
  100% { opacity: 0.12; transform: translate(-45%, -55%) scale(1.1); }
}

/* ==========================================================================
   Header & Top Navigation
   ========================================================================== */
.header {
  position: relative;
  width: 100%;
  z-index: 100;
  background: rgba(6, 7, 10, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 16px 0;
  transition: background var(--transition-fast);
}

.header.scrolled {
  background: rgba(6, 7, 10, 0.98);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  transition: transform var(--transition-fast);
  filter: drop-shadow(0 0 8px rgba(255, 180, 14, 0.2));
}

.logo-link:hover .nav-logo {
  transform: rotate(-10deg) scale(1.08);
  filter: drop-shadow(0 0 12px rgba(255, 180, 14, 0.5));
}

.logo-text-wrapper {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-text {
  font-family: var(--font-header);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 1px;
}

.logo-subtext {
  font-family: var(--font-accent);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.accent-text {
  color: var(--color-clash-gold);
  background: var(--grad-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-family: var(--font-accent);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
  position: relative;
  padding: 6px 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-nepal-red);
  transition: width var(--transition-fast);
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link.active {
  color: var(--color-clash-gold);
}

.nav-link.active::after {
  width: 100%;
  background: var(--color-clash-gold);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Mobile Toggle Hamburger button */
.mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 101;
}

.mobile-toggle span {
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

/* ==========================================================================
   Buttons Setup
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-accent);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 12px 24px;
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition-fast);
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 25%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  transform: rotate(30deg);
  transition: all 0.6s cubic-bezier(0.19, 1, 0.22, 1);
  opacity: 0;
  pointer-events: none;
}

.btn:hover::after {
  left: 140%;
  opacity: 1;
}

.btn-primary {
  background: var(--color-nepal-red);
  color: var(--text-primary);
  border: 1px solid var(--color-nepal-red);
  box-shadow: 0 4px 20px rgba(192, 20, 10, 0.3);
}

.btn-primary:hover {
  background: #d4160b;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(192, 20, 10, 0.5);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--color-clash-gold);
  transform: translateY(-2px);
}

.btn-discord {
  background: #5865f2;
  color: #fff;
  border: 1px solid #5865f2;
}

.btn-discord:hover {
  background: #4752c4;
  box-shadow: 0 0 15px rgba(88, 101, 242, 0.4);
  transform: translateY(-2px);
}

/* ==========================================================================
   Section Headers & Common Layout
   ========================================================================== */
section {
  padding: 100px 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-subtitle {
  font-family: var(--font-accent);
  color: var(--color-nepal-red);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  display: block;
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-header);
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  margin-bottom: 20px;
}

.section-divider {
  width: 80px;
  height: 4px;
  background: var(--grad-hero);
  margin: 0 auto 24px auto;
  border-radius: 2px;
}

.section-description {
  max-width: 600px;
  margin: 0 auto;
  color: var(--text-secondary);
  font-size: 1.05rem;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  min-height: calc(100vh - 90px);
  display: flex;
  align-items: center;
  padding-top: 50px;
  padding-bottom: 70px;
}

.hero-container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 60px;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-content .badge {
  font-family: var(--font-accent);
  background: rgba(192, 20, 10, 0.15);
  border: 1px solid rgba(192, 20, 10, 0.4);
  color: #ff4d42;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 24px;
}

.hero-title {
  font-family: var(--font-header);
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 24px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--color-clash-gold) 0%, var(--color-nepal-red) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 15px rgba(255, 180, 14, 0.1));
}

.hero-description {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 580px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 48px;
}

.hero-stats {
  display: flex;
  gap: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 32px;
  width: 100%;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-num {
  font-family: var(--font-accent);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-primary);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Hero Image Showcase */
.hero-image-wrapper {
  position: relative;
  width: 100%;
}

.hero-image-frame {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
  background: var(--bg-surface);
  transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
  transition: transform var(--transition-medium), box-shadow var(--transition-medium);
  animation: heroFloat 6s ease-in-out infinite alternate;
}

.hero-image-frame:hover {
  transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
  box-shadow: 0 30px 80px rgba(255, 180, 14, 0.15);
}

/* Hero Slideshow */
.hero-slides {
  position: relative;
  width: 100%;
  height: 520px;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  opacity: 0;
  transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity;
}

.hero-slide.active {
  opacity: 1;
}

.hero-image-frame:hover .hero-slide.active {
  transform: scale(1.03);
  transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1), transform 4s ease-out;
}

/* Slide Indicator Dots */
.slide-indicators {
  position: absolute;
  bottom: 16px;
  left: 16px;
  display: flex;
  gap: 8px;
  z-index: 10;
}

.slide-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.15);
  cursor: pointer;
  padding: 0;
  transition: all var(--transition-fast);
}

.slide-dot.active {
  width: 24px;
  border-radius: 4px;
  background: var(--color-clash-gold);
  border-color: var(--color-clash-gold);
  box-shadow: 0 0 8px rgba(255, 180, 14, 0.5);
}

.slide-dot:hover {
  background: rgba(255, 255, 255, 0.4);
}

@keyframes heroFloat {
  0% { transform: perspective(1000px) rotateY(-5deg) rotateX(5deg) translateY(0); }
  100% { transform: perspective(1000px) rotateY(-5deg) rotateX(5deg) translateY(-15px); }
}

/* ==========================================================================
   Roster Section
   ========================================================================== */

/* Roster Team Toggle Tabs */
.roster-team-tabs {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 50px;
}

.roster-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 14px 28px;
  cursor: pointer;
  transition: all var(--transition-medium);
  position: relative;
  overflow: hidden;
  color: var(--text-primary);
}

.roster-tab::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--color-nepal-red);
  transform: scaleX(0);
  transition: transform var(--transition-medium);
}

.roster-tab:hover {
  background: var(--bg-surface-elevated);
  border-color: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

.roster-tab.active {
  background: var(--bg-surface-elevated);
  border-color: var(--color-clash-gold);
  box-shadow: 0 8px 24px rgba(255, 180, 14, 0.08);
}

.roster-tab.active::before {
  transform: scaleX(1);
  background: var(--color-clash-gold);
}

.roster-tab-icon {
  font-size: 1.1rem;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.roster-tab.active .roster-tab-icon {
  color: var(--color-clash-gold);
}

.roster-tab-name {
  font-family: var(--font-header);
  font-size: 0.9rem;
  font-weight: 800;
}

.roster-tab-badge {
  font-family: var(--font-accent);
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

.roster-tab.active .roster-tab-badge {
  background: rgba(255, 180, 14, 0.1);
  color: var(--color-clash-gold);
  border: 1px solid rgba(255, 180, 14, 0.2);
}

/* Roster Panels (Show/Hide) */
.roster-panel {
  display: none;
  animation: rosterFadeIn 0.5s ease forwards;
}

.roster-panel.active {
  display: block;
}

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

.roster-grid {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 40px;
  align-items: start;
}

.jersey-showcase-card {
  background: var(--grad-dark-card);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  overflow: hidden;
  position: sticky;
  top: 100px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.jersey-img-container {
  position: relative;
  aspect-ratio: 4 / 5;
  background: #090b12;
  overflow: hidden;
}

.jersey-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.jersey-showcase-card:hover .jersey-img {
  transform: scale(1.06);
}

.jersey-overlay {
  position: absolute;
  top: 16px;
  left: 16px;
}

.jersey-tag {
  font-family: var(--font-accent);
  background: var(--color-nepal-red);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 20px;
  letter-spacing: 1px;
  box-shadow: 0 4px 10px rgba(192, 20, 10, 0.3);
}

.jersey-details {
  padding: 24px;
}

.jersey-details h3 {
  font-family: var(--font-header);
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.jersey-details p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Roster Loading Card State */
.loading-card {
  border-color: rgba(255, 180, 14, 0.08) !important;
}

.loading-visual {
  height: 100%;
  background: radial-gradient(circle at center, #0e1322 0%, #05070c 100%) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.loading-grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 20px 20px;
  background-position: center;
  pointer-events: none;
}

.pulsing-logo-silhouette {
  width: 50%;
  height: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: logoPulse 3s infinite ease-in-out;
}

.logo-silhouette {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.25;
  filter: grayscale(1) brightness(0.6) sepia(1) saturate(5) hue-rotate(15deg) drop-shadow(0 0 15px rgba(255, 180, 14, 0.4));
}

.scan-bar {
  position: absolute;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, transparent, rgba(255, 180, 14, 0.4), transparent);
  box-shadow: 0 0 12px rgba(255, 180, 14, 0.3);
  animation: scanMove 4s infinite ease-in-out;
}

@keyframes logoPulse {
  0% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.03); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.7; }
}

@keyframes scanMove {
  0% { top: 0%; }
  50% { top: 100%; }
  100% { top: 0%; }
}

/* Roster Announcement Teaser */
.roster-pending-box {
  background: var(--grad-dark-card);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 60px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  align-self: center;
}

.pending-icon {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(6, 7, 10, 0.6);
  border: 1px solid rgba(255, 180, 14, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  color: var(--color-clash-gold);
  margin-bottom: 28px;
  position: relative;
}

.pending-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: 0 0 35px rgba(255, 180, 14, 0.2);
  animation: pulseGlow 2.5s infinite alternate;
}

.pulsing-lock {
  animation: pulseLock 2s infinite ease-in-out;
}

.pending-badge {
  font-family: var(--font-accent);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--color-nepal-red);
  background: rgba(192, 20, 10, 0.1);
  border: 1px solid rgba(192, 20, 10, 0.2);
  padding: 4px 12px;
  border-radius: 4px;
  margin-bottom: 16px;
  display: inline-block;
}

.pending-content h3 {
  font-family: var(--font-header);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 12px;
  background: var(--grad-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.pending-content p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 440px;
  margin: 0 auto 32px auto;
}

.pending-progress-bar {
  width: 250px;
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
  overflow: hidden;
  margin: 0 auto 12px auto;
}

.progress-fill {
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, var(--color-nepal-red), var(--color-clash-gold));
  border-radius: 2px;
  animation: progressCycle 3s infinite linear;
}

.progress-status {
  font-family: var(--font-accent);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 1.5px;
}

@keyframes pulseGlow {
  0% { transform: scale(0.95); opacity: 0.6; }
  100% { transform: scale(1.1); opacity: 1; }
}

@keyframes pulseLock {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); filter: drop-shadow(0 0 8px rgba(255, 180, 14, 0.6)); }
  100% { transform: scale(1); }
}

@keyframes progressCycle {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(250%); }
}

.players-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.player-card {
  background: var(--grad-dark-card);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  position: relative;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
  overflow: hidden;
}

.player-card:hover {
  transform: translateY(-5px);
  border-color: rgba(192, 20, 10, 0.3);
  box-shadow: 0 12px 30px rgba(192, 20, 10, 0.12);
}

.player-card.mvp {
  border-color: rgba(255, 180, 14, 0.2);
}

.player-card.mvp:hover {
  transform: translateY(-5px);
  border-color: var(--color-clash-gold);
  box-shadow: 0 12px 30px rgba(255, 180, 14, 0.2);
}

.player-card.captain {
  border-left: 3px solid var(--color-clash-gold);
  border-color: rgba(255, 180, 14, 0.15);
}

.player-card.captain:hover {
  transform: translateY(-5px);
  border-color: var(--color-clash-gold);
  box-shadow: 0 12px 30px rgba(255, 180, 14, 0.22);
}

.player-card.captain .player-tag {
  background: rgba(255, 180, 14, 0.12);
  color: var(--color-clash-gold);
  border: 1px solid rgba(255, 180, 14, 0.25);
}

.player-avatar-placeholder {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--bg-surface-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--text-secondary);
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
}

.player-troop-img {
  width: 85%;
  height: 85%;
  object-fit: contain;
  z-index: 2;
  transition: transform var(--transition-medium);
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.4));
}

.player-card:hover .player-troop-img {
  transform: scale(1.15) rotate(5deg);
}

.player-card.mvp .player-avatar-placeholder {
  color: var(--color-clash-gold);
  background: rgba(255, 180, 14, 0.08);
  border-color: rgba(255, 180, 14, 0.4);
}

.player-logo-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-image: url('./images/tjn-logo.png');
  background-size: 60%;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.15;
}

.player-info {
  flex-grow: 1;
}

.player-tag-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.player-tag {
  font-family: var(--font-accent);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
}

.player-tag.gold {
  color: var(--color-clash-gold);
  font-weight: 800;
  letter-spacing: 0.5px;
}

.player-role {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--color-nepal-red);
  letter-spacing: 0.5px;
  font-weight: 600;
}

.player-name {
  font-family: var(--font-header);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.player-bio {
  color: var(--text-secondary);
  font-size: 0.85rem;
  max-width: 520px;
}

/* Subtle gold background glow for MVP cards */
.mvp-glow {
  position: absolute;
  top: 0;
  right: 0;
  width: 150px;
  height: 100%;
  background: radial-gradient(circle at right, rgba(255, 180, 14, 0.04) 0%, transparent 80%);
  pointer-events: none;
}

/* ==========================================================================
   Tournaments Teaser Section (Homepage)
   ========================================================================== */
.tournaments-teaser-section {
  padding: 80px 0;
  background: rgba(14, 17, 26, 0.4);
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.tournaments-teaser-card {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 40px;
  align-items: center;
  background: linear-gradient(135deg, rgba(21, 26, 41, 0.8) 0%, rgba(14, 17, 26, 0.95) 100%);
  border: 1px solid rgba(255, 180, 14, 0.25);
  border-radius: 12px;
  padding: 44px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}

.tournaments-teaser-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--grad-hero);
}

.teaser-title {
  font-family: var(--font-header);
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 900;
  margin: 8px 0 16px;
  line-height: 1.2;
}

.teaser-desc {
  color: var(--text-secondary);
  font-size: 0.96rem;
  line-height: 1.7;
  margin-bottom: 24px;
  max-width: 600px;
}

.teaser-desc strong {
  color: var(--text-primary);
}

.teaser-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.teaser-badges {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.teaser-stat-pill {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all var(--transition-fast);
}

.teaser-stat-pill:hover {
  background: rgba(255, 180, 14, 0.06);
  border-color: rgba(255, 180, 14, 0.3);
  transform: translateX(4px);
}

.pill-num {
  font-family: var(--font-header);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--color-clash-gold);
}

.pill-lbl {
  font-family: var(--font-accent);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
}

@media (max-width: 860px) {
  .tournaments-teaser-card {
    grid-template-columns: 1fr;
    padding: 28px 22px;
    gap: 28px;
  }
}

.cta-box {
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  padding: 24px;
  width: 100%;
}

.cta-box h4 {
  font-family: var(--font-header);
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.cta-box p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

/* ==========================================================================
   Achievements & Tribe Victory Section
   ========================================================================== */
.achievements-showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
  margin-bottom: 60px;
}

.achievement-content-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.ach-badge {
  font-family: var(--font-accent);
  background: rgba(192, 20, 10, 0.15);
  color: #ff4d42;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 4px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 20px;
  border: 1px solid rgba(192, 20, 10, 0.2);
}

.achievement-content-box h3 {
  font-family: var(--font-accent);
  font-size: 1.1rem;
  color: var(--color-clash-gold);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.victory-headline {
  font-family: var(--font-header);
  font-size: 1.8rem;
  font-weight: 900;
  line-height: 1.25;
  margin-bottom: 20px;
}

.achievement-content-box p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 32px;
}

.ach-highlights-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  list-style: none;
  width: 100%;
}

.ach-highlights-list li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-left: 2px solid var(--color-nepal-red);
  padding-left: 16px;
}

.highlight-val {
  font-family: var(--font-accent);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
}

.highlight-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Simulated Browser Viewport Mockup */
.achievement-visual {
  width: 100%;
}

.mockup-frame {
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0,0,0,0.5);
  position: relative;
}

.mockup-header {
  background: #090b11;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.mockup-dots {
  display: flex;
  gap: 6px;
}

.mockup-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
}

.mockup-title {
  font-family: var(--font-accent);
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.achievement-img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.mockup-frame:hover .achievement-img {
  transform: scale(1.02);
}

.mockup-overlay {
  position: absolute;
  bottom: 16px;
  left: 16px;
  pointer-events: none;
}

.pulsing-text {
  font-family: var(--font-accent);
  background: rgba(192, 20, 10, 0.9);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 4px;
  letter-spacing: 1px;
  box-shadow: 0 4px 12px rgba(192, 20, 10, 0.4);
  animation: pulseOpacity 1.5s infinite alternate;
}

@keyframes pulseOpacity {
  0% { opacity: 0.8; }
  100% { opacity: 1; }
}

/* Secondary banners showcase grid */
.banners-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 50px;
}

.banner-card {
  height: 320px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255,255,255,0.03);
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.banner-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
  filter: brightness(0.4) saturate(0.8);
}

.banner-card:hover .banner-bg {
  transform: scale(1.04);
  filter: brightness(0.5) saturate(1);
}

.banner-overlay-text {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 24px;
  background: linear-gradient(t, rgba(6, 7, 10, 0.9) 0%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.banner-overlay-text h4 {
  font-family: var(--font-header);
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.banner-overlay-text p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   Socials / Connect Section
   ========================================================================== */
.socials-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.social-card {
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  padding: 36px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.social-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 15px 35px rgba(0,0,0,0.4);
}

.social-icon-box {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 24px;
  transition: all var(--transition-fast);
}

/* Card-specific brands */
.social-card.discord {
  border-bottom: 3px solid #5865f2;
}
.social-card.discord .social-icon-box {
  background: rgba(88, 101, 242, 0.08);
  color: #5865f2;
  border: 1px solid rgba(88, 101, 242, 0.2);
}
.social-card.discord:hover .social-icon-box {
  background: #5865f2;
  color: #fff;
  box-shadow: 0 0 20px rgba(88, 101, 242, 0.4);
}

.social-card.facebook {
  border-bottom: 3px solid #1877f2;
}
.social-card.facebook .social-icon-box {
  background: rgba(24, 119, 242, 0.08);
  color: #1877f2;
  border: 1px solid rgba(24, 119, 242, 0.2);
}
.social-card.facebook:hover .social-icon-box {
  background: #1877f2;
  color: #fff;
  box-shadow: 0 0 20px rgba(24, 119, 242, 0.4);
}

.social-card.twitter {
  border-bottom: 3px solid #f3f4f6;
}
.social-card.twitter .social-icon-box {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.social-card.twitter:hover .social-icon-box {
  background: #fff;
  color: #000;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.social-card h3 {
  font-family: var(--font-header);
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.social-card p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: 24px;
  flex-grow: 1;
}

.social-link-btn {
  font-family: var(--font-accent);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.social-card:hover .social-link-btn {
  color: var(--text-primary);
}

/* ==========================================================================
   Modal Overlay
   ========================================================================== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(6, 7, 10, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-medium);
}

.modal.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  position: relative;
  max-width: 90%;
  max-height: 85%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  transform: scale(0.95);
  transition: transform var(--transition-medium);
}

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

.modal-img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 50px rgba(0,0,0,0.8);
}

.modal-caption {
  font-family: var(--font-accent);
  color: var(--color-clash-gold);
  font-size: 0.85rem;
  text-align: center;
  letter-spacing: 0.5px;
}

.modal-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: transparent;
  border: none;
  font-size: 2.5rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color var(--transition-fast), transform var(--transition-fast);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: var(--text-primary);
  transform: scale(1.1) rotate(90deg);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  background: #040507;
  padding-top: 60px;
  padding-bottom: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.02);
  position: relative;
}

.footer-nepal-accent {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--color-nepal-red) 0%, var(--color-nepal-blue) 100%);
}

.footer-container {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.footer-branding {
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  padding-bottom: 24px;
}

.footer-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.footer-title {
  font-family: var(--font-header);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.footer-tagline {
  font-family: var(--font-accent);
  color: var(--color-nepal-red);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-email {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-email a {
  transition: color var(--transition-fast);
}

.footer-email a:hover {
  color: var(--color-clash-gold);
}

.footer-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.supercell-disclaimer {
  max-width: 900px;
  line-height: 1.5;
}

/* ==========================================================================
   Page Stagger Reveal Classes
   ========================================================================== */
.fade-in-up {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.3s; }
.delay-3 { animation-delay: 0.45s; }
.delay-4 { animation-delay: 0.6s; }

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

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  
  .hero-content {
    align-items: center;
  }
  
  .hero-description {
    margin-left: auto;
    margin-right: auto;
  }
  
  .hero-actions {
    justify-content: center;
  }
  
  .hero-stats {
    justify-content: center;
  }
  
  .hero-image-frame {
    max-width: 600px;
    margin: 0 auto;
    transform: none;
    animation: heroFloatMobile 5s ease-in-out infinite alternate;
  }
  
  @keyframes heroFloatMobile {
    0% { transform: translateY(0); }
    100% { transform: translateY(-10px); }
  }
  
  .roster-grid {
    grid-template-columns: 1fr;
  }
  
  .players-grid {
    grid-template-columns: 1fr;
  }
  
  .jersey-showcase-card {
    position: static;
    max-width: 450px;
    margin: 0 auto;
  }
  
  .tournament-flex {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .achievements-showcase {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .socials-cards-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  section {
    padding: 60px 0;
  }
  
  .section-title {
    font-size: 1.8rem;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .mobile-toggle {
    display: flex;
  }
  
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: #090b12;
    border-left: 1px solid rgba(255,255,255,0.05);
    flex-direction: column;
    justify-content: center;
    gap: 30px;
    transition: right var(--transition-medium);
  }
  
  .nav-menu.active {
    right: 0;
  }
  
  .nav-actions {
    margin-right: 40px;
  }
  
  .banners-grid {
    grid-template-columns: 1fr;
  }
  
  .player-card {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }
  
  .player-tag-row {
    justify-content: center;
  }
  
  .tournament-tabs {
    flex-direction: column;
    align-items: center;
  }
  
  .tab-btn {
    width: 100%;
    max-width: 350px;
  }
  
  .header-actions {
    display: flex;
    gap: 12px;
  }
  
  #nav-cta {
    display: none; /* Hide button on mobile or display menu item */
  }
}

/* ==========================================================================
   Clan Leaderboard Section
   ========================================================================== */
.clan-section {
  padding: 100px 0;
  position: relative;
}

.clan-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 20px;
}

.search-box-wrapper {
  position: relative;
  flex: 1;
  min-width: 280px;
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
}

#clan-search-input {
  width: 100%;
  background: rgba(6, 7, 10, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 12px 16px 12px 48px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

#clan-search-input:focus {
  outline: none;
  border-color: var(--color-clash-gold);
  box-shadow: 0 0 10px rgba(255, 180, 14, 0.2);
}

.clan-filter-tabs {
  display: flex;
  gap: 10px;
}

.clan-filter-btn {
  background: rgba(6, 7, 10, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  padding: 10px 20px;
  border-radius: 8px;
  font-family: var(--font-accent);
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-fast);
}

.clan-filter-btn:hover {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

.clan-filter-btn.active {
  background: linear-gradient(135deg, var(--color-nepal-red) 0%, #dd281b 100%);
  color: #fff;
  border-color: var(--color-nepal-red);
  box-shadow: 0 4px 15px rgba(192, 20, 10, 0.3);
}

.clan-filter-btn[data-sort="trophies"].active {
  background: linear-gradient(135deg, var(--color-clash-gold) 0%, #ffd43f 100%);
  color: #06070a;
  border-color: var(--color-clash-gold);
  box-shadow: 0 4px 15px rgba(255, 180, 14, 0.3);
  font-weight: 600;
}

.clan-status-info {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-family: var(--font-accent);
}

.btn-icon {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-icon:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--color-clash-gold);
  color: var(--color-clash-gold);
}

.btn-icon.spinning i {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Leaderboard Container */
.clan-leaderboard-container {
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  min-height: 300px;
  position: relative;
  overflow: hidden;
}

/* Loading & Error States */
.clan-loading-state,
.clan-error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(255, 255, 255, 0.05);
  border-top-color: var(--color-clash-gold);
  border-bottom-color: var(--color-nepal-red);
  border-radius: 50%;
  animation: spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
  margin-bottom: 20px;
}

.error-icon {
  font-size: 3rem;
  color: var(--color-nepal-red);
  margin-bottom: 20px;
  animation: pulse-glow 2s infinite alternate;
}

.clan-error-state h3 {
  font-family: var(--font-header);
  font-size: 1.3rem;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.clan-error-state p {
  color: var(--text-secondary);
  max-width: 400px;
  margin-bottom: 20px;
}

/* Table Layout */
.clan-table-responsive {
  overflow-x: auto;
  width: 100%;
}

.clan-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.clan-table th {
  font-family: var(--font-accent);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 1px;
  color: var(--text-muted);
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 600;
}

.clan-table td {
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  font-size: 0.95rem;
  vertical-align: middle;
  transition: var(--transition-fast);
}

.clan-table tbody tr {
  transition: var(--transition-fast);
}

.clan-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.clan-table tbody tr.rank-highlight:hover {
  background: rgba(255, 180, 14, 0.05);
}

/* Special Columns */
.col-rank {
  width: 80px;
  font-weight: bold;
}

.col-player {
  min-width: 250px;
}

.col-tag {
  color: var(--text-muted);
  font-family: var(--font-accent);
  font-size: 0.85rem;
}

.col-clan {
  width: 180px;
}

.text-right {
  text-align: right !important;
}

/* Player Info Layout */
.player-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.league-icon-wrapper {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.league-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.player-details-column {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.player-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.player-table-name {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-primary);
  letter-spacing: 0.3px;
  transition: color 0.2s ease;
}

.player-link {
  text-decoration: none;
  display: inline-flex;
  transition: all 0.2s ease;
}

.player-link:hover .player-table-name {
  color: var(--accent-gold, #ffd700);
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
}

/* Ranks Badges */
.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-family: var(--font-accent);
  font-size: 0.85rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
}

.rank-1 .rank-badge {
  background: linear-gradient(135deg, #ffd700 0%, #b8860b 100%);
  color: #06070a;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

.rank-2 .rank-badge {
  background: linear-gradient(135deg, #e6e6e6 0%, #8c8c8c 100%);
  color: #06070a;
  box-shadow: 0 0 10px rgba(230, 230, 230, 0.3);
}

.rank-3 .rank-badge {
  background: linear-gradient(135deg, #cd7f32 0%, #8b4513 100%);
  color: #fff;
  box-shadow: 0 0 10px rgba(205, 127, 50, 0.3);
}

/* Row Rank Highlights */
.clan-table tbody tr.rank-1 {
  background: rgba(255, 215, 0, 0.02);
}

.clan-table tbody tr.rank-2 {
  background: rgba(230, 230, 230, 0.01);
}

/* Town Hall Badges */
.th-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-accent);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-transform: uppercase;
}

.th-18 {
  background: linear-gradient(135deg, rgba(192, 20, 10, 0.2) 0%, rgba(255, 180, 14, 0.2) 100%);
  color: var(--color-clash-gold);
  border-color: rgba(255, 180, 14, 0.4);
  box-shadow: 0 0 8px rgba(255, 180, 14, 0.1);
}

.th-17 {
  background: linear-gradient(135deg, rgba(0, 150, 255, 0.2) 0%, rgba(0, 240, 255, 0.2) 100%);
  color: #00f0ff;
  border-color: rgba(0, 240, 255, 0.4);
}

.th-16 {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(5, 150, 105, 0.2) 100%);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.4);
}

/* Clan Badges */
.clan-badge {
  display: inline-block;
  font-family: var(--font-accent);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.clan-badge.clan-primary {
  background: rgba(192, 20, 10, 0.1);
  color: #ff4a3f;
  border: 1px solid rgba(192, 20, 10, 0.3);
}

.clan-badge.clan-secondary {
  background: rgba(0, 56, 147, 0.15);
  color: #4a8bff;
  border: 1px solid rgba(0, 56, 147, 0.3);
}

/* Stats Styling */
.trophies-cell {
  font-family: var(--font-accent);
  font-weight: 700;
  color: var(--color-clash-gold);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
}

.trophy-mini-img {
  width: 14px;
  height: 14px;
  object-fit: contain;
}

.donation-cell {
  font-family: var(--font-accent);
  font-weight: 500;
  color: #10b981;
}

.received-cell {
  font-family: var(--font-accent);
  font-weight: 500;
  color: #6366f1;
}

.hidden {
  display: none !important;
}

/* Scrollbar Customization for Leaderboard Table */
.clan-table-responsive::-webkit-scrollbar {
  height: 8px;
}

.clan-table-responsive::-webkit-scrollbar-track {
  background: rgba(6, 7, 10, 0.3);
  border-radius: 4px;
}

.clan-table-responsive::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.clan-table-responsive::-webkit-scrollbar-thumb:hover {
  background: var(--color-nepal-red);
}

@keyframes pulse-glow {
  from {
    text-shadow: 0 0 10px rgba(192, 20, 10, 0.4);
  }
  to {
    text-shadow: 0 0 20px rgba(192, 20, 10, 0.8);
  }
}

/* Responsive Table */
@media (max-width: 768px) {
  .clan-controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .clan-filter-tabs {
    justify-content: space-between;
  }
  
  .clan-filter-btn {
    flex: 1;
    justify-content: center;
    padding: 10px 8px;
    font-size: 0.8rem;
  }
  
  .clan-status-info {
    justify-content: space-between;
  }
  
  .clan-table th {
    padding: 12px 10px;
    font-size: 0.75rem;
  }
  
  .clan-table td {
    padding: 10px;
    font-size: 0.85rem;
  }
  
  .col-rank {
    width: 40px;
  }
}

/* Performance Rendering Optimizations for Smooth Scrolling */
section {
  content-visibility: auto;
  contain-intrinsic-size: 800px;
}

