/* IronStats Brasil - Ultra-Modern Premium Design */
/* Crafted with calm aesthetics, tactile feel, and smooth micro-interactions */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Sans:wght@400;500;600;700&family=Sora:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ============================================
   DESIGN TOKENS - Calm, Sophisticated Palette
   ============================================ */
:root {
  /* Deep, calming backgrounds */
  --bg-primary: #08090c;
  --bg-secondary: #0d0f14;
  --bg-elevated: #12151c;
  --bg-card: #161a24;
  --bg-card-hover: #1c212d;
  --bg-glass: rgba(22, 26, 36, 0.7);
  
  /* Soft, refined text colors */
  --text-primary: #f0f2f5;
  --text-secondary: #8b92a5;
  --text-muted: #5c6478;
  
  /* Accent palette - warm & cool balance */
  --accent-coral: #ff6b5b;
  --accent-coral-soft: rgba(255, 107, 91, 0.12);
  --accent-gold: #e8c872;
  --accent-gold-soft: rgba(232, 200, 114, 0.12);
  --accent-mint: #5ee8c5;
  --accent-mint-soft: rgba(94, 232, 197, 0.12);
  --accent-blue: #5b9fff;
  --accent-blue-soft: rgba(91, 159, 255, 0.12);
  
  /* Semantic colors */
  --swim: #6eb5ff;
  --bike: #ffb86e;
  --run: #7ee8a5;
  
  /* Borders & surfaces */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-default: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.12);
  --border-active: rgba(232, 200, 114, 0.4);
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.3);
  --shadow-glow-gold: 0 0 40px rgba(232, 200, 114, 0.15);
  --shadow-glow-coral: 0 0 40px rgba(255, 107, 91, 0.15);
  
  /* Motion */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  
  /* Spacing scale */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  
  /* Border radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
}

/* ============================================
   GLOBAL RESET & BASE
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Instrument Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Subtle background texture */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(94, 232, 197, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(255, 107, 91, 0.02) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
  position: relative;
  z-index: 1;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

/* Display text - large headlines */
.display-text {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  letter-spacing: -0.03em;
}

/* Mono text for numbers/times */
.mono {
  font-family: 'JetBrains Mono', monospace;
  font-feature-settings: 'tnum' on, 'lnum' on;
}

/* ============================================
   HEADER - Floating, Glass Effect
   ============================================ */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: var(--space-md) 0;
  background: rgba(8, 9, 12, 0.8);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-subtle);
  transition: all 0.4s var(--ease-out-expo);
}

header.scrolled {
  padding: var(--space-sm) 0;
  background: rgba(8, 9, 12, 0.95);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xl);
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  color: var(--text-primary);
  flex-shrink: 0;
  transition: transform 0.3s var(--ease-out-expo);
}

.logo:hover {
  transform: translateY(-1px);
}

.logo-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: brightness(1.1);
}

.logo-text {
  font-family: 'Sora', sans-serif;
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-text span {
  background: linear-gradient(135deg, var(--accent-coral) 0%, var(--accent-gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

/* Navigation */
nav {
  display: flex;
  gap: var(--space-xs);
  flex-shrink: 0;
}

nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-full);
  transition: all 0.25s var(--ease-out-expo);
  position: relative;
}

nav a:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

nav a.active {
  color: var(--accent-coral);
  background: var(--accent-coral-soft);
}

/* Header Search */
.header-search {
  flex: 1;
  max-width: 420px;
  position: relative;
}

/* Search type badges */
.search-type-badge {
  padding: 0.25rem 0.5rem;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.search-type-badge.atleta {
  background: var(--accent-mint-soft);
  color: var(--accent-mint);
}

.search-type-badge.prova {
  background: var(--accent-coral-soft);
  color: var(--accent-coral);
}

.header-search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-family: inherit;
  transition: all 0.3s var(--ease-out-expo);
}

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

.header-search-input:focus {
  outline: none;
  border-color: var(--accent-gold);
  background: var(--bg-card);
  box-shadow: 0 0 0 4px var(--accent-gold-soft);
}

.header-search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 18px;
  height: 18px;
  transition: color 0.25s;
  z-index: 1;
}

.header-search-input:focus + .header-search-icon,
.header-search:focus-within .header-search-icon {
  color: var(--accent-gold);
}

/* Search Results Dropdown */
.header-search-results,
.card-cta-search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  max-height: 400px;
  overflow-y: auto;
  display: none;
  z-index: 9999;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(20px);
}

