/* ============================================================
   STUDYBEATS - styles.css
   Master stylesheet for all pages.
   Edit colours in :root section below to re-skin the whole site.
   ============================================================ */

:root {
  /* COLOUR PALETTE - edit these to change the whole site */
  --bg: #0a0a0b;
  --bg-elevated: #161618;
  --bg-card: #1c1c1f;
  --bg-card-hover: #252529;
  --border: #2a2a2e;
  --text: #ffffff;
  --text-muted: #a1a1aa;
  --text-dim: #71717a;
  --accent: #a3e635;
  --accent-hover: #bef264;
  --biology: #a3e635;
  --chemistry: #a855f7;
  --physics: #3b82f6;
  --danger: #ef4444;

  /* TYPOGRAPHY */
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

  /* SPACING */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-8: 48px;
  --space-10: 64px;
  --space-12: 96px;

  /* RADIUS */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-full: 999px;
}

/* ============================================================
   RESET
   ============================================================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select { font: inherit; color: inherit; }

/* ============================================================
   LAYOUT
   ============================================================ */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-5);
}

@media (max-width: 640px) {
  .container { padding: 0 var(--space-4); }
}

/* ============================================================
   NAVIGATION (top bar, every page)
   ============================================================ */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 11, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 28px;
  height: 28px;
  background: var(--accent);
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  color: #000;
  font-weight: 900;
  font-size: 14px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s ease;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--text);
}

@media (max-width: 640px) {
  .nav-links { gap: var(--space-3); }
  .nav-links a { font-size: 13px; }
}

/* ============================================================
   HERO (homepage)
   ============================================================ */

.hero {
  padding: var(--space-12) 0 var(--space-10);
  text-align: center;
  position: relative;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-4);
}

.hero h1 {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: var(--space-5);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.hero h1 .accent {
  color: var(--accent);
}

.hero-affirm {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  margin-bottom: var(--space-6);
  animation: fadeUp 1s ease-out 0.4s both;
}

.hero-affirm-line1 {
  font-size: clamp(20px, 3vw, 32px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  background: linear-gradient(90deg, var(--accent), #ffffff, var(--accent));
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shineText 4s linear infinite;
}

.hero-affirm-line2 {
  font-size: clamp(14px, 1.6vw, 18px);
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes shineText {
  0% { background-position: 200% center; }
  100% { background-position: -200% center; }
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--accent);
  color: #000;
  padding: 14px 32px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.01em;
  transition: transform 0.15s ease, background 0.15s ease;
}

.hero-cta:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

/* ============================================================
   SECTION HEADERS
   ============================================================ */

.section {
  padding: var(--space-10) 0;
}

.section-header {
  margin-bottom: var(--space-6);
}

.section-title {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-2);
}

.section-sub {
  color: var(--text-muted);
  font-size: 15px;
}

/* ============================================================
   YEAR TILES (homepage)
   ============================================================ */

.year-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-4);
}

.year-tile {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 160px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.year-tile:hover {
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  border-color: var(--text-dim);
}

.year-tile::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.year-tile:hover::before { opacity: 1; }

.year-tile-number {
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text);
}

.year-tile-label {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: var(--space-2);
}

.year-tile-meta {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: var(--space-3);
}

/* ============================================================
   HOW IT WORKS (homepage)
   ============================================================ */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-5);
}

.step {
  padding: var(--space-5);
}

.step-num {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 14px;
  color: var(--accent);
  margin-bottom: var(--space-3);
}

.step h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: var(--space-2);
  letter-spacing: -0.01em;
}

.step p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

/* ============================================================
   LESSON LIST (year page)
   ============================================================ */

.filter-bar {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-5);
}

.chip {
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.15s ease;
}

.chip:hover { color: var(--text); }
.chip.active {
  background: var(--text);
  color: #000;
  border-color: var(--text);
}

