/**
 * Skeleton Navigation Overlay Styles
 * 
 * Provides instant perceived navigation by showing skeleton loaders
 * immediately when navigating between key pages.
 * 
 * Uses gender-based accent colors:
 * - Men's: #E07856 (warm orange)
 * - Women's: #E879B3 (pink)
 */

/* ============================================
   CSS VARIABLES - Accent Colors
   ============================================ */
#skeleton-nav-overlay {
  --skel-accent: #E07856;
  --skel-accent-hover: #d6654a;
  --skel-accent-light: rgba(224, 120, 86, 0.15);
  --skel-accent-glow: rgba(224, 120, 86, 0.4);
}

#skeleton-nav-overlay.womens-theme {
  --skel-accent: #E879B3;
  --skel-accent-hover: #d666a0;
  --skel-accent-light: rgba(232, 121, 179, 0.15);
  --skel-accent-glow: rgba(232, 121, 179, 0.4);
}

/* ============================================
   OVERLAY CONTAINER
   ============================================ */
#skeleton-nav-overlay {
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9998;
  background: #fafafa;
  display: none;
  opacity: 0;
  transition: opacity 0.15s ease-out;
  overflow-y: auto;
  overflow-x: hidden;
}

html.dark #skeleton-nav-overlay {
  background: #18181b;
}

@media (prefers-color-scheme: dark) {
  #skeleton-nav-overlay {
    background: #18181b;
  }
}

#skeleton-nav-overlay.visible {
  opacity: 1;
}

body.skeleton-nav-active {
  overflow: hidden;
}

.skeleton-overlay-content {
  min-height: calc(100vh - 64px);
  box-sizing: border-box;
}

/* ============================================
   SHIMMER ANIMATION
   ============================================ */
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-shimmer {
  background: linear-gradient(90deg, 
    rgba(0, 0, 0, 0.06) 0%, 
    rgba(0, 0, 0, 0.10) 50%, 
    rgba(0, 0, 0, 0.06) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: 8px;
}

html.dark .skeleton-shimmer {
  background: linear-gradient(90deg, 
    rgba(255, 255, 255, 0.06) 0%, 
    rgba(255, 255, 255, 0.10) 50%, 
    rgba(255, 255, 255, 0.06) 100%
  );
  background-size: 200% 100%;
}

@media (prefers-color-scheme: dark) {
  .skeleton-shimmer {
    background: linear-gradient(90deg, 
      rgba(255, 255, 255, 0.06) 0%, 
      rgba(255, 255, 255, 0.10) 50%, 
      rgba(255, 255, 255, 0.06) 100%
    );
    background-size: 200% 100%;
  }
}

/* Accent-colored elements */
.accent-bg {
  background: linear-gradient(90deg, 
    var(--skel-accent-light) 0%, 
    color-mix(in srgb, var(--skel-accent) 25%, transparent) 50%, 
    var(--skel-accent-light) 100%
  ) !important;
  background-size: 200% 100% !important;
}

.accent-text {
  background: linear-gradient(90deg, 
    color-mix(in srgb, var(--skel-accent) 15%, transparent) 0%, 
    color-mix(in srgb, var(--skel-accent) 30%, transparent) 50%, 
    color-mix(in srgb, var(--skel-accent) 15%, transparent) 100%
  ) !important;
  background-size: 200% 100% !important;
}

.accent-border {
  border: 2px solid var(--skel-accent-light) !important;
}

.accent-gradient {
  background: linear-gradient(90deg, 
    transparent 0%, 
    var(--skel-accent-light) 50%, 
    transparent 100%
  ) !important;
}

/* ============================================
   INDEX PAGE SKELETON
   ============================================ */
.skeleton-index {
  padding: 0;
}

/* Header */
.skel-header {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px 20px;
  margin: 0 24px 6px;
  max-width: 1480px;
  margin-left: auto;
  margin-right: auto;
}

html.dark .skel-header {
  background: #27272a;
  border-color: #3f3f46;
}

@media (prefers-color-scheme: dark) {
  .skel-header {
    background: #27272a;
    border-color: #3f3f46;
  }
}

.skel-header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
}