.header-search-results.active,
.card-cta-search-results.active {
  display: block;
  animation: slideDown 0.25s var(--ease-out-expo);
}

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

.search-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  cursor: pointer;
  border-bottom: 1px solid var(--border-subtle);
  transition: all 0.2s var(--ease-out-expo);
}

.search-result-item:hover {
  background: var(--bg-card-hover);
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.search-result-name {
  font-weight: 600;
  font-size: 1rem;
}

.search-result-category {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.search-result-action {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--accent-gold);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.375rem 0.75rem;
  background: var(--accent-gold-soft);
  border-radius: var(--radius-full);
  transition: all 0.25s var(--ease-out-expo);
}

.search-result-action svg {
  width: 14px;
  height: 14px;
  transition: transform 0.3s var(--ease-spring);
}

.search-result-item:hover .search-result-action {
  background: var(--accent-gold);
  color: var(--bg-primary);
}

.search-result-item:hover .search-result-action svg {
  transform: translateX(3px);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  text-align: center;
  padding: var(--space-3xl) var(--space-lg);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 140%;
  height: 100%;
  background: radial-gradient(ellipse 50% 80% at 50% 0%, rgba(94, 232, 197, 0.05) 0%, transparent 60%);
  pointer-events: none;
}

.hero h1 {
  font-family: 'Sora', sans-serif;
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-lg);
  position: relative;
}

.hero h1 span {
  background: linear-gradient(135deg, var(--accent-coral) 0%, var(--accent-gold) 50%, var(--accent-mint) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  color: var(--text-secondary);
  font-size: 1.125rem;
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ============================================
   CARD CTA BANNER - Generate Card
   ============================================ */
.card-cta-banner {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin-bottom: var(--space-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xl);
  position: relative;
  overflow: visible;
  z-index: 10;
  transition: all 0.4s var(--ease-out-expo);
}

.card-cta-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--accent-coral-soft) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.4s;
}

.card-cta-banner:hover {
  border-color: var(--accent-coral);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow-coral);
}

.card-cta-banner:hover::before {
  opacity: 1;
}

.card-cta-content {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  position: relative;
  z-index: 1;
}

.card-cta-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--accent-coral) 0%, #ff8a7a 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(255, 107, 91, 0.25);
  transition: transform 0.4s var(--ease-spring);
}

.card-cta-banner:hover .card-cta-icon {
  transform: scale(1.08) rotate(3deg);
}

.card-cta-icon svg {
  width: 26px;
  height: 26px;
  color: white;
}

.card-cta-text h3 {
  font-family: 'Sora', sans-serif;
  font-size: 1.375rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  letter-spacing: -0.01em;
}

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

.card-cta-search {
  flex: 1;
  max-width: 320px;
  position: relative;
  z-index: 100;
}

.card-cta-search-input {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 2.75rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-family: inherit;
  transition: all 0.3s var(--ease-out-expo);
}

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

.card-cta-search-input:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 4px var(--accent-gold-soft);
}

.card-cta-search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 18px;
  height: 18px;
}

/* ============================================
   RANKINGS CTA BANNER
   ============================================ */
.rankings-cta-banner {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin-bottom: var(--space-xl);
  text-decoration: none;
  transition: all 0.4s var(--ease-out-expo);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.rankings-cta-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--accent-gold-soft) 0%, var(--accent-mint-soft) 100%);
  opacity: 0;
  transition: opacity 0.4s;
}

.rankings-cta-banner:hover {
  border-color: var(--accent-gold);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow-gold);
}

.rankings-cta-banner:hover::before {
  opacity: 1;
}

.rankings-cta-content {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  position: relative;
  z-index: 1;
}

.rankings-cta-icon {
  width: 56px;
  height: 56px;
  min-width: 56px;
  background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-mint) 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(232, 200, 114, 0.2);
  transition: transform 0.4s var(--ease-spring);
}

.rankings-cta-banner:hover .rankings-cta-icon {
  transform: scale(1.08) rotate(-3deg);
}

.rankings-cta-icon svg {
  width: 26px;
  height: 26px;
  stroke: var(--bg-primary);
  stroke-width: 2.5;
}

.rankings-cta-text {
  flex: 1;
}

