/**
 * Hub Page Styles
 * Styles specific to the Magic Internet Math hub/landing page
 */

/* Course Grid - base styles moved to collapsible section */

/* Course Cards */
.course-card {
  position: relative;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(6, 182, 212, 0.05) 100%);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 1.5rem;
  padding: 2rem;
  text-decoration: none;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  flex: 0 0 calc(25% - 0.75rem);  /* 4 per row, accounting for gap */
  min-width: 200px;               /* Minimum readable width */
  max-width: calc(25% - 0.75rem); /* Enforce max 4 per row */
}

.course-card:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  cursor: pointer;
}

.course-icon {
  width: 64px;
  height: 64px;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(99, 102, 241, 0.1) 100%);
}

.course-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 0.75rem;
}

.course-description {
  color: #94a3b8;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.course-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.course-tag {
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  background: rgba(148, 163, 184, 0.1);
  color: #94a3b8;
}

/* YouTube Playlist Icon on Course Cards */
.youtube-playlist-link {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 24px;
  height: 24px;
  color: #ff0000;
  opacity: 0.8;
  transition: opacity 0.2s, transform 0.2s;
  cursor: pointer;
  z-index: 10;
}

.youtube-playlist-link:hover {
  opacity: 1;
  transform: scale(1.1);
}

.youtube-icon {
  width: 100%;
  height: 100%;
}

/* Inline Card Progress Bar */
.card-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(148, 163, 184, 0.1);
  border-radius: 0 0 1.5rem 1.5rem;
  overflow: hidden;
}

.card-progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: var(--progress, 0%);
  background: var(--gradient, linear-gradient(90deg, #6366f1, #818cf8));
  transition: width 0.3s ease;
}

.course-card.has-progress {
  position: relative;
}

/* Level Sections */
.level-section {
  margin-top: 3rem;
}

.level-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0;
  padding: 0.75rem 1rem;
  margin-left: -1rem;
  margin-right: -1rem;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
  user-select: none;
}

.level-header:hover {
  background: rgba(255, 255, 255, 0.03);
}

.level-header.expanded {
  margin-bottom: 0;
}

.level-description {
  color: #64748b;
  font-size: 0.9rem;
  flex: 1;
}

/* Chevron icon for collapsible sections */
.level-chevron {
  font-size: 0.75rem;
  color: #64748b;
  transition: transform 0.2s ease;
  margin-left: auto;
  padding: 0.25rem;
}

.level-header.expanded .level-chevron {
  transform: rotate(90deg);
}

/* Collapsible courses grid */
.courses-grid {
  display: none;
  gap: 1rem;
  margin-top: 1.5rem;
  animation: slideDown 0.25s ease-out;
}

.courses-grid.expanded {
  display: flex;
  flex-wrap: wrap;  /* Allow wrapping to new rows */
}

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

/* Expand/Collapse All Toggle */
.section-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.toggle-all-btn {
  background: transparent;
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #818cf8;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.toggle-all-btn:hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.5);
}

/* Course count badge */
.course-count {
  font-size: 0.75rem;
  color: #64748b;
  background: rgba(100, 116, 139, 0.15);
  padding: 0.2rem 0.5rem;
  border-radius: 0.25rem;
  margin-left: 0.5rem;
}

/* Level Badges */
.level-badge {
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.level-badge.featured {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.2) 0%, rgba(251, 191, 36, 0.1) 100%);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.level-badge.beginner {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(34, 197, 94, 0.1) 100%);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.level-badge.subject {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(99, 102, 241, 0.1) 100%);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

/* Section-specific icon colors */

/* Featured section - gold/amber accent */
[data-section="featured"] .course-icon {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.2) 0%, rgba(251, 191, 36, 0.1) 100%);
}

/* Featured cards get a subtle gold border */
[data-section="featured"] .course-card {
  border-color: rgba(251, 191, 36, 0.2);
}

[data-section="featured"] .course-card:hover {
  border-color: rgba(251, 191, 36, 0.4);
}

