/* CSS Design System for Bharat Sports Heroes — Unsung Indian Medalists */
:root {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.7);
  --bg-glass-modal: rgba(255, 255, 255, 0.95);
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-inverse: #ffffff;
  
  --border-color: rgba(226, 232, 240, 0.8);
  --border-focus: #6366f1;
  
  --primary-accent: #4f46e5;
  --primary-hover: #4338ca;
  --saffron-orange: #ea580c;
  --india-green: #16a34a;
  
  --gold-bg: #fef9c3;
  --gold-text: #a16207;
  --gold-border: #fde047;
  
  --silver-bg: #f1f5f9;
  --silver-text: #475569;
  --silver-border: #cbd5e1;
  
  --bronze-bg: #ffedd5;
  --bronze-text: #c2410c;
  --bronze-border: #fdba74;
  
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  
  --font-heading: 'Outfit', 'Noto Sans Devanagari', sans-serif;
  --font-body: 'Inter', 'Noto Sans Devanagari', sans-serif;
}

[data-theme="dark"] {
  --bg-primary: #0b0f19;
  --bg-secondary: #131b2e;
  --bg-card: rgba(19, 27, 46, 0.85);
  --bg-glass: rgba(15, 23, 42, 0.75);
  --bg-glass-modal: rgba(15, 23, 42, 0.96);
  
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-inverse: #0f172a;
  
  --border-color: rgba(51, 65, 85, 0.6);
  --border-focus: #818cf8;
  
  --primary-accent: #6366f1;
  --primary-hover: #4f46e5;
  
  --gold-bg: rgba(234, 179, 8, 0.15);
  --gold-text: #fde047;
  --gold-border: rgba(234, 179, 8, 0.3);
  
  --silver-bg: rgba(148, 163, 184, 0.15);
  --silver-text: #cbd5e1;
  --silver-border: rgba(148, 163, 184, 0.3);
  
  --bronze-bg: rgba(249, 115, 22, 0.15);
  --bronze-text: #fb923c;
  --bronze-border: rgba(249, 115, 22, 0.3);
  
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.3);
  --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.5);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s ease, color 0.3s ease;
  position: relative;
  overflow-x: hidden;
}

/* Ambient Background Lights */
.ambient-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.18;
}

.orb-saffron {
  top: -100px;
  left: -100px;
  width: 450px;
  height: 450px;
  background: var(--saffron-orange);
}

.orb-white {
  top: 40%;
  right: -150px;
  width: 500px;
  height: 500px;
  background: var(--primary-accent);
}

.orb-green {
  bottom: -100px;
  left: 20%;
  width: 400px;
  height: 400px;
  background: var(--india-green);
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

/* Header */
.app-header {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 14px 0;
  transition: background 0.3s ease, border-color 0.3s ease, padding-top 0.2s ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.back-link:hover {
  color: var(--primary-accent);
  border-color: var(--primary-accent);
  transform: translateX(-2px);
}

.app-branding {
  display: flex;
  align-items: center;
  gap: 12px;
}

.branding-badge {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--saffron-orange) 0%, var(--primary-accent) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.25);
}

.branding-icon {
  width: 22px;
  height: 22px;
}

.branding-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
}

.branding-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Language Switcher */
.lang-switch-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 4px 6px;
}

.lang-icon {
  width: 16px;
  height: 16px;
  margin-left: 6px;
  color: var(--text-muted);
}

.lang-btn-group {
  display: flex;
  gap: 4px;
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-btn.active {
  background: var(--primary-accent);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

.lang-btn:hover:not(.active) {
  color: var(--text-main);
  background: rgba(99, 102, 241, 0.1);
}

/* Theme Toggle Button */
.theme-toggle-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary-accent);
  border-color: var(--primary-accent);
}

.icon-sun { display: block; }
.icon-moon { display: none; }