.rankings-cta-text h3 {
  font-family: 'Sora', sans-serif;
  font-size: 1.375rem;
  font-weight: 600;
  margin: 0 0 0.25rem 0;
  background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-mint) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.rankings-cta-text p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

.rankings-cta-arrow {
  width: 44px;
  height: 44px;
  min-width: 44px;
  background: var(--accent-gold-soft);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s var(--ease-out-expo);
}

.rankings-cta-banner:hover .rankings-cta-arrow {
  background: var(--accent-gold);
  transform: translateX(4px);
}

.rankings-cta-arrow svg {
  width: 20px;
  height: 20px;
  stroke: var(--accent-gold);
  transition: stroke 0.3s;
}

.rankings-cta-banner:hover .rankings-cta-arrow svg {
  stroke: var(--bg-primary);
}

/* ============================================
   FILTERS BAR
   ============================================ */
.filters-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.filter-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 500;
}

.filter-select {
  padding: 0.5rem 1rem;
  padding-right: 2.25rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-family: inherit;
  cursor: pointer;
  min-width: 140px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238b92a5' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  transition: all 0.25s var(--ease-out-expo);
}

.filter-select:hover {
  border-color: var(--border-hover);
  background-color: var(--bg-card);
}

.filter-select:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px var(--accent-gold-soft);
}

/* ============================================
   HIGHLIGHT BANNERS
   ============================================ */
.highlight-banner {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
  transition: border-color 0.3s;
}

.highlight-banner:hover {
  border-color: var(--border-hover);
}

.highlight-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.highlight-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent-gold) 0%, #f4d87a 100%);
  border-radius: var(--radius-md);
  color: var(--bg-primary);
  box-shadow: 0 4px 16px rgba(232, 200, 114, 0.2);
}

.highlight-icon svg {
  width: 24px;
  height: 24px;
}

.highlight-icon.red {
  background: linear-gradient(135deg, var(--accent-coral) 0%, #ff8a7a 100%);
  box-shadow: 0 4px 16px rgba(255, 107, 91, 0.2);
  color: white;
}

.highlight-icon.teal {
  background: linear-gradient(135deg, var(--accent-mint) 0%, #7ff4d6 100%);
  box-shadow: 0 4px 16px rgba(94, 232, 197, 0.2);
  color: var(--bg-primary);
}

.highlight-icon.orange {
  background: linear-gradient(135deg, #ff8a5b 0%, #ffb86e 100%);
  box-shadow: 0 4px 16px rgba(255, 138, 91, 0.2);
  color: var(--bg-primary);
}

.highlight-icon.blue {
  background: linear-gradient(135deg, var(--accent-blue) 0%, #64b5f6 100%);
  box-shadow: 0 4px 16px rgba(100, 181, 246, 0.2);
  color: white;
}

.highlight-header h3 {
  font-family: 'Sora', sans-serif;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.highlight-header p {
  color: var(--text-muted);
  font-size: 0.8125rem;
  margin-top: 2px;
}

.highlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--space-md);
}

.highlight-athlete-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  cursor: pointer;
  transition: all 0.3s var(--ease-out-expo);
  position: relative;
  overflow: hidden;
}

/* Countries Section */
.countries-section {
  margin-top: var(--space-xxl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border-subtle);
}

.countries-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  margin-top: var(--space-lg);
}

.countries-column-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: 'Sora', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: var(--space-md);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
}

.countries-column-header svg {
  width: 18px;
  height: 18px;
}

.countries-column-header.full {
  background: linear-gradient(135deg, var(--accent-coral-soft) 0%, transparent 100%);
  color: var(--accent-coral);
  border: 1px solid var(--accent-coral-soft);
}

.countries-column-header.half {
  background: linear-gradient(135deg, var(--accent-mint-soft) 0%, transparent 100%);
  color: var(--accent-mint);
  border: 1px solid var(--accent-mint-soft);
}

/* Countries Grid */
.countries-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.country-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all 0.3s var(--ease-out-expo);
}

.country-card:hover {
  border-color: var(--accent-blue);
  transform: translateX(4px);
}

.country-rank {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Sora', sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
}

