/* ═══════════════════════════════════════════════════════════════════════════════
   UTILITIES - Other CSS Files
   ═══════════════════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────────────────────
   Timer Action Buttons - Enhanced UI
   ───────────────────────────────────────────────────────────────────────────── */

/* Timer actions container - improved responsive layout */
.timer-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

/* Shared button styles */
.timer-actions button {
  min-width: 120px;
  font-family: var(--font-family);
  letter-spacing: 0.5px;
}

#start-btn,
#pause-btn,
#resume-btn {
  order: 1;
}

#stop-btn {
  order: 2;
}

#reset-btn {
  order: 3;
}

/* Stop button styling */
#stop-btn {
  background: rgba(255, 59, 48, 0.15);
  color: rgb(255, 89, 78);
  border: 2px solid rgba(255, 59, 48, 0.7);
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.2s ease;
  position: relative;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}

#stop-btn:hover {
  background: rgba(255, 59, 48, 0.25);
  border-color: rgb(255, 59, 48);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 59, 48, 0.25);
}

#stop-btn:active {
  transform: translateY(1px);
  box-shadow: none;
}

/* Theme compatibility for stop button */
body.theme-color #stop-btn {
  background: rgba(var(--theme-color-rgb), 0.15);
  border-color: rgba(var(--theme-color-rgb), 0.7);
  color: rgb(var(--theme-color-rgb));
}

body.theme-color #stop-btn:hover {
  background: rgba(var(--theme-color-rgb), 0.25);
  border-color: rgb(var(--theme-color-rgb));
  box-shadow: 0 4px 12px rgba(var(--theme-color-rgb), 0.25);
}

/* Enhanced responsive design */
@media (max-width: 768px) {
  .timer-actions {
    padding: 0 15px;
  }

  #stop-btn {
    padding: 10px 24px;
    font-size: 14px;
    min-width: 110px;
  }
}

/* ─────────────────────────────────────────────────────────────────────────────
   About Modal Codes - 1
   ───────────────────────────────────────────────────────────────────────────── */

/* About Info Modal Styles - Modern Design */
.about-info-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  visibility: hidden;
  opacity: 0;
  transition:
    visibility 0s linear 0.25s,
    opacity 0.3s ease;
  backdrop-filter: blur(3px);
}

.about-info-modal-overlay.active {
  visibility: visible;
  opacity: 1;
  transition-delay: 0s;
}

.about-info-modal {
  background: linear-gradient(145deg, rgb(45, 45, 55), rgb(25, 25, 35));
  border-radius: 16px;
  width: 90%;
  max-width: 480px;
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.25),
    0 1px 8px rgba(0, 0, 0, 0.1),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  overflow: hidden;
  transform: translateY(20px) scale(0.95);
  transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.about-info-modal-overlay.active .about-info-modal {
  transform: translateY(0) scale(1);
}

.about-info-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  position: relative;
}

.about-info-modal-header:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 4%;
  right: 4%;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(255, 255, 255, 0.2) 20%,
    rgba(255, 255, 255, 0.2) 80%,
    transparent
  );
}

.about-info-modal-title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: white;
  letter-spacing: -0.01em;
}

.about-info-modal-close {
  background: none;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.2s ease;
}

.about-info-modal-close:hover {
  background-color: rgba(255, 255, 255, 0.15);
  color: white;
}

.about-info-modal-content {
  padding: 24px;
  color: white;
  line-height: 1.6;
}

.about-info-modal-content p {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.9);
}

.about-info-modal-content strong {
  font-weight: 600;
  color: white;
}

.about-info-modal-content ul {
  margin-bottom: 16px;
  padding-left: 24px;
}

.about-info-modal-content li {
  margin-bottom: 10px;
  position: relative;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
}

.about-info-modal-content li::marker {
  color: rgba(255, 255, 255, 0.6);
}

.about-info-modal-footer {
  padding: 16px 24px 20px;
  display: flex;
  justify-content: flex-end;
}

