/* =========================================================================
   Akademi — Theater Mode (belajar.php)
   Bebas distraksi: tanpa navbar & footer situs.
   ========================================================================= */
:root {
  --sage: #1E3F3B;
  --sage-900: #142C29;
  --sage-700: #27514B;
  --gold: #C59B48;
  --gold-deep: #8C6A28;
  --gold-soft: #E7D4AC;
  --ivory: #FAF8F5;
  --ink: #172B29;
  --muted: #5F706C;
  --line: rgba(30, 63, 59, .12);
  --line-gold: rgba(197, 155, 72, .32);
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Plus Jakarta Sans", system-ui, sans-serif;
}
.theater-body {
  margin: 0; background: #0E1C1A; color: var(--ink); font-family: var(--sans);
  min-height: 100vh;
}
.theater-body ::selection { background: rgba(197, 155, 72, .35); }

/* ------------------------------------------------------------------ bar --- */
.theater-bar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 22px; background: rgba(20, 44, 41, .96);
  border-bottom: 1px solid rgba(197, 155, 72, .3);
  backdrop-filter: blur(12px); flex-wrap: wrap;
}
.theater-brand { display: flex; align-items: center; gap: 11px; text-decoration: none; min-width: 0; }
.theater-brand svg { width: 34px; height: 34px; flex: 0 0 auto; }
.theater-brand strong {
  display: block; font-family: var(--serif); font-size: .95rem; color: #FBF8F2; line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 42vw;
}
.theater-brand small {
  display: block; font-size: .7rem; color: rgba(231, 212, 172, .8);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 42vw;
}
.theater-bar-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.theater-progress { display: flex; align-items: center; gap: 8px; }
.tp-bar { display: block; width: 84px; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .16); overflow: hidden; }
.tp-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-soft), var(--gold)); border-radius: 99px; transition: width .4s ease; }
.tp-num { font-size: .76rem; font-weight: 700; color: var(--gold-soft); min-width: 34px; }
.theater-user { display: flex; align-items: center; gap: 8px; padding: 5px 11px 5px 6px; border-radius: 999px; background: rgba(255, 255, 255, .08); }
.theater-user .avatar {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--gold); color: #221a08; font-size: .76rem; font-weight: 800;
}
.theater-user-name { font-size: .78rem; color: #EAF1ED; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.theater-bar .btn-ghost { color: #EAF1ED; border-color: rgba(255, 255, 255, .28); }
.theater-bar .btn-ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; }