.country-card:nth-child(1) .country-rank {
  background: linear-gradient(135deg, #ffd700 0%, #ffb300 100%);
  color: var(--bg-primary);
}

.country-card:nth-child(2) .country-rank {
  background: linear-gradient(135deg, #c0c0c0 0%, #a0a0a0 100%);
  color: var(--bg-primary);
}

.country-card:nth-child(3) .country-rank {
  background: linear-gradient(135deg, #cd7f32 0%, #b87333 100%);
  color: var(--bg-primary);
}

.country-info {
  flex: 1;
}

.country-name {
  font-family: 'Sora', sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

.country-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.country-time {
  text-align: right;
}

.country-avg {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent-blue);
}

.country-label {
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.highlight-athlete-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-mint));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease-out-expo);
}

.highlight-athlete-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.highlight-athlete-card:hover::before {
  transform: scaleX(1);
}

.highlight-athlete-card .name {
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.highlight-athlete-card .time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--accent-gold);
}

.highlight-athlete-card .meta {
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

/* ============================================
   RACES DIFFICULTY SECTION
   ============================================ */
.races-difficulty-section {
  margin-top: var(--space-2xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border-subtle);
}

.section-title {
  font-family: 'Sora', sans-serif;
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.section-title svg {
  width: 24px;
  height: 24px;
  color: var(--accent-coral);
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin-bottom: var(--space-lg);
}

.difficulty-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

.difficulty-column {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}

.difficulty-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-subtle);
}

.difficulty-header h3 {
  font-family: 'Sora', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

.difficulty-header p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0;
}

.difficulty-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
}

.difficulty-icon svg {
  width: 20px;
  height: 20px;
}

.difficulty-icon.hard {
  background: var(--accent-coral-soft);
  color: var(--accent-coral);
}

.difficulty-icon.easy {
  background: var(--accent-mint-soft);
  color: var(--accent-mint);
}

.difficulty-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.difficulty-race-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--bg-elevated);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  transition: all 0.3s var(--ease-out-expo);
}

.difficulty-race-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateX(4px);
}

.race-rank {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
}

.race-info {
  flex: 1;
  min-width: 0;
}

.race-name {
  font-weight: 600;
  font-size: 0.875rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.25rem;
}

.race-meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.race-type {
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.625rem;
  letter-spacing: 0.05em;
}

.race-type.full {
  background: var(--accent-coral-soft);
  color: var(--accent-coral);
}

.race-type.half {
  background: var(--accent-gold-soft);
  color: var(--accent-gold);
}

.race-difficulty {
  text-align: right;
  flex-shrink: 0;
}

.race-difficulty .diff-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  font-weight: 600;
  display: block;
}

.race-difficulty .diff-label {
  font-size: 0.625rem;
  color: var(--text-muted);
}

.race-difficulty.hard .diff-value {
  color: var(--accent-coral);
}

.race-difficulty.easy .diff-value {
  color: var(--accent-mint);
}

/* ============================================
   STATS GRID
   ============================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-md);
  padding: var(--space-lg) 0;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  text-align: center;
  transition: all 0.3s var(--ease-out-expo);
}

.stat-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.stat-value {
  font-family: 'Sora', sans-serif;
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--accent-coral);
  letter-spacing: -0.02em;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ============================================
   TABLES
   ============================================ */
.table-container {
  overflow-x: auto;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--bg-card);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

thead {
  background: var(--bg-elevated);
}

th {
  padding: var(--space-md);
  text-align: left;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-default);
}

td {
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--border-subtle);
}

tbody tr {
  transition: background 0.2s;
  cursor: pointer;
}

tbody tr:hover {
  background: var(--bg-card-hover);
}

tbody tr:last-child td {
  border-bottom: none;
}

.pos-geral {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--accent-gold);
}

.tempo-swim { color: var(--swim); }
.tempo-bike { color: var(--bike); }
.tempo-run { color: var(--run); }
.tempo-total { font-weight: 700; color: var(--accent-coral); }

.prova-tipo {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.prova-tipo.full { background: var(--accent-coral-soft); color: var(--accent-coral); }
.prova-tipo.half { background: var(--accent-gold-soft); color: var(--accent-gold); }

/* ============================================
   TABS
   ============================================ */
.tabs {
  display: flex;
  gap: var(--space-xs);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border-subtle);
}

.tab {
  padding: var(--space-sm) var(--space-lg);
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9375rem;
  font-family: inherit;
  border-radius: var(--radius-sm);
  transition: all 0.25s var(--ease-out-expo);
  position: relative;
}

.tab:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

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

/* ============================================
   ATHLETE HEADER
   ============================================ */
.atleta-header {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-xl) 0;
}