.skel-logo-text {
  width: 140px;
  height: 32px;
}

.skel-search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 500px;
  margin: 0 auto;
}

.skel-search-input {
  flex: 1;
  height: 40px;
  border-radius: 10px;
}

.skel-search-btn {
  width: 70px;
  height: 36px;
  border-radius: 6px;
}

.skel-db-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0,0,0,0.02);
  border-radius: 12px;
  padding: 10px 14px;
}

html.dark .skel-db-btn {
  background: rgba(255,255,255,0.03);
}

.skel-db-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.skel-db-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.skel-db-count {
  width: 50px;
  height: 18px;
}

.skel-db-label {
  width: 100px;
  height: 12px;
}

/* Crawler */
.skel-crawler {
  max-width: 1480px;
  margin: 0 auto 6px;
  padding: 0 24px;
}

.skel-crawler-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px 20px;
  overflow: hidden;
}

html.dark .skel-crawler-inner {
  background: #27272a;
  border-color: #3f3f46;
}

@media (prefers-color-scheme: dark) {
  .skel-crawler-inner {
    background: #27272a;
    border-color: #3f3f46;
  }
}

.skel-crawler-badge {
  width: 80px;
  height: 28px;
  border-radius: 14px;
  flex-shrink: 0;
}

.skel-crawler-item {
  width: 200px;
  height: 24px;
  flex-shrink: 0;
}

/* Main Grid */
.skel-index-grid {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  justify-content: center;
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 24px;
}

.skel-index-left,
.skel-index-right {
  flex: 0 0 320px;
  width: 320px;
}

.skel-index-center {
  flex: 1;
  max-width: 800px;
  min-width: 400px;
}

/* Cards */
.skel-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

html.dark .skel-card {
  background: #27272a;
  border-color: #3f3f46;
}

@media (prefers-color-scheme: dark) {
  .skel-card {
    background: #27272a;
    border-color: #3f3f46;
  }
}

/* AOTW Card */
.skel-aotw-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
}

.skel-aotw-badge {
  width: 60px;
  height: 32px;
  border-radius: 16px;
}

.skel-aotw-title {
  width: 140px;
  height: 20px;
}

.skel-aotw-name {
  width: 180px;
  height: 28px;
  margin: 0 auto 8px;
}

.skel-aotw-school {
  width: 150px;
  height: 16px;
  margin: 0 auto 6px;
}

.skel-aotw-grade {
  width: 80px;
  height: 14px;
  margin: 0 auto 16px;
}

.skel-aotw-score {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px;
  background: rgba(0,0,0,0.02);
  border-radius: 8px;
  margin-bottom: 16px;
}

html.dark .skel-aotw-score {
  background: rgba(255,255,255,0.03);
}

.skel-score-num {
  width: 60px;
  height: 32px;
  border-radius: 6px;
}

.skel-stars {
  display: flex;
  gap: 4px;
}

.skel-star {
  width: 18px;
  height: 18px;
  border-radius: 50%;
}

.skel-aotw-blurb {
  margin-bottom: 16px;
}

.skel-blurb-line {
  height: 14px;
  margin-bottom: 8px;
  width: 100%;
}

.skel-blurb-line.short {
  width: 70%;
}

.skel-aotw-link {
  width: 100px;
  height: 32px;
  border-radius: 6px;
  margin: 0 auto;
}

/* Rankings Card */
.skel-rankings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.skel-rankings-title {
  width: 130px;
  height: 22px;
}

.skel-year-selector {
  display: flex;
  gap: 4px;
  background: rgba(0,0,0,0.03);
  padding: 4px;
  border-radius: 8px;
}

html.dark .skel-year-selector {
  background: rgba(255,255,255,0.05);
}

.skel-year-btn {
  width: 40px;
  height: 24px;
  border-radius: 6px;
}

.skel-rankings-badge {
  width: 60px;
  height: 24px;
  border-radius: 12px;
}

.skel-rankings-divider {
  height: 2px;
  margin-bottom: 12px;
}

.skel-ranking-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

