:root {
  --bg: #f0f4ff;
  --white: #ffffff;
  --text: #1e2a4a;
  --muted: #8892b0;
  --radius: 20px;
  --purple: #7c3aed;
  --purple-l: #ede9fe;
  --blue: #2563eb;
  --blue-l: #dbeafe;
  --green: #059669;
  --green-l: #d1fae5;
  --orange: #ea580c;
  --orange-l: #ffedd5;
  --pink: #db2777;
  --pink-l: #fce7f3;
  --red: #dc2626;
  --red-l: #fee2e2;
  --yellow: #d97706;
  --yellow-l: #fef3c7;
}

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

body {
  background: var(--bg);
  font-family: 'Nunito', sans-serif;
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Rainbow Top Bar */
.rainbow-bar {
  height: 6px;
  background: linear-gradient(90deg,
    #f87171 0%, #fb923c 14%, #fbbf24 28%,
    #4ade80 42%, #38bdf8 56%, #818cf8 70%,
    #c084fc 85%, #f472b6 100%);
}

/* Header */
.header {
  background: var(--white);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  z-index: 1000;
}

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

.logo-icon {
  font-size: 28px;
}

.logo-image {
  height: 40px;
  width: auto;
  border-radius: 8px;
}

.logo-text {
  font-family: 'Baloo 2', cursive;
  font-size: 24px;
  font-weight: 800;
  background: linear-gradient(90deg, var(--purple), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Navigation */
.main-nav {
  display: flex;
  gap: 8px;
}

.nav-link {
  padding: 10px 20px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  transition: all 0.2s ease;
}

.nav-link:hover {
  background: var(--bg);
  color: var(--text);
}

.nav-link.active {
  background: var(--purple);
  color: white;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-badge {
  padding: 8px 16px;
  background: var(--purple-l);
  color: var(--purple);
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
}

/* Buttons */
.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 12px;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: var(--purple);
  color: white;
}

.btn-primary:hover {
  background: #6d28d9;
  transform: translateY(-2px);
}

.btn-success {
  background: var(--green);
  color: white;
}

.btn-success:hover {
  background: #047857;
  transform: translateY(-2px);
}

.btn-secondary {
  background: #e2e8f0;
  color: var(--text);
}

.btn-secondary:hover {
  background: #cbd5e1;
}

.btn-large {
  padding: 14px 28px;
  font-size: 16px;
}

/* Hub Container */
.hub-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px;
  margin-top: 20px;
}

/* Welcome Section */
.welcome-section {
  text-align: center;
  margin-bottom: 48px;
}

.welcome-section h1 {
  font-family: 'Baloo 2', cursive;
  font-size: 42px;
  margin-bottom: 12px;
  background: linear-gradient(90deg, var(--purple), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  color: var(--muted);
  font-size: 18px;
}

/* Paths Section */
.paths-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 48px;
}

@media (max-width: 768px) {
  .paths-section {
    grid-template-columns: 1fr;
  }
}

.path-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
  border: 3px solid transparent;
}

.path-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}

.learn-path:hover {
  border-color: var(--green);
}

.play-path:hover {
  border-color: var(--purple);
}

.path-icon {
  font-size: 64px;
  margin-bottom: 16px;
  display: block;
}

.path-card h2 {
  font-family: 'Baloo 2', cursive;
  font-size: 28px;
  margin-bottom: 12px;
}

.path-desc {
  color: var(--muted);
  margin-bottom: 24px;
  font-size: 16px;
}

.feature-list {
  list-style: none;
  text-align: left;
  display: inline-block;
  margin-bottom: 24px;
}

.feature-list li {
  padding: 8px 0;
  font-size: 14px;
}

.path-cta {
  display: inline-block;
  padding: 12px 24px;
  background: linear-gradient(90deg, var(--purple), var(--blue));
  color: white;
  border-radius: 12px;
  font-weight: 700;
}

.learn-path .path-cta {
  background: linear-gradient(90deg, var(--green), var(--teal));
}

/* Quick Settings */
.quick-settings {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 32px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.quick-settings h3 {
  font-family: 'Baloo 2', cursive;
  font-size: 20px;
  margin-bottom: 16px;
}

.settings-preview {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.setting-item {
  display: flex;
  gap: 8px;
  align-items: center;
}

.setting-label {
  color: var(--muted);
}

.setting-value {
  font-weight: 700;
  color: var(--purple);
  background: var(--purple-l);
  padding: 4px 12px;
  border-radius: 8px;
}

/* Stats Section */
.stats-section {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.stats-section h3 {
  font-family: 'Baloo 2', cursive;
  font-size: 20px;
  margin-bottom: 20px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 600px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

.stat-card {
  background: var(--bg);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
}

.stat-number {
  display: block;
  font-family: 'Baloo 2', cursive;
  font-size: 36px;
  font-weight: 800;
  color: var(--purple);
}

.stat-label {
  color: var(--muted);
  font-size: 14px;
}

/* Category Section (for learn.html) */
.category-section {
  margin-bottom: 40px;
}

.category-section h2 {
  font-family: 'Baloo 2', cursive;
  font-size: 24px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.game-card-large {
  background: var(--white);
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.game-card-large:hover {
  border-color: var(--purple);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.15);
}

.game-card-large .game-emoji {
  font-size: 48px;
}

.game-card-large .game-name {
  font-family: 'Baloo 2', cursive;
  font-weight: 700;
  font-size: 16px;
}

.game-card-large .game-desc {
  font-size: 12px;
  color: var(--muted);
}

.game-card-large .difficulty {
  font-size: 12px;
  margin-top: 4px;
}

/* Status Badge */
.status-badge {
  padding: 6px 12px;
  background: var(--red-l);
  color: var(--red);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}

.status-badge.active {
  background: var(--green-l);
  color: var(--green);
}