.atleta-avatar {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, var(--accent-coral) 0%, var(--accent-gold) 100%);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Sora', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(255, 107, 91, 0.2);
}

.atleta-info h1 {
  font-family: 'Sora', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}

.atleta-categoria {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

/* ============================================
   ANALYSIS CARDS
   ============================================ */
.analysis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.analysis-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: all 0.3s var(--ease-out-expo);
}

.analysis-card:hover {
  border-color: var(--border-hover);
}

.analysis-card-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
}

.analysis-card-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent-mint) 0%, #7ff4d6 100%);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg-primary);
}

.analysis-card-icon svg { width: 18px; height: 18px; }
.analysis-card-icon.gold { background: linear-gradient(135deg, var(--accent-gold) 0%, #f4d87a 100%); }
.analysis-card-icon.red { background: linear-gradient(135deg, var(--accent-coral) 0%, #ff8a7a 100%); color: white; }

.analysis-card-title {
  font-family: 'Sora', sans-serif;
  font-size: 1rem;
  font-weight: 600;
}

/* Percentile Bar */
.percentile-container {
  margin-bottom: var(--space-md);
}

.percentile-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--space-xs);
  font-size: 0.8125rem;
}

.percentile-label .name { color: var(--text-muted); }
.percentile-label .value { font-weight: 600; color: var(--accent-mint); }

.percentile-bar {
  height: 8px;
  background: var(--bg-primary);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.percentile-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-mint) 0%, #7ff4d6 100%);
  border-radius: var(--radius-full);
  transition: width 0.6s var(--ease-out-expo);
}

.percentile-fill.gold { background: linear-gradient(90deg, var(--accent-gold) 0%, #f4d87a 100%); }
.percentile-fill.red { background: linear-gradient(90deg, var(--accent-coral) 0%, #ff8a7a 100%); }

/* Modality Comparison */
.mod-comparison {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.mod-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm);
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  transition: transform 0.2s var(--ease-out-expo);
}

.mod-row:hover {
  transform: translateX(4px);
}

.mod-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.mod-icon.swim { background: rgba(110, 181, 255, 0.12); color: var(--swim); }
.mod-icon.bike { background: rgba(255, 184, 110, 0.12); color: var(--bike); }
.mod-icon.run { background: rgba(126, 232, 165, 0.12); color: var(--run); }

.mod-icon svg { width: 18px; height: 18px; }

.mod-info { flex: 1; }

.mod-name {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mod-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.125rem;
  font-weight: 600;
}

.mod-diff {
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-full);
}

.mod-diff.positive {
  background: var(--accent-mint-soft);
  color: var(--accent-mint);
}

.mod-diff.negative {
  background: var(--accent-coral-soft);
  color: var(--accent-coral);
}

/* Points Badges */
.points-section {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  padding: var(--space-md) 0;
}

.point-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-elevated);
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 500;
  transition: transform 0.2s var(--ease-out-expo);
}

.point-badge:hover {
  transform: scale(1.05);
}

.point-badge svg { width: 14px; height: 14px; }

.point-badge.forte {
  color: var(--accent-mint);
  border: 1px solid rgba(94, 232, 197, 0.3);
}

.point-badge.fraco {
  color: var(--accent-coral);
  border: 1px solid rgba(255, 107, 91, 0.3);
}

/* ============================================
   WRAPPED CARDS (Athlete Card Generator)
   ============================================ */
.athlete-card {
  width: 360px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.wrapped-card {
  --card-accent: var(--accent-mint);
  width: 360px;
  height: 640px;
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  border: 2px solid var(--card-accent);
}

.wrapped-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(94, 232, 197, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.card-1 {
  --card-accent: var(--accent-mint);
  background: linear-gradient(165deg, #0a1612 0%, #0f1f1b 50%, #060d0a 100%);
}

.card-2 {
  --card-accent: var(--accent-gold);
  background: linear-gradient(165deg, #14120a 0%, #1c180d 50%, #0d0b06 100%);
}

.card-3 {
  --card-accent: var(--accent-coral);
  background: linear-gradient(165deg, #140a0c 0%, #1c0d10 50%, #0d0508 100%);
}

.wrapped-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 1;
}

.wrapped-logo { height: 24px; }

.wrapped-year {
  font-family: 'Sora', sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--card-accent);
}

.wrapped-intro {
  margin-top: var(--space-lg);
  position: relative;
  z-index: 1;
}

.wrapped-label {
  font-size: 0.6875rem;
  color: var(--card-accent);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 600;
}

.wrapped-name {
  font-family: 'Sora', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0.25rem 0;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.wrapped-cat {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.wrapped-big-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.wrapped-big-stat .big-number {
  font-family: 'Sora', sans-serif;
  font-size: 6rem;
  font-weight: 700;
  line-height: 1;
  color: var(--card-accent);
  letter-spacing: -0.03em;
}

.wrapped-big-stat .big-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: var(--space-sm);
}

/* Card Stats Row */
.wrapped-stats-row {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin: 0.75rem 0;
  position: relative;
  z-index: 1;
}

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

.wrapped-stat .stat-icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  color: var(--card-accent);
  margin-bottom: 0.25rem;
}

.wrapped-stat .stat-icon svg {
  width: 18px;
  height: 18px;
}

.wrapped-stat .stat-value {
  font-family: 'Sora', sans-serif;
  font-size: 1.375rem;
  font-weight: 700;
  display: block;
}

.wrapped-stat .stat-label {
  font-size: 0.5625rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.wrapped-divider {
  width: 1px;
  background: var(--border-subtle);
  align-self: stretch;
}

/* Card Time Block */
.wrapped-time-block {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-md);
  padding: 0.875rem 1rem;
  margin: 0.5rem 0;
  text-align: center;
}

.wrapped-time-block .time-type {
  font-size: 0.625rem;
  color: var(--card-accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.wrapped-time-block .time-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* Card Mods Row */
.wrapped-mods {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.wrapped-mod {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
}

.wrapped-mod .mod-name {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.wrapped-mod .mod-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  font-weight: 600;
}

.wrapped-mod .mod-icon {
  width: 16px;
  height: 16px;
  color: var(--card-accent);
}

/* Card 3 Profile Grid */
.wrapped-profile-grid {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.625rem;
  position: relative;
  z-index: 1;
}

.wrapped-mod-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-md);
  padding: 0.75rem;
}

.mod-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  padding-bottom: 0.375rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.mod-icon-large {
  width: 18px;
  height: 18px;
  color: var(--card-accent);
}

.mod-icon-large svg {
  width: 18px;
  height: 18px;
}

.mod-card-title {
  font-family: 'Sora', sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-primary);
}

.mod-card-content {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.25rem 0.5rem;
}

.mod-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mod-stat-label {
  font-size: 0.625rem;
  color: var(--text-muted);
}

.mod-stat-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
}

.mod-stat-small {
  font-size: 0.625rem;
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 600;
  color: var(--card-accent);
}

.mod-stat-avg {
  grid-column: 1 / -1;
  padding-top: 0.25rem;
  margin-top: 0.125rem;
  border-top: 1px dashed rgba(255,255,255,0.06);
}

.mod-stat-avg .mod-stat-value {
  color: var(--text-muted);
  font-size: 0.6875rem;
}

/* ============================================
   RACE STATS (Prova page)
   ============================================ */
.race-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
  margin: var(--space-lg) 0;
}

.race-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  transition: all 0.3s var(--ease-out-expo);
}

.race-stat-card:hover {
  border-color: var(--border-hover);
}

.race-stat-card h4 {
  font-family: 'Sora', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border-subtle);
}

