/* ============================================================
   Computer Shiksha — shared styles
   Bootstrap 5 + custom design tokens
   ============================================================ */

:root {
  /* Brand */
  --cs-primary:       #1968B3;
  --cs-primary-dark:  #155A9E;
  --cs-primary-light: #4A95D6;
  --cs-logo-grey:     #6F6F6F;

  /* Surfaces */
  --cs-bg-hero-start: #F4EFDC;
  --cs-bg-hero-end:   #BFDDF5;
  --cs-bg-soft:       #EAF3FB;
  --cs-card-blue:     #2A7DC8;
  --cs-footer-bg:     #1B4A66;
  --cs-yellow:        #F4C849;

  /* Text */
  --cs-text:          #111111;
  --cs-text-muted:    #6B7280;
  --cs-text-inverse:  #FFFFFF;

  /* Borders & shadows */
  --cs-border:        #E5E7EB;
  --cs-border-soft:   #DDE7F0;
  --cs-shadow-sm:     0 2px 6px rgba(15, 35, 60, 0.06);
  --cs-shadow-md:     0 6px 22px rgba(15, 35, 60, 0.08);
  --cs-shadow-lg:     0 14px 38px rgba(15, 35, 60, 0.12);

  /* Radius */
  --cs-r-sm: 8px;
  --cs-r-md: 14px;
  --cs-r-lg: 22px;
  --cs-r-pill: 999px;
}

/* ---------- Base ------------------------------------------- */
* { box-sizing: border-box; }

html, body {
  font-family: 'Poppins', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--cs-text);
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body { min-height: 100vh; display: flex; flex-direction: column; }
main  { flex: 1 0 auto; }

a { color: var(--cs-primary); text-decoration: none; }
a:hover { color: var(--cs-primary-dark); text-decoration: underline; }

img, svg { max-width: 100%; height: auto; display: block; }

/* ---------- Header ----------------------------------------- */
.cs-navbar {
  background: #fff;
  padding: 14px 0;
  border-bottom: 1px solid transparent;
  position: sticky;
  top: 0;
  z-index: 1030;
}

.cs-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
}
.cs-logo:hover { text-decoration: none; }

.cs-logo__img {
  height: 46px;
  width: auto;
  max-width: 100%;
  display: block;
}

/* Slightly smaller in the auth card so it doesn't dominate the form */
.cs-auth-logo .cs-logo__img { height: 48px; }

/* On mobile, scale the logo down a touch */
@media (max-width: 575.98px) {
  .cs-logo__img { height: 38px; }
}

.cs-nav { display: flex; align-items: center; gap: 36px; }
.cs-nav__link {
  color: var(--cs-text);
  font-weight: 500;
  font-size: 17px;
  position: relative;
  padding: 6px 0;
  text-decoration: none;
}
.cs-nav__link:hover { color: var(--cs-primary); text-decoration: none; }
.cs-nav__link.active {
  color: var(--cs-text);
  font-weight: 700;
}
.cs-nav__link.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: var(--cs-primary);
  border-radius: 2px;
}

.cs-login-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--cs-primary);
  color: #fff;
  border: 0;
  border-radius: var(--cs-r-pill);
  padding: 8px 18px 8px 10px;
  font-weight: 600;
  font-size: 15px;
  transition: background 0.15s ease, transform 0.1s ease;
}
.cs-login-btn:hover { background: var(--cs-primary-dark); color: #fff; text-decoration: none; }
.cs-login-btn:active { transform: translateY(1px); }

.cs-login-btn__avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: #0f3a5e;
  display: inline-flex; align-items: center; justify-content: center;
}

/* mobile nav toggler */
.cs-nav-toggler {
  background: transparent;
  border: 1px solid var(--cs-border);
  border-radius: 8px;
  width: 42px; height: 42px;
  display: inline-flex; align-items: center; justify-content: center;
}
.cs-nav-toggler:focus { outline: 2px solid var(--cs-primary); }