/* Beginners section - green theme */
[data-section="beginners"] .course-icon {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(34, 197, 94, 0.1) 100%);
}

/* Calculus section - orange theme */
[data-section="calculus"] .course-icon {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.2) 0%, rgba(249, 115, 22, 0.1) 100%);
}

/* Algebra section - purple theme */
[data-section="algebra"] .course-icon {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(139, 92, 246, 0.1) 100%);
}

/* Geometry section - pink theme */
[data-section="geometry"] .course-icon {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.2) 0%, rgba(236, 72, 153, 0.1) 100%);
}

/* History section - amber theme */
[data-section="history"] .course-icon {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(245, 158, 11, 0.1) 100%);
}

/* Seminal Works section - deep amber/gold theme for classical texts */
[data-section="seminal"] .course-icon {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.2) 0%, rgba(217, 119, 6, 0.1) 100%);
}

[data-section="seminal"] .course-card {
  border-color: rgba(217, 119, 6, 0.2);
}

[data-section="seminal"] .course-card:hover {
  border-color: rgba(217, 119, 6, 0.4);
}

/* Hero Section */
.hero-logo {
  display: block;
  max-width: 400px;
  width: 100%;
  height: auto;
  margin: 0 auto 1.5rem;
  filter: drop-shadow(0 0 30px rgba(251, 191, 36, 0.2));
}

@media (max-width: 640px) {
  .hero-logo {
    max-width: 300px;
  }
}

.hero-quote {
  font-size: 1.15rem;
  font-style: italic;
  color: #e2e8f0;
  max-width: 580px;
  margin: 0 auto 1rem;
  line-height: 1.7;
  text-align: center;
  border: none;
  padding: 0 1.5rem;
  position: relative;
  opacity: 0;
  animation: quotesFadeInUp 1.5s ease forwards;
  text-shadow: 0 0 30px rgba(251, 191, 36, 0.15);
}

.hero-quote::before,
.hero-quote::after {
  position: absolute;
  font-size: 2.5rem;
  color: rgba(251, 191, 36, 0.4);
  font-family: Georgia, serif;
  line-height: 1;
}

.hero-quote::before {
  content: '"';
  left: -0.5rem;
  top: -0.25rem;
}

.hero-quote::after {
  content: '"';
  right: -0.5rem;
  bottom: -0.75rem;
}

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

.hero-subtitle {
  font-size: 1.25rem;
  color: #94a3b8;
  max-width: 600px;
  margin: 0 auto 1rem;
  line-height: 1.6;
}

/* Section Headers */
.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  color: #64748b;
  margin-bottom: 2rem;
}

/* Progress Dashboard */
#progress-dashboard {
  margin-top: 3rem;
}

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

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

.progress-stat-card {
  text-align: center;
  padding: 1.5rem;
}

.progress-stat-value {
  font-size: 2.5rem;
  font-weight: 700;
}

.progress-stat-label {
  color: #94a3b8;
  font-size: 0.875rem;
}

.progress-course-card {
  padding: 1.5rem;
}

.progress-course-title {
  color: #f1f5f9;
  margin-bottom: 0.5rem;
}

.hub-progress-bar-container {
  height: 8px;
  background: rgba(148, 163, 184, 0.2);
  border-radius: 4px;
  overflow: hidden;
}

.hub-progress-bar-fill {
  height: 100%;
  width: 0%;
  transition: width 0.5s;
}

.progress-count {
  color: #94a3b8;
  font-size: 0.75rem;
  margin-top: 0.5rem;
}

/* Leaderboard Section */
.leaderboard-section {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.leaderboard-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* =============================================================================
   FEATURED CONTENT VISUALIZATION
   ============================================================================= */

.featured-section {
  margin-top: 3rem;
}

/* Games Row - Side by side layout for racing games */
.games-row {
  display: flex;
  gap: 1.5rem;
  margin-top: 3rem;
}

.games-row .game-section {
  flex: 1;
  margin-top: 0;
  min-width: 0;
}

/* Stack games vertically on smaller screens */
@media (max-width: 900px) {
  .games-row {
    flex-direction: column;
  }

  .games-row .game-section {
    flex: none;
  }
}

#featured-content-inline {
  margin: 2.5rem 0;
}

