/* ═══════════════════════════════════════════════
   PLATEFORM — Mobile + Desktop Styles
   ═══════════════════════════════════════════════ */

:root {
  --pink:      #ff87e9;
  --purple:    #5d27d8;
  --dark:      #002c2b;
  --bg-pink:   #fcdcff;
  --red:       #f90a21;
  --white:     #ffffff;
  --muted:     #c1c1c1;
  --font:      'Poppins', sans-serif;
  --display:   'DM Serif Display', Georgia, serif;
  --sidebar-w: 230px;
}

*, *::before, *::after {
  margin: 0; padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: #111;
}

/* ── APP SHELL ── */
#app {
  position: fixed;
  left: 50%; top: 0;
  transform: translateX(-50%);
  width: 100%; max-width: 430px; height: 100%;
  overflow: hidden;
  background: white;
  font-family: var(--font);
  color: var(--dark);
}

/* ── SCREENS ── */
.screen {
  position: absolute; inset: 0;
  background: white;
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.screen.active { display: flex; animation: slideIn .25s ease; }
.screen.back-active { display: flex; animation: slideInLeft .25s ease; }

@keyframes slideIn {
  from { opacity: 0; transform: translateX(22px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-22px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-8px); }
  40%      { transform: translateX(8px); }
  60%      { transform: translateX(-5px); }
  80%      { transform: translateX(5px); }
}

/* ── HOME INDICATOR ── */
.home-ind {
  height: 32px; flex-shrink: 0;
  display: flex; align-items: flex-start;
  justify-content: center; padding-top: 8px;
}
.home-ind::after {
  content: '';
  width: 134px; height: 5px;
  background: #000; border-radius: 100px;
}

/* ══════════════════════════════════════════════
   AUTH SCREENS (Signup / Login / Path)
══════════════════════════════════════════════ */
.auth-body {
  flex: 1;
  display: flex; flex-direction: column; align-items: center;
  padding: 16px 36px 0;
  overflow-y: auto; overflow-x: hidden;
}
.auth-body.shake { animation: shake .4s ease; }

.welcome-title {
  font-size: 46px; font-weight: 500;
  color: var(--pink); line-height: 1.1;
  letter-spacing: -.55px;
  width: 100%; text-align: left;
  margin-bottom: 14px;
}

.auth-sub {
  font-size: 14px; font-weight: 500;
  color: var(--dark); letter-spacing: -.15px;
  margin-bottom: 28px;
  width: 100%; text-align: left;
}

.form-fields { width: 100%; display: flex; flex-direction: column; gap: 24px; margin-bottom: 22px; }

.field { width: 100%; }
.field-label {
  display: block; margin-bottom: 4px;
  font-size: 13px; font-weight: 500; color: var(--purple);
}
.field-label .req { color: var(--red); margin-left: 1px; }

.field-row { position: relative; display: flex; align-items: center; }

.field-input {
  width: 100%; background: none;
  border: none; border-bottom: 2px solid var(--purple);
  outline: none; padding: 5px 32px 5px 0;
  font-size: 14px; font-family: var(--font); color: var(--dark);
}
.field-input:focus { border-bottom-color: var(--pink); }

.eye-btn {
  position: absolute; right: 0;
  background: none; border: none; cursor: pointer;
  padding: 4px; color: var(--purple); display: flex;
}
.eye-btn svg { width: 20px; height: 20px; }

.field-hint { font-size: 11px; color: var(--dark); opacity: .7; margin-top: 4px; }

.auth-switch {
  font-size: 13px; color: var(--dark);
  text-align: center; margin-bottom: 18px;
}
.pink-link { color: var(--pink); text-decoration: none; font-weight: 600; }

.cta-btn {
  width: 100%; max-width: 240px; height: 50px;
  background: var(--purple); color: white;
  border: none; border-radius: 14px;
  font-size: 16px; font-weight: 600; font-family: var(--font);
  cursor: pointer; margin-bottom: 20px;
  box-shadow: 0 6px 20px rgba(93,39,216,.38);
  transition: transform .1s, box-shadow .1s;
}
.cta-btn:active { transform: scale(.96); box-shadow: 0 3px 10px rgba(93,39,216,.25); }

.brand-logo {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: auto; padding-bottom: 6px;
}
.brand-logo-img { height: 52px; width: auto; }
.brand-text { font-size: 20px; font-weight: 700; color: #000; letter-spacing: -.22px; }

/* PATH screen */
.path-body {
  flex: 1; display: flex; flex-direction: column;
  justify-content: center;
  padding: 64px 36px;
  overflow-y: auto;
}
.path-sub { font-size: 14px; font-weight: 500; color: var(--purple); margin-bottom: 28px; }
.path-buttons { display: flex; flex-direction: column; gap: 16px; margin-bottom: 24px; }

.path-btn {
  width: 100%; height: 64px;
  background: var(--pink); border: none; border-radius: 14px;
  cursor: pointer; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(255,135,233,.38);
  transition: transform .1s;
}
.path-btn:active { transform: scale(.97); }
.path-btn-title { font-size: 22px; font-weight: 700; color: white; font-family: var(--font); }
.path-btn-sub   { font-size: 10px; color: rgba(255,255,255,.88); font-family: var(--font); }

.path-illus { display: flex; justify-content: center; margin-top: auto; margin-bottom: 16px; }

/* ══════════════════════════════════════════════
   MAIN APP SCREENS
══════════════════════════════════════════════ */
.main-screen { padding-bottom: 72px; } /* reserve space for bottom nav */

.screen-header {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 6px 20px 10px;
  flex-shrink: 0;
}
.screen-title { font-size: 24px; font-weight: 700; color: var(--pink); }

.header-btn {
  background: none; border: none; cursor: pointer;
  padding: 4px; display: flex; align-items: center;
  color: var(--purple);
}
.header-btn svg { width: 24px; height: 24px; }

.avatar-btn { background: none; border: none; cursor: pointer; padding: 0; }
.avatar-circle {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--purple);
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 14px; font-weight: 700;
  overflow: hidden; flex-shrink: 0;
}
.avatar-circle.lg { width: 48px; height: 48px; font-size: 16px; }

.scroll-area {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.scroll-area::-webkit-scrollbar { display: none; }

/* ── HORIZONTAL SCROLL ── */
.h-scroll-wrap {
  overflow-x: auto; overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.h-scroll-wrap::-webkit-scrollbar { display: none; }
.h-scroll {
  display: flex; gap: 16px;
  padding: 4px 20px 16px;
  width: max-content;
}

/* ── SECTION BLOCK ── */
.section-block { padding: 2px 20px 12px; }
.section-label { font-size: 16px; font-weight: 700; color: var(--purple); margin-bottom: 10px; }
.section-label.pink { color: var(--pink); }

/* ── DIVIDER ── */
.divider { height: 1px; background: #ebebeb; margin: 0 20px 8px; }

/* ══════════════════════════════════════════════
   DISCOVER FEED
══════════════════════════════════════════════ */
.feed-post { padding: 0 20px; margin-bottom: 14px; }

.feed-img-wrap {
  border-radius: 12px; overflow: hidden;
  cursor: pointer; position: relative;
  aspect-ratio: 1 / 1;
}
.feed-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  pointer-events: none;
}

.feed-actions {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 4px 4px;
}
.action-btn {
  background: none; border: none; cursor: pointer;
  display: flex; align-items: center; gap: 5px;
  padding: 2px; transition: transform .15s;
}
.action-btn:active { transform: scale(.82); }
.action-btn svg { width: 24px; height: 24px; color: var(--muted); stroke: var(--muted); transition: color .2s, stroke .2s; }
.action-btn.liked svg { color: var(--pink); stroke: var(--pink); fill: var(--pink); }
.like-count { font-size: 12px; color: var(--muted); font-weight: 500; transition: color .2s; }
.action-btn.liked .like-count { color: var(--pink); }

.feed-caption { font-size: 12px; color: var(--pink); line-height: 1.4; padding: 2px 4px; }
.feed-time    { font-size: 10px; color: var(--purple); padding: 2px 4px 6px; }

/* Heart pop */
#heart-pop {
  position: fixed; pointer-events: none; z-index: 300;
  opacity: 0; transform: translate(-50%,-50%) scale(.3);
}
#heart-pop.pop { animation: heartBoom .6s ease forwards; }
@keyframes heartBoom {
  0%   { opacity: 1; transform: translate(-50%,-50%) scale(.3); }
  35%  { opacity: 1; transform: translate(-50%,-50%) scale(1.4); }
  65%  { opacity: .9; transform: translate(-50%,-50%) scale(1.1); }
  100% { opacity: 0; transform: translate(-50%,-50%) scale(1.5); }
}

/* ══════════════════════════════════════════════
   COMPETE SCREEN
══════════════════════════════════════════════ */
.contest-card {
  width: 300px; flex-shrink: 0;
  border-radius: 14px; overflow: hidden;
  background: white; box-shadow: 0 4px 18px rgba(0,0,0,.13);
  cursor: pointer; transition: transform .18s;
}
.contest-card:active { transform: scale(.97); }
.contest-card img { width: 100%; height: 220px; object-fit: cover; display: block; }
.contest-card-body { padding: 10px 14px 14px; }
.contest-cta-text { font-size: 11px; color: var(--purple); text-align: center; margin-bottom: 10px; line-height: 1.4; }

.card-btns { display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; }
.register-btn {
  background: var(--pink); color: white;
  border: none; border-radius: 7px; padding: 8px 18px;
  font-size: 13px; font-weight: 700; font-family: var(--font);
  cursor: pointer; box-shadow: 0 3px 8px rgba(255,135,233,.4);
  transition: transform .1s;
}
.register-btn:active { transform: scale(.95); }
.spots-badge {
  background: var(--purple); color: white;
  border-radius: 5px; padding: 4px 10px;
  font-size: 10px; font-weight: 600; text-align: center;
}

.ongoing-item {
  background: var(--purple); border-radius: 7px;
  padding: 8px 14px; min-height: 36px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px; cursor: pointer; transition: opacity .15s;
}
.ongoing-item:active { opacity: .82; }
.ongoing-name { font-size: 13px; font-weight: 700; color: white; line-height: 1.3; flex: 1; min-width: 0; }

.dots { display: flex; gap: 5px; align-items: center; }
.dot {
  width: 11px; height: 11px; border-radius: 50%;
  border: 1.5px solid var(--pink); background: transparent;
}
.dot.on { background: var(--pink); }

.countdown-wrap {
  padding: 18px 20px 10px;
  text-align: center;
  border-top: 1px solid #ebebeb;
}
.countdown-label { font-size: 18px; font-weight: 700; color: var(--purple); margin-bottom: 4px; }
.countdown-num   { font-size: 32px; font-weight: 700; color: var(--pink); }

/* ══════════════════════════════════════════════
   DETAIL SCREENS (Contest Progress / Certificate)
══════════════════════════════════════════════ */
.detail-header {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 4px 20px 8px; flex-shrink: 0;
}
.back-btn {
  background: none; border: none; cursor: pointer;
  display: flex; align-items: center; gap: 4px;
  color: var(--pink); font-size: 14px;
  font-weight: 600; font-family: var(--font);
  padding: 4px 0;
}
.back-btn svg { width: 20px; height: 20px; }

.card-wrap {
  margin: 8px 20px 20px;
  background: white; border-radius: 14px;
  box-shadow: 0 4px 22px rgba(0,0,0,.16);
  overflow: hidden; padding: 20px;
}

.card-title { font-size: 20px; font-weight: 700; color: var(--purple); margin-bottom: 14px; }

.card-img {
  width: 100%; height: 230px;
  background: var(--bg-pink); border-radius: 10px;
  overflow: hidden; position: relative;
  margin-bottom: 14px;
  display: flex; align-items: center; justify-content: center;
}
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-img .thumb { position: absolute; top: 12px; right: 14px; font-size: 32px; }

.card-desc {
  font-size: 13px; line-height: 1.6; color: #555;
  margin: 0 0 18px;
}

.prog-lines { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.prog-line {
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 12px; font-weight: 600;
  color: white;
  background: var(--purple);
}
.prog-line.prog-done    { background: var(--purple); opacity: 0.45; }
.prog-line.prog-active  { background: var(--pink); opacity: 1; }
.prog-line.prog-upcoming{ background: #e0d6f7; color: var(--purple); opacity: 1; }

.info-rows { margin-bottom: 20px; }
.info-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid #f0f0f0;
}
.info-row:last-child { border-bottom: none; }
.info-key { font-size: 14px; font-weight: 600; color: var(--purple); }
.info-val { font-size: 14px; font-weight: 600; color: var(--pink); }
.info-val .rstar { color: var(--red); }

.action-big {
  width: 100%; height: 50px;
  background: var(--purple); color: white;
  border: none; border-radius: 10px;
  font-size: 15px; font-weight: 700; font-family: var(--font);
  cursor: pointer; box-shadow: 0 5px 16px rgba(0,0,0,.28);
  transition: transform .1s;
}
.action-big:active { transform: scale(.97); }

.mastered-big {
  display: block; margin: 0 auto;
  width: 190px; height: 34px;
  background: var(--pink); color: var(--purple);
  border: none; border-radius: 7px;
  font-size: 15px; font-weight: 700; font-family: var(--font);
  cursor: pointer;
}

/* ══════════════════════════════════════════════
   UPSKILL SCREEN
══════════════════════════════════════════════ */
.job-card {
  width: 270px; flex-shrink: 0;
  border-radius: 14px; overflow: hidden;
  background: white; box-shadow: 0 4px 16px rgba(0,0,0,.12);
}
.job-card img { width: 100%; height: 200px; object-fit: cover; display: block; }
.job-card-body { padding: 10px 14px 14px; text-align: center; }
.job-text { font-size: 11px; color: var(--purple); margin-bottom: 10px; line-height: 1.5; }
.apply-btn {
  background: var(--pink); color: white;
  border: none; border-radius: 7px; padding: 8px 22px;
  font-size: 13px; font-weight: 700; font-family: var(--font);
  cursor: pointer; box-shadow: 0 3px 8px rgba(255,135,233,.4);
  transition: transform .1s;
}
.apply-btn:active { transform: scale(.95); }

.stream-item {
  background: var(--purple); border-radius: 7px;
  padding: 8px 14px; min-height: 36px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px; cursor: pointer; transition: opacity .15s;
}
.stream-item:active { opacity: .82; }
.stream-name { font-size: 13px; font-weight: 700; color: white; line-height: 1.3; flex: 1; min-width: 0; }

.bar-wrap { width: 72px; height: 8px; background: rgba(255,255,255,.25); border-radius: 4px; overflow: hidden; }
.bar-fill  { height: 100%; background: var(--pink); border-radius: 4px; }

.mastered-tag {
  background: var(--pink); color: var(--purple);
  border-radius: 5px; padding: 3px 10px;
  font-size: 11px; font-weight: 700;
}

/* ══════════════════════════════════════════════
   GROW SCREEN
══════════════════════════════════════════════ */
.chart-wrap { padding: 10px 20px 4px; }
.chart-svg { display: block; width: 100%; }
.chart-label { font-size: 12px; font-weight: 700; color: var(--purple); text-align: center; margin: 6px 0 14px; }
.chart-legend {
  display: flex; gap: 18px; justify-content: center;
  margin: 4px 0 2px;
}
.legend-item {
  display: flex; align-items: center; gap: 5px;
  font-size: 10px; color: #666; font-family: var(--font);
}
.legend-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.legend-dot.green { background: #39d353; }
.legend-dash {
  width: 16px; height: 2px; background: #aaa;
  border-top: 2px dashed #aaa; flex-shrink: 0;
}

.incubator-card {
  margin: 0 20px 14px;
  background: var(--purple); border-radius: 10px;
  padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.inc-name { font-size: 15px; font-weight: 700; color: white; margin-bottom: 3px; }
.inc-sub  { font-size: 9px; color: var(--pink); line-height: 1.4; }
.inc-apply {
  background: var(--pink); color: white;
  border: none; border-radius: 7px; padding: 10px 16px;
  font-size: 13px; font-weight: 700; font-family: var(--font);
  cursor: pointer; white-space: nowrap; flex-shrink: 0;
  transition: transform .1s;
}
.inc-apply:active { transform: scale(.95); }

.cloud-card {
  width: 260px; flex-shrink: 0;
  border-radius: 14px; overflow: hidden;
  background: white; box-shadow: 0 4px 16px rgba(0,0,0,.12);
  cursor: pointer; position: relative;
}
.cloud-card img { width: 100%; height: 170px; object-fit: cover; display: block; }
.price-badge {
  position: absolute; top: 10px; right: 10px;
  background: var(--pink); border: 3px solid #fffa74;
  color: white; border-radius: 10px;
  padding: 5px 12px; font-size: 12px; font-weight: 700;
}
.cloud-body { padding: 8px 14px 12px; text-align: center; }
.reserve-btn {
  background: var(--pink); color: white;
  border: none; border-radius: 7px; padding: 8px 22px;
  font-size: 13px; font-weight: 700; font-family: var(--font);
  cursor: pointer; transition: transform .1s;
}
.reserve-btn:active { transform: scale(.95); }

/* ══════════════════════════════════════════════
   BOTTOM NAV
══════════════════════════════════════════════ */
#bottom-nav {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 72px;
  background: var(--purple);
  display: flex; align-items: center; justify-content: space-around;
  padding: 0 10px;
  box-shadow: 0 -4px 20px rgba(0,0,0,.22);
  z-index: 150;
}
#bottom-nav.hidden { display: none; }

/* Desktop sidebar: hidden by default on mobile, shown via media query */
#desktop-sidebar { display: none; }

.nav-btn {
  background: none; border: none; cursor: pointer;
  padding: 10px 14px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.nav-btn.hidden { display: none; }
.nav-btn svg { width: 24px; height: 24px; stroke: rgba(255,255,255,.45); transition: stroke .2s; }
.nav-btn.active svg { stroke: var(--pink); }

/* ══════════════════════════════════════════════
   PROFILE PANEL OVERLAY
══════════════════════════════════════════════ */
#profile-panel {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.18);
  z-index: 250;
  display: flex; justify-content: flex-end; align-items: flex-start;
}
#profile-panel.hidden { display: none; }

.panel-card {
  background: rgba(255,255,255,.96);
  border: 0.5px solid var(--purple);
  border-radius: 14px;
  box-shadow: 0 5px 25px rgba(0,0,0,.2);
  width: 200px;
  margin: 50px 16px 0 0;
  padding: 14px;
  backdrop-filter: blur(6px);
  animation: fadeDown .2s ease;
}
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px; padding-bottom: 10px;
  border-bottom: 1px solid #ebebeb;
}
.panel-uname { font-size: 13px; font-weight: 600; color: var(--purple); line-height: 1.3; max-width: 110px; }

.panel-menu { display: flex; flex-direction: column; gap: 7px; margin-bottom: 12px; }
.panel-item {
  background: var(--pink); border-radius: 7px;
  height: 30px; padding: 0 12px;
  display: flex; align-items: center;
  font-size: 13px; font-weight: 500; color: white;
  cursor: pointer; transition: opacity .15s;
}
.panel-item:active { opacity: .8; }

.logout-btn {
  width: 100%; height: 36px;
  background: var(--purple); color: white;
  border: none; border-radius: 7px;
  font-size: 14px; font-weight: 600; font-family: var(--font);
  cursor: pointer; transition: opacity .15s;
}
.logout-btn:active { opacity: .82; }

/* ══════════════════════════════════════════════
   BRAND PANEL (desktop auth split — hidden mobile)
══════════════════════════════════════════════ */
.brand-panel {
  display: none; /* shown via desktop media query */
  position: relative;
  width: 42%;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 0;
}
.brand-panel-bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(.52);
}
.brand-panel-content {
  position: relative; z-index: 1;
  height: 100%;
  display: flex; flex-direction: column;
  padding: 44px 48px;
  color: white;
}
.bp-top {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: auto;
}
.bp-logo-img {
  height: 72px; width: auto;
  filter: none;
}
.bp-wordmark {
  font-size: 22px; font-weight: 700;
  font-family: var(--font);
  color: white; letter-spacing: -.2px;
}
.bp-tagline {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 52px; line-height: 1.05;
  font-weight: 400;
  color: white;
  margin-bottom: 20px;
  margin-top: auto;
}
.bp-tagline em {
  font-style: italic;
  color: var(--pink);
}
.bp-sub {
  font-size: 14px; line-height: 1.6;
  color: rgba(255,255,255,.72);
  font-family: var(--font);
  max-width: 280px;
}

/* ══════════════════════════════════════════════
   COURSE PLAYER SCREEN
══════════════════════════════════════════════ */
.course-video-wrap {
  margin: 0 20px 18px;
  border-radius: 16px; overflow: hidden;
  position: relative;
  background: var(--dark);
  aspect-ratio: 16 / 9;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(0,0,0,.28);
}
.course-video-wrap img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  opacity: .72;
}
.course-play-btn {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.course-play-circle {
  width: 58px; height: 58px; border-radius: 50%;
  background: rgba(255,255,255,.18);
  border: 2.5px solid white;
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s, background .15s;
}
.course-video-wrap:active .course-play-circle {
  transform: scale(.9);
  background: rgba(255,135,233,.35);
}
.course-play-circle svg { width: 26px; height: 26px; fill: white; margin-left: 4px; }

.course-badge {
  position: absolute; top: 10px; left: 10px;
  background: var(--pink); color: white;
  border-radius: 6px; padding: 3px 10px;
  font-size: 10px; font-weight: 700; letter-spacing: .3px;
}

.course-meta {
  padding: 0 20px 16px;
}
.course-title {
  font-size: 19px; font-weight: 700;
  color: var(--dark); line-height: 1.25;
  margin-bottom: 5px;
}
.course-host {
  font-size: 12px; color: var(--purple); font-weight: 500;
  margin-bottom: 14px;
}

.course-prog-row {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 4px;
}
.course-prog-track {
  flex: 1; height: 7px;
  background: #f0e0ff; border-radius: 4px; overflow: hidden;
}
.course-prog-fill {
  height: 100%; background: var(--purple); border-radius: 4px;
  transition: width .5s ease;
}
.course-prog-pct {
  font-size: 12px; font-weight: 700; color: var(--purple);
  white-space: nowrap;
}

.lessons-header {
  padding: 8px 20px 10px;
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid #ebebeb;
}
.lessons-title {
  font-size: 15px; font-weight: 700; color: var(--purple);
}
.lessons-count {
  font-size: 11px; color: var(--muted); font-weight: 500;
}

.lesson-item {
  display: flex; align-items: center; gap: 13px;
  padding: 11px 20px;
  border-bottom: 1px solid #f5f5f5;
  cursor: pointer; transition: background .15s;
}
.lesson-item:active { background: #fdf4ff; }
.lesson-item.active-lesson { background: #fdf0ff; }

.lesson-num {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}
.lesson-num svg { width: 16px; height: 16px; padding: 0; flex-shrink: 0; }
.lesson-num.done {
  background: var(--purple); color: white;
}
.lesson-num.playing {
  background: var(--pink); color: white;
}
.lesson-num.locked {
  background: #f0f0f0; color: var(--muted);
}

.lesson-info { flex: 1; min-width: 0; }
.lesson-name {
  font-size: 13px; font-weight: 600; color: var(--dark);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lesson-duration { font-size: 10px; color: var(--muted); margin-top: 1px; }

.lesson-status { flex-shrink: 0; }
.lesson-status svg { width: 18px; height: 18px; display: block; }

.course-action-row {
  padding: 16px 20px 20px;
  display: flex; gap: 12px;
}
.course-btn-primary {
  flex: 1; height: 48px;
  background: var(--purple); color: white;
  border: none; border-radius: 12px;
  font-size: 15px; font-weight: 700; font-family: var(--font);
  cursor: pointer; box-shadow: 0 5px 16px rgba(93,39,216,.32);
  transition: transform .1s;
}
.course-btn-primary:active { transform: scale(.97); }
.course-btn-secondary {
  width: 48px; height: 48px;
  background: var(--bg-pink); color: var(--purple);
  border: none; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0; transition: transform .1s;
}
.course-btn-secondary:active { transform: scale(.97); }
.course-btn-secondary svg { width: 20px; height: 20px; }

/* ══════════════════════════════════════════════
   DESKTOP LAYOUT  ≥ 768px
══════════════════════════════════════════════ */
@media (min-width: 768px) {

  html, body { overflow: hidden; }

  /* App shell — full viewport, flex row */
  #app {
    position: fixed;
    left: 0; top: 0;
    transform: none;
    width: 100%; max-width: 100%;
    display: flex;
    flex-direction: row;
    background: #f5f3ff;
  }

  /* Screens wrap fills remaining space */
  #screens-wrap {
    flex: 1;
    position: relative;
    height: 100%;
    overflow: hidden;
  }

  /* ── DESKTOP SIDEBAR ── */
  #desktop-sidebar {
    width: var(--sidebar-w);
    height: 100%;
    background: var(--purple);
    display: flex !important;
    flex-direction: column;
    flex-shrink: 0;
    padding: 28px 0 0;
    z-index: 100;
  }
  #desktop-sidebar.hidden {
    display: none !important;
  }

  .ds-logo {
    display: flex; align-items: center; justify-content: center;
    padding: 16px 16px 28px;
    border-bottom: 1px solid rgba(255,255,255,.1);
    margin-bottom: 16px;
  }
  .ds-logo-img {
    height: 72px; width: calc(100% - 32px);
    object-fit: contain;
    filter: none;
  }
  .ds-brand-text {
    font-size: 20px; font-weight: 700;
    color: white; font-family: var(--font);
    letter-spacing: -.18px;
  }

  .ds-nav {
    flex: 1;
    display: flex; flex-direction: column;
    padding: 0 12px;
    gap: 4px;
  }
  .ds-nav-btn {
    display: flex; align-items: center; gap: 12px;
    width: 100%; height: 46px;
    padding: 0 14px;
    background: none; border: none;
    border-radius: 10px;
    cursor: pointer;
    font-family: var(--font); font-size: 14px; font-weight: 500;
    color: rgba(255,255,255,.55);
    transition: background .18s, color .18s;
    text-align: left;
  }
  .ds-nav-btn svg {
    width: 20px; height: 20px; flex-shrink: 0;
    stroke: rgba(255,255,255,.55);
    transition: stroke .18s;
  }
  .ds-nav-btn:hover {
    background: rgba(255,255,255,.08);
    color: rgba(255,255,255,.85);
  }
  .ds-nav-btn:hover svg { stroke: rgba(255,255,255,.85); }
  .ds-nav-btn.active {
    background: rgba(255,255,255,.14);
    color: white;
  }
  .ds-nav-btn.active svg { stroke: var(--pink); }
  .ds-nav-btn.hidden { display: none; }

  .ds-footer {
    display: flex; align-items: center; gap: 10px;
    padding: 16px 16px 24px;
    border-top: 1px solid rgba(255,255,255,.1);
    cursor: pointer;
    transition: background .15s;
    border-radius: 0 0 0 0;
  }
  .ds-footer:hover { background: rgba(255,255,255,.06); }
  .ds-footer .avatar-circle {
    width: 36px; height: 36px; font-size: 12px; flex-shrink: 0;
    background: rgba(255,255,255,.18);
  }
  .ds-user-info {
    flex: 1; min-width: 0;
    display: flex; flex-direction: column;
  }
  .ds-user-name {
    font-size: 13px; font-weight: 600; color: white;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    font-family: var(--font);
  }
  .ds-user-sub {
    font-size: 10px; color: rgba(255,255,255,.45);
    font-family: var(--font);
  }
  .ds-chevron { width: 16px; height: 16px; flex-shrink: 0; }

  /* ── HIDE MOBILE NAV ON DESKTOP ── */
  #bottom-nav { display: none !important; }

  /* ── SCREENS FILL THE WRAP ── */
  .screen {
    position: absolute; inset: 0;
    background: #f7f4ff;
    display: none;
    flex-direction: column;
    overflow: hidden;
    padding-top: 0;
  }
  .screen.active { display: flex; animation: slideIn .22s ease; }
  .screen.back-active { display: flex; animation: slideInLeft .22s ease; }

  /* main screens already have bottom padding for mobile nav — remove it */
  .main-screen { padding-bottom: 0; }

  /* ── SCREEN HEADER ── */
  .screen-header {
    padding: 22px 36px 14px;
    background: white;
    border-bottom: 1px solid #ede8ff;
    flex-shrink: 0;
  }
  .screen-title { font-size: 28px; }

  .detail-header {
    padding: 18px 36px 12px;
    background: white;
    border-bottom: 1px solid #ede8ff;
  }

  /* ── AUTH SCREENS — SPLIT LAYOUT ── */
  #screen-signup,
  #screen-login,
  #screen-path {
    flex-direction: row;
    background: white;
  }
  /* Show the brand panel */
  #screen-signup .brand-panel,
  #screen-login .brand-panel,
  #screen-path .brand-panel {
    display: flex;
    flex-direction: column;
  }
  /* Auth form side */
  #screen-signup .auth-body,
  #screen-login .auth-body {
    flex: 1;
    padding: 0 72px;
    display: flex; flex-direction: column;
    justify-content: center;
    overflow-y: auto;
    max-width: 520px;
    margin: 0 auto;
  }
  #screen-path .path-body {
    flex: 1;
    padding: 64px 72px;
    display: flex; flex-direction: column;
    justify-content: center;
    max-width: 520px;
    margin: 0 auto;
  }
  /* Hide home indicator on desktop */
  .home-ind { display: none; }
  /* Hide mobile brand logo on desktop (panel serves that role) */
  #screen-signup .brand-logo,
  #screen-login .brand-logo,
  #screen-path .brand-logo { display: none; }

  /* ── SCROLL AREA ── */
  .scroll-area {
    padding: 0;
  }

  /* ── DISCOVER — instagram-style single column ── */
  #screen-discover .scroll-area { padding: 0; }
  #feed-list {
    display: block;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px 0 32px;
  }
  .feed-post { padding: 0 64px 4px; margin-bottom: 0; }
  .feed-img-wrap { border-radius: 12px; }
  #screen-discover .divider { margin: 0 64px 20px; }

  /* ── COMPETE — WIDER CARDS ── */
  #screen-compete .scroll-area { padding: 24px 36px; }
  .contest-card { width: 340px; }
  .contest-card img { height: 240px; }
  #ongoing-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px;
  }
  .countdown-wrap { max-width: 100%; text-align: center; padding: 24px 36px; }

  /* ── CONTEST / CERT DETAIL CARD ── */
  .card-wrap {
    margin: 24px 36px;
    max-width: 560px;
  }

  /* ── UPSKILL — 2-COL STREAMS ── */
  #screen-upskill .scroll-area { padding: 24px 36px; }
  .job-card { width: 300px; }
  #streams-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 28px;
  }
  #streams-list .section-block { padding-left: 0; padding-right: 0; }

  /* ── GROW — single column, max-width centered ── */
  .grow-scroll {
    display: block !important;
    overflow-y: auto;
    padding: 24px 36px 40px;
    max-width: 720px;
    margin: 0 auto;
    width: 100%;
  }
  .grow-left { width: 100%; padding: 0; border-right: none; }
  .grow-right { width: 100%; padding: 0; }
  /* Clouds: 2-col grid below chart */
  .grow-right .h-scroll-wrap { overflow-x: visible; }
  .grow-right .h-scroll {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    width: 100%;
    padding: 0;
    gap: 18px;
  }
  .cloud-card { width: 100%; }
  .cloud-card img { height: 180px; }

  /* ── COURSE PLAYER — SPLIT PANE ── */
  #course-content {
    display: flex !important;
    flex-direction: row;
    overflow: hidden;
    height: 100%;
  }
  .course-player-left {
    width: 56%;
    overflow-y: auto;
    padding: 28px 24px 28px 36px;
    border-right: 1px solid #ede8ff;
    scrollbar-width: none;
  }
  .course-player-left::-webkit-scrollbar { display: none; }
  .course-player-right {
    flex: 1;
    overflow-y: auto;
    display: flex; flex-direction: column;
    scrollbar-width: none;
  }
  .course-player-right::-webkit-scrollbar { display: none; }
  /* On desktop the video+meta are in .course-player-left wrapper */
  .course-video-wrap { margin: 0 0 20px; }
  .course-meta { padding: 0 0 16px; }
  .course-action-row { padding: 0 0 0; }

  /* ── PROFILE PANEL ── */
  #profile-panel { position: absolute; }
  .panel-card { margin: 56px 20px 0 0; }

  /* ── H-SCROLL PADDING ── */
  .h-scroll { padding-left: 0; }
  .h-scroll-wrap { padding: 0; }
  #screen-compete .h-scroll-wrap,
  #screen-upskill .h-scroll-wrap { padding-left: 0; }

  /* Section block padding reset */
  .section-block { padding-left: 0; }
  .divider { margin: 0 0 8px; }

  /* ── GROW CHART — same width as incubator card ── */
  .chart-wrap { padding: 10px 20px 4px; }
  .chart-svg  { max-width: none; width: 100%; }

}