@media (max-width: 991.98px) {
  .cs-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: #fff;
    padding: 16px 24px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    box-shadow: var(--cs-shadow-md);
    border-top: 1px solid var(--cs-border);
  }
  .cs-nav.is-open { display: flex; }
  .cs-nav__link.active::after { display: none; }
}

/* ---------- Footer ----------------------------------------- */
.cs-footer {
  background: var(--cs-footer-bg);
  color: #fff;
  padding: 22px 0;
  margin-top: auto;
}
/* Footer logo — if your logo has dark text that's hard to read on the
   navy footer, uncomment the next line to render it as solid white. */
/* .cs-footer .cs-logo__img { filter: brightness(0) invert(1); } */

.cs-footer__links {
  display: flex; flex-wrap: wrap;
  justify-content: flex-end;
  gap: 36px;
}
.cs-footer__links a {
  color: #fff;
  font-weight: 600;
  font-size: 16px;
}
.cs-footer__links a:hover { color: #B7DCF5; text-decoration: none; }

@media (max-width: 767.98px) {
  .cs-footer__links {
    justify-content: flex-start;
    gap: 16px 24px;
    margin-top: 18px;
  }
}

/* ---------- Hero ------------------------------------------- */
.cs-hero {
  /* Real banner artwork supplied — gradient, grid, and decorations are baked in */
  background-color: #BFDDF5; /* fallback while image loads */
  background-image: url('../img/hero-girl.png');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: right center;
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  padding: 24px 0;
}
.cs-hero > .container { width: 100%; }

.cs-hero__title {
  font-weight: 800;
  font-size: clamp(1.75rem, 4.2vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.5px;
  margin: 0 0 18px;
}
.cs-hero__lead {
  font-size: clamp(0.95rem, 1.1vw, 1.05rem);
  color: #2b2b2b;
  max-width: 560px;
  margin: 0;
  line-height: 1.5;
}

.cs-hero__art {
  position: relative;
  min-height: min(70vh, 520px);
}
/* If a foreground img/svg is ever placed here, keep it constrained */
.cs-hero__art > img,
.cs-hero__art > svg:not(.cs-hero-deco) {
  position: relative; z-index: 2;
  max-height: min(70vh, 500px);
  width: auto;
  max-width: 100%;
  margin: 0 auto;
}

.cs-stat-badge {
  position: absolute;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.85);
  border-radius: 12px;
  padding: 8px 14px;
  display: inline-flex; align-items: center; gap: 10px;
  box-shadow: var(--cs-shadow-sm);
  font-size: 13px;
  font-weight: 600;
  z-index: 3;
}
.cs-stat-badge i { color: var(--cs-primary); font-size: 18px; }
.cs-stat-badge small { display: block; color: var(--cs-text-muted); font-weight: 500; font-size: 11px; }

.cs-stat--courses    { top: 26%; left: 6%; }
.cs-stat--instructors{ top: 46%; right: 4%; }
.cs-stat--students   { bottom: 20%; left: 20%; }

/* Tablet — drop to stacked layout: title on top, image as a normal banner image below */
@media (max-width: 991.98px) {
  .cs-hero {
    background-image: none;
    background:
      linear-gradient(135deg, var(--cs-bg-hero-start) 0%, var(--cs-bg-hero-end) 70%);
    min-height: auto;
    padding: 32px 0 0;
    display: block;
  }
  .cs-hero__art { min-height: 240px; margin-top: 24px; }
  .cs-hero__art > img,
  .cs-hero__art > svg:not(.cs-hero-deco) { max-height: 380px; }
  .cs-hero__mobile-art { display: block !important; margin-top: 24px; }
  .cs-hero__mobile-art img { width: 100%; display: block; }
  .cs-stat-badge { display: none; } /* hide badges on mobile; they're decorative */
}

/* very short viewports — keep things compact */
@media (min-height: 500px) and (max-height: 720px) and (min-width: 992px) {
  .cs-hero__title { font-size: clamp(1.5rem, 3vw, 2.5rem); margin-bottom: 12px; }
  .cs-hero__lead  { font-size: 0.95rem; }
}

/* Show the mobile banner image only on small screens */
.cs-hero__mobile-art { display: none; }

/* ---------- Section header --------------------------------- */
.cs-section { padding: 70px 0; }
.cs-section--soft { background: #fff; }

.cs-section-title {
  text-align: center;
  font-weight: 800;
  font-size: clamp(2rem, 3.6vw, 3rem);
  margin-bottom: 16px;
}
.cs-section-title em {
  color: var(--cs-primary);
  font-style: normal;
}
.cs-section-lead {
  text-align: center;
  color: var(--cs-text-muted);
  max-width: 700px;
  margin: 0 auto 48px;
  font-size: 17px;
  line-height: 1.55;
}

/* ---------- Course card ------------------------------------ */
.cs-course-card {
  background: #fff;
  border-radius: var(--cs-r-md);
  overflow: hidden;
  box-shadow: var(--cs-shadow-sm);
  border: 1px solid var(--cs-border-soft);
  height: 100%;
  display: flex; flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.cs-course-card:hover { transform: translateY(-4px); box-shadow: var(--cs-shadow-md); }

.cs-course-card__media {
  background: var(--cs-card-blue);
  aspect-ratio: 16/12;
  display: flex; align-items: center; justify-content: center;
  padding: 18px;
}
.cs-course-card__media svg,
.cs-course-card__media img { max-height: 100%; }

.cs-course-card__body {
  padding: 18px 16px 22px;
  text-align: center;
  flex: 1;
  display: flex; flex-direction: column;
  gap: 8px;
}
.cs-course-card__title {
  font-weight: 700;
  font-size: 19px;
  margin: 0;
}
.cs-course-card__desc {
  color: var(--cs-text-muted);
  font-size: 14px;
  line-height: 1.45;
  margin: 0;
}

.cs-more-btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: #fff;
  border: 1px solid var(--cs-border);
  border-radius: var(--cs-r-pill);
  padding: 10px 22px;
  font-weight: 600;
  color: var(--cs-text);
  box-shadow: var(--cs-shadow-sm);
}
.cs-more-btn:hover { color: var(--cs-primary); text-decoration: none; }
.cs-more-btn i { color: var(--cs-primary); }

/* ---------- Auth pages ------------------------------------- */
.cs-auth-page {
  background:
    linear-gradient(135deg, var(--cs-bg-hero-start) 0%, var(--cs-bg-hero-end) 70%);
  position: relative;
  padding: 70px 0;
  flex: 1;
  display: flex;
  align-items: center;
}
.cs-auth-page::before {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='800' height='800' viewBox='0 0 800 800'><g fill='none' stroke='%23ffffff' stroke-opacity='0.5' stroke-width='1.4'><path d='M70 110 q40 -50 90 -10 t100 30'/><circle cx='130' cy='170' r='12'/><path d='M620 80 l30 40 -10 10 z'/><path d='M180 540 q60 -40 110 0'/><circle cx='700' cy='400' r='16'/><path d='M520 620 l-20 -30 40 -10 z'/><path d='M340 360 c20 -30 60 -30 80 0'/><path d='M60 700 q60 -20 120 0'/></g></svg>");
  background-size: 800px 800px;
  background-position: center;
  opacity: 0.4;
  pointer-events: none;
}

.cs-auth-card {
  background: #fff;
  border-radius: var(--cs-r-lg);
  padding: 36px clamp(20px, 4vw, 48px);
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
  box-shadow: var(--cs-shadow-lg);
  position: relative;
  z-index: 2;
  border: 1px solid rgba(160, 195, 230, 0.5);
}

.cs-auth-logo {
  display: flex; justify-content: center;
  margin-bottom: 18px;
}
.cs-auth-title {
  text-align: center;
  font-weight: 800;
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  margin: 0 0 8px;
}
.cs-auth-sub {
  text-align: center;
  color: #2b2b2b;
  margin: 0 0 28px;
  font-size: 15px;
}

.cs-form-group { margin-bottom: 18px; }
.cs-form-group label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
  font-size: 15px;
}
.cs-input-wrap {
  position: relative;
}
.cs-input-wrap > i {
  position: absolute;
  left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--cs-primary);
  font-size: 16px;
  pointer-events: none;
}
.cs-input,
.cs-input-plain {
  width: 100%;
  height: 48px;
  border: 1px solid var(--cs-border-soft);
  border-radius: 10px;
  padding: 10px 14px 10px 44px;
  font-size: 15px;
  color: var(--cs-text);
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.cs-input-plain { padding-left: 16px; }
.cs-input:focus,
.cs-input-plain:focus {
  outline: none;
  border-color: var(--cs-primary);
  box-shadow: 0 0 0 3px rgba(25, 104, 179, 0.15);
}
.cs-input::placeholder,
.cs-input-plain::placeholder { color: #9CA3AF; }

.cs-form-link {
  display: block;
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--cs-primary);
  font-weight: 500;
  text-align: left;
}

.cs-btn-primary {
  background: var(--cs-primary);
  color: #fff;
  border: 0;
  width: 100%;
  height: 52px;
  border-radius: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  font-size: 16px;
  text-transform: uppercase;
  transition: background 0.15s ease, transform 0.1s ease;
  box-shadow: 0 6px 14px rgba(25, 104, 179, 0.25);
}
.cs-btn-primary:hover { background: var(--cs-primary-dark); color: #fff; }
.cs-btn-primary:active { transform: translateY(1px); }

.cs-btn-rounded {
  border-radius: var(--cs-r-pill);
  padding: 12px 36px;
  height: auto;
  width: auto;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
}

.cs-divider-or {
  text-align: center;
  margin: 16px 0 6px;
  color: #2b2b2b;
  font-size: 14px;
}
.cs-divider-or + .cs-divider-or { margin-top: 0; }

.cs-auth-foot {
  text-align: center;
  margin: 20px 0 0;
  font-size: 14px;
  color: #2b2b2b;
}
.cs-auth-foot a { color: var(--cs-primary); font-weight: 500; }

.cs-back-link {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--cs-primary);
  font-weight: 700;
  font-size: 22px;
  text-decoration: none;
}
.cs-back-link:hover { text-decoration: none; color: var(--cs-primary-dark); }

/* ---------- Form helpers (signup conditional fields) -------- */
.cs-label-hint {
  font-weight: 400;
  font-size: 13px;
  color: #6b7280;
  margin-left: 4px;
}

.cs-segment {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.cs-segment__option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 62px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff;
  border: 1.5px solid var(--cs-border-soft);
  color: #4b5563;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  margin: 0;
  user-select: none;
}
.cs-segment__option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.cs-segment__option .cs-segment__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #F2F6FB;
  color: #6b7c93;
  font-size: 18px;
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease;
}
.cs-segment__option:hover {
  border-color: var(--cs-primary);
  color: var(--cs-primary);
}
.cs-segment__option:hover .cs-segment__icon {
  background: rgba(25, 104, 179, 0.08);
  color: var(--cs-primary);
}
.cs-segment__option.is-active {
  border-color: var(--cs-primary);
  background: rgba(25, 104, 179, 0.04);
  color: var(--cs-primary);
  box-shadow: 0 0 0 3px rgba(25, 104, 179, 0.10);
}
.cs-segment__option.is-active .cs-segment__icon {
  background: var(--cs-primary);
  color: #fff;
}
.cs-segment__option.is-active::after {
  content: "\F26B";
  font-family: "bootstrap-icons";
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 14px;
  color: var(--cs-primary);
  line-height: 1;
}
@media (max-width: 420px) {
  .cs-segment { grid-template-columns: 1fr; }
  .cs-segment__option { justify-content: flex-start; }
}