html.dark .skel-ranking-row {
  border-color: rgba(255,255,255,0.05);
}

.skel-ranking-row:last-child {
  border-bottom: none;
}

.skel-rank-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
}

.skel-rank-info {
  flex: 1;
}

.skel-rank-name {
  height: 16px;
  margin-bottom: 4px;
}

.skel-rank-detail {
  width: 80px;
  height: 12px;
}

.skel-rank-score {
  width: 48px;
  height: 22px;
  border-radius: 6px;
}

/* Weekly Card */
.skel-weekly-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.skel-weekly-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.skel-weekly-title {
  flex: 1;
  width: 180px;
  height: 24px;
}

.skel-weekly-badge {
  width: 70px;
  height: 24px;
  border-radius: 12px;
}

.skel-weekly-content {
  width: 100%;
  height: 180px;
  border-radius: 12px;
}

/* Match Card */
.skel-match-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.skel-match-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.skel-match-titles {
  flex: 1;
}

.skel-match-title {
  width: 180px;
  height: 20px;
  margin-bottom: 6px;
}

.skel-match-subtitle {
  width: 120px;
  height: 14px;
}

.skel-match-refresh {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.skel-match-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.skel-match-athlete {
  text-align: center;
  flex: 1;
}

.skel-match-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 12px;
}

.skel-match-name {
  width: 110px;
  height: 18px;
  margin: 0 auto 6px;
}

.skel-match-school {
  width: 90px;
  height: 14px;
  margin: 0 auto 12px;
}

.skel-match-stats {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}

.skel-match-stat {
  width: 80px;
  height: 16px;
}

.skel-match-vs {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.skel-vs-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
}

.skel-vs-text {
  width: 30px;
  height: 14px;
}

/* NCAA Card */
.skel-ncaa {
  text-align: center;
}

.skel-ncaa-title {
  width: 180px;
  height: 14px;
  margin: 0 auto 12px;
}

.skel-ncaa-badge {
  width: 200px;
  height: 36px;
  border-radius: 18px;
  margin: 0 auto 12px;
}

.skel-ncaa-countdown {
  width: 120px;
  height: 20px;
  margin: 0 auto;
}

/* Viewed Widget */
.skel-viewed-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

html.dark .skel-viewed-header {
  border-color: rgba(255,255,255,0.05);
}

.skel-viewed-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

.skel-viewed-title {
  flex: 1;
  width: 100px;
  height: 18px;
}

.skel-viewed-badge {
  width: 50px;
  height: 22px;
  border-radius: 11px;
}

.skel-viewed-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}

html.dark .skel-viewed-row {
  border-color: rgba(255,255,255,0.04);
}

.skel-viewed-rank {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

.skel-viewed-info {
  flex: 1;
}

.skel-viewed-name {
  height: 16px;
  margin-bottom: 4px;
}

.skel-viewed-detail {
  width: 90px;
  height: 12px;
}

.skel-viewed-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.skel-viewed-views {
  width: 50px;
  height: 14px;
}

.skel-viewed-stars {
  width: 70px;
  height: 12px;
}

.skel-viewed-toggle {
  width: 80px;
  height: 14px;
  margin: 12px auto 0;
}

/* Commits Widget */
.skel-commits-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.skel-commits-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

.skel-commits-title {
  width: 120px;
  height: 18px;
}

.skel-commit-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}

.skel-commit-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.skel-commit-info {
  flex: 1;
}

.skel-commit-name {
  height: 16px;
  margin-bottom: 4px;
}

.skel-commit-college {
  height: 12px;
}

.skel-commit-date {
  width: 60px;
  height: 12px;
}

/* Meets Widget */
.skel-meets-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.skel-meets-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

.skel-meets-title {
  width: 120px;
  height: 18px;
}

.skel-meet-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}

.skel-meet-date {
  width: 50px;
  height: 50px;
  border-radius: 8px;
}

.skel-meet-info {
  flex: 1;
}

.skel-meet-name {
  height: 16px;
  margin-bottom: 6px;
}

.skel-meet-location {
  width: 100px;
  height: 12px;
}

