/* ============================================================
   EsportsAtlas.com — Core CSS Framework
   Dark-mode optimized, mobile-first, data-rich design system
   ============================================================ */

/* --- CSS Custom Properties --- */
:root {
  --bg-primary: #0a0e17;
  --bg-secondary: #111827;
  --bg-card: #1a2236;
  --bg-card-hover: #1f2a42;
  --bg-accent: #0f1a2e;
  --text-primary: #f0f4fc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-blue: #3b82f6;
  --accent-cyan: #06b6d4;
  --accent-purple: #8b5cf6;
  --accent-green: #10b981;
  --accent-red: #ef4444;
  --accent-orange: #f97316;
  --accent-yellow: #eab308;
  --accent-pink: #ec4899;
  --gradient-hero: linear-gradient(135deg, #0a0e17 0%, #1a1040 50%, #0a2540 100%);
  --gradient-card: linear-gradient(145deg, #1a2236 0%, #0f1a2e 100%);
  --gradient-accent: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  --gradient-fire: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
  --border-color: #1e293b;
  --border-accent: #334155;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.5);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.6);
  --shadow-glow-blue: 0 0 20px rgba(59,130,246,0.3);
  --shadow-glow-purple: 0 0 20px rgba(139,92,246,0.3);
  --shadow-glow-cyan: 0 0 20px rgba(6,182,212,0.3);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Orbitron', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
  --max-width: 1400px;
  --nav-height: 70px;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
}

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

a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-blue);
}

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.75rem); }
h4 { font-size: clamp(1rem, 2vw, 1.25rem); }

p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

::selection {
  background: var(--accent-blue);
  color: white;
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-accent);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-blue);
}

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

.container-narrow {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(10, 14, 23, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: all var(--transition-normal);
}

.nav.scrolled {
  background: rgba(10, 14, 23, 0.98);
  box-shadow: var(--shadow-md);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
  text-decoration: none;
}

.nav-logo .logo-icon {
  width: 36px;
  height: 36px;
  background: var(--gradient-accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.nav-logo span.highlight {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: rgba(59, 130, 246, 0.1);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--accent-blue);
  border-radius: 2px;
}

.nav-cta {
  background: var(--gradient-accent) !important;
  color: white !important;
  font-weight: 600 !important;
  padding: 8px 20px !important;
}

.nav-cta:hover {
  box-shadow: var(--shadow-glow-blue);
  transform: translateY(-1px);
}

/* Mobile Nav Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 5px;
  background: none;
  border: none;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
  background: var(--gradient-hero);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(59,130,246,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(139,92,246,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(6,182,212,0.06) 0%, transparent 50%);
  pointer-events: none;
}

.hero-grid {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    linear-gradient(rgba(59,130,246,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59,130,246,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  color: var(--accent-cyan);
  margin-bottom: 24px;
  font-weight: 500;
}

.hero-badge .pulse {
  width: 8px;
  height: 8px;
  background: var(--accent-green);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.5); }
}

.hero h1 {
  margin-bottom: 20px;
  text-shadow: 0 0 40px rgba(59,130,246,0.2);
}

.hero h1 .gradient-text {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 650px;
  margin: 0 auto 32px;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
  border: none;
  text-decoration: none;
  font-family: var(--font-main);
}

.btn-primary {
  background: var(--gradient-accent);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow-blue);
  color: white;
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-accent);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--accent-blue);
  color: var(--text-primary);
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 16px 36px;
  font-size: 1.05rem;
}

/* --- Stats Bar --- */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  max-width: 800px;
  margin: 0 auto;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 800;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* --- Section Styling --- */
.section {
  padding: 80px 0;
  position: relative;
}

.section-dark {
  background: var(--bg-secondary);
}

.section-accent {
  background: var(--bg-accent);
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 48px;
}

.section-header .section-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-cyan);
  margin-bottom: 12px;
}

.section-header h2 {
  margin-bottom: 16px;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

/* --- Interactive Map Section --- */
.map-section {
  padding: 60px 0 80px;
  background: var(--bg-secondary);
}

.map-container {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
}

.map-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(10, 14, 23, 0.8);
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
}

.map-filter-btn {
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 500;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-main);
}

.map-filter-btn:hover,
.map-filter-btn.active {
  background: var(--accent-blue);
  color: white;
  border-color: var(--accent-blue);
}

#esports-map {
  width: 100%;
  height: 500px;
  background: #0c1220;
}