.about-info-btn {
  padding: 10px 20px;
  background: linear-gradient(to bottom right, #4a7bff, #2e5cd8);
  color: white;
  border: none;
  border-radius: 40px;
  cursor: pointer;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.02em;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.about-info-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.about-info-btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ─────────────────────────────────────────────────────────────────────────────
   Leaderboard Modal Codes - 2
   ───────────────────────────────────────────────────────────────────────────── */

/* Leaderboard Modal Styles */
.leaderboard-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.leaderboard-modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.leaderboard-modal {
  background: var(--card-bg, #ffffff);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  width: 95%;
  max-width: 800px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.8) translateY(30px);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.leaderboard-modal-overlay.show .leaderboard-modal {
  transform: scale(1) translateY(0);
}

/* Header */
.leaderboard-modal-header {
  padding: 16px 30px 12px;
  border-bottom: 1px solid var(--border-color, #e1e5e9);
  background: var(
    --gradient-bg,
    linear-gradient(135deg, #667eea 0%, #764ba2 100%)
  );
  color: white;
  position: relative;
  flex-shrink: 0;
}

.leaderboard-modal-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.leaderboard-modal-title .trophy-icon {
  font-size: 22px;
  animation: trophyGlow 2s ease-in-out infinite alternate;
}

.leaderboard-badge {
  background: #00ff88;
  color: #000;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  margin-left: 8px;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

@keyframes trophyGlow {
  0% {
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
  }
  100% {
    text-shadow:
      0 0 15px rgba(255, 215, 0, 0.8),
      0 0 25px rgba(255, 215, 0, 0.4);
  }
}

.leaderboard-modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  font-size: 24px;
  color: white;
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 1;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
}

.leaderboard-modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.leaderboard-modal-close:active {
  transform: scale(0.95);
  transition: all 0.1s ease;
}

/* Tabs */
.leaderboard-tabs {
  display: flex;
  background: var(--bg-secondary, #f8f9fa);
  padding: 0;
  margin: 0;
  overflow-x: auto;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border-color, #e1e5e9);
}

.leaderboard-tab {
  flex: 1;
  padding: 13px 8px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary, #666);
  transition: all 0.3s ease;
  white-space: nowrap;
  min-width: 0;
  position: relative;
  text-align: center;
}

.leaderboard-tab:hover {
  background: var(--accent-color-light, rgba(79, 28, 81, 0.1));
  color: var(--accent-color, #4f1c51);
}

.leaderboard-tab.active {
  background: var(--card-bg, #ffffff);
  color: var(--accent-color, #4f1c51);
  box-shadow: 0 -2px 0 var(--accent-color, #4f1c51);
}

.leaderboard-tab.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-color, #4f1c51);
}

/* Period Filter */
.leaderboard-period-filter {
  display: flex;
  gap: 8px;
  padding: 12px 30px 8px;
  background: var(--card-bg, #ffffff);
  border-bottom: 1px solid var(--border-color, #e1e5e9);
  flex-shrink: 0;
}

.period-btn {
  padding: 8px 16px;
  border: 2px solid var(--border-color, #e1e5e9);
  border-radius: 20px;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary, #666);
  transition: all 0.2s ease;
}

.period-btn:hover {
  border-color: var(--accent-color, #4f1c51);
  color: var(--accent-color, #4f1c51);
}

.period-btn.active {
  background: var(--accent-color, #4f1c51);
  border-color: var(--accent-color, #4f1c51);
  color: white;
}

/* Monthly Winners Export */
.leaderboard-export {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 30px 14px;
  background: var(--card-bg, #ffffff);
  border-bottom: 1px solid var(--border-color, #e1e5e9);
  flex-shrink: 0;
}

.leaderboard-export-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.leaderboard-export-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary, #666);
}

.leaderboard-export-subtitle {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-secondary, #666);
}

.leaderboard-export-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.leaderboard-export-select {
  padding: 8px 12px;
  border: 1px solid var(--border-color, #e1e5e9);
  border-radius: 10px;
  background: var(--bg-secondary, #f8f9fa);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary, #1f2937);
  min-width: 132px;
}

.leaderboard-export-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  min-width: 132px;
  border-radius: 10px;
  border: none;
  background: var(--accent-color, #4f1c51);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.leaderboard-export-btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  filter: saturate(0.7);
  transform: none;
}

.leaderboard-export-btn:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.leaderboard-export-btn-icon {
  font-size: 12px;
  line-height: 1;
}

.leaderboard-export-btn-text {
  white-space: nowrap;
}

.leaderboard-export-btn--download:disabled {
  opacity: 0.55;
}

.leaderboard-history-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.leaderboard-history-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.leaderboard-history-pill.available {
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
}

.leaderboard-history-pill.current {
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
}

.leaderboard-history-pill.future,
.leaderboard-history-pill.empty {
  background: rgba(100, 116, 139, 0.12);
  color: #64748b;
}

.leaderboard-history-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.leaderboard-history-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border-color, #e1e5e9);
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,250,252,0.96));
  text-align: left;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
}

.leaderboard-history-card:not(:disabled) {
  cursor: pointer;
}

.leaderboard-history-card:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.leaderboard-history-card.is-selected {
  border-color: var(--accent-color, #4f1c51);
  box-shadow: 0 0 0 2px rgba(79, 28, 81, 0.12);
}

.leaderboard-history-card:disabled {
  cursor: not-allowed;
}

.leaderboard-history-card.available {
  background: linear-gradient(180deg, rgba(240, 253, 244, 0.96), rgba(236, 253, 245, 0.96));
}

.leaderboard-history-card.current {
  background: linear-gradient(180deg, rgba(255, 251, 235, 0.96), rgba(254, 243, 199, 0.88));
}

.leaderboard-history-card.future,
.leaderboard-history-card.empty {
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(241, 245, 249, 0.96));
  opacity: 0.65;
}

.leaderboard-history-card-month {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary, #1f2937);
}

.leaderboard-history-card-status {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-color, #4f1c51);
}

.leaderboard-history-card.current .leaderboard-history-card-status {
  color: #b45309;
}

.leaderboard-history-card.future .leaderboard-history-card-status,
.leaderboard-history-card.empty .leaderboard-history-card-status {
  color: #64748b;
}

.leaderboard-history-card.available .leaderboard-history-card-status {
  color: #15803d;
}

.leaderboard-history-card-meta {
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-secondary, #666);
}

.leaderboard-history-note {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-secondary, #666);
}

.leaderboard-history-controls-shell {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(79, 28, 81, 0.12);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.98));
}

.leaderboard-history-controls-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.leaderboard-history-controls-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.leaderboard-history-controls-text {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-secondary, #666);
}

.leaderboard-history-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.leaderboard-history-toggle {
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-color, #e1e5e9);
  background: var(--card-bg, #ffffff);
  color: var(--text-primary, #1f2937);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.leaderboard-history-toggle:hover {
  border-color: var(--accent-color, #4f1c51);
  color: var(--accent-color, #4f1c51);
}

.leaderboard-history-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px 22px 24px;
}

.leaderboard-history-hero {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(79, 28, 81, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.98));
  border: 1px solid rgba(79, 28, 81, 0.12);
}

.leaderboard-history-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-color, #4f1c51);
}

.leaderboard-history-hero h3 {
  margin: 0;
  font-size: 22px;
  color: var(--text-primary, #1f2937);
}

.leaderboard-history-hero p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary, #666);
}

.leaderboard-history-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.leaderboard-history-stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--bg-secondary, #f8f9fa);
  border: 1px solid var(--border-color, #e1e5e9);
}

.leaderboard-history-stat-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary, #666);
}

.leaderboard-history-stat strong {
  font-size: 20px;
  color: var(--accent-color, #4f1c51);
}

.leaderboard-history-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.leaderboard-history-result-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--border-color, #e1e5e9);
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.98));
}

.leaderboard-history-result-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary, #1f2937);
}

.leaderboard-history-result-icon {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(79, 28, 81, 0.08);
}

.leaderboard-history-result-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.leaderboard-history-result-row {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.8);
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.leaderboard-history-result-row.rank-gold {
  background: linear-gradient(90deg, rgba(255, 248, 209, 0.98) 0%, rgba(255, 236, 153, 0.92) 100%);
  border-color: rgba(246, 183, 0, 0.65);
  box-shadow: 0 8px 18px rgba(180, 121, 0, 0.14);
}

.leaderboard-history-result-row.rank-silver {
  background: linear-gradient(90deg, rgba(251, 252, 253, 0.99) 0%, rgba(216, 223, 231, 0.96) 100%);
  border-color: rgba(152, 162, 175, 0.82);
  box-shadow:
    0 6px 14px rgba(112, 124, 140, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.leaderboard-history-result-row.rank-bronze {
  background: linear-gradient(90deg, rgba(255, 242, 233, 0.98) 0%, rgba(224, 164, 125, 0.88) 100%);
  border-color: rgba(143, 90, 47, 0.7);
  box-shadow: 0 5px 12px rgba(120, 73, 34, 0.1);
}

.leaderboard-history-result-row.rank-gold .leaderboard-history-rank {
  color: #b77900;
}

.leaderboard-history-result-row.rank-silver .leaderboard-history-rank {
  color: #7a838f;
}

.leaderboard-history-result-row.rank-bronze .leaderboard-history-rank {
  color: #8f5a2f;
}

.leaderboard-history-result-row.rank-gold .leaderboard-history-user,
.leaderboard-history-result-row.rank-silver .leaderboard-history-user,
.leaderboard-history-result-row.rank-bronze .leaderboard-history-user {
  font-weight: 700;
}

.leaderboard-history-result-row.rank-gold .leaderboard-history-score {
  color: #8b5b00;
}

.leaderboard-history-result-row.rank-silver .leaderboard-history-score {
  color: #5d6876;
}
.leaderboard-history-result-card.is-overall-champion {
  position: relative;
  overflow: hidden;
  border-color: rgba(255, 185, 0, 0.55);
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.18), transparent 32%),
    linear-gradient(180deg, #ffb900 0%, #e2a400 100%);
  box-shadow:
    0 14px 26px rgba(180, 121, 0, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.28) inset;
}
.leaderboard-history-result-card.is-overall-champion::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    transparent 0%,
    rgba(255, 255, 255, 0.3) 45%,
    rgba(255, 255, 255, 0.06) 55%,
    transparent 100%
  );
  transform: translateX(-70%);
  animation: overallChampionSheen 4.8s ease-in-out infinite;
  pointer-events: none;
}
.leaderboard-history-result-card.is-overall-champion .leaderboard-history-result-head {
  position: relative;
  color: #5f3d00;
}
.leaderboard-history-result-card.is-overall-champion .leaderboard-history-result-icon {
  background: linear-gradient(135deg, #f3f4f6 0%, #d1d5db 100%);
  box-shadow:
    0 5px 12px rgba(107, 114, 128, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.6) inset;
}
.leaderboard-history-result-card.is-overall-champion .leaderboard-history-result-list {
  position: relative;
}
.leaderboard-history-result-card.is-overall-champion .leaderboard-history-result-row.rank-gold {
  background: linear-gradient(90deg, rgba(255, 250, 222, 0.98) 0%, rgba(255, 241, 190, 0.96) 100%);
  border-color: rgba(255, 185, 0, 0.72);
  box-shadow:
    0 8px 18px rgba(180, 121, 0, 0.1),
    0 0 0 1px rgba(255, 255, 255, 0.32) inset;
}
.leaderboard-history-result-card.is-overall-champion .leaderboard-history-result-row.rank-gold::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.42) 50%, transparent 100%);
  transform: translateX(-60%);
  animation: rowSheen 3.6s ease-in-out infinite;
  pointer-events: none;
}
body.theme-dark .leaderboard-history-result-card.is-overall-champion {
  border-color: rgba(255, 185, 0, 0.5);
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.08), transparent 30%),
    linear-gradient(180deg, #ffb900 0%, #9d7100 100%);
  box-shadow:
    0 14px 26px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(255, 232, 149, 0.05) inset;
}
body.theme-dark .leaderboard-history-result-card.is-overall-champion .leaderboard-history-result-head {
  color: #5f3d00;
}
body.theme-dark .leaderboard-history-result-card.is-overall-champion .leaderboard-history-result-icon {
  background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
  box-shadow:
    0 5px 12px rgba(0, 0, 0, 0.18),
    0 0 14px rgba(156, 163, 175, 0.18);
}
body.theme-dark .leaderboard-history-result-card.is-overall-champion .leaderboard-history-result-row.rank-gold {
  background: linear-gradient(90deg, rgba(255, 250, 222, 0.96) 0%, rgba(255, 241, 190, 0.9) 100%);
  border-color: rgba(255, 185, 0, 0.58);
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.26),
    0 0 0 1px rgba(255, 236, 153, 0.06) inset;
}
body.theme-dark .leaderboard-history-result-card.is-overall-champion .leaderboard-history-result-row.rank-gold > * {
  position: relative;
  z-index: 1;
}
body.theme-dark .leaderboard-history-result-card.is-overall-champion .leaderboard-history-result-row.rank-gold .leaderboard-history-rank {
  color: #7a4a00;
}
body.theme-dark .leaderboard-history-result-card.is-overall-champion .leaderboard-history-result-row.rank-gold .leaderboard-history-user {
  color: #2f2100;
}
body.theme-dark .leaderboard-history-result-card.is-overall-champion .leaderboard-history-result-row.rank-gold .leaderboard-history-score {
  color: #6a4100;
}
@keyframes overallChampionSheen {
  0% {
    transform: translateX(-70%);
    opacity: 0;
  }
  20% {
    opacity: 0.6;
  }
  50% {
    transform: translateX(70%);
    opacity: 0.35;
  }
  100% {
    transform: translateX(70%);
    opacity: 0;
  }
}
@keyframes rowSheen {
  0% {
    transform: translateX(-60%);
    opacity: 0;
  }
  25% {
    opacity: 0.5;
  }
  60% {
    transform: translateX(65%);
    opacity: 0.25;
  }
  100% {
    transform: translateX(65%);
    opacity: 0;
  }
}

.leaderboard-history-result-row.rank-bronze .leaderboard-history-score {
  color: #6f4321;
}

.leaderboard-history-result-row.empty {
  grid-template-columns: 1fr;
}

.leaderboard-history-rank {
  font-size: 12px;
  font-weight: 800;
  color: var(--accent-color, #4f1c51);
}

.leaderboard-history-user {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary, #1f2937);
}

.leaderboard-history-score {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary, #666);
}

.leaderboard-history-loading,
.leaderboard-history-empty {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border-radius: 12px;
  background: var(--bg-secondary, #f8f9fa);
  color: var(--text-secondary, #666);
}

body.theme-dark .leaderboard-history-result-card {
  background: linear-gradient(180deg, rgba(28, 28, 28, 0.98), rgba(24, 24, 24, 0.96));
  border-color: rgba(255, 255, 255, 0.08);
}

body.theme-dark .leaderboard-history-result-head {
  color: #f3f4f6;
}

body.theme-dark .leaderboard-history-result-icon {
  background: rgba(139, 95, 191, 0.14);
}

body.theme-dark .leaderboard-history-result-row {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

body.theme-dark .leaderboard-history-result-row.rank-gold {
  background: linear-gradient(90deg, rgba(255, 225, 107, 0.16) 0%, rgba(145, 99, 0, 0.3) 100%);
  border-color: rgba(246, 200, 79, 0.55);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.3);
}

body.theme-dark .leaderboard-history-result-row.rank-silver {
  background: linear-gradient(90deg, rgba(210, 219, 230, 0.1) 0%, rgba(112, 124, 140, 0.2) 100%);
  border-color: rgba(144, 160, 178, 0.45);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.24);
}

body.theme-dark .leaderboard-history-result-row.rank-bronze {
  background: linear-gradient(90deg, rgba(153, 97, 54, 0.22) 0%, rgba(86, 51, 28, 0.4) 100%);
  border-color: rgba(184, 119, 69, 0.42);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.22);
}

body.theme-dark .leaderboard-history-result-row.rank-gold .leaderboard-history-rank {
  color: #ffd75a;
}

body.theme-dark .leaderboard-history-result-row.rank-silver .leaderboard-history-rank {
  color: #d3dbe5;
}

body.theme-dark .leaderboard-history-result-row.rank-bronze .leaderboard-history-rank {
  color: #e0a06d;
}

body.theme-dark .leaderboard-history-result-row.rank-gold .leaderboard-history-user,
body.theme-dark .leaderboard-history-result-row.rank-silver .leaderboard-history-user,
body.theme-dark .leaderboard-history-result-row.rank-bronze .leaderboard-history-user {
  color: #f3f4f6;
}

body.theme-dark .leaderboard-history-result-row.rank-gold .leaderboard-history-score,
body.theme-dark .leaderboard-history-result-row.rank-silver .leaderboard-history-score,
body.theme-dark .leaderboard-history-result-row.rank-bronze .leaderboard-history-score {
  color: #d1d5db;
}

body.theme-dark .leaderboard-history-loading,
body.theme-dark .leaderboard-history-empty {
  background: rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
}

@media (max-width: 640px) {
  .leaderboard-history-controls-top,
  .leaderboard-history-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .leaderboard-retry-btn,
  .leaderboard-export-select,
  .leaderboard-export-btn,
  .leaderboard-history-toggle {
    width: 100%;
    min-width: 0;
  }

  .leaderboard-history-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .leaderboard-history-stats,
  .leaderboard-history-results {
    grid-template-columns: 1fr;
  }

  .leaderboard-history-panel {
    padding: 16px;
  }
}

/* Content */
.leaderboard-info {
  padding: 12px 30px;
  background: var(--info-bg, #f8f9fa);
  border-bottom: 1px solid var(--border-color, #e1e5e9);
  flex-shrink: 0;
}

.leaderboard-info-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.info-icon {
  font-size: 16px;
  flex-shrink: 0;
  color: var(--info-color, #17a2b8);
  opacity: 0.8;
}

.info-text {
  font-size: 13px;
  color: var(--text-secondary, #666);
  line-height: 1.4;
}

.info-text strong {
  color: var(--accent-color, #4f1c51);
  font-weight: 600;
}

/* Content */
.leaderboard-content {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

.leaderboard-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Loading State */
.leaderboard-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 30px;
  color: var(--text-secondary, #666);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color, #e1e5e9);
  border-top: 3px solid var(--accent-color, #4f1c51);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Error State */
.leaderboard-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 280px;
  max-width: 560px;
  margin: 0 auto;
  padding: 60px 24px;
  text-align: center;
  color: var(--error-color, #e74c3c);
}

.leaderboard-error h3 {
  margin: 0;
  font-size: 18px;
}

.leaderboard-error p {
  margin: 0;
  color: var(--text-secondary, #666);
  max-width: 36ch;
}

.leaderboard-retry-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 128px;
  padding: 10px 18px;
  border: none;
  border-radius: 999px;
  background: var(--accent-color, #4f1c51);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 10px 20px rgba(79, 28, 81, 0.16);
}

.leaderboard-retry-btn:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.leaderboard-retry-btn:active {
  transform: translateY(0);
}

.leaderboard-retry-btn:focus-visible {
  outline: 2px solid rgba(79, 28, 81, 0.35);
  outline-offset: 3px;
}

/* Empty State */
.leaderboard-empty {
  text-align: center;
  padding: 60px 30px;
  color: var(--text-secondary, #666);
}

.leaderboard-empty h3 {
  margin: 0 0 10px;
  font-size: 18px;
  color: var(--text-primary, #333);
}

.leaderboard-empty p {
  margin: 0;
}

/* Leaderboard Item */
.leaderboard-item {
  display: flex;
  align-items: center;
  padding: 16px 30px;
  border-bottom: 1px solid var(--border-color, #e1e5e9);
  transition: all 0.2s ease;
  position: relative;
}

.leaderboard-item:hover {
  background: var(--bg-secondary, #f8f9fa);
}

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

.leaderboard-item.current-user {
  background: linear-gradient(
    90deg,
    rgba(79, 28, 81, 0.1) 0%,
    rgba(79, 28, 81, 0.05) 50%,
    transparent 100%
  );
  border-left: 4px solid var(--accent-color, #4f1c51);
}

/* Top 3 Highlighting */
.leaderboard-item.rank-gold {
  background: rgba(255, 215, 0, 0.35);
  border-left: 6px solid #ffd700;
  box-shadow: 0 4px 16px rgba(255, 215, 0, 0.4);
  border-radius: 4px;
}

.leaderboard-item.rank-silver {
  background: rgba(192, 192, 192, 0.3);
  border-left: 6px solid #c0c0c0;
  box-shadow: 0 3px 12px rgba(192, 192, 192, 0.35);
  border-radius: 4px;
}

.leaderboard-item.rank-bronze {
  background: rgba(205, 127, 50, 0.2);
  border-left: 5px solid #cd7f32;
  box-shadow: 0 2px 8px rgba(205, 127, 50, 0.25);
  border-radius: 4px;
}

/* Rank */
.leaderboard-rank {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-secondary, #666);
  min-width: 40px;
  text-align: center;
  margin-right: 16px;
}

.leaderboard-rank.top-three {
  font-size: 20px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.leaderboard-rank.rank-1 {
  color: #ffd700;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.leaderboard-rank.rank-2 {
  color: #c0c0c0;
  text-shadow: 0 0 10px rgba(192, 192, 192, 0.5);
}

.leaderboard-rank.rank-3 {
  color: #cd7f32;
  text-shadow: 0 0 10px rgba(205, 127, 50, 0.5);
}

/* Medal for top 3 */
.medal {
  font-size: 24px;
  margin-right: 8px;
}

/* Avatar */
.leaderboard-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(
    --gradient-bg,
    linear-gradient(135deg, #667eea 0%, #764ba2 100%)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 16px;
  margin-right: 16px;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.leaderboard-avatar.current-user {
  box-shadow:
    0 0 0 3px var(--accent-color, #4f1c51),
    0 2px 8px rgba(0, 0, 0, 0.1);
}

/* User Info */
.leaderboard-user-info {
  flex: 1;
  min-width: 0;
}

.leaderboard-username {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary, #333);
  margin: 0 0 2px;
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.username-text {
  flex-shrink: 0;
}

/* User Badges */
.user-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  animation: badgeGlow 2s ease-in-out infinite alternate;
}

.user-badge.vip {
  background: linear-gradient(135deg, #ffd700 0%, #ffa500 100%);
  color: #2c2c2c;
  border: 1px solid #ffd700;
}

.user-badge.premium {
  background: linear-gradient(135deg, #8b5fbf 0%, #6a4c96 100%);
  color: white;
  border: 1px solid #8b5fbf;
}

.user-badge.founder {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
  color: white;
  border: 1px solid #ff6b6b;
}

.user-badge.rph {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
  color: white;
  border: 1px solid #ff6b6b;
  text-transform: none;
}

.user-badge.champion {
  background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
  color: white;
  border: 1px solid #4ecdc4;
}

.user-badge.beta {
  background: linear-gradient(135deg, #45b7d1 0%, #3498db 100%);
  color: white;
  border: 1px solid #45b7d1;
}

/* Monthly Champion Badges */
.user-badge.monthly-focus-champion {
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  color: white;
  border: 1px solid #3b82f6;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
  animation: focusGlow 2s ease-in-out infinite alternate;
}

.user-badge.monthly-sessions-champion {
  /* Light-blue variant for Session Master */
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
  color: white;
  border: 1px solid #3b82f6;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.35);
  animation: energyGlow 2s ease-in-out infinite alternate;
}

.user-badge.monthly-streak-champion {
  background: linear-gradient(135deg, #dc2626 0%, #f59e0b 100%);
  color: white;
  border: 1px solid #f59e0b;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
  animation: fireGlow 2s ease-in-out infinite alternate;
}

.user-badge.monthly-endurance-champion {
  background: linear-gradient(135deg, #7c3aed 0%, #06b6d4 100%);
  color: white;
  border: 1px solid #06b6d4;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.4);
  animation: diamondGlow 2s ease-in-out infinite alternate;
}

.user-badge.monthly-current-streak-champion {
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  color: white;
  border: 1px solid #f59e0b;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
  animation: hotStreakGlow 2s ease-in-out infinite alternate;
}

/* Special Achievement Badges */
.user-badge.monthly-mvp {
  background: linear-gradient(135deg, #ffd700 0%, #ffa500 100%, #ff6b6b 200%);
  color: #1a1a1a;
  border: 2px solid #ffd700;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
  animation: mvpSparkle 3s ease-in-out infinite;
}

.user-badge.triple-crown {
  background: linear-gradient(135deg, #ff0080 0%, #7928ca 50%, #ff8c00 100%);
  color: white;
  border: 2px solid #7928ca;
  box-shadow: 0 0 25px rgba(121, 40, 202, 0.5);
  animation: rainbowGlow 4s ease-in-out infinite;
}

.user-badge.grand-slam {
  background: linear-gradient(
    135deg,
    #ffd700 0%,
    #ff69b4 25%,
    #00ced1 50%,
    #32cd32 75%,
    #ffd700 100%
  );
  color: #1a1a1a;
  border: 2px solid #ffd700;
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.8);
  animation: grandSlamSparkle 2s ease-in-out infinite;
}

/* Badge Animations */
@keyframes focusGlow {
  0% {
    box-shadow:
      0 2px 6px rgba(0, 0, 0, 0.15),
      0 0 10px rgba(59, 130, 246, 0.3);
  }
  100% {
    box-shadow:
      0 4px 12px rgba(0, 0, 0, 0.25),
      0 0 20px rgba(59, 130, 246, 0.6);
  }
}

@keyframes energyGlow {
  0% {
    box-shadow:
      0 2px 6px rgba(0, 0, 0, 0.15),
      0 0 10px rgba(249, 115, 22, 0.3);
  }
  100% {
    box-shadow:
      0 4px 12px rgba(0, 0, 0, 0.25),
      0 0 20px rgba(249, 115, 22, 0.6);
  }
}

@keyframes fireGlow {
  0% {
    box-shadow:
      0 2px 6px rgba(0, 0, 0, 0.15),
      0 0 10px rgba(245, 158, 11, 0.3);
  }
  100% {
    box-shadow:
      0 4px 12px rgba(0, 0, 0, 0.25),
      0 0 20px rgba(245, 158, 11, 0.6);
  }
}

@keyframes diamondGlow {
  0% {
    box-shadow:
      0 2px 6px rgba(0, 0, 0, 0.15),
      0 0 10px rgba(6, 182, 212, 0.3);
  }
  100% {
    box-shadow:
      0 4px 12px rgba(0, 0, 0, 0.25),
      0 0 20px rgba(6, 182, 212, 0.6);
  }
}

@keyframes hotStreakGlow {
  0% {
    box-shadow:
      0 2px 6px rgba(0, 0, 0, 0.15),
      0 0 10px rgba(245, 158, 11, 0.3);
  }
  100% {
    box-shadow:
      0 4px 12px rgba(0, 0, 0, 0.25),
      0 0 20px rgba(239, 68, 68, 0.6);
  }
}

@keyframes mvpSparkle {
  0% {
    transform: scale(1);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.8);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
  }
}

@keyframes rainbowGlow {
  0% {
    box-shadow: 0 0 20px rgba(121, 40, 202, 0.5);
  }
  25% {
    box-shadow: 0 0 25px rgba(255, 0, 128, 0.5);
  }
  50% {
    box-shadow: 0 0 25px rgba(255, 140, 0, 0.5);
  }
  75% {
    box-shadow: 0 0 25px rgba(121, 40, 202, 0.5);
  }
  100% {
    box-shadow: 0 0 20px rgba(121, 40, 202, 0.5);
  }
}

@keyframes grandSlamSparkle {
  0% {
    transform: scale(1) rotate(0deg);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.8);
  }
  50% {
    transform: scale(1.1) rotate(2deg);
    box-shadow: 0 0 40px rgba(255, 105, 180, 0.6);
  }
  100% {
    transform: scale(1) rotate(0deg);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.8);
  }
}

@keyframes badgeGlow {
  0% {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  }
  100% {
    box-shadow:
      0 3px 12px rgba(0, 0, 0, 0.25),
      0 0 20px rgba(255, 215, 0, 0.3);
  }
}

.leaderboard-user-subtitle {
  font-size: 13px;
  color: var(--text-secondary, #666);
  margin: 0;
  opacity: 0.8;
}

.leaderboard-item.current-user .leaderboard-username {
  color: var(--accent-color, #4f1c51);
  font-weight: 700;
}

/* Score */
.leaderboard-score {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-color, #4f1c51);
  text-align: right;
  min-width: 80px;
}

.leaderboard-score-unit {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary, #666);
  display: block;
  margin-top: 2px;
}

/* Highlighted User */
.highlighted-user-section {
  background: var(--bg-secondary, #f8f9fa);
  border-top: 1px solid var(--border-color, #e1e5e9);
  padding: 20px 30px;
}

.highlighted-user-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary, #666);
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .leaderboard-modal {
    width: 95%;
    margin: 20px;
    max-height: 90vh;
  }

  .leaderboard-modal-header {
    padding: 20px 20px 16px;
  }

  .leaderboard-modal-title {
    font-size: 20px;
  }

  .leaderboard-modal-close {
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    font-size: 24px;
  }

  .leaderboard-tab {
    padding: 14px 8px;
    font-size: 13px;
    min-width: 100px;
  }

  .leaderboard-period-filter {
    padding: 16px 20px 8px;
    gap: 6px;
  }

  .period-btn {
    padding: 6px 12px;
    font-size: 12px;
  }

  .leaderboard-item {
    padding: 12px 20px;
  }

  .leaderboard-avatar {
    width: 36px;
    height: 36px;
    font-size: 14px;
    margin-right: 12px;
  }

  .leaderboard-username {
    font-size: 15px;
  }

  .leaderboard-score {
    font-size: 16px;
    min-width: 60px;
  }

  .leaderboard-rank {
    font-size: 16px;
    min-width: 35px;
    margin-right: 12px;
  }

  .highlighted-user-section {
    padding: 16px 20px;
  }
}

/* Theme Support */
body.theme-dark .leaderboard-modal {
  background: #1e1e1e;
  color: #f1f1f1;
  border: 1px solid #333;
}

body.theme-dark .leaderboard-modal-header {
  background: linear-gradient(135deg, #2c2c2c 0%, #1e1e1e 100%);
  border-bottom: 1px solid #333;
}

body.theme-dark .leaderboard-tabs {
  background: #2a2a2a;
  border-bottom: 1px solid #333;
}

body.theme-dark .leaderboard-tab {
  color: #bbb;
}

body.theme-dark .leaderboard-tab:hover {
  background: rgba(139, 95, 191, 0.15);
  color: #8b5fbf;
}

body.theme-dark .leaderboard-tab.active {
  background: #1e1e1e;
  color: #8b5fbf;
  box-shadow: 0 -2px 0 #8b5fbf;
}

body.theme-dark .leaderboard-period-filter {
  background: #1e1e1e;
  border-bottom: 1px solid #333;
}

body.theme-dark .period-btn {
  border-color: #444;
  color: #bbb;
}

body.theme-dark .period-btn:hover {
  border-color: #8b5fbf;
  color: #8b5fbf;
}

body.theme-dark .period-btn.active {
  background: #8b5fbf;
  border-color: #8b5fbf;
  color: white;
}

body.theme-dark .leaderboard-info {
  background: #252525;
  border-bottom: 1px solid #333;
}

body.theme-dark .info-text {
  color: #ccc;
}

body.theme-dark .info-text strong {
  color: #8b5fbf;
}

body.theme-dark .leaderboard-item {
  border-bottom: 1px solid #333;
}

body.theme-dark .leaderboard-item:hover {
  background: #2a2a2a;
}

body.theme-dark .leaderboard-username {
  color: #f1f1f1;
}

body.theme-dark .leaderboard-user-subtitle {
  color: #999;
}

body.theme-dark .leaderboard-score {
  color: #8b5fbf;
}

body.theme-dark .leaderboard-score-unit {
  color: #999;
}

body.theme-dark .highlighted-user-section {
  background: #2a2a2a;
  border-top: 1px solid #333;
}

body.theme-dark .highlighted-user-title {
  color: #bbb;
}

/* Dark Theme Top 3 Highlighting - Refined for Dark Mode */
body.theme-dark .leaderboard-item.rank-gold {
  background: linear-gradient(
    135deg,
    rgba(255, 215, 0, 0.15) 0%,
    rgba(255, 193, 7, 0.08) 100%
  );
  border-left: 4px solid #ffc107;
  box-shadow: 0 2px 8px rgba(255, 193, 7, 0.2);
}

body.theme-dark .leaderboard-item.rank-gold .leaderboard-rank {
  color: #ffc107;
  text-shadow: 0 0 8px rgba(255, 193, 7, 0.4);
}

body.theme-dark .leaderboard-item.rank-silver {
  background: linear-gradient(
    135deg,
    rgba(192, 192, 192, 0.12) 0%,
    rgba(158, 158, 158, 0.06) 100%
  );
  border-left: 4px solid #9e9e9e;
  box-shadow: 0 2px 8px rgba(158, 158, 158, 0.15);
}

body.theme-dark .leaderboard-item.rank-silver .leaderboard-rank {
  color: #c0c0c0;
  text-shadow: 0 0 8px rgba(192, 192, 192, 0.3);
}

body.theme-dark .leaderboard-item.rank-bronze {
  background: linear-gradient(
    135deg,
    rgba(205, 127, 50, 0.12) 0%,
    rgba(184, 115, 51, 0.06) 100%
  );
  border-left: 4px solid #b87333;
  box-shadow: 0 2px 8px rgba(184, 115, 51, 0.15);
}

body.theme-dark .leaderboard-item.rank-bronze .leaderboard-rank {
  color: #cd7f32;
  text-shadow: 0 0 8px rgba(205, 127, 50, 0.3);
}

/* Dark theme current user highlighting */
body.theme-dark .leaderboard-item.current-user {
  background: linear-gradient(
    90deg,
    rgba(139, 95, 191, 0.1) 0%,
    transparent 100%
  );
  border-left: 4px solid #8b5fbf;
}

body.theme-dark .leaderboard-item.current-user .leaderboard-username {
  color: #8b5fbf;
  font-weight: 700;
}

body.theme-dark .leaderboard-avatar.current-user {
  box-shadow:
    0 0 0 3px #8b5fbf,
    0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Dark theme loading and error states */
body.theme-dark .leaderboard-loading {
  color: #bbb;
}

body.theme-dark .loading-spinner {
  border-color: #444;
  border-top-color: #8b5fbf;
}

body.theme-dark .leaderboard-error {
  color: #ff6b6b;
}

body.theme-dark .leaderboard-error h3 {
  color: #ff6b6b;
}

body.theme-dark .leaderboard-error p {
  color: #bbb;
}

body.theme-dark .leaderboard-empty {
  color: #bbb;
}

body.theme-dark .leaderboard-empty h3 {
  color: #f1f1f1;
}

/* Dark theme rank styling */
body.theme-dark .leaderboard-rank {
  color: #bbb;
}

body.theme-dark .leaderboard-rank.top-three {
  font-weight: 700;
}

/* Dark theme modal close button */
body.theme-dark .leaderboard-modal-close {
  background: rgba(255, 255, 255, 0.1);
  color: #f1f1f1;
}

body.theme-dark .leaderboard-modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* Dark Theme Badge Support */
body.theme-dark .user-badge.vip {
  background: linear-gradient(135deg, #ffd700 0%, #ffa500 100%);
  color: #1a1a1a;
}

body.theme-dark .user-badge.premium {
  background: linear-gradient(135deg, #9b6fd9 0%, #7b4fb8 100%);
  color: white;
}

body.theme-dark .user-badge.founder {
  background: linear-gradient(135deg, #ff7b7b 0%, #ff5a5a 100%);
  color: white;
}

body.theme-dark .user-badge.champion {
  background: linear-gradient(135deg, #5eddd4 0%, #54b8af 100%);
  color: #1a1a1a;
}

body.theme-dark .user-badge.beta {
  background: linear-gradient(135deg, #55c7e1 0%, #4aa8db 100%);
  color: white;
}

/* Custom Theme Support */
body.theme-custom .leaderboard-modal,
body.theme-yourname .leaderboard-modal,
body.theme-rain .leaderboard-modal,
body.theme-color .leaderboard-modal {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
}

body.theme-custom .leaderboard-modal-header,
body.theme-yourname .leaderboard-modal-header,
body.theme-rain .leaderboard-modal-header,
body.theme-color .leaderboard-modal-header {
  background: var(--accent-color, #4f1c51);
  backdrop-filter: blur(10px);
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  .leaderboard-modal {
    width: 98%;
    max-width: none;
    max-height: 95vh;
    margin: 10px;
  }

  .leaderboard-modal-header {
    padding: 14px 20px 10px;
  }

  .leaderboard-modal-title {
    font-size: 18px;
  }

  .leaderboard-tabs {
    padding: 0;
  }

  .leaderboard-tab {
    padding: 12px 6px;
    font-size: 12px;
    min-width: 0;
  }

  .leaderboard-tab span {
    display: block;
    margin-bottom: 2px;
  }

  .leaderboard-period-filter {
    padding: 10px 20px 6px;
    gap: 6px;
  }

  .period-btn {
    padding: 6px 12px;
    font-size: 12px;
  }

  .leaderboard-content {
    padding: 0;
  }

  .ranking-item {
    padding: 12px 16px;
  }

  .rank-info {
    gap: 12px;
  }

  .user-avatar {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }

  .user-details h4 {
    font-size: 14px;
  }

  .user-stats {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .leaderboard-modal {
    width: 100%;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    margin: 0;
  }

  .leaderboard-modal-header {
    padding: 12px 16px 8px;
  }

  .leaderboard-modal-title {
    font-size: 16px;
  }

  .leaderboard-modal-close {
    top: 12px;
    right: 16px;
    width: 28px;
    height: 28px;
    font-size: 20px;
  }

  .leaderboard-tab {
    padding: 10px 4px;
    font-size: 11px;
    line-height: 1.2;
    flex-direction: column;
  }

  .leaderboard-tab .tab-text {
    display: none;
  }

  .leaderboard-tab span:first-child {
    font-size: 18px;
    margin-bottom: 2px;
  }

  .leaderboard-period-filter {
    padding: 8px 16px 4px;
    flex-wrap: wrap;
  }

  .period-btn {
    padding: 5px 10px;
    font-size: 11px;
    min-width: 70px;
  }

  .leaderboard-content {
    padding: 0;
  }

  .ranking-item {
    padding: 10px 12px;
  }

  .rank-position {
    font-size: 14px;
    min-width: 24px;
  }

  .user-avatar {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }

  .user-details h4 {
    font-size: 13px;
  }

  .user-stats {
    font-size: 14px;
  }
}

@media (max-width: 360px) {
  .leaderboard-tab {
    padding: 8px 2px;
  }

  .leaderboard-tab span:first-child {
    font-size: 16px;
  }

  .leaderboard-period-filter {
    justify-content: center;
  }

  .period-btn {
    padding: 4px 8px;
    font-size: 10px;
    min-width: 60px;
  }
}

/* ─────────────────────────────────────────────────────────────────────────────
   Article Styles Codes - 3
   ───────────────────────────────────────────────────────────────────────────── */

/* SEO Optimized Article Preview Styles */
.pomodoro-preview {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 2.5rem;
  margin: 2rem auto;
  max-width: 800px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.preview-content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: relative;
  z-index: 1;
}

.preview-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.preview-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.method-highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 2rem 0;
}

.method-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.5rem;
  transition: transform 0.3s ease;
}

.method-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.08);
}

.method-card h3 {
  color: #ffffff;
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.method-card p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

/* Article Text Styles */
.article-text {
  color: #ffffff;
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.featured-quote {
  font-size: 1.25rem;
  line-height: 1.7;
  color: #ffffff;
  border-left: 4px solid rgba(255, 255, 255, 0.2);
  padding: 1rem 0 1rem 2rem;
  margin: 2rem 0;
  font-style: italic;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.1), transparent);
  border-radius: 0 12px 12px 0;
}

.section-title {
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 600;
  margin: 2.5rem 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.feature-list {
  color: #ffffff;
  list-style-type: none;
  padding: 0;
  margin: 1.5rem 0;
}

.feature-list li {
  margin-bottom: 0.75rem;
  padding-left: 1.5rem;
  position: relative;
}

.feature-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent-color, #4fd1c5);
}

/* Enhanced mobile responsiveness */
@media (max-width: 768px) {
  .method-highlights {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .method-card {
    padding: 1.25rem;
  }

  .article-title {
    font-size: 1.75rem;
  }

  .article-preview {
    font-size: 1rem;
  }
}

.feature-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  font-size: 0.9rem;
  color: #ffffff;
  font-weight: 500;
  letter-spacing: 0.2px;
  backdrop-filter: blur(5px);
}

.article-title {
  color: #ffffff !important; /* Force white color for all themes */
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.5px;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.article-preview {
  color: rgba(
    255,
    255,
    255,
    0.95
  ) !important; /* Force white color with slight transparency */
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
  font-weight: 400;
}

/* Glass morphism effect */
.pomodoro-preview::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--accent-color, #4fd1c5) 0%,
    rgba(79, 209, 197, 0.5) 100%
  );
}

.pomodoro-preview::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle at top right,
    rgba(255, 255, 255, 0.1),
    transparent 70%
  );
  pointer-events: none;
}

.pomodoro-preview::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-color, #4fd1c5), #4f7dd1);
}

.article-title {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.article-preview {
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

/* Enhanced Button Styles */
.learn-more-btn,
.back-to-timer-btn,
.article-link,
.visit-article-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: white;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
}

.learn-more-btn::before,
.back-to-timer-btn::before,
.article-link::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.learn-more-btn:hover,
.back-to-timer-btn:hover,
.article-link:hover,
.visit-article-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.learn-more-btn:active,
.back-to-timer-btn:active,
.article-link:active,
.visit-article-btn:active {
  transform: translateY(0);
  background: rgba(255, 255, 255, 0.08);
}

/* Special styling for back button */
.back-to-timer-btn {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0.05)
  );
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
}

.back-to-timer-btn:hover {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.15),
    rgba(255, 255, 255, 0.1)
  );
  color: var(--text-primary);
}

/* Article Cards */
.articles-section {
  padding: 3rem 0;
  max-width: 1000px;
  margin: 0 auto;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  padding: 1rem;
  margin-top: 2rem;
}

.article-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 1.75rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 1rem;
}

.article-card h3 {
  font-size: 1.2rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.95);
}

.article-card p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
  flex-grow: 1;
}

.visit-article-btn {
  margin-top: auto;
  align-self: flex-start;
}

.article-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(var(--accent-rgb, 79, 209, 197), 0.1),
    rgba(var(--accent-rgb, 79, 209, 197), 0.05)
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.article-card:hover::before {
  opacity: 1;
}

.article-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.article-card h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.article-card p {
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.article-link {
  color: var(--accent-color, #4fd1c5);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  transition: gap 0.3s ease;
}

.article-link:hover {
  gap: 0.8rem;
}

/* Dark theme support */
body.theme-dark .article-card {
  background: rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.1);
}

/* Your Name theme support */
body.theme-yourname .article-card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
}

/* Expandable educational content */
.seo-content {
  --seo-surface: rgba(255, 255, 255, 0.72);
  --seo-surface-hover: rgba(255, 255, 255, 0.88);
  --seo-border: rgba(0, 0, 0, 0.1);
  --seo-divider: rgba(0, 0, 0, 0.09);
  --seo-text: #1f2937;
  --seo-text-soft: rgba(31, 41, 55, 0.78);
  --seo-text-muted: rgba(31, 41, 55, 0.62);
  --seo-focus: rgba(31, 41, 55, 0.72);
  width: 100%;
  max-width: 800px;
  margin: 0 auto 2.5rem;
}

body.theme-dark .seo-content,
body.theme-yourname .seo-content,
body.theme-rain .seo-content,
body.theme-custom .seo-content {
  --seo-surface: rgba(20, 20, 20, 0.58);
  --seo-surface-hover: rgba(255, 255, 255, 0.09);
  --seo-border: rgba(255, 255, 255, 0.2);
  --seo-divider: rgba(255, 255, 255, 0.14);
  --seo-text: #ffffff;
  --seo-text-soft: rgba(255, 255, 255, 0.88);
  --seo-text-muted: rgba(255, 255, 255, 0.7);
  --seo-focus: rgba(255, 255, 255, 0.82);
}

.seo-content-inner {
  position: relative;
  overflow: hidden;
  color: var(--seo-text);
  background:
    radial-gradient(
      circle at top right,
      rgba(255, 255, 255, 0.16),
      transparent 45%
    ),
    var(--seo-surface);
  border: 1px solid var(--seo-border);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.seo-content-inner::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(
    180deg,
    var(--accent-color, #4fd1c5),
    #4f7dd1
  );
}

.seo-content-intro {
  padding: 1.75rem 2rem 1.5rem;
}

.seo-content-eyebrow {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--seo-text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.seo-content h2 {
  margin: 0 0 0.65rem;
  color: var(--seo-text);
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 700;
  line-height: 1.2;
}

.seo-content-intro p,
.seo-content-column p {
  margin: 0;
  color: var(--seo-text-soft);
  font-size: 0.98rem;
  line-height: 1.65;
}

.seo-content-details {
  border-top: 1px solid var(--seo-divider);
}

.seo-content-details summary {
  display: flex;
  min-height: 56px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 2rem;
  color: var(--seo-text);
  font-size: 0.92rem;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
  transition: background-color 0.2s ease;
}

.seo-content-details summary::-webkit-details-marker {
  display: none;
}

.seo-content-details summary:hover {
  background: var(--seo-surface-hover);
}

.seo-content-details summary:focus-visible {
  outline: 3px solid var(--seo-focus);
  outline-offset: -4px;
}

.seo-summary-icon {
  position: relative;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border: 1px solid var(--seo-border);
  border-radius: 50%;
}

.seo-summary-icon::before,
.seo-summary-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 9px;
  height: 1.5px;
  border-radius: 999px;
  background: currentColor;
  transform: translate(-50%, -50%);
  transition: transform 0.2s ease;
}

.seo-summary-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.seo-content-details[open] .seo-summary-icon::after {
  transform: translate(-50%, -50%) rotate(0deg);
}

.seo-content-expanded {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
  padding: 1.5rem 2rem 1.75rem;
  border-top: 1px solid var(--seo-divider);
}

.seo-content h3 {
  margin: 0 0 0.65rem;
  color: var(--seo-text);
  font-size: 0.95rem;
  font-weight: 700;
}

.seo-content h3:not(:first-child) {
  margin-top: 1.5rem;
}

.seo-feature-list {
  display: grid;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.seo-feature-list li {
  position: relative;
  padding-left: 1.25rem;
  color: var(--seo-text-soft);
  font-size: 0.88rem;
  line-height: 1.5;
}

.seo-feature-list li::before {
  content: "";
  position: absolute;
  top: 0.55em;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-color, #4fd1c5);
  box-shadow: 0 0 0 3px var(--seo-divider);
}

.seo-faq-list {
  margin: 0;
}

.seo-faq-list dt {
  margin: 1rem 0 0.25rem;
  color: var(--seo-text);
  font-size: 0.88rem;
  font-weight: 700;
}

.seo-faq-list dt:first-child {
  margin-top: 0;
}

.seo-faq-list dd {
  margin: 0;
  color: var(--seo-text-soft);
  font-size: 0.84rem;
  line-height: 1.55;
}

.seo-content-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0 2rem 1.75rem;
}

.seo-content-actions a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1rem;
  color: var(--seo-text);
  background: transparent;
  border: 1px solid var(--seo-border);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 650;
  text-decoration: none;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.seo-content-actions a:hover {
  background: var(--seo-surface-hover);
  border-color: var(--seo-focus);
  transform: translateY(-1px);
}

.seo-content-actions a:focus-visible {
  outline: 3px solid var(--seo-focus);
  outline-offset: 2px;
}

body.focus-mode-active .seo-content {
  display: none !important;
}

/* Enhanced Responsive Design */
@media (max-width: 768px) {
  .seo-content-expanded {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .preview-icon {
    font-size: 2rem;
  }

  .articles-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding: 0.75rem;
  }

  .article-title {
    font-size: 1.5rem;
  }

  .feature-tag {
    font-size: 0.85rem;
    padding: 0.4rem 0.9rem;
  }

  .preview-features {
    gap: 0.5rem;
  }

  .learn-more-btn,
  .back-to-timer-btn,
  .visit-article-btn {
    width: 100%;
    justify-content: center;
    text-align: center;
    padding: 0.9rem 1.25rem;
  }
}

@media (max-width: 480px) {
  .seo-content-intro {
    padding: 1.4rem 1.35rem 1.2rem;
  }

  .seo-content-details summary {
    min-height: 60px;
    padding: 0.75rem 1.35rem;
  }

  .seo-content-expanded {
    padding: 1.35rem;
  }

  .seo-content-actions {
    flex-direction: column;
    padding: 0 1.35rem 1.4rem;
  }

  .seo-content-actions a {
    width: 100%;
  }

  .seo-content {
    margin-bottom: 2rem;
  }

  .preview-content {
    gap: 1rem;
  }

  .article-title {
    font-size: 1.35rem;
  }

  .preview-features {
    flex-direction: column;
    gap: 0.5rem;
  }

  .feature-tag {
    width: 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .seo-summary-icon::before,
  .seo-summary-icon::after,
  .seo-content-actions a {
    transition: none;
  }
}