.chip.biology.active { background: var(--biology); border-color: var(--biology); color: #000; }
.chip.chemistry.active { background: var(--chemistry); border-color: var(--chemistry); color: #000; }
.chip.physics.active { background: var(--physics); border-color: var(--physics); color: #fff; }

.lesson-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.lesson-row {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  background: var(--bg-card);
  border-radius: var(--radius);
  transition: background 0.15s ease;
}

.lesson-row:hover { background: var(--bg-card-hover); }

.lesson-week {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dim);
  text-align: center;
}

.lesson-info {
  min-width: 0;
}

.lesson-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lesson-subject {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.lesson-subject.Biology { color: var(--biology); }
.lesson-subject.Chemistry { color: var(--chemistry); }
.lesson-subject.Physics { color: var(--physics); }

.lesson-action {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: var(--accent);
  border-radius: var(--radius-full);
  color: #000;
  transition: transform 0.15s ease;
}

.lesson-row:hover .lesson-action { transform: scale(1.08); }

/* ============================================================
   LESSON PAGE (player + lyrics)
   ============================================================ */

.lesson-header {
  padding: var(--space-8) 0 var(--space-6);
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--space-6);
  align-items: end;
}

@media (max-width: 768px) {
  .lesson-header {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: var(--space-5);
  }
}

.lesson-art {
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--accent), #4d7c0f);
  display: grid;
  place-items: center;
  font-size: 80px;
  font-weight: 900;
  color: #000;
  letter-spacing: -0.04em;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.lesson-art.Biology { background: linear-gradient(135deg, var(--biology), #4d7c0f); }
.lesson-art.Chemistry { background: linear-gradient(135deg, var(--chemistry), #6b21a8); }
.lesson-art.Physics { background: linear-gradient(135deg, var(--physics), #1e40af); }

.lesson-meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

@media (max-width: 768px) {
  .lesson-meta { align-items: center; }
  .lesson-art { width: 220px; margin: 0 auto; }
}

.lesson-eyebrow {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.lesson-h1 {
  font-size: clamp(28px, 5vw, 56px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.lesson-context {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: var(--space-2);
}

.player-controls {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.btn-play {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--accent);
  color: #000;
  padding: 14px 28px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 15px;
  transition: transform 0.15s, background 0.15s;
}

.btn-play:hover { background: var(--accent-hover); transform: scale(1.03); }
.btn-play:disabled { background: var(--bg-card); color: var(--text-dim); cursor: not-allowed; transform: none; }

.btn-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all 0.15s ease;
}

.btn-icon:hover { background: var(--bg-card-hover); color: var(--accent); }
.btn-icon.active { color: var(--accent); }

.audio-player {
  margin-top: var(--space-5);
  width: 100%;
}

audio { width: 100%; }

.lesson-body {
  padding: var(--space-6) 0 var(--space-12);
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-8);
}

@media (max-width: 900px) {
  .lesson-body { grid-template-columns: 1fr; gap: var(--space-5); }
}

.lyrics-box {
  background: linear-gradient(180deg, var(--bg-card) 0%, #0f0f12 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6) var(--space-6) var(--space-8);
  position: relative;
  overflow: hidden;
}

.lyrics-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.4;
}

.lyrics-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-5);
  gap: var(--space-3);
}

.lyrics-box h2 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
}

.lyrics-box h2::before {
  content: '♪';
  font-size: 18px;
  color: var(--accent);
}

.lyrics-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.lyrics-toggle:hover {
  color: var(--text);
  border-color: var(--text-dim);
}

.lyrics-toggle.active {
  background: rgba(163, 230, 53, 0.1);
  border-color: rgba(163, 230, 53, 0.4);
  color: var(--accent);
}

.lyrics-toggle-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-dim);
  transition: background 0.15s ease;
}

.lyrics-toggle.active .lyrics-toggle-dot {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.lyrics-section {
  display: block;
  font-size: clamp(13px, 1.3vw, 15px);
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin: var(--space-5) 0 var(--space-3) 0;
}

.lyrics-section:first-child {
  margin-top: 0;
}

.lyrics-line {
  display: block;
  margin-bottom: var(--space-2);
}

.lyrics-viewport {
  max-height: 520px;
  overflow-y: auto;
  scroll-behavior: smooth;
  position: relative;
  mask-image: linear-gradient(180deg, transparent 0%, black 8%, black 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, black 8%, black 92%, transparent 100%);
  padding: var(--space-5) 0;
}

.lyrics-viewport::-webkit-scrollbar {
  width: 6px;
}

.lyrics-viewport::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.lyrics-viewport::-webkit-scrollbar-thumb:hover {
  background: var(--text-dim);
}

.lyrics {
  white-space: pre-wrap;
  font-family: var(--font-display);
  color: var(--text);
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: -0.01em;
  text-align: left;
  padding: 0 var(--space-3);
}

.lyrics.placeholder {
  font-size: 15px;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.7;
  letter-spacing: 0;
}

@media (max-width: 640px) {
  .lyrics { font-size: 20px; line-height: 1.45; padding: 0; }
  .lyrics-viewport { max-height: 420px; }
  .lyrics-box { padding: var(--space-5); }
}

.objectives-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  align-self: start;
}

.objectives-box h3 {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}

.objectives-box p {
  font-size: 14px;
  color: var(--text);
  line-height: 1.7;
}

.curriculum-ref {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-dim);
}

/* ============================================================
   STATUS / LOADING STATES
   ============================================================ */

.status-banner {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4);
  margin: var(--space-5) 0;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 14px;
  color: var(--text-muted);
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   STATIC CONTENT PAGES (about, privacy)
   ============================================================ */

.prose {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-8) var(--space-5);
}

.prose h1 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-5);
}

.prose h2 {
  font-size: 22px;
  font-weight: 600;
  margin-top: var(--space-6);
  margin-bottom: var(--space-3);
  letter-spacing: -0.01em;
}

