:root {
  --navy-950: #091324;
  --navy-900: #0f1e36;
  --navy-800: #172c4d;
  --navy-700: #223d66;
  --gold-400: #e5c37e;
  --gold-500: #d4aa5b;
  --gold-dim: rgba(212, 170, 91, 0.16);
  --text-main: #f7f4ee;
  --text-muted: #b6c2d6;
  --border: rgba(212, 170, 91, 0.22);
  --green: #34d399;
  --red: #f87171;
  --radius: 16px;
}

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

body {
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--navy-950);
  color: var(--text-main);
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;
}

.bg-glow {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(212, 170, 91, 0.12), transparent 45%),
    radial-gradient(circle at 80% 10%, rgba(34, 61, 102, 0.45), transparent 50%);
  pointer-events: none;
  z-index: -1;
}

.container {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Hero */
.hero {
  padding: 48px 0 36px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(15, 30, 54, 0.9), rgba(9, 19, 36, 0.4));
}

.avatar-ring {
  width: 112px;
  height: 112px;
  margin: 0 auto 18px;
  padding: 4px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  border-radius: 50%;
  display: block;
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--gold-400);
  margin-bottom: 8px;
}

.hero-title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.9rem, 5vw, 2.8rem);
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 12px;
}

.hero-title .sep {
  color: var(--gold-500);
  font-weight: 400;
}

.hero-bio {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 560px;
  margin: 0 auto 24px;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.social-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--navy-800);
  border: 1px solid var(--border);
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.social-pill:hover {
  transform: translateY(-2px);
  border-color: var(--gold-400);
  background: var(--navy-700);
}

.coffee-pill {
  background: rgba(212, 170, 91, 0.16);
  border-color: var(--gold-400);
  color: var(--gold-400);
}

.coffee-pill:hover {
  background: var(--gold-400);
  color: var(--navy-950);
}

/* Main */
.main-content {
  padding: 36px 20px 64px;
}

.unit-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.unit-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--gold-400);
  background: var(--gold-dim);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.section-title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.9rem;
  margin-bottom: 4px;
}

.section-sub {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.playlist-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
  color: var(--navy-950);
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.playlist-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

/* Progress */
.progress-card {
  background: var(--navy-900);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 20px;
}

.progress-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.progress-label {
  color: var(--text-muted);
  font-weight: 500;
}

.progress-count {
  color: var(--gold-400);
  font-weight: 700;
}

.progress-track {
  height: 9px;
  background: var(--navy-950);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-500), var(--gold-400));
  border-radius: 999px;
  transition: width 0.35s ease;
}

/* Filters */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.filter-btn {
  background: var(--navy-900);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 8px 15px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-btn:hover {
  color: var(--text-main);
  border-color: var(--gold-400);
}

.filter-btn.active {
  background: var(--gold-400);
  color: var(--navy-950);
  border-color: var(--gold-400);
}

/* Grid */
.lessons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.lesson-card {
  background: var(--navy-900);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.lesson-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold-400);
}

.lesson-card.completed {
  border-color: rgba(52, 211, 153, 0.55);
}

.cover-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--navy-950);
}

.cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 65%;
  display: block;
}

.lesson-num {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(9, 19, 36, 0.86);
  border: 1px solid var(--border);
  color: var(--gold-400);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 8px;
}

.done-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(16, 185, 129, 0.92);
  color: #042f2e;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 9px;
  border-radius: 8px;
}

.card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-cat {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold-400);
  margin-bottom: 4px;
}

.card-title-es {
  font-size: 1.08rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
}

.card-title-en {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.card-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.watch-row {
  display: flex;
  gap: 8px;
}

.btn-watch {
  flex: 1;
  text-align: center;
  padding: 8px 10px;
  border-radius: 9px;
  background: var(--navy-800);
  border: 1px solid var(--border);
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-watch:hover {
  background: var(--navy-700);
  border-color: var(--gold-400);
}

.btn-quiz {
  width: 100%;
  padding: 10px 12px;
  border-radius: 9px;
  border: none;
  background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
  color: var(--navy-950);
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.15s ease;
}

.btn-quiz:hover {
  filter: brightness(1.07);
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 10, 20, 0.8);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 100;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal {
  position: relative;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--navy-900);
  border: 1px solid var(--gold-500);
  border-radius: 20px;
  padding: 26px 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.modal-close:hover {
  color: #fff;
}

.modal-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--gold-400);
  margin-bottom: 4px;
}

.modal-title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.5rem;
  margin-bottom: 2px;
}

.modal-subtitle {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 20px;
}

.modal-section-label {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold-400);
  margin-bottom: 10px;
}

.phrases-section {
  margin-bottom: 22px;
}

.phrases-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.phrase-btn {
  width: 100%;
  text-align: left;
  background: var(--navy-800);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 11px 14px;
  color: var(--text-main);
  font-family: inherit;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.phrase-btn:hover {
  border-color: var(--gold-400);
  background: var(--navy-700);
}

.phrase-en {
  font-weight: 700;
  font-size: 0.95rem;
  display: block;
}

.phrase-es {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.quiz-question {
  background: var(--navy-950);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
}

.quiz-q-text {
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.quiz-opt {
  text-align: left;
  padding: 9px 12px;
  border-radius: 9px;
  background: var(--navy-800);
  border: 1px solid var(--border);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.quiz-opt:hover:not(:disabled) {
  border-color: var(--gold-400);
}

.quiz-opt.correct {
  background: rgba(52, 211, 153, 0.18);
  border-color: var(--green);
  color: #a7f3d0;
  font-weight: 700;
}

.quiz-opt.wrong {
  background: rgba(248, 113, 113, 0.18);
  border-color: var(--red);
  color: #fecaca;
}

.quiz-success {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(52, 211, 153, 0.16);
  border: 1px solid var(--green);
  color: #a7f3d0;
  font-weight: 700;
  font-size: 0.9rem;
  text-align: center;
}

/* Support / Buy Me a Coffee */
.support-card {
  margin-top: 44px;
  padding: 28px 26px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(23, 44, 77, 0.95), rgba(15, 30, 54, 0.95));
  border: 1px solid var(--gold-500);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.support-title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.45rem;
  margin-bottom: 6px;
  color: #fff;
}

.support-sub {
  color: var(--text-muted);
  font-size: 0.94rem;
  max-width: 540px;
}

.coffee-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ffdd00, #f5b800);
  color: #111827;
  font-weight: 800;
  font-size: 0.95rem;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(245, 184, 0, 0.25);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.coffee-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 28px 0 36px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.footer-brand {
  color: var(--text-main);
  margin-bottom: 4px;
}