[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

/* Main Content Area */
.main-content {
  flex: 1;
  padding-top: 32px;
  padding-bottom: 60px;
}

/* Hero Section */
.hero-banner {
  margin-bottom: 28px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: rgba(234, 88, 12, 0.1);
  color: var(--saffron-orange);
  font-size: 0.825rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.hero-headline {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--text-main) 0%, var(--primary-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 820px;
  margin-bottom: 24px;
}

/* Stats Counter Strip */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
}

.bg-gold { background: linear-gradient(135deg, #eab308 0%, #ca8a04 100%); }
.bg-saffron { background: linear-gradient(135deg, #f97316 0%, #ea580c 100%); }
.bg-silver { background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%); }
.bg-bronze { background: linear-gradient(135deg, #f97316 0%, #c2410c 100%); }
.bg-rose { background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%); }

.stat-number {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
}

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

/* Controls Panel */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
}

.controls-single-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.search-bar {
  flex: 1;
  min-width: 220px;
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-bar input {
  width: 100%;
  padding: 11px 40px 11px 40px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: all 0.2s ease;
}

.search-bar input:focus {
  border-color: var(--primary-accent);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.clear-btn {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.clear-btn:hover {
  color: var(--text-main);
}

.dropdown-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.dropdown-group select {
  padding: 11px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.dropdown-group select:hover {
  border-color: var(--primary-accent);
}

.dropdown-group select:focus {
  border-color: var(--primary-accent);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* Filter Tabs */
.filter-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.filter-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.filter-btn svg {
  width: 14px;
  height: 14px;
}

.filter-btn:hover {
  border-color: var(--primary-accent);
  color: var(--text-main);
}

.filter-btn.active {
  background: var(--primary-accent);
  border-color: var(--primary-accent);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
}

/* Results Status Bar */
.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding: 0 4px;
}

.results-count {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
}

.keyboard-tip {
  font-size: 0.75rem;
  color: var(--text-muted);
}

kbd {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 2px 6px;
  font-family: monospace;
  font-size: 0.7rem;
}

/* Athlete Cards Grid */
.athletes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.athlete-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  position: relative;
  overflow: hidden;
}

.athlete-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(99, 102, 241, 0.4);
}

.card-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

.avatar-icon-wrapper {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(234, 88, 12, 0.15) 100%);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-accent);
  flex-shrink: 0;
}

.athlete-info {
  flex: 1;
}

.athlete-name {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 4px;
}

.athlete-sport-origin {
  font-size: 0.825rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.sport-tag {
  color: var(--primary-accent);
  font-weight: 600;
}

/* Medal Badges */
.medals-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.medal-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.medal-chip.gold {
  background: var(--gold-bg);
  color: var(--gold-text);
  border: 1px solid var(--gold-border);
}

.medal-chip.silver {
  background: var(--silver-bg);
  color: var(--silver-text);
  border: 1px solid var(--silver-border);
}

.medal-chip.bronze {
  background: var(--bronze-bg);
  color: var(--bronze-text);
  border: 1px solid var(--bronze-border);
}

/* Hardship Banner inside card */
.hardship-box {
  background: rgba(239, 68, 68, 0.06);
  border-left: 3px solid #ef4444;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 10px 12px;
  margin-bottom: 18px;
}

.hardship-box.active-info {
  background: rgba(16, 185, 129, 0.06);
  border-left-color: #10b981;
}

.hardship-box.active-info .hardship-title {
  color: #059669;
}

.hardship-box.pending-info {
  background: rgba(148, 163, 184, 0.08);
  border-left-color: #94a3b8;
}

.hardship-box.pending-info .hardship-title {
  color: #64748b;
}

.hardship-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #dc2626;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

[data-theme="dark"] .hardship-title {
  color: #f87171;
}

.status-badge-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
}

.status-badge-inline.hardship {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.status-badge-inline.active {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.status-badge-inline.pending {
  background: rgba(148, 163, 184, 0.12);
  color: #64748b;
  border: 1px dashed var(--border-color);
}

.hardship-snippet {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-color);
  padding-top: 14px;
  margin-top: auto;
}

.tournament-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  max-width: 65%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-view-details {
  background: var(--primary-accent);
  color: #ffffff;
  border: none;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-view-details:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
  transform: translateX(2px);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-card);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-lg);
  margin-top: 20px;
}

.empty-icon {
  width: 56px;
  height: 56px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.empty-state h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.btn-reset {
  background: var(--primary-accent);
  color: #ffffff;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
}

/* Modal Dialog */
.athlete-modal {
  border: none;
  background: transparent;
  padding: 0;
  max-width: 680px;
  width: 90%;
  margin: auto;
  border-radius: var(--radius-lg);
  overflow: visible;
  outline: none;
}

.athlete-modal::backdrop {
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
}

.glass-modal {
  background: var(--bg-glass-modal);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-lg);
  position: relative;
  max-height: 88vh;
  overflow-y: auto;
  scrollbar-width: thin;
}

.modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  color: var(--text-main);
  border-color: var(--primary-accent);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 24px;
  padding-right: 40px;
}

.modal-avatar {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--saffron-orange) 0%, var(--primary-accent) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.modal-name {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.2;
}

.modal-subtext {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.modal-section {
  margin-bottom: 24px;
}

.section-heading {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-main);
}

.section-heading svg {
  width: 18px;
  height: 18px;
  color: var(--primary-accent);
}

.heading-danger svg {
  color: #ef4444;
}

.medals-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.medal-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  font-size: 0.875rem;
  font-weight: 500;
}

.situation-box {
  background: rgba(239, 68, 68, 0.05);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius-md);
  padding: 16px;
}