.cs-cond[hidden] { display: none !important; }
.cs-label-hint[hidden] { display: none !important; }
.cs-input-action[hidden] { display: none !important; }

.cs-input-wrap--with-action .cs-input {
  padding-right: 96px;
}
.cs-input-action {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: var(--cs-primary);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}
.cs-input-action:hover { background: var(--cs-primary-dark); }
.cs-input-action:disabled {
  background: #9CA3AF;
  cursor: not-allowed;
}

.cs-otp-status {
  margin: 8px 0 0;
  font-size: 13px;
  color: #1f7a3a;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.cs-otp-status[hidden] { display: none !important; }

/* ---------- Page header (centered) ------------------------- */
.cs-page-hero {
  background:
    linear-gradient(135deg, var(--cs-bg-hero-start) 0%, var(--cs-bg-hero-end) 70%);
  padding: 60px 0 40px;
  text-align: center;
}
.cs-page-hero h1 {
  font-weight: 800;
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  margin: 0 0 12px;
}
.cs-page-hero h1 em { color: var(--cs-primary); font-style: normal; }
.cs-page-hero p {
  max-width: 720px;
  margin: 0 auto;
  color: var(--cs-text-muted);
  font-size: 17px;
  line-height: 1.55;
}

.cs-search {
  max-width: 560px;
  margin: 26px auto 0;
  position: relative;
}
.cs-search input {
  width: 100%;
  height: 50px;
  border-radius: var(--cs-r-pill);
  border: 1px solid var(--cs-border-soft);
  padding: 12px 52px 12px 22px;
  font-size: 15px;
  background: #fff;
}
.cs-search input:focus { outline: none; border-color: var(--cs-primary); }
.cs-search button {
  position: absolute;
  right: 6px; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: var(--cs-text);
}

/* ---------- Chapter list ----------------------------------- */
.cs-chapter-row {
  display: flex; align-items: center; gap: 20px;
  background: #fff;
  border-radius: var(--cs-r-md);
  padding: 14px 22px 14px 14px;
  box-shadow: var(--cs-shadow-sm);
  border: 1px solid var(--cs-border-soft);
  margin-bottom: 18px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cs-chapter-row:hover { transform: translateY(-2px); box-shadow: var(--cs-shadow-md); }

.cs-chapter-row.is-active {
  background: linear-gradient(180deg, #4495D2 0%, #2C7AB9 100%);
  color: #fff;
  border-color: transparent;
}
.cs-chapter-row.is-active .cs-chapter-row__progress small { color: rgba(255,255,255,0.85); }
.cs-chapter-row.is-active .cs-chapter-row__bar { background: rgba(255,255,255,0.35); }

.cs-chapter-row__media {
  width: 180px;
  flex-shrink: 0;
  aspect-ratio: 16/10;
  border-radius: 10px;
  overflow: hidden;
  background: #B6E3FC;
}
.cs-chapter-row__media img,
.cs-chapter-row__media svg { width: 100%; height: 100%; object-fit: cover; }

.cs-chapter-row__body {
  flex: 1;
  display: flex; flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.cs-chapter-row__title { font-weight: 800; font-size: 22px; margin: 0; }
.cs-chapter-row__sub   { font-weight: 500; margin: 0 0 6px; }
.cs-chapter-row__progress { display: flex; align-items: center; gap: 14px; }
.cs-chapter-row__progress small { font-size: 12px; color: var(--cs-text-muted); }
.cs-chapter-row__bar {
  flex: 1;
  height: 6px;
  background: #E5E7EB;
  border-radius: 999px;
  overflow: hidden;
  max-width: 360px;
}
.cs-chapter-row__bar > i {
  display: block;
  height: 100%;
  background: var(--cs-yellow);
  border-radius: 999px;
}

.cs-chip-btn {
  background: var(--cs-yellow);
  color: #2b2b2b;
  border: 0;
  border-radius: 6px;
  padding: 6px 16px;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  flex-shrink: 0;
}
.cs-chip-btn:hover { filter: brightness(0.95); color: #2b2b2b; }

@media (max-width: 767.98px) {
  .cs-chapter-row { flex-wrap: wrap; padding: 12px; }
  .cs-chapter-row__media { width: 100%; }
  .cs-chip-btn { align-self: flex-start; }
}

/* ---------- Video player ----------------------------------- */
.cs-video-page {
  min-height: calc(100vh - 72px);
  display: flex;
  flex-direction: column;
}
.cs-video-frame {
  background: #0d0d0d;
  border-radius: 0;
  padding: 8px 8px 12px;
  position: relative;
  flex: 0 0 auto;
}
.cs-video-frame__inner {
  position: relative;
  /* Matches supplied video-thumb.png aspect (1790×595 ≈ 3:1) */
  aspect-ratio: 1790 / 595;
  max-height: 56vh;
  margin: 0 auto;
  border-radius: 8px;
  overflow: hidden;
  background: #B7DDF7;
}
.cs-video-frame__inner img,
.cs-video-frame__inner svg { width: 100%; height: 100%; object-fit: cover; }

.cs-video-frame__bar {
  display: flex; align-items: center; gap: 14px;
  padding: 6px 8px 0;
  color: #fff;
}
.cs-video-frame__bar .cs-progress {
  flex: 1;
  height: 3px;
  background: rgba(255,255,255,0.2);
  position: relative;
}
.cs-video-frame__bar .cs-progress > i {
  display: block;
  height: 100%;
  background: var(--cs-primary);
  width: 30%;
  position: relative;
}
.cs-video-frame__bar .cs-progress > i::after {
  content: "";
  position: absolute;
  right: -4px; top: 50%; transform: translateY(-50%);
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--cs-primary);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.5);
}
.cs-video-frame__bar button {
  background: transparent; border: 0;
  color: #fff;
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 17px;
}

.cs-video-actions {
  flex: 1 1 auto;
  display: flex; flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: clamp(8px, 1.4vh, 16px);
  padding: clamp(10px, 2vh, 22px) 16px;
  background: linear-gradient(180deg, #E9F4FE 0%, #BFDDF5 100%);
}

.cs-pill-btn-lg {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--cs-primary);
  color: #fff;
  border: 0;
  border-radius: var(--cs-r-pill);
  padding: clamp(10px, 1.4vh, 14px) clamp(28px, 4vw, 48px);
  font-weight: 700;
  font-size: clamp(0.95rem, 1.5vh, 1.05rem);
  box-shadow: 0 6px 18px rgba(25, 104, 179, 0.25);
}
.cs-pill-btn-lg:hover { background: var(--cs-primary-dark); color: #fff; }

.cs-chapter-nav {
  display: flex; align-items: center; justify-content: center;
  gap: clamp(20px, 4vw, 36px);
  margin: 0;
}
.cs-chapter-nav__title { font-weight: 800; font-size: clamp(1.4rem, 3.2vh, 2.2rem); margin: 0; }
.cs-square-btn {
  width: clamp(40px, 6vh, 52px); height: clamp(40px, 6vh, 52px);
  border-radius: 12px;
  background: #DCEEFB;
  border: 1px solid #BFD9EE;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--cs-primary);
  font-size: clamp(16px, 2.4vh, 22px);
  transition: background 0.15s ease;
}
.cs-square-btn:hover { background: #C9E3F8; color: var(--cs-primary-dark); text-decoration: none; }
.cs-play-circle {
  width: clamp(56px, 9vh, 80px); height: clamp(56px, 9vh, 80px);
  border-radius: 50%;
  background: var(--cs-primary);
  color: #fff;
  border: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: clamp(22px, 3.6vh, 30px);
  box-shadow: 0 8px 22px rgba(25, 104, 179, 0.3);
}
.cs-play-circle:hover { background: var(--cs-primary-dark); }

/* below tablet — let the page scroll naturally instead of squishing */
@media (max-width: 767.98px) {
  .cs-video-page { min-height: auto; }
  .cs-video-frame__inner { max-height: none; }
  .cs-video-actions { padding: 28px 16px; }
}

/* ---------- Language ---------------------------------------- */
.cs-lang-card {
  background: linear-gradient(135deg, #F4EFDC 0%, #BFDDF5 100%);
  border: 1px solid #BFD9EE;
  border-radius: var(--cs-r-lg);
  padding: 36px clamp(20px, 4vw, 48px) 30px;
  max-width: 520px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 2;
}
.cs-lang-card h2 {
  font-weight: 800;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  margin: 0 0 28px;
}
.cs-lang-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  max-width: 360px;
  margin: 0 auto 32px;
}
.cs-lang-option {
  background: #fff;
  border-radius: 14px;
  padding: 12px;
  display: flex; flex-direction: column;
  align-items: center; gap: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.cs-lang-option input { position: absolute; opacity: 0; pointer-events: none; }
.cs-lang-option .cs-flag {
  width: 100%; aspect-ratio: 16/12;
  border-radius: 8px;
  overflow: hidden;
}
.cs-lang-option .cs-flag svg { width: 100%; height: 100%; }
.cs-lang-option__name { font-weight: 600; font-size: 16px; margin: 0; }
.cs-lang-option:hover { transform: translateY(-2px); }
.cs-lang-option.is-selected {
  background: #B5D7F2;
  border-color: var(--cs-primary);
}

/* ---------- Profile edit ----------------------------------- */
.cs-profile-card {
  background: #fff;
  border-radius: var(--cs-r-lg);
  padding: clamp(20px, 4vw, 36px);
  max-width: 560px;
  margin: 0 auto;
  box-shadow: var(--cs-shadow-md);
  position: relative;
  z-index: 2;
}
.cs-profile-head {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 28px;
}
.cs-profile-head h2 { font-weight: 800; font-size: 22px; margin: 0; }
.cs-back-circle {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: #DCEEFB;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--cs-primary);
  border: 1px solid #BFD9EE;
  text-decoration: none;
  font-size: 18px;
}
.cs-back-circle:hover { background: #C9E3F8; color: var(--cs-primary-dark); }

.cs-field-edit {
  position: relative;
}
.cs-field-edit__pencil {
  position: absolute;
  right: 4px; top: 2px;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: #DCEEFB;
  border: 1px solid #BFD9EE;
  color: var(--cs-primary);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px;
  text-decoration: none;
}
.cs-field-edit__pencil:hover { background: #C9E3F8; }

/* ---------- Legal pages ------------------------------------ */
.cs-legal {
  background: linear-gradient(135deg, var(--cs-bg-hero-start) 0%, var(--cs-bg-hero-end) 70%);
  padding: 60px 0 80px;
}
.cs-legal h1 {
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 3rem);
  text-align: center;
  margin-bottom: 36px;
}
.cs-legal h3 {
  font-weight: 700;
  font-size: 17px;
  margin: 28px 0 8px;
}
.cs-legal p, .cs-legal ul {
  font-size: 16px;
  line-height: 1.6;
  color: #1a1a1a;
}
.cs-legal ul { padding-left: 24px; }
.cs-legal a { color: var(--cs-primary); }

/* ---------- Forgot password success ------------------------- */
.cs-success-icon {
  display: flex; justify-content: center;
  margin-bottom: 18px;
}
.cs-success-icon i {
  font-size: 64px;
  color: var(--cs-primary);
}
.cs-success-text { text-align: center; color: #1a1a1a; line-height: 1.55; }
.cs-success-text strong { display: block; color: var(--cs-primary); margin: 12px 0 18px; font-weight: 700; font-size: 17px; }

/* ---------- Utility ---------------------------------------- */
.cs-text-primary { color: var(--cs-primary) !important; }
.cs-bg-soft { background: var(--cs-bg-soft); }
.text-muted-cs { color: var(--cs-text-muted) !important; }

/* Decorative SVG positioning */
.cs-hero-deco {
  position: absolute;
  pointer-events: none;
  z-index: 1;
  height: auto;
  max-height: none;
}
.cs-hero-deco--pencil    { top: 12%; left: 18%;  width: clamp(60px, 9vw, 90px);  }
.cs-hero-deco--plane     { top: 55%; left: 8%;   width: clamp(80px, 12vw, 120px); }
.cs-hero-deco--squiggle  { top: 4%;  right: 4%;  width: clamp(40px, 5vw, 60px);  }

@media (max-width: 767.98px) {
  .cs-hero-deco { display: none; }
}
