/* Styles for new phases: movie, teach, presenter, tweaks */

/* ===== Movie ===== */
.movie-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: 480px;
  background: var(--bg-soft);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin: 8px 0 4px;
  border: 1px solid var(--line);
}

.movie-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 60%, #FBF7F0, var(--bg-soft));
  transition: background 24s ease;
}
.movie-bg.play {
  animation: bg-darken 26s ease forwards;
}
@keyframes bg-darken {
  0%   { background: radial-gradient(circle at 50% 60%, #FBF7F0, #F1EBE0); }
  60%  { background: radial-gradient(circle at 50% 60%, #F2DBC9, #E8C8B0); }
  85%  { background: radial-gradient(circle at 50% 60%, #D89878, #8E3F1E); }
  92%  { background: radial-gradient(circle at 50% 60%, #14110F, #14110F); }
  100% { background: radial-gradient(circle at 50% 60%, #FBF7F0, #F1EBE0); }
}

.movie-time {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "Inter", sans-serif;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  background: rgba(247, 243, 236, 0.9);
  padding: 6px 12px;
  border-radius: 99px;
  z-index: 10;
}
.movie-time.play .t-end { animation: time-emerge 22s ease forwards; }
@keyframes time-emerge {
  0% { color: var(--ink-3); }
  50% { color: var(--terra); }
  100% { color: var(--terra-deep); }
}

.movie-figure {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  opacity: 0.85;
}
.movie-stage > .movie-bg.play ~ .movie-figure {
  animation: figure-hunch 24s ease forwards;
}
@keyframes figure-hunch {
  0%   { transform: translateX(-50%) translateY(0) scale(1); opacity: 0.85; }
  60%  { transform: translateX(-50%) translateY(8px) scale(0.96); opacity: 0.92; }
  88%  { transform: translateX(-50%) translateY(16px) scale(0.9); opacity: 1; }
  92%  { transform: translateX(-50%) translateY(16px) scale(0.9); opacity: 0; }
  100% { transform: translateX(-50%) translateY(0) scale(1); opacity: 0.85; }
}

.movie-card {
  position: absolute;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 11px;
  line-height: 1.2;
  width: max-content;
  max-width: 130px;
  box-shadow: 0 8px 20px -8px rgba(28,24,22,0.18);
  opacity: 0;
  transform: var(--cx, none) scale(0.5);
  animation: card-in 22s ease forwards;
  z-index: 3;
}
@keyframes card-in {
  0%   { opacity: 0; transform: var(--cx, none) scale(0.5) rotate(-8deg); }
  4%   { opacity: 1; transform: var(--cx, none) scale(1.05) rotate(0deg); }
  6%   { opacity: 1; transform: var(--cx, none) scale(1) rotate(0deg); }
  85%  { opacity: 1; transform: var(--cx, none) scale(1) rotate(var(--r, 0deg)); }
  92%  { opacity: 0; transform: var(--cx, none) scale(0.95); }
  100% { opacity: 0; transform: var(--cx, none) scale(0.95); }
}
.movie-card:nth-child(odd) { --r: -3deg; }
.movie-card:nth-child(even) { --r: 4deg; }
.mc-time {
  font-family: "Inter", sans-serif;
  font-size: 9px;
  color: var(--terra);
  letter-spacing: 0.1em;
  margin-bottom: 2px;
  font-weight: 500;
}
.mc-text {
  font-family: var(--serif);
  font-size: 13px;
  color: var(--ink);
  text-wrap: balance;
}

.movie-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #14110F;
  color: #F7F3EC;
  z-index: 20;
  opacity: 0;
  pointer-events: none;
}
.movie-overlay.play {
  animation: overlay-final 26s ease forwards;
}
@keyframes overlay-final {
  0%, 88%  { opacity: 0; }
  92%      { opacity: 1; }
  100%     { opacity: 0; }
}
.mo-text {
  font-family: var(--serif);
  font-size: 26px;
  text-align: center;
  text-wrap: balance;
  margin: 4px 16px;
}
.mo-text-2 { color: var(--terra-soft); font-style: italic; }

.movie-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.1em;
  z-index: 30;
  box-shadow: 0 14px 30px -8px rgba(28,24,22,0.4);
}

/* ===== Teach phase ===== */
.teach-phase { padding-bottom: 140px; }
.teach-track {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
}
.teach-dot {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: var(--line);
  transition: background 300ms ease;
}
.teach-dot.done { background: var(--terra-soft); }
.teach-dot.current { background: var(--terra); }

.teach-letter {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 72px;
  line-height: 1;
  color: var(--terra);
  letter-spacing: -0.02em;
  margin: 8px 0 16px;
}

.teach-title { font-size: 32px; }

.teach-bullets {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 18px;
}
.teach-bullet {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.teach-bullet:last-child { border-bottom: none; }
.tb-mark {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--terra-soft);
  color: var(--terra-deep);
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tb-text {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.35;
  color: var(--ink);
  padding-top: 4px;
}

/* ===== Presenter / follower bars ===== */
.presenter-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 520px;
  background: var(--ink);
  color: var(--bg);
  padding: 14px 22px max(16px, env(safe-area-inset-bottom));
  z-index: 100;
  box-shadow: 0 -10px 30px -10px rgba(28,24,22,0.4);
}
.pb-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--terra-soft);
  margin-bottom: 8px;
  font-weight: 500;
}
.pb-buttons {
  display: flex;
  gap: 8px;
}
.pb-buttons button {
  flex: 1;
  background: rgba(247,243,236,0.1);
  color: var(--bg);
  border: 1px solid rgba(247,243,236,0.2);
  border-radius: 99px;
  padding: 12px 14px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 180ms ease;
}
.pb-buttons button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.pb-buttons button:hover:not(:disabled) {
  background: rgba(247,243,236,0.18);
}
.pb-buttons button.pb-primary {
  background: var(--terra);
  border-color: var(--terra);
}
.pb-buttons button.pb-primary:hover {
  background: var(--terra-deep);
}

.follower-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 520px;
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  padding: 14px 22px max(16px, env(safe-area-inset-bottom));
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 13px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}
.fb-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--terra);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

/* Presenter badge */
.presenter-badge {
  position: fixed;
  top: 12px;
  right: 14px;
  background: var(--terra);
  color: #fff;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  z-index: 200;
  box-shadow: 0 4px 10px -2px rgba(196,90,44,0.4);
}