.prose p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

.prose a {
  color: var(--accent);
  border-bottom: 1px solid currentColor;
}

/* ============================================================
   FOOTER
   ============================================================ */

footer {
  border-top: 1px solid var(--border);
  padding: var(--space-6) 0;
  margin-top: var(--space-10);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-dim);
}

.footer-inner a { color: var(--text-muted); margin-left: var(--space-4); }
.footer-inner a:hover { color: var(--text); }

@media (max-width: 640px) {
  .footer-inner { flex-direction: column; gap: var(--space-3); }
  .footer-inner a { margin-left: var(--space-3); margin-right: var(--space-3); }
}

/* ============================================================
   ADMIN PAGE
   ============================================================ */

.admin-form {
  max-width: 480px;
  margin: var(--space-10) auto;
  padding: var(--space-6);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.admin-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-form input, .admin-form select {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: var(--space-4);
  font-size: 15px;
}

.admin-form input:focus, .admin-form select:focus {
  outline: none;
  border-color: var(--accent);
}

.btn-primary {
  display: block;
  width: 100%;
  background: var(--accent);
  color: #000;
  padding: 12px;
  border-radius: var(--radius);
  font-weight: 700;
  transition: background 0.15s ease;
}

.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:disabled { background: var(--bg-elevated); color: var(--text-dim); cursor: not-allowed; }

.hero-eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-4);
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: clamp(15px, 1.6vw, 20px);
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: var(--space-5);
  padding: 8px 18px;
  background: rgba(163, 230, 53, 0.08);
  border: 1px solid rgba(163, 230, 53, 0.25);
  border-radius: var(--radius-full);
  animation: pulseGlow 2.4s ease-in-out infinite;
  position: relative;
  overflow: hidden;
}

.hero-eyebrow::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(163, 230, 53, 0.25), transparent);
  transform: translateX(-100%);
  animation: shimmer 3s ease-in-out infinite;
}

.hero-eyebrow-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: blink 1.4s ease-in-out infinite;
  box-shadow: 0 0 12px var(--accent);
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(163, 230, 53, 0); }
  50% { box-shadow: 0 0 0 6px rgba(163, 230, 53, 0); border-color: rgba(163, 230, 53, 0.5); }
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  60%, 100% { transform: translateX(100%); }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ============================================================
   PROFILE PAGE
   ============================================================ */

.profile-back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 8px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: var(--space-5);
  transition: all 0.15s ease;
}

.profile-back:hover {
  color: var(--text);
  border-color: var(--text-dim);
}

.profile-card {
  max-width: 720px;
  margin: 0 auto;
  background: linear-gradient(180deg, var(--bg-card) 0%, #0f0f12 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  position: relative;
  overflow: hidden;
}

.profile-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.5;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--border);
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #4d7c0f);
  display: grid;
  place-items: center;
  font-size: 32px;
  font-weight: 800;
  color: #000;
  letter-spacing: -0.02em;
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(163, 230, 53, 0.2);
}

.profile-greeting {
  min-width: 0;
}

.profile-eyebrow {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: var(--space-1);
}

.profile-name {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
}

.profile-field {
  margin-bottom: var(--space-6);
}

.profile-field label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-2);
  letter-spacing: -0.01em;
}

.profile-hint {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 var(--space-3) 0;
  line-height: 1.5;
}

.profile-field input[type="text"] {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  transition: border-color 0.15s ease;
}

.profile-field input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
}

/* Genre grid */
.genre-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--space-2);
}

.genre-btn {
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
  position: relative;
}

.genre-btn:hover {
  color: var(--text);
  border-color: var(--text-dim);
  transform: translateY(-1px);
}

.genre-btn.selected {
  background: rgba(163, 230, 53, 0.12);
  border-color: var(--accent);
  color: var(--accent);
}

.genre-btn.selected::after {
  content: '✓';
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 12px;
  font-weight: 700;
}

/* Stats */
.profile-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
  padding: var(--space-5) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.profile-stat {
  text-align: center;
}

.profile-stat-value {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: var(--space-1);
}

.profile-stat-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.profile-note {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4);
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-5);
}

.profile-clear {
  width: 100%;
  padding: 12px;
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  color: #ef4444;
  cursor: pointer;
  transition: all 0.15s ease;
}

.profile-clear:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.5);
}

/* "Playing in [Genre]" label on lesson page */
.now-playing-genre {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 4px 10px;
  background: rgba(163, 230, 53, 0.1);
  border: 1px solid rgba(163, 230, 53, 0.3);
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: var(--space-2);
}

.now-playing-genre::before {
  content: '♪';
  font-size: 13px;
}

@media (max-width: 640px) {
  .profile-card { padding: var(--space-5); }
  .profile-avatar { width: 56px; height: 56px; font-size: 24px; }
  .genre-grid { grid-template-columns: repeat(2, 1fr); }
}