.race-stat-item {
  display: flex;
  justify-content: space-between;
  padding: 0.375rem 0;
  font-size: 0.875rem;
}

.race-stat-item .label {
  color: var(--text-muted);
}

.race-stat-item .value {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
}

.difficulty-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.difficulty-badge.easy {
  background: var(--accent-mint-soft);
  color: var(--accent-mint);
}

.difficulty-badge.normal {
  background: var(--accent-gold-soft);
  color: var(--accent-gold);
}

.difficulty-badge.hard {
  background: var(--accent-coral-soft);
  color: var(--accent-coral);
}

.wrapped-footer {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding-top: var(--space-md);
}

/* Card Navigation */
.card-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.card-nav-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--bg-card);
  color: var(--text-primary);
  border-radius: var(--radius-full);
  font-size: 1.125rem;
  cursor: pointer;
  transition: all 0.25s var(--ease-out-expo);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-nav-btn:hover {
  background: var(--bg-elevated);
  transform: scale(1.1);
}

.card-dots {
  display: flex;
  gap: var(--space-sm);
}

.dot {
  width: 8px;
  height: 8px;
  background: var(--border-default);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.25s var(--ease-out-expo);
}

.dot:hover {
  background: var(--text-muted);
}

.dot.active {
  background: var(--accent-coral);
  transform: scale(1.25);
}