.featured-viz-card {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(236, 72, 153, 0.05) 100%);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 1.5rem;
  padding: 2rem;
  overflow: hidden;
}

.featured-viz-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.featured-viz-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 0.5rem;
}

.featured-viz-subtitle {
  color: #94a3b8;
  font-size: 1rem;
}

.featured-viz-content {
  margin: 1.5rem 0;
  display: flex;
  justify-content: center;
  overflow-x: auto;
}

.cardinality-svg {
  width: 100%;
  max-width: 800px;
  height: auto;
  min-height: 200px;
}

.featured-viz-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.control-label {
  color: #94a3b8;
  font-size: 0.875rem;
}

.control-value {
  color: #f1f5f9;
  font-weight: 600;
  font-size: 0.875rem;
  min-width: 70px;
}

.viz-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 150px;
  height: 6px;
  background: rgba(99, 102, 241, 0.3);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

.viz-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.2s;
}

.viz-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.viz-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  border-radius: 50%;
  border: none;
  cursor: pointer;
}

.viz-btn {
  padding: 0.5rem 1.25rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(99, 102, 241, 0.1) 100%);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.3);
  cursor: pointer;
  transition: all 0.2s;
}

.viz-btn:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.3) 0%, rgba(99, 102, 241, 0.2) 100%);
  border-color: rgba(99, 102, 241, 0.5);
}

.viz-btn.active {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.2) 0%, rgba(236, 72, 153, 0.1) 100%);
  color: #f472b6;
  border-color: rgba(236, 72, 153, 0.3);
}