/* ============================================
   ATHLETE DETAIL PAGE SKELETON
   ============================================ */
.skeleton-athlete-detail {
  display: flex;
  gap: 12px;
  padding: 8px;
  height: calc(100vh - 72px);
  background: linear-gradient(135deg, #18181b 0%, #27272a 50%, #1f1f23 100%);
}

@media (prefers-color-scheme: light) {
  .skeleton-athlete-detail {
    background: linear-gradient(135deg, #fefdfb 0%, #fffef9 50%, #fdfcf7 100%);
  }
}

/* Left Sidebar */
.skel-athlete-sidebar {
  width: 320px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
}

@media (prefers-color-scheme: light) {
  .skel-athlete-sidebar {
    background: rgba(255, 255, 255, 0.65);
    border-color: rgba(0, 0, 0, 0.08);
  }
}

.skel-athlete-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto 16px;
}

.skel-athlete-name {
  width: 180px;
  height: 28px;
  margin: 0 auto 8px;
}

.skel-athlete-school {
  width: 150px;
  height: 18px;
  margin: 0 auto 6px;
}

.skel-athlete-meta {
  width: 120px;
  height: 14px;
  margin: 0 auto 20px;
}

.skel-athlete-score-box {
  padding: 16px;
  background: rgba(0,0,0,0.15);
  border-radius: 12px;
  margin-bottom: 20px;
}

@media (prefers-color-scheme: light) {
  .skel-athlete-score-box {
    background: rgba(0,0,0,0.03);
  }
}

.skel-score-value {
  width: 80px;
  height: 48px;
  margin: 0 auto 12px;
  border-radius: 8px;
}

.skel-stars-row {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.skel-career-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.skel-career-tab {
  flex: 1;
  height: 36px;
  border-radius: 8px;
}

.skel-athlete-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.skel-action-btn {
  flex: 1;
  height: 40px;
  border-radius: 8px;
}

.skel-athlete-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.skel-stat-item {
  background: rgba(0,0,0,0.1);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
}

@media (prefers-color-scheme: light) {
  .skel-stat-item {
    background: rgba(0,0,0,0.03);
  }
}

.skel-stat-label {
  width: 60%;
  height: 12px;
  margin: 0 auto 8px;
}

.skel-stat-value {
  width: 50%;
  height: 20px;
  margin: 0 auto;
}

.skel-quick-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skel-quick-link {
  height: 36px;
  border-radius: 8px;
}

/* Center Content */
.skel-athlete-center {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skel-nav-tabs {
  display: flex;
  gap: 8px;
  padding: 4px;
  background: rgba(0,0,0,0.15);
  border-radius: 12px;
}

@media (prefers-color-scheme: light) {
  .skel-nav-tabs {
    background: rgba(0,0,0,0.04);
  }
}

.skel-nav-tab {
  flex: 1;
  height: 40px;
  border-radius: 8px;
}

.skel-nav-tab.active {
  background: rgba(255,255,255,0.1);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

@media (prefers-color-scheme: light) {
  .skel-nav-tab.active {
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  }
}

.skel-chart-container {
  flex: 1;
  background: rgba(0,0,0,0.2);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.06);
  padding: 20px;
}

@media (prefers-color-scheme: light) {
  .skel-chart-container {
    background: rgba(255,255,255,0.5);
    border-color: rgba(0,0,0,0.06);
  }
}

.skel-chart-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.skel-toolbar-left,
.skel-toolbar-right {
  display: flex;
  gap: 10px;
}

.skel-toolbar-dropdown {
  width: 120px;
  height: 36px;
  border-radius: 8px;
}

.skel-toolbar-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.skel-chart-area {
  width: 100%;
  height: calc(100% - 76px);
  min-height: 300px;
  border-radius: 12px;
}

/* Right Sidebar - PBs */
.skel-pbs-sidebar {
  width: 280px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 20px;
  overflow-y: auto;
}

@media (prefers-color-scheme: light) {
  .skel-pbs-sidebar {
    background: rgba(255, 255, 255, 0.65);
    border-color: rgba(0, 0, 0, 0.08);
  }
}

.skel-pbs-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

@media (prefers-color-scheme: light) {
  .skel-pbs-header {
    border-color: rgba(0,0,0,0.08);
  }
}

.skel-pbs-title {
  width: 100px;
  height: 16px;
}

.skel-pbs-toggle {
  width: 60px;
  height: 28px;
  border-radius: 14px;
}

.skel-pbs-group {
  margin-bottom: 16px;
}

.skel-pbs-group-header {
  width: 80px;
  height: 14px;
  margin-bottom: 12px;
  background: rgba(255,255,255,0.03);
  border-radius: 4px;
  padding: 8px;
}

@media (prefers-color-scheme: light) {
  .skel-pbs-group-header {
    background: rgba(0,0,0,0.03);
  }
}

.skel-pbs-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 6px;
  margin-bottom: 4px;
}

.skel-pbs-year {
  width: 28px;
  height: 14px;
  flex-shrink: 0;
}

.skel-pbs-event-info {
  flex: 1;
}

.skel-pbs-event {
  width: 60px;
  height: 14px;
  margin-bottom: 4px;
}

.skel-pbs-meet {
  width: 100px;
  height: 10px;
}

.skel-pbs-mark {
  width: 55px;
  height: 16px;
}

/* ============================================
   DATABASE PAGE SKELETON
   ============================================ */
.skeleton-database {
  display: flex;
  gap: 24px;
  padding: 24px;
  max-width: 1800px;
  margin: 0 auto;
}

/* Filter Sidebar */
.skel-filter-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 20px;
  height: fit-content;
  position: sticky;
  top: 88px;
}

@media (prefers-color-scheme: light) {
  .skel-filter-sidebar {
    background: white;
    border-color: #e5e7eb;
  }
}

.skel-filter-section {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

@media (prefers-color-scheme: light) {
  .skel-filter-section {
    border-color: rgba(0,0,0,0.05);
  }
}

.skel-filter-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.skel-filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.skel-filter-label {
  width: 90px;
  height: 16px;
}

.skel-filter-arrow {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

.skel-gender-toggle {
  display: flex;
  gap: 8px;
}

.skel-gender-btn {
  flex: 1;
  height: 36px;
  border-radius: 8px;
}

.skel-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skel-filter-chip {
  width: 80px;
  height: 30px;
  border-radius: 15px;
}

.skel-filter-dropdown {
  width: 100%;
  height: 40px;
  border-radius: 8px;
}

/* Main Content */
.skel-database-main {
  flex: 1;
  min-width: 0;
}

.skel-db-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.skel-toolbar-left {
  display: flex;
  gap: 10px;
}

.skel-toolbar-right {
  display: flex;
  gap: 10px;
  align-items: center;
}

.skel-search-box {
  width: 300px;
  height: 44px;
  border-radius: 12px;
}

.skel-view-toggle {
  width: 100px;
  height: 38px;
  border-radius: 8px;
}

.skel-view-icons {
  display: flex;
  gap: 4px;
  background: rgba(255,255,255,0.05);
  padding: 4px;
  border-radius: 8px;
}

@media (prefers-color-scheme: light) {
  .skel-view-icons {
    background: rgba(0,0,0,0.03);
  }
}

.skel-view-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

.skel-results-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding: 0 8px;
}

.skel-results-count {
  width: 150px;
  height: 18px;
}

.skel-sort-dropdown {
  width: 140px;
  height: 36px;
  border-radius: 8px;
}

/* Athlete Rows */
.skel-athletes-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skel-athlete-row {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 16px 20px;
}

@media (prefers-color-scheme: light) {
  .skel-athlete-row {
    background: white;
    border-color: #e5e7eb;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  }
}

.skel-row-main {
  flex: 0 0 260px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.skel-row-info {
  flex: 1;
}

.skel-row-name {
  height: 20px;
  margin-bottom: 6px;
}

.skel-row-school {
  height: 14px;
}

.skel-row-score {
  text-align: center;
}

.skel-row-score-num {
  width: 48px;
  height: 28px;
  margin-bottom: 6px;
  border-radius: 6px;
}

.skel-row-stars {
  display: flex;
  gap: 3px;
  justify-content: center;
}

.skel-mini-star {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.skel-row-badges {
  display: flex;
  gap: 6px;
  flex: 0 0 160px;
}

.skel-badge {
  width: 70px;
  height: 24px;
  border-radius: 12px;
}

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

.skel-event-cell {
  background: rgba(255,255,255,0.03);
  border-radius: 10px;
  padding: 10px;
  text-align: center;
}

@media (prefers-color-scheme: light) {
  .skel-event-cell {
    background: rgba(0,0,0,0.02);
  }
}

.skel-event-cell.best {
  background: linear-gradient(135deg, 
    rgba(34, 197, 94, 0.08) 0%, 
    rgba(34, 197, 94, 0.04) 100%
  );
}

.skel-event-name {
  width: 45px;
  height: 12px;
  margin: 0 auto 6px;
}

.skel-event-mark {
  width: 60px;
  height: 18px;
  margin: 0 auto;
}

.skel-row-action {
  flex-shrink: 0;
}

.skel-action-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

/* Pagination */
.skel-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  padding: 16px;
}

.skel-page-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.skel-page-info {
  width: 100px;
  height: 16px;
  margin-left: 12px;
}

/* ============================================
   DEFAULT/FALLBACK SKELETON
   ============================================ */
.skeleton-default {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 128px);
}

.skeleton-loading-indicator {
  text-align: center;
}

.skeleton-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(0, 0, 0, 0.1);
  border-top-color: var(--skel-accent);
  border-radius: 50%;
  animation: skeleton-spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

html.dark .skeleton-spinner {
  border-color: rgba(255, 255, 255, 0.1);
  border-top-color: var(--skel-accent);
}

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

.skeleton-loading-text {
  color: #71717a;
  font-size: 14px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1400px) {
  .skel-index-grid {
    gap: 16px;
  }
}

@media (max-width: 1200px) {
  .skel-index-center {
    display: none;
  }
  
  .skeleton-athlete-detail {
    flex-wrap: wrap;
  }
  
  .skel-athlete-sidebar,
  .skel-pbs-sidebar {
    width: 100%;
  }
  
  .skeleton-database {
    flex-direction: column;
  }
  
  .skel-filter-sidebar {
    width: 100%;
    position: static;
  }
  
  .skel-row-events {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .skel-index-grid {
    flex-direction: column;
  }
  
  .skel-index-left,
  .skel-index-right {
    width: 100%;
    flex: none;
  }
  
  .skel-header-inner {
    flex-wrap: wrap;
  }
  
  .skel-search {
    order: 3;
    flex: 1 1 100%;
    max-width: 100%;
    margin: 12px 0 0;
  }
  
  .skel-athlete-row {
    flex-direction: column;
    align-items: stretch;
  }
  
  .skel-row-main {
    flex: none;
    width: 100%;
  }
  
  .skel-row-events {
    grid-template-columns: repeat(2, 1fr);
  }
}
/* ============================================
   ATHLETE DATABASE SKELETON
   ============================================ */
.skeleton-athlete-database {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 64px);
  background: #fafafa;
}

html.dark .skeleton-athlete-database {
  background: #18181b;
}

/* Header Container */
.skel-db-header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
}

html.dark .skel-db-header {
  background: rgba(24, 24, 27, 0.95);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

/* Brand Bar */
.skel-db-brand-bar {
  padding: 8px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

html.dark .skel-db-brand-bar {
  border-bottom-color: rgba(255, 255, 255, 0.04);
}

.skel-db-brand-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.skel-db-logo {
  width: 140px;
  height: 24px;
}

.skel-db-subtitle {
  width: 100px;
  height: 16px;
}

.skel-db-brand-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.skel-alltime-toggle {
  width: 140px;
  height: 32px;
  border-radius: 8px;
}

.skel-results-info {
  width: 120px;
  height: 16px;
}

.skel-view-switcher {
  width: 72px;
  height: 32px;
  border-radius: 8px;
}

/* Filter Bar */
.skel-db-filter-bar {
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: rgba(0, 0, 0, 0.015);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

html.dark .skel-db-filter-bar {
  background: rgba(255, 255, 255, 0.02);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

.skel-db-filter-bar .skel-search-input {
  width: 220px;
  height: 40px;
  border-radius: 10px;
}

.skel-separator {
  width: 1px;
  height: 20px;
  background: rgba(0, 0, 0, 0.12);
  margin: 0 6px;
}

html.dark .skel-separator {
  background: rgba(255, 255, 255, 0.12);
}

.skel-gender-toggle {
  width: 120px;
  height: 34px;
  border-radius: 8px;
}

.skel-filter-btns {
  display: flex;
  gap: 4px;
}

.skel-filter-btn {
  width: 80px;
  height: 34px;
  border-radius: 8px;
}

.skel-advanced-btn {
  width: 100px;
  height: 34px;
  border-radius: 8px;
}

.skel-saved-btn {
  width: 120px;
  height: 34px;
  border-radius: 8px;
}

.skel-save-btn {
  width: 70px;
  height: 34px;
  border-radius: 8px;
}

.skel-sort-btn {
  width: 110px;
  height: 34px;
  border-radius: 8px;
}

/* Database Layout */
.skel-db-layout {
  display: flex;
  width: 100%;
  max-width: 1800px;
  margin: 0 auto;
  flex: 1;
}

/* Sidebar */
.skel-db-sidebar {
  width: 200px;
  min-width: 200px;
  background: rgba(255, 255, 255, 0.98);
  border-right: 1px solid rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
  overflow: hidden;
}

html.dark .skel-db-sidebar {
  background: rgba(24, 24, 27, 0.98);
  border-right-color: rgba(255, 255, 255, 0.08);
}

.skel-sidebar-header {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

html.dark .skel-sidebar-header {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.skel-sidebar-title {
  width: 50px;
  height: 16px;
}

/* Smart Filters */
.skel-smart-filters {
  padding: 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

html.dark .skel-smart-filters {
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

.skel-smart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.skel-smart-title {
  width: 80px;
  height: 14px;
}

.skel-smart-badge {
  width: 50px;
  height: 20px;
  border-radius: 10px;
}

.skel-smart-textarea {
  width: 100%;
  height: 70px;
  border-radius: 8px;
  margin-bottom: 8px;
}

.skel-smart-btn {
  width: 100%;
  height: 32px;
  border-radius: 8px;
}

/* Filter Sections */
.skel-filter-section {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  padding: 10px 14px;
}

html.dark .skel-filter-section {
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

.skel-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.skel-section-title {
  height: 14px;
}

.skel-section-arrow {
  width: 10px;
  height: 10px;
}

.skel-checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
}

.skel-checkbox {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

.skel-checkbox-label {
  width: 100px;
  height: 12px;
}

/* Main Content */
.skel-db-main {
  flex: 1;
  min-width: 0;
  padding: 16px 32px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Athlete Row */
.skel-db-athlete-row {
  background: white;
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.08);
}

html.dark .skel-db-athlete-row {
  background: #27272a;
}

.skel-db-row-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0;
}

/* Name Section */
.skel-db-name-section {
  flex: 0 0 280px;
  width: 280px;
  padding-right: 12px;
}

.skel-db-name-box {
  background: rgba(0, 0, 0, 0.04);
  border-radius: 8px;
  padding: 8px;
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 4px;
}

html.dark .skel-db-name-box {
  background: rgba(255, 255, 255, 0.05);
}

.skel-db-name-info {
  flex: 1;
  min-width: 0;
}

.skel-db-name {
  height: 24px;
  margin-bottom: 6px;
}

.skel-db-school {
  width: 50%;
  height: 12px;
}

.skel-db-score-box {
  width: 80px;
  padding: 6px;
  border-radius: 8px;
  text-align: center;
}

.accent-bg-light {
  background: var(--skel-accent-light) !important;
}

.skel-db-score {
  height: 28px;
  margin-bottom: 4px;
  border-radius: 6px;
}

.skel-db-stars {
  display: flex;
  justify-content: center;
  gap: 2px;
}

.skel-db-star {
  width: 14px;
  height: 14px;
  border-radius: 50%;
}

.skel-db-badges {
  display: flex;
  gap: 4px;
  align-items: center;
}

.skel-db-badge {
  width: 50px;
  height: 18px;
  border-radius: 4px;
}

.skel-db-peak {
  width: 100px;
  height: 12px;
}

/* Events Section */
.skel-db-events-section {
  flex: 0 0 240px;
  width: 240px;
  padding-left: 12px;
  padding-right: 8px;
  margin-left: 12px;
  border-left: 1px solid rgba(0, 0, 0, 0.15);
}

html.dark .skel-db-events-section {
  border-left-color: rgba(255, 255, 255, 0.15);
}

.skel-db-events-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
}

.skel-db-event-box {
  background: rgba(0, 0, 0, 0.04);
  border-radius: 6px;
  padding: 6px;
  min-height: 48px;
}

html.dark .skel-db-event-box {
  background: rgba(255, 255, 255, 0.05);
}

.skel-db-event-box.highlight {
  background: var(--skel-accent-light);
}

.skel-db-event-name {
  width: 75%;
  height: 12px;
  margin-bottom: 6px;
}

.skel-db-event-mark {
  width: 50%;
  height: 16px;
}

/* Chart Section */
.skel-db-chart-section {
  flex: 0 0 260px;
  width: 260px;
  padding-left: 12px;
  padding-right: 8px;
  margin-left: 12px;
  border-left: 1px solid rgba(0, 0, 0, 0.15);
}

html.dark .skel-db-chart-section {
  border-left-color: rgba(255, 255, 255, 0.15);
}

.skel-db-chart-box {
  background: rgba(0, 0, 0, 0.04);
  border-radius: 8px;
  padding: 8px;
  height: 100px;
}

html.dark .skel-db-chart-box {
  background: rgba(255, 255, 255, 0.05);
}

.skel-db-chart-title {
  width: 50%;
  height: 12px;
  margin-bottom: 8px;
}

.skel-db-chart-bars {
  height: calc(100% - 20px);
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.skel-db-chart-bar {
  flex: 1;
  border-radius: 4px;
}

/* Rank Section */
.skel-db-rank-section {
  flex: 0 0 85px;
  width: 85px;
  margin-left: 12px;
  padding-left: 12px;
  border-left: 1px solid rgba(0, 0, 0, 0.15);
}

html.dark .skel-db-rank-section {
  border-left-color: rgba(255, 255, 255, 0.15);
}

.skel-db-rank-box {
  background: rgba(0, 0, 0, 0.04);
  border-radius: 8px;
  padding: 8px;
  text-align: center;
  margin-bottom: 8px;
}

html.dark .skel-db-rank-box {
  background: rgba(255, 255, 255, 0.05);
}

.skel-db-rank-num {
  height: 24px;
  margin-bottom: 4px;
}

.skel-db-rank-label {
  height: 12px;
}

.skel-db-add-btn {
  width: 100%;
  height: 28px;
  border-radius: 6px;
}

/* Actions */
.skel-db-actions {
  flex: 0 0 auto;
  margin-left: 8px;
}

.skel-db-action-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

/* Pagination */
.skel-db-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px 0;
  margin-top: auto;
}

.skel-db-pagination .skel-page-btn {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.skel-page-ellipsis {
  width: 20px;
  height: 16px;
}

/* Responsive - Database */
@media (max-width: 1280px) {
  .skel-db-name-section { flex: 0 0 260px; width: 260px; }
  .skel-db-events-section { flex: 0 0 220px; width: 220px; }
  .skel-db-chart-section { flex: 0 0 240px; width: 240px; }
}

@media (max-width: 1024px) {
  .skel-db-row-inner {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
  }
  .skel-db-name-section,
  .skel-db-events-section,
  .skel-db-chart-section,
  .skel-db-rank-section {
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    padding-left: 0;
    padding-right: 0;
    border-left: none;
  }
}

@media (max-width: 900px) {
  .skel-db-sidebar {
    display: none;
  }
  .skel-db-main {
    padding: 16px;
  }
}