* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --vh: 100dvh;
  /* --accent / --accent-ink come from theme.css, loaded after this file */
}

html, body {
  height: 100%;
  background: #000;
  color: #fff;
  font-family: -apple-system, system-ui, sans-serif;
  overflow: hidden;
  overscroll-behavior: none;
}

#feed {
  height: 100dvh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
#feed::-webkit-scrollbar { display: none; }

.slide {
  position: relative;
  height: 100dvh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.slide video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

/* subtle loading shimmer before a clip is ready */
.slide.loading::after {
  content: "";
  position: absolute;
  width: 42px; height: 42px;
  border: 3px solid rgba(255,255,255,.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* paused overlay (tap to resume) */
.slide.paused::before {
  content: "▶";
  position: absolute;
  font-size: 64px;
  color: rgba(255,255,255,.85);
  text-shadow: 0 2px 12px rgba(0,0,0,.6);
  pointer-events: none;
}

.btn {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  right: 14px;
  z-index: 10;
  width: 44px; height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}

#hint {
  position: fixed;
  left: 50%;
  bottom: max(28px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 10;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(6px);
  font-size: 14px;
  font-weight: 600;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: .55; } 50% { opacity: 1; } }
#hint.hidden { display: none; }

/* clip failed to load — don't hang on the spinner */
.slide.error::after {
  content: "couldn't load — swipe on";
  position: absolute;
  color: rgba(255,255,255,.7);
  font-size: 15px;
}

/* landing page - featured tutor above, brand + subject picker below.
   Shown on every visit; the tap on Korean is also the gesture iOS needs
   before it will let a video play with sound. */
#landing {
  position: fixed; inset: 0; z-index: 50;
  display: flex; flex-direction: column;
  background: #0b0b0d;
  transition: opacity .4s ease;
}
#landing.gone { opacity: 0; pointer-events: none; }

/* hero takes whatever height the panel doesn't need, so a short screen
   crops the photo instead of pushing the subject list off-screen */
.landing-hero { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; }
.landing-hero img {
  display: block; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 20%;
}
/* fade the photo into the panel so there's no hard seam */
.landing-hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 55%, rgba(11,11,13,.85) 88%, #0b0b0d);
}
.cast-credit {
  position: absolute; left: 16px; bottom: 14px; z-index: 1;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(0,0,0,.42); backdrop-filter: blur(8px);
  font-size: 12px; letter-spacing: .01em; color: rgba(255,255,255,.72);
}
.cast-credit b { color: #fff; font-weight: 700; margin-right: 7px; }

.landing-panel {
  flex: 0 0 auto;
  padding: 4px 20px max(26px, env(safe-area-inset-bottom));
}
.landing-panel h1 {
  font-size: 13px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent);
}
.slogan {
  margin-top: 6px;
  font-size: clamp(24px, 7.2vw, 30px); font-weight: 800;
  letter-spacing: -.5px; line-height: 1.15;
}

.subjects { list-style: none; margin-top: 20px; display: grid; gap: 8px; }
.subject {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 13px 16px;
  border: 1px solid rgba(255,255,255,.13); border-radius: 14px;
  background: rgba(255,255,255,.04);
  font: inherit; color: #fff; text-align: left;
  cursor: pointer;
}
.s-name { flex: 1; font-size: 15px; font-weight: 600; line-height: 1.25; }
.s-tag { flex: none; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; opacity: .5; }

/* coming soon - visibly present, plainly not pickable */
.subject:disabled { color: rgba(255,255,255,.42); cursor: default; }
.subject:disabled .s-tag { opacity: .75; }

/* the one live subject */
.subject.live {
  border-color: transparent;
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 8px 26px -10px var(--accent);
}
.subject.live .s-name { font-weight: 700; }
.subject.live .s-tag { opacity: .72; }
.subject.live:active { transform: scale(.985); }

/* desktop / landscape: frame the feed in a phone-width column on a dark backdrop */
@media (min-width: 620px) and (min-aspect-ratio: 3/4) {
  body { background: #0c0c0e; }
  #feed {
    width: min(430px, 46vh);
    height: 100dvh;
    margin: 0 auto;
    box-shadow: 0 0 60px rgba(0,0,0,.6);
  }
  .slide { width: 100%; }
  .btn { right: calc(50% - min(215px, 23vh) + 14px); }
  /* keep the landing in the same phone-width column as the feed */
  #landing {
    left: 50%; right: auto;
    width: min(430px, 46vh);
    transform: translateX(-50%);
    box-shadow: 0 0 60px rgba(0,0,0,.6);
  }
}

/* ----------------------------------------------------------------- ads
   Sponsor slides: label, watch-gate timer, and the CTA that is the only
   tappable route to the advertiser. Ported from hotguysteach so both skins
   share one implementation. Colours use --accent, so each skin stays on brand. */
.sponsor-tag {
  position: absolute; z-index: 5;
  top: max(16px, env(safe-area-inset-top)); left: 14px;
  padding: 5px 10px; border-radius: 7px;
  background: rgba(0,0,0,.55); backdrop-filter: blur(8px);
  font-size: 11px; font-weight: 700;
  letter-spacing: .09em; text-transform: uppercase;
  color: rgba(255,255,255,.92);
}
.ad-timer {
  position: absolute; z-index: 5;
  top: max(16px, env(safe-area-inset-top)); left: 108px;
  padding: 5px 10px; border-radius: 7px;
  background: rgba(0,0,0,.42); backdrop-filter: blur(8px);
  font-size: 11px; font-weight: 700;
  letter-spacing: .04em; font-variant-numeric: tabular-nums;
  color: rgba(255,255,255,.66);
}
#feed.ad-gate { touch-action: none; overscroll-behavior: none; }
.sponsor-cta {
  position: absolute; z-index: 5;
  left: 14px; right: 14px;
  bottom: max(20px, env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: 14px;
  background: var(--accent); color: var(--accent-ink);
  text-decoration: none;
  box-shadow: 0 10px 30px -12px var(--accent);
}
.ad-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ad-name {
  font-size: 10px; font-weight: 700;
  letter-spacing: .09em; text-transform: uppercase; opacity: .62;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ad-text { font-size: 15px; font-weight: 700; line-height: 1.25; }
.ad-go {
  flex: none; padding: 7px 13px; border-radius: 999px;
  background: rgba(0,0,0,.16);
  font-size: 13px; font-weight: 700;
}
.sponsor-cta:active { transform: scale(.99); }