.featured-viz-explanation {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.featured-viz-explanation p {
  color: #94a3b8;
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.featured-viz-explanation .math {
  font-family: "Times New Roman", serif;
  font-style: italic;
  color: #c4b5fd;
}

.featured-viz-explanation .aleph {
  font-style: normal;
}

.featured-viz-explanation .hint {
  font-size: 0.8rem;
  color: #64748b;
  margin-bottom: 0;
}

/* Connection line hover effect */
.connection-line {
  transition: stroke 0.2s, stroke-width 0.2s, opacity 0.2s;
}

.number-group {
  cursor: pointer;
  transition: transform 0.2s;
}

/* Responsive */
@media (max-width: 640px) {
  .featured-viz-card {
    padding: 1.25rem;
  }

  .featured-viz-title {
    font-size: 1.25rem;
  }

  .featured-viz-controls {
    flex-direction: column;
    gap: 1rem;
  }

  .viz-slider {
    width: 200px;
  }
}

/* =============================================================================
   MOD RACING QUICK PLAY
   ============================================================================= */

.mod-race-start-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem 0;
}

.mod-race-example {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.25rem 2rem;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 1rem;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.mod-race-example-label {
  font-size: 0.75rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mod-race-example-problem {
  font-size: 1.5rem;
  font-weight: 600;
  color: #f1f5f9;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.mod-race-example-answer {
  font-size: 1rem;
  color: #22d3ee;
  font-weight: 500;
}

.mod-race-start-btn {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

.mod-race-full-game-link {
  font-size: 0.875rem;
  color: #64748b;
  text-decoration: none;
  transition: color 0.2s;
}

.mod-race-full-game-link:hover {
  color: #22d3ee;
}

.mod-race-problem {
  font-size: 2.5rem;
  font-weight: 700;
  color: #f1f5f9;
  text-align: center;
  padding: 2rem;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.mod-race-input-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

.mod-race-input {
  background: rgba(99, 102, 241, 0.1);
  border: 2px solid rgba(99, 102, 241, 0.3);
  border-radius: 0.75rem;
  padding: 1rem 1.5rem;
  font-size: 1.5rem;
  color: #f1f5f9;
  text-align: center;
  width: 120px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.mod-race-input:focus {
  border-color: #22d3ee;
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.3);
}

.mod-race-input::placeholder {
  color: #475569;
}

/* Remove spinner from number input */
.mod-race-input::-webkit-outer-spin-button,
.mod-race-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.mod-race-input[type=number] {
  -moz-appearance: textfield;
}

.mod-race-hint {
  text-align: center;
  color: #64748b;
  font-size: 0.8rem;
  margin-top: 0.75rem;
}

.mod-race-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin: 1rem 0;
}

.mod-race-stat {
  text-align: center;
}

.mod-race-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #22d3ee;
}

.mod-race-stat-label {
  font-size: 0.7rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mod-race-streak {
  color: #fbbf24 !important;
}

.mod-race-feedback {
  text-align: center;
  padding: 1rem 1.5rem;
  border-radius: 0.75rem;
  margin: 1rem auto;
  max-width: 300px;
  font-weight: 600;
  font-size: 1.1rem;
}

.mod-race-feedback.correct {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.mod-race-feedback.incorrect {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.mod-race-progress {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.mod-race-progress-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.15);
  border: 2px solid rgba(99, 102, 241, 0.3);
  transition: all 0.3s ease;
}

.mod-race-progress-dot.current {
  background: #6366f1;
  border-color: #6366f1;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.5);
  transform: scale(1.2);
}

.mod-race-progress-dot.correct {
  background: #22c55e;
  border-color: #22c55e;
}

.mod-race-progress-dot.incorrect {
  background: #ef4444;
  border-color: #ef4444;
}

/* Results Screen */
.mod-race-results {
  padding: 1.5rem 0;
}

.mod-race-results-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
}

.mod-race-result-stat {
  text-align: center;
}

.mod-race-result-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: #22d3ee;
}

.mod-race-result-label {
  font-size: 0.75rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mod-race-results-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.mod-race-full-btn {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.2) 0%, rgba(34, 211, 238, 0.1) 100%) !important;
  color: #22d3ee !important;
  border-color: rgba(34, 211, 238, 0.3) !important;
  text-decoration: none;
}

.mod-race-full-btn:hover {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.3) 0%, rgba(34, 211, 238, 0.2) 100%) !important;
  border-color: rgba(34, 211, 238, 0.5) !important;
}

.mod-race-full-game-cta {
  text-align: center;
  color: #64748b;
  font-size: 0.875rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.mod-race-full-game-cta strong {
  color: #94a3b8;
}

.mod-race-learn-link {
  display: block;
  text-align: center;
  color: #818cf8;
  font-size: 0.875rem;
  margin-top: 1rem;
  text-decoration: none;
}

.mod-race-learn-link:hover {
  color: #a5b4fc;
  text-decoration: underline;
}

/* Responsive - Mod Racing */
@media (max-width: 640px) {
  .mod-race-problem {
    font-size: 1.75rem;
    padding: 1.5rem;
  }

  .mod-race-input {
    font-size: 1.25rem;
    width: 100px;
    padding: 0.75rem 1rem;
  }

  .mod-race-stats {
    gap: 1.5rem;
  }

  .mod-race-stat-value {
    font-size: 1.25rem;
  }

  .mod-race-results-stats {
    gap: 1.5rem;
  }

  .mod-race-result-value {
    font-size: 2rem;
  }

  .mod-race-results-actions {
    flex-direction: column;
    align-items: center;
  }
}

/* ==========================================================================
   BASE CONVERSION RACING QUICK PLAY
   ========================================================================== */

.base-race-start-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem 0;
}