.severity-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.725rem;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  margin-bottom: 8px;
}

.situation-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.situation-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.full-story-text {
  font-size: 0.925rem;
  color: var(--text-main);
  line-height: 1.6;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
}

.news-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.news-links-list li a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-accent);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.news-links-list li a:hover {
  text-decoration: underline;
  color: var(--primary-hover);
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-color);
  padding-top: 18px;
  margin-top: 10px;
}

.btn-share {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-share:hover {
  border-color: var(--primary-accent);
  color: var(--primary-accent);
}

.btn-close-secondary {
  background: var(--primary-accent);
  color: #ffffff;
  border: none;
  padding: 8px 18px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
}

/* Footer */
.app-footer {
  background: var(--bg-glass);
  border-top: 1px solid var(--border-color);
  padding: 24px 0;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-brand {
  font-weight: 700;
  color: var(--text-main);
  margin-right: 8px;
}

.footer-link {
  color: var(--primary-accent);
  text-decoration: none;
}

.footer-link:hover {
  text-decoration: underline;
}

.dot-sep {
  margin: 0 6px;
}

/* Spotlight Section for Unsung / Forgotten Heroes at Top */
.spotlight-section {
  background: rgba(239, 68, 68, 0.04);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 32px;
}

.spotlight-header {
  margin-bottom: 20px;
}

.spotlight-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.spotlight-badge {
  background: #ef4444;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-transform: uppercase;
}

.spotlight-heading {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-main);
}

.spotlight-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.spotlight-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

/* Directory & Tabular View Styling */
.directory-section {
  margin-top: 24px;
}

.directory-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.view-mode-toggle {
  display: flex;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 3px;
  gap: 4px;
}

.view-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.view-btn.active {
  background: var(--primary-accent);
  color: #ffffff;
}

/* Responsive Table */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  padding: 0;
  border-radius: var(--radius-lg);
  margin-bottom: 30px;
}

.athletes-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}

.athletes-table th {
  background: rgba(99, 102, 241, 0.08);
  color: var(--text-main);
  font-family: var(--font-heading);
  font-weight: 700;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.athletes-table th.sortable {
  cursor: pointer;
  user-select: none;
}

.athletes-table th.sortable:hover {
  color: var(--primary-accent);
}

.athletes-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.athletes-table tbody tr {
  transition: background-color 0.2s ease;
}

.athletes-table tbody tr:hover {
  background: rgba(99, 102, 241, 0.04);
}

.table-athlete-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.table-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-accent);
  font-weight: 700;
  flex-shrink: 0;
}

.table-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge-unsung {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.table-sport {
  font-weight: 600;
  color: var(--primary-accent);
}

.table-category {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.status-badge-inline {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Responsive Breakpoints */
@media (max-width: 768px) {
  .app-header {
    padding-top: max(env(safe-area-inset-top, 0px), 50px) !important;
    padding-bottom: 12px !important;
  }
  
  .hero-headline {
    font-size: 1.7rem;
  }
  
  .header-inner {
    flex-wrap: wrap;
  }
  
  .search-row {
    flex-direction: column;
  }
  
  .dropdown-filters {
    width: 100%;
  }
  
  .dropdown-filters select {
    flex: 1;
  }
  
  .athletes-grid {
    grid-template-columns: 1fr;
  }
  
  .modal-header {
    flex-direction: column;
  }
  
  .results-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

@media (max-width: 600px) {
  .header-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 0.5rem 0;
    gap: 0.5rem;
  }
  .brand-sub { display: none; }
  .brand-title { font-size: 1.1rem; }
  .back-link { font-size: 0.78rem; padding: 0.3rem 0.5rem; }
  .container { padding: 0 1rem; }
  .spotlight-cards-grid { grid-template-columns: 1fr; }
  .table-responsive { width: 100%; max-width: 100%; min-width: 0; overflow-x: auto; box-sizing: border-box; }
  .athletes-table { min-width: 500px; }
  .dropdown-filters { flex-direction: column; width: 100%; }
  .dropdown-filters select { width: 100%; }
}