/* ══════════════════════════════════════════════
   CAPTURE MODE  (body.capture)
   Unrolls fixed/absolute layout so Figma's
   generate_figma_design can capture full content
══════════════════════════════════════════════ */
body.capture #app {
  position: relative !important;
  left: auto !important;
  transform: none !important;
  width: 100% !important;
  height: auto !important;
  min-height: 100vh !important;
  overflow: visible !important;
  display: flex !important;
  flex-direction: column !important;
}
body.capture #screens-wrap {
  position: relative !important;
  height: auto !important;
  overflow: visible !important;
  flex: 1 !important;
}
body.capture .screen {
  position: relative !important;
  display: none !important;
  overflow: visible !important;
  height: auto !important;
  min-height: 0 !important;
  animation: none !important;
}
body.capture .screen.active,
body.capture .screen.back-active {
  display: flex !important;
  flex-direction: column !important;
  animation: none !important;
  min-height: 100vh !important;
}
body.capture .scroll-area {
  overflow: visible !important;
  height: auto !important;
  max-height: none !important;
  flex: none !important;
}
body.capture #bottom-nav {
  position: relative !important;
  bottom: auto !important;
}

/* ══════════════════════════════════════════════
   MODAL / POPUP SYSTEM
══════════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 900;
  background: rgba(0,0,0,.45);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fadeIn .18s ease;
}
@media (min-width: 480px) {
  .modal-overlay { align-items: center; }
}
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }

.modal-sheet {
  background: #fff; border-radius: 20px 20px 0 0;
  padding: 28px 24px 36px;
  width: 100%; max-width: 480px;
  font-family: var(--font);
  animation: slideUp .22s ease;
  max-height: 90vh; overflow-y: auto;
}
@media (min-width: 480px) {
  .modal-sheet { border-radius: 20px; }
}
@keyframes slideUp { from { transform: translateY(40px); opacity: 0 } to { transform: translateY(0); opacity: 1 } }

.modal-icon {
  width: 52px; height: 52px; border-radius: 50%;
  background: #f0e8ff;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.modal-icon svg { width: 26px; height: 26px; stroke: var(--purple); }

.modal-title {
  font-size: 20px; font-weight: 700; color: var(--dark);
  text-align: center; margin-bottom: 8px;
}
.modal-body {
  font-size: 13px; color: #666; line-height: 1.65;
  text-align: center; margin-bottom: 24px;
}
.modal-body.left { text-align: left; }

.modal-actions { display: flex; flex-direction: column; gap: 10px; }
.modal-btn-primary {
  width: 100%; height: 48px; border-radius: 12px;
  background: var(--purple); color: #fff;
  border: none; font-size: 15px; font-weight: 600;
  font-family: var(--font); cursor: pointer;
  transition: transform .1s;
}
.modal-btn-primary:active { transform: scale(.97); }
.modal-btn-secondary {
  width: 100%; height: 44px; border-radius: 12px;
  background: none; color: var(--purple);
  border: 1.5px solid #e0d6f7;
  font-size: 14px; font-weight: 500;
  font-family: var(--font); cursor: pointer;
}

/* T&C text */
.tnc-scroll {
  background: #faf8ff; border-radius: 10px;
  padding: 14px 16px; max-height: 180px;
  overflow-y: auto; margin-bottom: 18px;
  font-size: 12px; color: #555; line-height: 1.7;
  border: 1px solid #ede8ff;
}
.tnc-scroll h4 { font-size: 13px; font-weight: 700; color: var(--dark); margin: 10px 0 4px; }
.tnc-scroll h4:first-child { margin-top: 0; }

/* Registration form inside modal */
.reg-form { display: flex; flex-direction: column; gap: 16px; margin-bottom: 20px; }
.reg-field label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--purple); margin-bottom: 5px;
}
.reg-field input, .reg-field select, .reg-field textarea {
  width: 100%; padding: 9px 12px; border-radius: 8px;
  border: 1.5px solid #e0d6f7; font-size: 13px;
  font-family: var(--font); color: var(--dark);
  background: #fff; outline: none;
  transition: border-color .15s;
}
.reg-field input:focus, .reg-field select:focus, .reg-field textarea:focus {
  border-color: var(--purple);
}
.reg-field textarea { resize: none; height: 72px; }
.reg-field input[disabled] { background: #f5f3ff; color: #888; }
.reg-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

@media (min-width: 768px) {
  body.capture #app {
    flex-direction: row !important;
    min-height: 100vh !important;
  }
  body.capture #desktop-sidebar {
    position: sticky !important;
    top: 0 !important;
    height: 100vh !important;
    overflow: visible !important;
  }
  body.capture #screens-wrap {
    position: relative !important;
    height: auto !important;
    overflow: visible !important;
  }
}
