/* eStudy — Ocean design system */
:root {
  --bg1: #1e40af;
  --bg2: #2563eb;
  --accent: #a3e635;
  --accent-ink: #1c2d05;
  --ink: #172554;
  --white: #ffffff;
  --glass: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.25);
  --muted: rgba(255, 255, 255, 0.72);
  --danger: #fb7185;
  --shadow: 0 10px 30px rgba(2, 6, 23, 0.35);
  --radius: 16px;
  --radius-lg: 24px;
  --font: "Bricolage Grotesque", "Trebuchet MS", sans-serif;
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--bg1) 0%, var(--bg2) 100%);
  background-attachment: fixed;
  color: var(--white);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: #d9f99d; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 480px; margin: 0 auto; padding: 0 20px; }

/* Top bar */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--white); font-weight: 800; font-size: 18px; letter-spacing: 0.2px; }
.brand:hover { color: var(--white); }
.brand-badge {
  width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: var(--accent-ink);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px;
  box-shadow: 0 4px 14px rgba(163, 230, 53, 0.35);
}
.topbar-right { display: flex; align-items: center; gap: 10px; }

/* Language switcher — simple, top right */
.lang-switch {
  display: flex; background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: 100px; padding: 3px; gap: 2px;
}
.lang-switch button {
  border: 0; background: transparent; color: var(--muted); font-family: var(--font);
  font-weight: 700; font-size: 13px; padding: 6px 12px; border-radius: 100px; cursor: pointer;
}
.lang-switch button.active { background: var(--white); color: var(--bg1); }

/* Cards & buttons */
.card {
  background: var(--white); color: var(--ink);
  border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow);
}
.glass {
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: var(--radius); padding: 16px 18px;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  border: 0; cursor: pointer; font-family: var(--font);
  background: var(--white); color: var(--bg1);
  border-radius: 100px; padding: 16px 26px; font-size: 16px; font-weight: 800;
  box-shadow: 0 8px 24px rgba(2, 6, 23, 0.4);
  transition: transform 0.12s ease;
  text-align: center;
}
.btn:hover { transform: translateY(-1px); color: var(--bg1); }
.btn-accent { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 22px rgba(163, 230, 53, 0.4); }
.btn-accent:hover { color: var(--accent-ink); }
.btn-ghost { background: var(--glass); color: var(--white); border: 1px solid var(--glass-border); box-shadow: none; }
.btn-ghost:hover { color: var(--white); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: 100px; padding: 7px 14px; font-size: 13px; font-weight: 700;
}

h1, h2, h3 { margin: 0; }
.muted { color: var(--muted); }

/* Portal hero */
.hero { padding: 44px 0 26px 0; text-align: left; }
.hero h1 { font-size: clamp(32px, 6vw, 52px); font-weight: 800; line-height: 1.08; letter-spacing: -0.5px; }
.hero p.lead { font-size: 17px; line-height: 1.55; color: var(--muted); max-width: 640px; margin: 16px 0 0 0; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 28px; }
.step { background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius); padding: 18px; }
.step .n { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.step h3 { font-size: 15px; margin-top: 12px; }
.step p { font-size: 13.5px; color: var(--muted); line-height: 1.5; margin: 6px 0 0 0; }

/* Course cards */
.courses { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; padding: 30px 0 50px 0; }
.course-card {
  border-radius: var(--radius-lg); padding: 24px; color: var(--white);
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; min-height: 190px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: transform 0.14s ease;
}
a.course-card:hover { transform: translateY(-3px); color: var(--white); }
.course-card .kicker { font-size: 11px; letter-spacing: 1.8px; text-transform: uppercase; opacity: 0.8; font-weight: 700; }
.course-card h3 { font-size: 24px; font-weight: 800; }
.course-card p { margin: 0; font-size: 14px; line-height: 1.5; opacity: 0.85; }
.course-card .meta { margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.course-card.soon { opacity: 0.62; filter: saturate(0.75); }

/* Lesson list (course page) */
.lesson { background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; }
.lesson-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.lesson-num { font-size: 12px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; color: var(--accent); }
.lesson-title { font-size: 17px; font-weight: 700; }
.quiz-row { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.quiz-link {
  flex: 1 1 180px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--white); color: var(--ink); border-radius: 12px; padding: 12px 16px;
  font-weight: 700; font-size: 14px;
}
.quiz-link:hover { color: var(--ink); }
.quiz-link .status { font-size: 12px; font-weight: 700; color: #65a30d; }
.quiz-link .status.todo { color: #94a3b8; }
.dl-row { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.dl-link {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255, 255, 255, 0.08); border: 1px solid var(--glass-border);
  color: var(--white); border-radius: 100px; padding: 8px 14px; font-size: 13px; font-weight: 600;
}
.dl-link:hover { color: var(--white); background: rgba(255, 255, 255, 0.16); }

.section-title { font-size: 13px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); font-weight: 700; margin: 34px 0 14px 0; }

footer { padding: 30px 0 40px 0; color: var(--muted); font-size: 13.5px; line-height: 1.6; }
footer a { font-weight: 700; }

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

/* Badges (Duolingo-style) */
.badge-row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 12px; }
.badge {
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--glass-border);
  border-radius: 14px; padding: 14px 12px; text-align: center;
  opacity: 0.45; filter: grayscale(1);
}
.badge.earned { opacity: 1; filter: none; background: rgba(163, 230, 53, 0.12); border-color: rgba(163, 230, 53, 0.45); }
.badge-ic { font-size: 34px; line-height: 1; margin-bottom: 8px; }
.badge-name { font-weight: 800; font-size: 13.5px; }
.badge-desc { font-size: 11.5px; color: var(--muted); margin-top: 3px; line-height: 1.35; }

/* Wallet chip (course page) */
.wallet-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(251, 191, 36, 0.14); border: 1px solid rgba(251, 191, 36, 0.45);
  color: #fde68a; border-radius: 100px; padding: 8px 16px; font-weight: 800; font-size: 14px;
}