.theater-flash { padding: 12px 22px 0; background: #0E1C1A; }
.theater-flash .alert { margin-bottom: 8px; }

/* ----------------------------------------------------------------- grid --- */
.theater-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) 348px;
  gap: 0; align-items: start; min-height: calc(100vh - 60px);
}
.theater-main { padding: 18px 22px 56px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.theater-side {
  position: sticky; top: 60px; align-self: start; max-height: calc(100vh - 60px); overflow-y: auto;
  background: #122824; border-left: 1px solid rgba(197, 155, 72, .22);
  padding: 18px 16px 24px; display: flex; flex-direction: column; gap: 16px;
}

/* --------------------------------------------------------------- player --- */
.player-shell { background: #000; border-radius: 14px; overflow: hidden; border: 1px solid rgba(197, 155, 72, .28); }
.player-stage { position: relative; }
.player-embed { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.player-embed iframe, .player-embed > iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.player-embed::before {
  /* Bingkai tipis agar video tidak menempel ke tepi */
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  box-shadow: inset 0 0 0 1px rgba(197, 155, 72, .18);
}
.player-shield { position: absolute; z-index: 3; display: block; background: transparent; }
.player-shield--top {
  top: 0; left: 0; right: 0; height: 58px;
  background: linear-gradient(180deg, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0));
}
.player-shield--corner { right: 0; bottom: 0; width: 168px; height: 46px; background: linear-gradient(0deg, rgba(0, 0, 0, .42), transparent); }

.player-placeholder {
  position: relative; aspect-ratio: 16 / 9; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px; text-align: center;
  padding: 28px; background:
    radial-gradient(60% 70% at 50% 30%, rgba(197, 155, 72, .12), transparent 70%),
    linear-gradient(150deg, #17352F, #0C1C19);
  color: #DDE8E3;
}
.pp-ico { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: rgba(197, 155, 72, .16); color: var(--gold-soft); border: 1px solid rgba(231, 212, 172, .35); }
.pp-ico .ico { width: 26px; height: 26px; }
.player-placeholder strong { font-family: var(--serif); font-size: 1.05rem; color: #FBF8F2; }
.player-placeholder p { margin: 0; max-width: 48ch; font-size: .84rem; color: rgba(221, 232, 227, .75); line-height: 1.6; }
.player-placeholder small { font-size: .7rem; color: rgba(231, 212, 172, .6); }

.player-note {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px;
  background: rgba(197, 155, 72, .1); border-top: 1px solid rgba(197, 155, 72, .28);
  font-size: .8rem; color: #EAF1ED; flex-wrap: wrap;
}
.player-note .ico { width: 16px; height: 16px; color: var(--gold-soft); flex: 0 0 auto; }
.player-note span { flex: 1; min-width: 160px; }

/* ------------------------------------------------------------ watermark --- */
.wm-layer { position: absolute; inset: 0; z-index: 4; pointer-events: none; overflow: hidden; }
.wm {
  position: absolute; font-size: 12px; letter-spacing: .04em; color: rgba(255, 255, 255, .32);
  text-shadow: 0 1px 3px rgba(0, 0, 0, .55); white-space: nowrap; user-select: none;
  font-weight: 600;
}
.wm-1 { animation: wmDriftA 22s ease-in-out infinite alternate; }
.wm-2 { animation: wmDriftB 27s ease-in-out infinite alternate; opacity: .8; }
.wm-badge {
  position: absolute; left: 12px; bottom: 10px;
  font-size: 10px; letter-spacing: .1em; text-transform: uppercase; font-weight: 800;
  color: rgba(231, 212, 172, .55); text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
  animation: wmPulse 7s ease-in-out infinite;
}
@keyframes wmDriftA {
  0%   { top: 16%; left: 8%; }
  35%  { top: 62%; left: 46%; }
  70%  { top: 34%; left: 22%; }
  100% { top: 74%; left: 58%; }
}
@keyframes wmDriftB {
  0%   { top: 72%; left: 54%; }
  40%  { top: 24%; left: 16%; }
  75%  { top: 52%; left: 66%; }
  100% { top: 18%; left: 38%; }
}
@keyframes wmPulse { 0%, 100% { opacity: .5; } 50% { opacity: .95; } }

/* ---------------------------------------------------------------- audio --- */
.lesson-audio { background: #122824 !important; border: 1px solid rgba(197, 155, 72, .28) !important; color: #EAF1ED; }
.lesson-audio-head { display: flex; gap: 11px; align-items: flex-start; margin-bottom: 12px; }
.lesson-audio-head .ico { width: 22px; height: 22px; color: var(--gold-soft); flex: 0 0 auto; margin-top: 2px; }
.lesson-audio-head strong { display: block; font-size: .9rem; color: #FBF8F2; }
.lesson-audio-head small { display: block; font-size: .76rem; color: rgba(221, 232, 227, .7); }
.lesson-audio audio { width: 100%; height: 40px; border-radius: 999px; }

/* ----------------------------------------------------------- lesson head --- */
.card-soft {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 22px 24px; box-shadow: 0 10px 28px -22px rgba(20, 44, 41, .5);
}
.theater-main .card-soft { background: #FCFBF8; }
.lesson-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; flex-wrap: wrap; }
.lesson-crumb { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-deep); font-weight: 700; }
.lesson-head h1 { font-family: var(--serif); font-size: clamp(1.3rem, 2.2vw, 1.75rem); color: var(--sage); margin: 8px 0 10px; line-height: 1.24; }
.lesson-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.lesson-chips span {
  display: inline-flex; align-items: center; gap: 5px; font-size: .72rem; font-weight: 600;
  padding: 4px 10px; border-radius: 999px; background: rgba(30, 63, 59, .07); color: var(--muted);
}
.lesson-chips .ico { width: 13px; height: 13px; }
.lesson-chips .is-done { background: #E7F2EA; color: #246142; }
.lesson-chips .is-free { background: rgba(197, 155, 72, .16); color: var(--gold-deep); }
.done-form { flex: 0 0 auto; }

.lesson-block h2 {
  display: flex; align-items: center; gap: 8px; font-family: var(--serif);
  font-size: 1.1rem; color: var(--sage); margin: 0 0 10px;
}
.lesson-block h2 .ico { width: 18px; height: 18px; color: var(--gold-deep); }
.lesson-prose { font-size: .92rem; color: #2C3A38; line-height: 1.72; }
.lesson-prose p { margin: 0 0 1em; }
.lesson-prose h2 { font-size: 1.05rem; margin: 18px 0 8px; }
.lesson-prose ul, .lesson-prose ol { padding-left: 1.15em; }

.practice-box {
  display: flex; gap: 14px; padding: 20px 22px; border-radius: 14px;
  background: linear-gradient(140deg, rgba(197, 155, 72, .14), rgba(197, 155, 72, .05));
  border: 1px dashed rgba(197, 155, 72, .55);
}
.practice-ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: #fff; color: var(--gold-deep); flex: 0 0 auto; box-shadow: 0 6px 16px -12px rgba(20, 44, 41, .5); }
.practice-ico .ico { width: 20px; height: 20px; }
.practice-box h3 { font-family: var(--serif); font-size: 1.02rem; color: var(--sage); margin: 2px 0 6px; }
.practice-box p { margin: 0; font-size: .89rem; color: #4A5A56; line-height: 1.66; }

.worksheet-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.worksheet-info { display: flex; gap: 12px; align-items: center; }
.worksheet-info .ico { width: 24px; height: 24px; color: var(--gold-deep); }
.worksheet-info strong { display: block; font-size: .9rem; color: var(--sage); }
.worksheet-info small { display: block; font-size: .76rem; color: var(--muted); }

/* ----------------------------------------------------------------- kuis --- */
.quiz-item { padding: 14px 0; border-bottom: 1px solid var(--line); }
.quiz-item:last-of-type { border-bottom: 0; }
.quiz-q { font-size: .92rem; font-weight: 700; color: var(--sage); margin: 0 0 10px; }
.quiz-q span { color: var(--gold-deep); }
.quiz-opts { display: grid; gap: 8px; }
.quiz-opt {
  display: flex; align-items: center; gap: 10px; padding: 10px 13px; border-radius: 11px;
  border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: .87rem; transition: all .18s;
}
.quiz-opt:hover { border-color: var(--line-gold); background: #FFFDF8; }
.quiz-opt input { accent-color: var(--sage); }
.qo-letter {
  display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px;
  background: rgba(30, 63, 59, .07); font-size: .7rem; font-weight: 800; color: var(--sage-700); flex: 0 0 auto;
}
.quiz-opt:has(input:checked) { border-color: var(--gold); background: rgba(197, 155, 72, .12); }
.quiz-opt:has(input:checked) .qo-letter { background: var(--sage); color: #F7F3EA; }

/* -------------------------------------------------------------- diskusi --- */
.comment-list { display: grid; gap: 12px; margin-bottom: 8px; }
.comment { padding: 13px 15px; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.comment-head { display: flex; align-items: center; gap: 9px; margin-bottom: 7px; }
.comment-head .avatar { width: 30px; height: 30px; font-size: .78rem; background: var(--sage-100); color: var(--sage-700); }
.comment-head strong { display: block; font-size: .84rem; color: var(--sage); }
.comment-head small { display: block; font-size: .7rem; color: var(--muted); }
.comment p { margin: 0; font-size: .87rem; color: #2C3A38; line-height: 1.65; }
.comment--reply { margin: 10px 0 0 14px; background: var(--ivory-2); }
.comment--reply.is-coach { background: #EAF2ED; border-color: rgba(30, 63, 59, .18); }
.reply-box { margin-top: 9px; }
.reply-box summary { font-size: .76rem; font-weight: 700; color: var(--gold-deep); cursor: pointer; }
.reply-box form { margin-top: 9px; }

/* ------------------------------------------------------------ lesson nav --- */
.lesson-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 4px; flex-wrap: wrap; }
.lesson-nav-btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 15px; border-radius: 12px;
  background: #FCFBF8; border: 1px solid var(--line); max-width: 48%; min-width: 200px;
  transition: all .2s;
}
.lesson-nav-btn:hover { border-color: var(--line-gold); background: #fff; }
.lesson-nav-btn small { display: block; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-deep); font-weight: 700; }
.lesson-nav-btn strong { display: block; font-size: .84rem; color: var(--sage); font-weight: 600; line-height: 1.35; }
.lesson-nav-btn .ico { width: 17px; height: 17px; color: var(--sage-500); flex: 0 0 auto; }
.lesson-nav-btn.is-next { margin-left: auto; text-align: right; flex-direction: row; }
.lesson-nav-btn.is-next span { flex: 1; }
.lesson-nav-btn.is-locked { opacity: .6; }

.enroll-cta-block h2 { font-family: var(--serif); color: var(--sage); }
.enroll-cta-block .btn-row { margin-top: 14px; }

/* ------------------------------------------------------------------ side --- */
.side-progress { background: rgba(255, 255, 255, .06); border: 1px solid rgba(197, 155, 72, .22); border-radius: 12px; padding: 13px 14px; }
.side-progress-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.side-progress-head span { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(231, 212, 172, .8); font-weight: 700; }
.side-progress-head strong { font-family: var(--serif); font-size: 1.1rem; color: var(--gold-soft); }
.side-progress .progress-bar { background: rgba(255, 255, 255, .14); height: 6px; }
.side-progress .progress-bar span { background: linear-gradient(90deg, var(--gold-soft), var(--gold)); }
.side-progress small { display: block; margin-top: 7px; font-size: .7rem; color: rgba(221, 232, 227, .65); }
.side-curriculum { display: grid; gap: 14px; }
.side-section-head { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.side-section-head span { font-size: .68rem; font-weight: 800; color: var(--gold-soft); letter-spacing: .08em; }
.side-section-head strong { font-size: .78rem; color: rgba(234, 241, 237, .9); font-weight: 600; line-height: 1.35; }
.side-curriculum ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 3px; }
.side-curriculum li a, .side-curriculum li .sc-locked {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 9px;
  font-size: .78rem; color: rgba(221, 232, 227, .82); text-decoration: none; transition: background .18s;
}
.side-curriculum li a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.sc-ico { display: inline-flex; color: rgba(231, 212, 172, .75); flex: 0 0 auto; }
.sc-ico .ico { width: 13px; height: 13px; }
.sc-title { flex: 1; min-width: 0; line-height: 1.35; }
.sc-min { font-size: .68rem; color: rgba(221, 232, 227, .45); }
.side-curriculum li.is-current a { background: rgba(197, 155, 72, .2); color: #FBF8F2; box-shadow: inset 2px 0 0 var(--gold); }
.side-curriculum li.is-current .sc-ico { color: var(--gold-soft); }
.side-curriculum li.is-done .sc-ico { color: #7FC79E; }
.side-curriculum li.is-locked .sc-locked { color: rgba(221, 232, 227, .38); }
.side-curriculum li.is-locked .sc-ico { color: rgba(221, 232, 227, .3); }
.side-actions { display: grid; gap: 8px; margin-top: auto; }
.side-actions .btn-block { justify-content: flex-start; color: #EAF1ED; border-color: rgba(255, 255, 255, .22); }
.side-actions .btn-block:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.side-actions .ico { width: 15px; height: 15px; }

/* ------------------------------------------------------------- responsive --- */
@media (max-width: 1100px) {
  .theater-grid { grid-template-columns: minmax(0, 1fr) 300px; }
}
@media (max-width: 960px) {
  .theater-grid { grid-template-columns: minmax(0, 1fr); }
  .theater-side {
    position: static; max-height: none; border-left: 0;
    border-top: 1px solid rgba(197, 155, 72, .22);
    order: 2;
  }
  .theater-main { padding: 14px 14px 32px; }
  .theater-brand strong, .theater-brand small { max-width: 52vw; }
  .theater-progress { order: 3; }
}
@media (max-width: 640px) {
  .theater-bar { padding: 10px 12px; }
  .theater-user-name { display: none; }
  .tp-bar { width: 56px; }
  .lesson-head { flex-direction: column; }
  .done-form { width: 100%; }
  .done-form .btn { width: 100%; }
  .card-soft { padding: 18px 16px; }
  .practice-box { flex-direction: column; gap: 10px; padding: 16px; }
  .lesson-nav-btn { max-width: 100%; width: 100%; }
  .lesson-nav-btn.is-next { margin-left: 0; }
  .wm { font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .wm-1, .wm-2, .wm-badge { animation: none; }
  .wm-1 { top: 24%; left: 12%; }
  .wm-2 { top: 70%; left: 50%; }
}
@media print {
  .theater-bar, .theater-side, .lesson-nav { display: none !important; }
  .theater-body { background: #fff; }
}