/* ============================================
   LOADING
   ============================================ */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: var(--space-2xl);
}

.spinner {
  width: 28px;
  height: 28px;
  border: 2px solid var(--border-default);
  border-top-color: var(--accent-coral);
  border-radius: var(--radius-full);
  animation: spin 0.8s linear infinite;
}

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

/* ============================================
   FOOTER
   ============================================ */
footer {
  text-align: center;
  padding: var(--space-xl);
  color: var(--text-muted);
  font-size: 0.8125rem;
  border-top: 1px solid var(--border-subtle);
  margin-top: var(--space-3xl);
}

footer a {
  color: var(--accent-coral);
  text-decoration: none;
  transition: color 0.25s;
}

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

/* ============================================
   TOOLTIPS
   ============================================ */
.tooltip-trigger {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: 1px solid rgba(232, 200, 114, 0.3);
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--accent-gold);
  background: var(--accent-gold-soft);
  transition: all 0.25s var(--ease-out-expo);
  flex-shrink: 0;
}

.tooltip-trigger:hover {
  background: var(--accent-gold);
  color: var(--bg-primary);
  border-color: var(--accent-gold);
  transform: scale(1.1);
}

.tooltip-popup {
  position: fixed;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  border: 1px solid var(--accent-gold);
    font-size: 0.875rem;
  color: var(--text-primary);
  line-height: 1.6;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, 0.05);
  z-index: 10000;
    display: none;
  min-width: 280px;
  max-width: 360px;
}

.tooltip-popup.active {
    display: block;
  animation: tooltipFadeIn 0.2s var(--ease-out-expo);
}

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

.tooltip-popup strong {
  color: var(--accent-gold);
    font-weight: 600;
}

/* ============================================
   INSIGHT BOX
   ============================================ */
.insight-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  transition: all 0.3s var(--ease-out-expo);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  cursor: pointer;
}

.insight-box p {
  margin: 0;
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.insight-box .insight-value {
  font-family: 'Sora', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-gold);
}

.insight-box:hover {
  transform: translateY(-3px);
  border-color: var(--accent-gold);
  box-shadow: var(--shadow-glow-gold);
}

/* ============================================
   RANKING PAGE STYLES
   ============================================ */
.ranking-filters {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}

.ranking-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.ranking-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s var(--ease-out-expo);
  text-align: center;
}

.ranking-tab .tab-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--text-muted);
  transition: all 0.3s var(--ease-out-expo);
}

.ranking-tab:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.ranking-tab:hover .tab-icon svg {
  stroke: var(--text-primary);
}

.ranking-tab.active {
  background: var(--accent-gold-soft);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.ranking-tab.active .tab-icon svg {
  stroke: var(--accent-gold);
}

.ranking-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.ranking-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  transition: all 0.3s var(--ease-out-expo);
}

.ranking-item:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateX(4px);
}

.rank-position {
  flex-shrink: 0;
  width: 48px;
  text-align: center;
}

.rank-position .medal { font-size: 2rem; }

.rank-position .rank-number {
  font-family: 'Sora', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-muted);
}

.rank-info {
  flex: 1;
  min-width: 0;
}

.rank-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
  text-decoration: none;
  display: block;
  margin-bottom: 0.25rem;
  transition: color 0.25s;
}

.rank-name:hover {
  color: var(--accent-gold);
}

