:root {
  /* Brand Colors */
  --brand: #0284c7;
  --brand-light: #0ea5e9;
  --brand-gradient: linear-gradient(135deg, #0284c7, #0ea5e9);
  --accent: #8b5cf6;
  --accent-gradient: linear-gradient(135deg, #8b5cf6, #a855f7);
  --premium-gold: #d97706;
  --premium-gradient: linear-gradient(135deg, #f59e0b, #d97706);
  
  /* Mapped layout vars to ensure compatibility */
  --teal: #0284c7;
  --teal-dim: rgba(2, 132, 199, 0.08);
  --teal-glow: rgba(2, 132, 199, 0.15);
  --purple: #8b5cf6;
  --green: #10b981;
  --red: #ef4444;
  --bg-base: #f0f7fa;
  --bg-surface: #ffffff;
  --bg-surface-hover: #e0f2fe;
  --bg-elevated: #ffffff;
  --bg-input: #f8fafc;
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --border-hover: #cbd5e1;
  
  /* Original structure compat */
  --bg-page: var(--bg-base);
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-panel-solid: #ffffff;
  --border: rgba(226, 232, 240, 0.8);
  --border-focus: #0284c7;
  --text-main: #0f172a;
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 30px -5px rgba(15, 23, 42, 0.06), 0 4px 12px -2px rgba(15, 23, 42, 0.03);
  --radius-lg: 1.25rem;
  --radius-md: 0.75rem;
  --font: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* General Reset & Typography */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font);
}

body {
  background-color: var(--bg-page);
  color: var(--text-main);
  min-height: 100vh;
  padding: 1.5rem 1rem;
  overflow-x: hidden;
  background-image: radial-gradient(circle at 100% 0%, rgba(14, 165, 233, 0.05) 0%, transparent 40%),
                    radial-gradient(circle at 0% 100%, rgba(168, 85, 247, 0.04) 0%, transparent 40%);
  background-attachment: fixed;
}

.container {
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
  overflow-x: hidden;
}

/* Header styling */
header {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
}

@media (min-width: 768px) {
  header {
    flex-direction: row;
    align-items: center;
  }
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-box {
  height: 3.2rem;
  width: 3.2rem;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--brand), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.35rem;
  color: #ffffff;
  box-shadow: 0 8px 16px -4px rgba(2, 132, 199, 0.3);
}

.brand-title {
  font-size: 2rem;
  font-weight: 900;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.brand-title span {
  color: var(--brand);
  background: linear-gradient(135deg, var(--brand), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.version-badge {
  font-size: 0.65rem;
  background: rgba(2, 132, 199, 0.08);
  color: var(--brand);
  padding: 0.2rem 0.6rem;
  border-radius: 2rem;
  border: 1px solid rgba(2, 132, 199, 0.2);
  margin-left: 0.5rem;
  font-weight: 700;
}

.brand-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Stats section */
.stats-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.stat-card {
  background: rgba(2, 132, 199, 0.045);
  border: 1px solid rgba(2, 132, 199, 0.12);
  border-radius: var(--radius-md);
  padding: 0.6rem 1.2rem;
  text-align: center;
  min-width: 110px;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.02);
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.stat-card.premium-stat {
  background-color: #fffbeb;
  border-color: #fde68a;
}

.stat-label {
  display: block;
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.stat-card.premium-stat .stat-label {
  color: #b45309;
}

.stat-value {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--text-main);
}

.stat-value.premium-value {
  color: #d97706;
}

/* Main Workspace Layout */
.workspace-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .workspace-grid {
    grid-template-columns: 7fr 5fr;
  }
}

.left-column, .right-column {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Panel Design with Glassmorphism */
.panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
  transition: border-color 0.3s, box-shadow 0.3s;
  overflow: hidden;
}

.panel:hover {
  border-color: rgba(2, 132, 199, 0.25);
  box-shadow: 0 15px 35px -5px rgba(15, 23, 42, 0.08), 0 5px 15px -2px rgba(15, 23, 42, 0.04);
}

.panel-title {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--text-main);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  letter-spacing: -0.01em;
}

.import-border {
  border-top: 4px solid var(--brand);
}

.panel-description {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.5;
}
/* Form elements */
textarea {
  width: 100%;
  height: 250px;
  background-color: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 0.75rem;
  font-family: monospace;
  font-size: 0.75rem;
  color: #334155;
  resize: none;
  outline: none;
  transition: border-color 0.2s;
}

textarea:focus, input:focus {
  border-color: var(--brand);
}

.btn-primary {
  width: 100%;
  background: var(--brand-gradient);
  color: #ffffff;
  font-weight: 700;
  padding: 0.65rem;
  border: none;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s, box-shadow 0.2s;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.15);
}

.btn-primary:hover {
  opacity: 0.9;
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.25);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-text {
  font-size: 0.75rem;
  color: var(--brand);
  font-weight: 700;
  background: none;
  border: none;
  cursor: pointer;
}

.btn-text:hover {
  text-decoration: underline;
}

/* Logger */
.logger-box {
  background-color: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1rem;
  font-family: monospace;
  font-size: 0.75rem;
  color: #475569;
  height: 180px;
  overflow-y: auto;
}

/* Right Panel Search & Detail Grid */
.detail-grid {
  display: grid;
  grid-template-cols: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .detail-grid {
    grid-template-cols: 1fr 1fr;
  }
}

.search-container {
  position: relative;
  margin-bottom: 1rem;
}

.search-input {
  width: 100%;
  background-color: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 0.65rem 2.5rem 0.65rem 1rem;
  font-size: 0.875rem;
  color: #334155;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.2);
}

.search-icon {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
}

/* Gymnasts List items */
.gymnasts-scroll {
  height: 400px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.gymnast-item {
  width: 100%;
  text-align: left;
  padding: 0.75rem;
  border-radius: 0.75rem;
  background-color: #f8fafc;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}

.gymnast-item:hover {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
}

.gymnast-name {
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.gymnast-item:hover .gymnast-name {
  color: var(--brand);
}

.gymnast-club {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 0.15rem;
}

.gymnast-arrow {
  color: #94a3b8;
  font-size: 0.875rem;
}

.premium-badge {
  font-size: 0.55rem;
  background-color: #fffbeb;
  color: #d97706;
  font-weight: 900;
  padding: 0.125rem 0.35rem;
  border-radius: 0.25rem;
  border: 1px solid #fde68a;
}

/* Detail Section */
.profile-detail-container {
  min-height: 440px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #94a3b8;
  font-size: 0.875rem;
  width: 100%;
}

.profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e2e8f0;
  width: 100%;
}

.profile-main-title {
  font-size: 1.5rem;
  font-weight: 900;
  color: #1e293b;
}

.profile-gender-badge {
  height: 3rem;
  width: 3rem;
  border-radius: 50%;
  background-color: #f1f5f9;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

/* Premium alert box */
.premium-alert-active {
  margin: 1.25rem 0;
  padding: 1rem;
  border-radius: 0.75rem;
  background-color: #fef3c7;
  border: 1px solid #fde68a;
  color: #b45309;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.premium-alert-active .badge {
  background-color: #d97706;
  color: #ffffff;
  font-weight: 900;
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
}

.premium-alert-inactive {
  margin: 1.25rem 0;
  padding: 1rem;
  border-radius: 0.75rem;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: left;
}

.premium-alert-inactive .title {
  font-weight: 700;
  color: #1e293b;
}

.premium-alert-inactive .desc {
  color: #64748b;
  font-size: 0.6875rem;
}

.btn-premium {
  width: 100%;
  background-color: #d97706;
  color: #ffffff;
  font-weight: 700;
  padding: 0.5rem;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.2s;
  box-shadow: 0 2px 4px rgba(217, 119, 6, 0.1);
}

.btn-premium:hover {
  background-color: #b45309;
}

/* Results History list */
.results-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.result-card {
  background-color: #f8fafc;
  border: 1px solid var(--border);
  padding: 1rem;
  border-radius: 0.75rem;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.comp-name {
  font-weight: 700;
  font-size: 0.875rem;
  color: #1e293b;
}

.comp-meta {
  font-size: 0.625rem;
  color: var(--text-muted);
  font-weight: 500;
}

.category-badge {
  font-size: 0.75rem;
  background-color: rgba(2, 132, 199, 0.08);
  color: var(--brand);
  font-weight: 700;
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
}

.all-around-score {
  font-size: 0.75rem;
  color: #10b981;
  font-weight: 900;
  margin-top: 0.25rem;
}

.apparatus-grid {
  display: grid;
  grid-template-cols: 1fr 1fr;
  gap: 0.5rem;
  border-top: 1px solid var(--border);
  padding-top: 0.5rem;
}

.apparatus-item {
  background-color: #ffffff;
  padding: 0.5rem;
  border-radius: 0.375rem;
  border: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.apparatus-name {
  font-size: 0.625rem;
  color: var(--text-muted);
}

.apparatus-score {
  font-size: 0.75rem;
  font-weight: 700;
  color: #1e293b;
}

/* Tabs styling */
.tabs-container {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.tab-button {
  background-color: #f1f5f9;
  border: 1px solid var(--border);
  padding: 0.4rem 0.8rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s;
}
.tab-button:hover {
  background-color: #e2e8f0;
}
.tab-button.active {
  background-color: var(--brand);
  color: white;
  border-color: var(--brand);
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.15);
}

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

.live-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: #ef4444;
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

/* Responsive adjustments for narrow/tablet screens */
@media (max-width: 767px) {
  /* Stack panels vertically on narrow screens (only when visible, not overriding display:none) */
  .workspace-grid:not([style*="display: none"]):not([style*="display:none"]) {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }
  /* When JS sets display:grid, force flex layout for narrow screens */
  .workspace-grid[style*="display: grid"] {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }
  .workspace-grid > .panel,
  .workspace-grid > section {
    width: 100%;
    max-width: 650px;
  }
  #profile-detail-container {
    width: 100%;
    max-width: 650px;
    margin: 0 auto;
  }
}

/* Discipline Badges under Gare Archiviate */
.discipline-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  justify-content: center;
  margin-top: 0.35rem;
}

.disc-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  border-radius: 2rem;
  text-transform: uppercase;
  background-color: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  transition: all 0.15s ease;
}

.disc-badge:hover {
  background-color: #e2e8f0;
  border-color: var(--brand);
  color: var(--brand);
}

/* Dashboard responsive columns */
.dashboard-cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  width: 100%;
  overflow: hidden;
}
.dashboard-cols > * {
  min-width: 0; /* Prevent grid items from overflowing parent container */
  overflow: hidden;
}

@media (min-width: 1024px) {
  .dashboard-cols {
    grid-template-columns: 1fr 1fr 1fr; /* 3 equal columns side-by-side */
  }
}

@media (max-width: 767px) {
  .panel {
    padding: 0.75rem !important;
  }
  
  /* Compact lists for mobile */
  .comp-card {
    padding: 0.5rem 0.6rem;
    gap: 0.6rem;
    margin-bottom: 0.5rem;
  }
  .comp-card h3 {
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
  }
  .comp-day {
    font-size: 0.95rem;
  }
  .comp-month {
    font-size: 0.65rem;
  }
  
  /* Gymnast and Club results rows in mobile */
  .athlete-card, .gymnast-card, .club-card, .list-item {
    padding: 0.5rem 0.6rem !important;
    margin-bottom: 0.4rem !important;
  }
  
  /* Compact result tables/lists */
  .result-row {
    padding: 0.4rem 0.5rem !important;
  }
  .news-card-item {
    flex-direction: row !important;
    height: 100px !important;
    max-width: 100% !important;
  }
  .news-card-img-wrapper {
    width: 90px !important;
    height: 100px !important;
    flex-shrink: 0 !important;
  }
  .news-card-img {
    object-fit: cover !important;
  }
  /* Ensure news card text area doesn't push the card wider */
  .news-card-item > div:last-child {
    min-width: 0 !important;
    overflow: hidden !important;
  }
  /* Constrain carousel on mobile */
  .carousel-container {
    max-width: 100% !important;
    overflow: hidden !important;
  }
  /* Constrain the news grid itself */
  #home-news-grid {
    max-width: 100%;
    overflow: hidden;
  }
  /* Constrain hero banner text on small screens */
  .hero-banner {
    padding: 2rem 1.25rem !important;
  }
  .hero-title {
    font-size: 1.5rem !important;
  }
}

/* Modern Vertical Timeline for Results */
.timeline-container {
  position: relative;
  margin: 1.5rem 0 1.5rem 0.5rem;
  padding-left: 2rem;
  border-left: 2.5px solid var(--border);
}
.timeline-item {
  position: relative;
  margin-bottom: 2rem;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: calc(-2rem - 6px);
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand);
  border: 2px solid var(--bg-page);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
  transition: all 0.25s ease;
  z-index: 2;
}
.timeline-item:hover::before {
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(168, 85, 247, 0.4);
  transform: scale(1.2);
}
.result-card {
  background: var(--bg-panel-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.result-card:hover {
  color: var(--brand);
  font-weight: 700;
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
}

.all-around-score {
  font-size: 0.75rem;
  color: #10b981;
  font-weight: 900;
  margin-top: 0.25rem;
}

.apparatus-grid {
  display: grid;
  grid-template-cols: 1fr 1fr;
  gap: 0.5rem;
  border-top: 1px solid var(--border);
  padding-top: 0.5rem;
}

.apparatus-item {
  background-color: #ffffff;
  padding: 0.5rem;
  border-radius: 0.375rem;
  border: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.apparatus-name {
  font-size: 0.625rem;
  color: var(--text-muted);
}

.apparatus-score {
  font-size: 0.75rem;
  font-weight: 700;
  color: #1e293b;
}

/* Tabs styling */
.tabs-container {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.tabs-container::-webkit-scrollbar {
  display: none;
}
.tab-button {
  flex-shrink: 0;
  background-color: #f1f5f9;
  border: 1px solid var(--border);
  padding: 0.4rem 0.8rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.result-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  margin-bottom: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}

.result-card:hover {
  border-color: rgba(0, 229, 196, 0.2);
  background: var(--bg-surface-hover);
  transform: translateX(2px);
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.comp-name {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.comp-meta {
  font-size: 0.6rem;
  color: var(--text-muted);
  font-weight: 600;
}

.all-around-score {
  font-size: 0.75rem;
  color: var(--green);
  font-weight: 900;
  margin-top: 0.2rem;
}

/* Timeline */
.timeline-container {
  position: relative;
  margin: 1.25rem 0 1.25rem 0.5rem;
  padding-left: 2rem;
  border-left: 2px solid rgba(0, 229, 196, 0.15);
}

.timeline-item {
  position: relative;
  margin-bottom: 1.75rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: calc(-2rem - 5px);
  top: 10px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--teal);
  border: 2px solid var(--bg-base);
  box-shadow: 0 0 0 3px rgba(0, 229, 196, 0.15);
  transition: all 0.25s ease;
  z-index: 2;
}

.timeline-item:hover::before {
  background: var(--purple);
  box-shadow: 0 0 0 5px rgba(139, 92, 246, 0.3);
  transform: scale(1.3);
}

/* Apparatus grid */
.apparatus-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  border-top: 1px solid var(--border);
  padding-top: 0.6rem;
}

.apparatus-item {
  background: var(--bg-elevated);
  padding: 0.45rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.apparatus-name {
  font-size: 0.6rem;
  color: var(--text-muted);
}

.apparatus-score {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-primary);
}

/* ===================== TABS (section tabs) ===================== */
.tabs-container {
  display: flex;
  gap: 0.3rem;
  margin-bottom: 0.85rem;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.tabs-container::-webkit-scrollbar { display: none; }

/* ===================== LIVE INDICATOR ===================== */
@keyframes pulse {
  0% { transform: scale(0.85); opacity: 0.4; box-shadow: 0 0 0 0 rgba(239,68,68,0.5); }
  50% { transform: scale(1.2); opacity: 1; box-shadow: 0 0 0 5px rgba(239,68,68,0); }
  100% { transform: scale(0.85); opacity: 0.4; box-shadow: 0 0 0 0 rgba(239,68,68,0); }
}

.live-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: var(--red);
  border-radius: 50%;
  animation: pulse 1.8s infinite;
  flex-shrink: 0;
}

/* ===================== SOCIAL ===================== */
#social-editor-box {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
}

#social-editor-box h4 { color: var(--text-primary) !important; }

/* feed tab switcher */
#feed-tab-all, #feed-tab-friends {
  background: transparent !important;
  color: var(--text-secondary) !important;
  border-radius: var(--radius-sm) !important;
}

/* ===================== INPUT FIELD (class) ===================== */
.input-field {
  width: 100%;
  background: var(--bg-input) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-md) !important;
  padding: 0.6rem 0.85rem !important;
  font-size: 0.8rem;
  color: var(--text-primary) !important;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: var(--font);
}

.input-field:focus {
  border-color: var(--border-focus) !important;
  box-shadow: 0 0 0 3px rgba(0, 229, 196, 0.1) !important;
}

.input-field::placeholder { color: var(--text-muted) !important; }

/* ===================== AUTH MODAL ===================== */
#auth-modal > div {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-xl) !important;
  box-shadow: var(--shadow-lg), 0 0 60px rgba(0, 229, 196, 0.05) !important;
}

#auth-modal h2 { color: var(--text-primary) !important; }

#auth-modal label { color: var(--text-secondary) !important; }

/* Auth tab switcher */
#tab-login-btn, #tab-register-btn {
  background: transparent !important;
  border-radius: 1.5rem !important;
  color: var(--text-secondary) !important;
}

#tab-login-btn[style*="white"], #tab-login-btn[style*="box-shadow"] {
  background: var(--teal) !important;
  color: #ffffff !important;
}

/* ===================== SUBSCRIPTION ALERT BANNER ===================== */
#subscription-alert-banner {
  background: var(--gold-dim) !important;
  border: 1px solid rgba(245, 158, 11, 0.3) !important;
  color: var(--gold) !important;
  border-radius: var(--radius-md) !important;
}

/* ===================== MOBILE STATS BLOCK ===================== */
.mobile-stats-block > div > div {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-md) !important;
}

/* ===================== COMPETITION CARDS ===================== */
.comp-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.comp-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-hover);
}

.comp-date-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 45px;
  background: var(--bg-surface-hover);
  padding: 0.4rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.comp-day {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.comp-month {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-top: 0.15rem;
}

.comp-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