.map-legend {
  display: flex;
  gap: 20px;
  padding: 12px 16px;
  background: rgba(10, 14, 23, 0.8);
  border-top: 1px solid var(--border-color);
  flex-wrap: wrap;
}

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

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* --- Cards --- */
.card {
  background: var(--gradient-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all var(--transition-normal);
}

.card:hover {
  border-color: var(--accent-blue);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.card-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

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

/* Team Card */
.team-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
}

.team-card .team-logo {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  flex-shrink: 0;
}

.team-card .team-info h4 {
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.team-card .team-info .team-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.team-card .team-stats {
  margin-left: auto;
  text-align: right;
}

.team-card .team-stats .stat-val {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-green);
}

.team-card .team-stats .stat-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Feature Card */
.feature-card {
  padding: 32px;
  text-align: center;
}

.feature-card .feature-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.feature-card h3 {
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* --- Data Table --- */
.data-table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table thead {
  background: var(--bg-accent);
}

.data-table th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}

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

.data-table tbody tr:hover {
  background: rgba(59, 130, 246, 0.05);
}

.data-table .rank-cell {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-primary);
  width: 50px;
}

.data-table .rank-cell.gold { color: #fbbf24; }
.data-table .rank-cell.silver { color: #94a3b8; }
.data-table .rank-cell.bronze { color: #d97706; }

.data-table .team-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.data-table .team-cell .mini-logo {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  flex-shrink: 0;
}

.data-table .bar-cell {
  min-width: 120px;
}

.data-table .bar-cell .bar-bg {
  height: 6px;
  background: rgba(255,255,255,0.05);
  border-radius: 3px;
  overflow: hidden;
}

.data-table .bar-cell .bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 1s ease;
}

.data-table .change-positive { color: var(--accent-green); }
.data-table .change-negative { color: var(--accent-red); }

/* --- Comparison Section --- */
.compare-section {
  padding: 80px 0;
}

.compare-panel {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 32px;
  align-items: start;
}

.compare-side {
  background: var(--gradient-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.compare-vs {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-red);
  text-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
  padding-top: 80px;
}

.compare-metric {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-color);
}

.compare-metric:last-child {
  border-bottom: none;
}

.compare-metric .metric-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  flex: 1;
}

.compare-metric .metric-value {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
}

.compare-metric .metric-value.winner {
  color: var(--accent-green);
}

.compare-bar {
  display: flex;
  height: 8px;
  background: rgba(255,255,255,0.05);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 8px;
}

.compare-bar .bar-left {
  background: var(--accent-blue);
  transition: width 1s ease;
}

.compare-bar .bar-right {
  background: var(--accent-red);
  transition: width 1s ease;
}

/* --- Dropdown / Select --- */
.custom-select {
  position: relative;
  display: inline-block;
}

.custom-select select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 10px 40px 10px 16px;
  border-radius: var(--radius-md);
  font-family: var(--font-main);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  min-width: 200px;
}

.custom-select select:hover,
.custom-select select:focus {
  border-color: var(--accent-blue);
  outline: none;
}

.custom-select::after {
  content: '\25BC';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.7rem;
  color: var(--text-muted);
  pointer-events: none;
}

/* --- Tabs --- */
.tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-card);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow-x: auto;
}

.tab-btn {
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  font-family: var(--font-main);
}

.tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
  background: var(--accent-blue);
  color: white;
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

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

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

/* --- Charts --- */
.chart-container {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.chart-container canvas {
  width: 100% !important;
  max-height: 400px;
}

.chart-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
}

/* --- Timeline --- */
.timeline {
  position: relative;
  padding: 20px 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 24px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-color);
}

.timeline-item {
  display: flex;
  gap: 24px;
  margin-bottom: 32px;
  position: relative;
}

.timeline-dot {
  width: 12px;
  height: 12px;
  background: var(--accent-blue);
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
  position: relative;
  left: 19px;
  z-index: 2;
  box-shadow: 0 0 0 4px var(--bg-primary);
}

.timeline-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  flex: 1;
  margin-left: 12px;
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-cyan);
  margin-bottom: 8px;
}

/* --- FAQ / Accordion --- */
.faq-section {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
  transition: all var(--transition-normal);
}

.faq-item:hover {
  border-color: var(--border-accent);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  cursor: pointer;
  background: var(--bg-card);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition-fast);
  border: none;
  width: 100%;
  text-align: left;
  color: var(--text-primary);
  font-family: var(--font-main);
}

.faq-question:hover {
  background: var(--bg-card-hover);
}

.faq-question .faq-icon {
  font-size: 1.2rem;
  transition: transform var(--transition-normal);
  color: var(--accent-blue);
}