.rank-details {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.rank-stats {
  flex-shrink: 0;
  text-align: right;
}

.stat-highlight {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-bottom: var(--space-xs);
}

.stat-value {
  font-family: 'Sora', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
  color: var(--accent-gold);
}

.stat-value.improvement { color: var(--accent-mint); }
.stat-value.volume { color: var(--accent-gold); }
.stat-value.position { color: var(--accent-coral); }
.stat-value.podium { color: var(--accent-gold); }

.stat-label {
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

/* Medal Icons */
.medal-icon,
.medal-icon-small {
  width: 32px;
  height: 32px;
  stroke-width: 2;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  transition: all 0.3s var(--ease-out-expo);
}

.medal-icon-small {
  width: 20px;
  height: 20px;
}

.medal-icon.gold { stroke: #FFD700; color: #FFD700; }
.medal-icon.silver { stroke: #C0C0C0; color: #C0C0C0; }
.medal-icon.bronze { stroke: #CD7F32; color: #CD7F32; }

.ranking-item:hover .medal-icon {
  filter: drop-shadow(0 4px 12px rgba(255, 215, 0, 0.4));
  transform: scale(1.1) rotate(5deg);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
  .header-content {
    flex-wrap: wrap;
    justify-content: space-between;
    row-gap: var(--space-sm);
  }
  
  .logo {
    order: 1;
    flex: 0 0 auto;
  }
  
  nav {
    order: 2;
    flex: 0 0 auto;
  }
  
  .header-search {
    order: 3;
    flex: 1 1 100%;
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--space-sm);
  }
  
  .header-search-input {
    max-width: 100%;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .card-cta-banner {
    flex-direction: column;
    text-align: center;
    padding: var(--space-lg);
  }
  
  .card-cta-content {
    flex-direction: column;
  }
  
  .card-cta-search {
    max-width: 100%;
    width: 100%;
  }
  
  .rankings-cta-content {
    flex-direction: column;
    text-align: center;
    gap: var(--space-md);
  }
  
  .rankings-cta-arrow {
    display: none;
  }
  
  .filters-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
  }
  
  .difficulty-grid {
    grid-template-columns: 1fr;
  }
  
  .countries-columns {
    grid-template-columns: 1fr;
  }
  
  .atleta-header {
    flex-direction: column;
    text-align: center;
  }
  
  .analysis-grid {
    grid-template-columns: 1fr;
  }
  
  .ranking-tabs {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .ranking-item {
    flex-wrap: wrap;
    gap: var(--space-sm);
  }
  
  .rank-stats {
    flex-basis: 100%;
    text-align: left;
    padding-left: 56px;
  }
  
  /* Mobile table style */
  thead { display: none; }
  
  tbody tr {
    display: block;
    padding: var(--space-md);
    border: 1px solid var(--border-default);
    margin-bottom: var(--space-sm);
    border-radius: var(--radius-md);
    background: var(--bg-card);
  }
  
  td {
    display: flex;
    justify-content: space-between;
    padding: var(--space-xs) 0;
    border: none;
  }
  
  td::before {
    content: attr(data-label);
  font-weight: 600;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-md);
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .wrapped-card {
    width: 100%;
    max-width: 340px;
    height: auto;
    min-height: 580px;
  }
  
  .wrapped-big-stat .big-number {
    font-size: 4.5rem;
  }
  
  .highlight-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .ranking-tabs {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================
   MICRO-INTERACTIONS & ANIMATIONS
   ============================================ */

/* Smooth focus transitions */
*:focus {
  outline: none;
}

*:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 2px;
}

/* Button press effect */
button:active,
.btn:active {
  transform: scale(0.98);
}

/* Link hover underline animation */
a:not(.btn):not(.logo):not(.ranking-cta-banner):not(.difficulty-race-card):not(.ranking-item) {
  position: relative;
}

/* Stagger animation for lists */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ranking-item,
.highlight-athlete-card,
.difficulty-race-card {
  animation: fadeInUp 0.4s var(--ease-out-expo) backwards;
}

.ranking-item:nth-child(1) { animation-delay: 0.05s; }
.ranking-item:nth-child(2) { animation-delay: 0.1s; }
.ranking-item:nth-child(3) { animation-delay: 0.15s; }
.ranking-item:nth-child(4) { animation-delay: 0.2s; }
.ranking-item:nth-child(5) { animation-delay: 0.25s; }

/* Pulse animation for active states */
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.dot.active {
  animation: pulse 2s var(--ease-out-expo) infinite;
}

/* Skeleton loading */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-elevated) 0%,
    var(--bg-card-hover) 50%,
    var(--bg-elevated) 100%
  );
  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; }
}

/* Confetti animation for achievements */
@keyframes confetti-burst {
  0% {
    transform: translate(0, 0) rotate(0deg) scale(1);
    opacity: 1;
  }
  20% { opacity: 1; }
  100% {
    transform: translate(var(--tx), var(--ty)) rotate(var(--rot)) scale(0.2);
    opacity: 0;
  }
}

.confetti {
  position: fixed;
  width: 10px;
  height: 10px;
  background: var(--accent-gold);
  pointer-events: none;
  z-index: 9999;
  animation: confetti-burst var(--duration) var(--ease-out-quart) forwards;
}