.base-race-example {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.25rem 2rem;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 0.75rem;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.base-race-example-label {
  color: #64748b;
  font-size: 0.875rem;
}

.base-race-example-problem {
  color: #f1f5f9;
  font-size: 1.25rem;
  font-weight: 600;
  font-family: monospace;
}

.base-race-example-answer {
  color: #10b981;
  font-weight: 500;
}

.base-race-start-btn {
  padding: 1rem 3rem !important;
  font-size: 1.125rem !important;
  background: linear-gradient(90deg, #10b981, #34d399) !important;
}

.base-race-full-game-link {
  color: #64748b;
  font-size: 0.875rem;
  text-decoration: none;
}

.base-race-full-game-link:hover {
  color: #94a3b8;
}

.base-race-learn-link {
  display: block;
  text-align: center;
  color: #10b981;
  font-size: 0.875rem;
  margin-top: 1rem;
  text-decoration: none;
}

.base-race-learn-link:hover {
  color: #34d399;
  text-decoration: underline;
}

.base-race-problem {
  font-size: 1.5rem;
  font-weight: 700;
  color: #f1f5f9;
  text-align: center;
  padding: 1.5rem;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 0.75rem;
  margin-bottom: 0.5rem;
  font-family: monospace;
}

.base-race-problem-hint {
  text-align: center;
  color: #64748b;
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
}

.base-race-input-container {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.base-race-input {
  width: 150px;
  padding: 0.75rem 1rem;
  font-size: 1.5rem;
  font-weight: 600;
  text-align: center;
  background: #1e293b;
  border: 2px solid #334155;
  border-radius: 0.5rem;
  color: #f1f5f9;
  outline: none;
  transition: border-color 0.2s;
  text-transform: uppercase;
  font-family: monospace;
}

.base-race-input:focus {
  border-color: #10b981;
}

.base-race-input::placeholder {
  color: #475569;
}

.base-race-hint {
  text-align: center;
  color: #475569;
  font-size: 0.75rem;
  margin-top: 0.5rem;
}

.base-race-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.base-race-stat {
  text-align: center;
}

.base-race-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #f1f5f9;
}

.base-race-stat-label {
  font-size: 0.75rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.base-race-streak {
  color: #f97316;
}

.base-race-feedback {
  text-align: center;
  padding: 1rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 1.125rem;
  animation: fadeIn 0.3s ease;
}

.base-race-feedback.correct {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.base-race-feedback.incorrect {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.base-race-progress {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.base-race-progress-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #334155;
  transition: all 0.3s ease;
}

.base-race-progress-dot.current {
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.3);
  animation: pulse 1.5s ease-in-out infinite;
}

.base-race-progress-dot.correct {
  background: #22c55e;
}

.base-race-progress-dot.incorrect {
  background: #ef4444;
}

.base-race-results {
  padding: 1.5rem 0;
}

.base-race-results-stats {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
}

.base-race-result-stat {
  text-align: center;
}

.base-race-result-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: #10b981;
}

.base-race-result-label {
  font-size: 0.875rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.base-race-results-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.base-race-full-btn {
  background: linear-gradient(90deg, #10b981, #34d399) !important;
}

.base-race-full-btn:hover {
  filter: brightness(1.1);
}

.base-race-full-game-cta {
  text-align: center;
  color: #64748b;
  font-size: 0.875rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.base-race-full-game-cta strong {
  color: #94a3b8;
}

/* Responsive - Base Racing */
@media (max-width: 640px) {
  .base-race-problem {
    font-size: 1.25rem;
    padding: 1.5rem;
  }

  .base-race-input {
    font-size: 1.25rem;
    width: 120px;
    padding: 0.75rem 1rem;
  }

  .base-race-stats {
    gap: 1.5rem;
  }

  .base-race-stat-value {
    font-size: 1.25rem;
  }

  .base-race-results-stats {
    gap: 1.5rem;
  }

  .base-race-result-value {
    font-size: 2rem;
  }

  .base-race-results-actions {
    flex-direction: column;
    align-items: center;
  }
}

/* ===========================================
   Continue Learning Section
   =========================================== */

.continue-learning-section {
  margin-bottom: 2.5rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.08) 0%, rgba(16, 185, 129, 0.04) 100%);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 1rem;
}

.continue-learning-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.continue-learning-icon {
  font-size: 1.5rem;
}

.continue-learning-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #f1f5f9;
  margin: 0;
}

.continue-learning-count {
  font-size: 0.75rem;
  color: #64748b;
  background: rgba(100, 116, 139, 0.15);
  padding: 0.2rem 0.6rem;
  border-radius: 0.25rem;
  margin-left: auto;
}

.continue-learning-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

/* Continue Learning Card */
.continue-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 0.75rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.continue-card:hover {
  background: rgba(15, 23, 42, 0.8);
  border-color: rgba(34, 197, 94, 0.3);
  transform: translateX(4px);
}

.continue-card-icon {
  font-size: 1.75rem;
  flex-shrink: 0;
}

.continue-card-content {
  flex: 1;
  min-width: 0;
}

.continue-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #f1f5f9;
  margin: 0 0 0.35rem 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.continue-card-progress {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.continue-card-section {
  font-size: 0.75rem;
  color: #94a3b8;
}

.continue-card-time {
  font-size: 0.7rem;
  color: #64748b;
}

.continue-card-bar {
  height: 4px;
  background: rgba(148, 163, 184, 0.15);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 0.25rem;
}

.continue-card-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s ease;
}

.continue-card-percent {
  font-size: 0.7rem;
  font-weight: 600;
  color: #22c55e;
}

.continue-card-arrow {
  font-size: 1.25rem;
  color: #64748b;
  transition: transform 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
}

.continue-card:hover .continue-card-arrow {
  transform: translateX(4px);
  color: #22c55e;
}

/* Responsive - Continue Learning */
@media (max-width: 768px) {
  .continue-learning-section {
    padding: 1rem;
  }

  .continue-learning-grid {
    grid-template-columns: 1fr;
  }

  .continue-learning-header {
    flex-wrap: wrap;
  }

  .continue-learning-count {
    margin-left: 0;
    margin-top: 0.5rem;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .continue-card {
    padding: 0.875rem 1rem;
  }

  .continue-card-icon {
    font-size: 1.5rem;
  }

  .continue-card-title {
    font-size: 0.875rem;
  }
}

/* =============================================================================
   PIONEERS CLUB PODCAST CTA
   ============================================================================= */

.pioneers-club-cta {
  display: block;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.15) 0%, rgba(249, 115, 22, 0.1) 100%);
  border: 2px solid rgba(251, 191, 36, 0.4);
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  margin: 2rem auto;
  max-width: 500px;
  text-decoration: none;
  transition: all 0.3s ease;
  animation: pioneersPulse 3s ease-in-out infinite;
}

.pioneers-club-cta:hover {
  transform: translateY(-2px);
  border-color: rgba(251, 191, 36, 0.7);
  box-shadow: 0 10px 30px rgba(251, 191, 36, 0.2);
  animation: none;
}

@keyframes pioneersPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.2);
  }
  50% {
    box-shadow: 0 0 20px 5px rgba(251, 191, 36, 0.15);
  }
}

.pioneers-club-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.pioneers-club-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.pioneers-club-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.pioneers-club-text strong {
  color: #fbbf24;
  font-size: 1.1rem;
  font-weight: 700;
}

.pioneers-club-text span {
  color: #94a3b8;
  font-size: 0.875rem;
}

.pioneers-club-arrow {
  color: #fbbf24;
  font-size: 1.5rem;
  font-weight: 700;
  transition: transform 0.2s ease;
}

.pioneers-club-cta:hover .pioneers-club-arrow {
  transform: translateX(4px);
}

@media (max-width: 480px) {
  .pioneers-club-cta {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
  }

  .pioneers-club-icon {
    font-size: 1.5rem;
  }

  .pioneers-club-text strong {
    font-size: 1rem;
  }

  .pioneers-club-text span {
    font-size: 0.8rem;
  }
}