.faq-item.active .faq-question .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 500px;
}

.faq-answer-inner {
  padding: 0 20px 20px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.8;
}

/* --- Tags / Badges --- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid;
}

.tag-blue { background: rgba(59,130,246,0.1); color: var(--accent-blue); border-color: rgba(59,130,246,0.3); }
.tag-green { background: rgba(16,185,129,0.1); color: var(--accent-green); border-color: rgba(16,185,129,0.3); }
.tag-red { background: rgba(239,68,68,0.1); color: var(--accent-red); border-color: rgba(239,68,68,0.3); }
.tag-purple { background: rgba(139,92,246,0.1); color: var(--accent-purple); border-color: rgba(139,92,246,0.3); }
.tag-orange { background: rgba(249,115,22,0.1); color: var(--accent-orange); border-color: rgba(249,115,22,0.3); }
.tag-cyan { background: rgba(6,182,212,0.1); color: var(--accent-cyan); border-color: rgba(6,182,212,0.3); }

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-gold { background: rgba(251,191,36,0.2); color: #fbbf24; }
.badge-silver { background: rgba(148,163,184,0.2); color: #94a3b8; }
.badge-bronze { background: rgba(217,119,6,0.2); color: #d97706; }

/* --- Profile Header (Teams, Leagues, etc.) --- */
.profile-hero {
  padding: calc(var(--nav-height) + 40px) 0 40px;
  background: var(--gradient-hero);
  border-bottom: 1px solid var(--border-color);
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.profile-logo {
  width: 96px;
  height: 96px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 800;
  flex-shrink: 0;
  border: 2px solid var(--border-color);
}

.profile-info {
  flex: 1;
}

.profile-info h1 {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  margin-bottom: 8px;
}

.profile-info .profile-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.profile-info .profile-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.profile-stats-row {
  display: flex;
  gap: 32px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.profile-stat {
  text-align: center;
}

.profile-stat .val {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
}

.profile-stat .lbl {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* --- Content Article --- */
.article-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 48px 20px;
}

.article-content h2 {
  margin: 40px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.article-content h3 {
  margin: 32px 0 12px;
}

.article-content p {
  margin-bottom: 16px;
  font-size: 1.02rem;
  line-height: 1.9;
}

.article-content ul,
.article-content ol {
  margin: 16px 0;
  padding-left: 24px;
}

.article-content ul { list-style: disc; }
.article-content ol { list-style: decimal; }

.article-content li {
  margin-bottom: 8px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.article-content blockquote {
  border-left: 3px solid var(--accent-blue);
  padding: 16px 20px;
  margin: 24px 0;
  background: rgba(59, 130, 246, 0.05);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--text-secondary);
  font-style: italic;
}

.article-content img {
  border-radius: var(--radius-md);
  margin: 24px 0;
  border: 1px solid var(--border-color);
}

.article-content figure {
  margin: 24px 0;
}

.article-content figcaption {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
}

.article-content .info-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  margin: 24px 0;
}

.article-content .info-box h4 {
  font-family: var(--font-main);
  margin-bottom: 12px;
  color: var(--accent-cyan);
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.9rem;
}

.article-content table th,
.article-content table td {
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  text-align: left;
}

.article-content table th {
  background: var(--bg-card);
  font-weight: 600;
  color: var(--text-primary);
}

.article-content table td {
  color: var(--text-secondary);
}

/* --- Image Cards --- */
.image-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
}

.image-card .image-wrapper {
  position: relative;
  padding-top: 56.25%;
  overflow: hidden;
}

.image-card .image-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.image-card:hover .image-wrapper img {
  transform: scale(1.05);
}

.image-card .image-content {
  padding: 20px;
}

.image-card .image-content h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.image-card .image-content p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* --- Footer --- */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 60px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand .footer-logo {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.footer-brand .footer-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 300px;
}

.footer-col h4 {
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 4px 0;
  transition: color var(--transition-fast);
}

.footer-col a:hover {
  color: var(--accent-cyan);
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

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

.footer-bottom .footer-social {
  display: flex;
  gap: 12px;
}

.footer-bottom .footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: all var(--transition-fast);
}

.footer-bottom .footer-social a:hover {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: white;
}

/* --- Breadcrumbs --- */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.breadcrumbs a {
  color: var(--text-muted);
}

.breadcrumbs a:hover {
  color: var(--accent-cyan);
}

.breadcrumbs .separator {
  color: var(--border-accent);
}

/* --- Scroll Animations --- */
.animate-in {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
}

.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Skeleton Loading --- */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* --- Tooltip --- */
.tooltip {
  position: relative;
  cursor: help;
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: var(--bg-card);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  white-space: nowrap;
  border: 1px solid var(--border-color);
  opacity: 0;
  pointer-events: none;
  transition: all var(--transition-fast);
  z-index: 100;
}

.tooltip:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

/* --- Counter Animation --- */
.counter {
  font-variant-numeric: tabular-nums;
}

/* --- Progress Ring --- */
.progress-ring {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.progress-ring svg {
  transform: rotate(-90deg);
}

.progress-ring .ring-value {
  position: absolute;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
}

/* --- Search --- */
.search-box {
  position: relative;
  max-width: 500px;
}

.search-box input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.95rem;
  transition: all var(--transition-fast);
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.search-box input:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: var(--shadow-glow-blue);
}

.search-box .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

/* --- Pagination --- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 32px;
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.pagination a:hover {
  background: rgba(59, 130, 246, 0.1);
  color: var(--text-primary);
}

.pagination .active {
  background: var(--accent-blue);
  color: white;
}

/* --- Back to Top --- */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  background: var(--accent-blue);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  transition: all var(--transition-normal);
  z-index: 999;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--accent-purple);
  transform: translateY(-2px);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .card-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .card-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .compare-panel {
    grid-template-columns: 1fr;
  }
  .compare-vs {
    padding: 16px 0;
    font-size: 1.5rem;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-height: 60px;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(10, 14, 23, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 16px;
    gap: 4px;
    border-bottom: 1px solid var(--border-color);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition-normal);
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .nav-links a {
    width: 100%;
    padding: 12px 16px;
  }

  .nav-toggle {
    display: flex;
  }

  .hero {
    min-height: auto;
    padding-top: calc(var(--nav-height) + 32px);
    padding-bottom: 48px;
  }

  .hero-content {
    padding: 24px 16px;
  }

  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .section {
    padding: 48px 0;
  }

  .card-grid,
  .card-grid-3,
  .card-grid-4 {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .profile-header {
    flex-direction: column;
    text-align: center;
  }

  .profile-info .profile-meta {
    justify-content: center;
  }

  .profile-stats-row {
    justify-content: center;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  #esports-map {
    height: 350px;
  }

  .map-controls {
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .timeline::before {
    left: 16px;
  }

  .timeline-dot {
    left: 11px;
  }

  .data-table {
    font-size: 0.8rem;
  }

  .data-table th,
  .data-table td {
    padding: 10px 12px;
  }
}

@media (max-width: 480px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.4rem; }
  h3 { font-size: 1.15rem; }

  .btn {
    padding: 10px 20px;
    font-size: 0.85rem;
  }

  .card {
    padding: 16px;
  }

  .section-header {
    margin-bottom: 32px;
  }
}

/* --- Print Styles --- */
@media print {
  .nav, .footer, .back-to-top, .map-container {
    display: none !important;
  }

  body {
    background: white;
    color: #111;
  }

  .section {
    padding: 20px 0;
  }

  a {
    color: #111;
    text-decoration: underline;
  }
}

/* --- Structured Data Visual Helpers --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* --- Region Color Coding --- */
.region-na { color: #3b82f6; }
.region-eu { color: #8b5cf6; }
.region-kr { color: #ef4444; }
.region-cn { color: #f97316; }
.region-br { color: #10b981; }
.region-sea { color: #06b6d4; }
.region-jp { color: #ec4899; }
.region-oce { color: #eab308; }

.bg-region-na { background: rgba(59,130,246,0.15); }
.bg-region-eu { background: rgba(139,92,246,0.15); }
.bg-region-kr { background: rgba(239,68,68,0.15); }
.bg-region-cn { background: rgba(249,115,22,0.15); }
.bg-region-br { background: rgba(16,185,129,0.15); }
.bg-region-sea { background: rgba(6,182,212,0.15); }

/* --- Heatmap overlay --- */
.heatmap-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  border-radius: var(--radius-sm);
  min-height: 48px;
}

/* --- Animated Gradient Border --- */
.glow-border {
  position: relative;
  overflow: hidden;
}

.glow-border::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: var(--gradient-accent);
  border-radius: inherit;
  z-index: -1;
  animation: glowRotate 3s linear infinite;
}

@keyframes glowRotate {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

/* --- Number tickers --- */
@keyframes countUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.count-animate {
  animation: countUp 0.5s ease forwards;
}
