/* ==========================================================================
   feature.css : Styles used ONLY on feature pages (e.g., ai-roleplays.html)
   ========================================================================== */

/* ===== FEATURE ACCENT ===== */
body[data-feature="simulation"] { --feature-accent: var(--accent-purple); }
body[data-feature="restitution"] { --feature-accent: var(--accent-blue); }
body[data-feature="coaching"]    { --feature-accent: var(--accent-green); }
body[data-feature="podcast"]     { --feature-accent: var(--accent-orange); }
body[data-feature="flashcard"]   { --feature-accent: var(--accent-blue); }
body[data-feature="quiz"]        { --feature-accent: var(--accent-purple); }

/* ===== FEATURE PAGE OVERRIDES ===== */
.main-container {
  padding-top: 72px;
}

/* ===== HERO OVERRIDES ===== */
.hero {
  padding: 120px 32px 80px;
  padding-top: 72px;
}

.hero-badge span {
  padding: 5px 12px;
  background: var(--feature-accent);
  color: #fff;
}

.hero h1 {
  font-size: clamp(32px, 3.5vw, 46px);
  line-height: 1.08;
}

.hero p {
  font-size: 17px;
  max-width: 480px;
  margin: 0 0 36px;
  line-height: 1.55;
}

.hero-buttons {
  flex-wrap: wrap;
}

/* Hero visual : illustration area */
.hero-visual {
  aspect-ratio: auto;
  background: transparent;
  border-radius: 14px;
  border: none;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== SECTION OVERRIDES ===== */
.section {
  padding: 100px 32px;
}

.section-badge {
  color: var(--feature-accent);
}

.section-desc {
  font-size: 16px;
  max-width: 560px;
  line-height: 1.55;
}

.feature-card p {
  font-size: 13.5px;
  line-height: 1.5;
}

/* ===== HERO : Live Simulation with Image + Dialogue ===== */
.hero-sim-live {
  display: flex;
  align-items: stretch;
  gap: 24px;
  width: 100%;
}

/* Image wrapper : left side */
.sim-live-img-wrapper {
  position: relative;
  flex: 0 0 55%;
  border-radius: 14px;
  overflow: hidden;
  border: 1.5px solid var(--border-strong);
  box-shadow: 0 8px 40px rgba(17, 25, 39, 0.10);
  background: var(--bg-card);
  z-index: 2;
}

.sim-live-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* Dialogue prompter : right side */
.sim-live-dialogue {
  flex: 1;
  position: relative;
  overflow: hidden;
  mask-image: linear-gradient(to bottom, transparent 0%, black 25%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 25%);
}

.sim-live-dialogue-track {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 1s cubic-bezier(0.25, 1, 0.5, 1);
}

.sim-dialogue-msg {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 12.5px;
  line-height: 1.45;
  box-shadow: 0 4px 20px rgba(17, 25, 39, 0.08);
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.sim-dialogue-msg.visible {
  opacity: 1;
}

.sim-dialogue-msg.msg-ai {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-primary);
}

.sim-dialogue-msg.msg-user {
  background: var(--text-primary);
  color: var(--bg);
}

.sim-dialogue-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 3px;
}

.msg-ai .sim-dialogue-label {
  color: var(--feature-accent);
}

.msg-user .sim-dialogue-label {
  color: rgba(255, 255, 255, 0.45);
}

/* Bottom controls : voice state bar */
.sim-live-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px;
  z-index: 3;
}

/* Live badge : top corner of image */
.sim-live-badge-corner {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(239, 68, 68, 0.9);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 5px;
  z-index: 3;
}

.sim-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  animation: livePulse 1.5s ease-in-out infinite;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Voice state indicator : parle / écoute */
.sim-voice-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 10px 16px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  pointer-events: none;
  transition: background 0.4s ease, border-color 0.4s ease;
}

/* State: speaking (AI talks) */
.sim-voice-state.speaking {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.18);
}

/* Icon container : holds both icons, toggles visibility */
.voice-state-icon {
  position: relative;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Voice bars : equalizer for "parle" */
.voice-bars {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sim-voice-state.speaking .voice-bars {
  opacity: 1;
}

.voice-bar {
  width: 3px;
  border-radius: 2px;
  background: #fff;
}

.voice-bar:nth-child(1) { height: 35%; }
.voice-bar:nth-child(2) { height: 65%; }
.voice-bar:nth-child(3) { height: 45%; }
.voice-bar:nth-child(4) { height: 75%; }

.sim-voice-state.speaking .voice-bar {
  animation: voiceBar 0.55s ease-in-out infinite alternate;
}

.sim-voice-state.speaking .voice-bar:nth-child(1) { animation-delay: 0s; }
.sim-voice-state.speaking .voice-bar:nth-child(2) { animation-delay: 0.12s; }
.sim-voice-state.speaking .voice-bar:nth-child(3) { animation-delay: 0.24s; }
.sim-voice-state.speaking .voice-bar:nth-child(4) { animation-delay: 0.08s; }

@keyframes voiceBar {
  0%   { transform: scaleY(0.3); }
  100% { transform: scaleY(1); }
}

/* Listen ring : pulsing dot for "écoute" */
.voice-listen-ring {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sim-voice-state.listening .voice-listen-ring {
  opacity: 1;
}

.voice-listen-ring::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
}

.sim-voice-state.listening .voice-listen-ring::before {
  animation: listenPulse 1.8s ease-in-out infinite;
}

.voice-listen-ring::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
}

.sim-voice-state.listening .voice-listen-ring::after {
  animation: listenRing 1.8s ease-out infinite;
}

@keyframes listenPulse {
  0%, 100% { opacity: 0.5; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1); }
}

@keyframes listenRing {
  0% { transform: scale(1); opacity: 0.5; }
  100% { transform: scale(2.5); opacity: 0; }
}

/* Label */
.voice-state-label {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: opacity 0.3s ease;
}

/* Responsive : stack on mobile */
@media (max-width: 900px) {
  .hero-sim-live { flex-direction: column; }
  .sim-live-img-wrapper { flex: none; width: 100%; }
  .sim-live-dialogue {
    height: 200px;
    margin-top: 12px;
    mask-image: linear-gradient(to bottom, transparent 0%, black 20%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 20%);
  }
}

/* ===== STATS ROW ===== */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 40px;
}

.stat-item {
  background: var(--bg-card);
  border-radius: 14px;
  padding: 28px 24px;
  border: 1px solid var(--border);
  text-align: center;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
  line-height: 1;
}

.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ===== CREATION MODES ===== */
.creation-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 40px;
}

.creation-card {
  background: var(--bg-card);
  border-radius: 14px;
  padding: 32px 28px;
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.creation-card:hover {
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(17, 25, 39, 0.06);
}

.creation-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.creation-card-icon svg {
  width: 24px;
  height: 24px;
}

.creation-card h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.creation-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 16px;
}

.creation-card-features {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.creation-card-feature {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.creation-card-feature svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--feature-accent);
}

/* ===== METIERS CONTEXTS GRID ===== */
.contexts-wrapper {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.context-group {
  background: var(--bg-card);
  border-radius: 14px;
  padding: 24px 28px;
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.context-group:hover {
  border-color: var(--border-strong);
}

.context-group-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.context-group-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.context-group-icon svg {
  width: 18px;
  height: 18px;
}

.context-group-header h4 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.context-group-header a {
  margin-left: auto;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--feature-accent);
  text-decoration: none;
  transition: opacity 0.15s;
  white-space: nowrap;
}

.context-group-header a:hover {
  opacity: 0.7;
}

.context-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.context-tag {
  font-size: 13px;
  padding: 7px 16px;
  border-radius: 9999px;
  font-weight: 450;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  transition: all 0.15s;
}

.context-tag:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
  background: var(--bg-card-hover);
}

/* ===== VARIANT SYSTEM VISUAL ===== */
.variant-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  align-items: center;
  margin-top: 40px;
}

.variant-content h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.variant-content p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.variant-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.variant-feature {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.variant-feature-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.variant-feature-icon svg {
  width: 14px;
  height: 14px;
}

.variant-feature-text h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

.variant-feature-text p {
  font-size: 13px;
  color: var(--text-tertiary);
  line-height: 1.4;
  margin-bottom: 0;
}

/* ===== VARIANT TREE ASSET ===== */
.variant-tree {
  background: var(--bg-elevated);
  border: 1.5px solid var(--border-strong);
  border-radius: 16px;
  padding: 32px 24px;
  box-shadow: 0 8px 40px rgba(17, 25, 39, 0.07);
  position: relative;
  overflow: hidden;
}

.vt-module-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.vt-module-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Root simulation */
.vt-root {
  background: var(--text-primary);
  color: var(--bg);
  border-radius: 10px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
  position: relative;
  z-index: 2;
}

.vt-root-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.vt-root-icon svg {
  width: 14px;
  height: 14px;
}

.vt-root-text {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
}

.vt-root-text span {
  display: block;
  font-size: 10px;
  font-weight: 400;
  opacity: 0.5;
  margin-top: 2px;
}

.vt-root-badge {
  margin-left: auto;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 20px;
  background: rgba(255,255,255,0.12);
  white-space: nowrap;
}

/* Connector lines */
.vt-connector {
  display: flex;
  justify-content: center;
  padding: 0;
  position: relative;
  height: 32px;
}

.vt-connector::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 1.5px;
  height: 100%;
  background: var(--border-strong);
}

/* Branch connectors */
.vt-branches {
  position: relative;
  padding-top: 0;
}

.vt-branches::before {
  content: '';
  position: absolute;
  top: 0;
  left: 12.5%;
  right: 12.5%;
  height: 1.5px;
  background: var(--border-strong);
}

.vt-branch-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  position: relative;
}

.vt-branch-connector {
  display: flex;
  justify-content: center;
  height: 20px;
  position: relative;
}

.vt-branch-connector::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 1.5px;
  height: 100%;
  background: var(--border-strong);
}

/* Variant cards */
.vt-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  transition: all 0.2s;
}

.vt-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(17, 25, 39, 0.06);
}

.vt-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.vt-card-number {
  font-size: 9px;
  font-weight: 700;
  font-family: var(--font-mono);
  width: 18px;
  height: 18px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.vt-card-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

.vt-card-desc {
  font-size: 11px;
  color: var(--text-tertiary);
  line-height: 1.35;
  margin-bottom: 10px;
}

.vt-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vt-difficulty {
  font-size: 9.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.vt-difficulty.easy {
  background: rgba(34, 197, 94, 0.1);
  color: #16a34a;
}

.vt-difficulty.medium {
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
}

.vt-difficulty.hard {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}

.vt-type {
  font-size: 9.5px;
  color: var(--text-quaternary);
  font-weight: 500;
}

/* Module progress indicator */
.vt-module-footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.vt-progress-bar {
  flex: 1;
  height: 4px;
  background: var(--bg-card);
  border-radius: 2px;
  overflow: hidden;
}

.vt-progress-fill {
  height: 100%;
  width: 33%;
  background: var(--feature-accent);
  border-radius: 2px;
  transition: width 0.5s ease;
}

.vt-progress-label {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-tertiary);
  white-space: nowrap;
}

/* ===== EXPERIENCE SECTION (how learners pass simulations) ===== */
.experience-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 40px;
}

.experience-card {
  background: var(--bg-card);
  border-radius: 14px;
  padding: 28px;
  border: 1px solid var(--border);
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
}

.experience-card:hover {
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(17, 25, 39, 0.06);
}

.experience-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.experience-card-icon svg {
  width: 24px;
  height: 24px;
}

.experience-card h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.experience-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 16px;
}

.experience-card-link {
  margin-top: auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--feature-accent);
  text-decoration: none;
  transition: opacity 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.experience-card-link:hover {
  opacity: 0.7;
}

/* ===== STEPS OVERVIEW ===== */
.steps-overview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 40px;
}

.step-overview-card {
  background: var(--bg-card);
  border-radius: 14px;
  padding: 28px;
  border: 1px solid var(--border);
  transition: all 0.2s;
  text-align: center;
}

.step-overview-card:hover {
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(17, 25, 39, 0.06);
}

.step-overview-number {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--feature-accent);
  margin-bottom: 12px;
  line-height: 1;
  letter-spacing: -0.03em;
}

.step-overview-card h4 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.step-overview-card p {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ===== CTA OVERRIDES ===== */
.cta-section h2 {
  font-size: clamp(28px, 3.5vw, 40px);
}

.cta-section p {
  max-width: 480px;
  margin: 0 auto 32px;
  line-height: 1.55;
}

.cta-buttons {
  flex-wrap: wrap;
}

/* ===== FOOTER OVERRIDES ===== */
.footer {
  padding: 32px 64px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-tertiary);
}

.footer::before {
  display: none;
}

/* ===== RESPONSIVE : Feature Pages ===== */
@media (max-width: 900px) {
  .hero { padding: 60px 32px 48px; }
  .section { padding: 60px 24px; }
  .creation-grid { grid-template-columns: 1fr; }
  .variant-layout { grid-template-columns: 1fr; }
  .variant-tree { margin-top: 24px; }
  .vt-branch-grid { grid-template-columns: 1fr; gap: 8px; }
  .vt-branches::before { display: none; }
  .vt-branch-connector { display: none; }
  .experience-grid { grid-template-columns: 1fr; }
  .steps-overview { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .cta-section { padding: 60px 24px; }
  .footer { padding: 32px 24px; }
}

@media (max-width: 600px) {
  .hero h1 { font-size: 28px; }
  .stats-row { grid-template-columns: 1fr; }
}

/* ===== VOCAL BUILDER : animated asset ===== */
.vb {
  width: 100%;
  height: 620px;
  background: var(--bg-elevated);
  border-radius: 16px;
  border: 1px solid var(--border-strong);
  box-shadow: 0 4px 32px rgba(17, 25, 39, 0.06), 0 1px 2px rgba(17, 25, 39, 0.03);
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  margin-top: 32px;
}

.vb-left {
  padding: 22px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
}

/* Voice card */
.vb-vc {
  background: var(--bg);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--border);
  transition: border-color 0.4s, box-shadow 0.4s;
  flex-shrink: 0;
}

/* Avatar */
.vb-orb-w { position: relative; width: 48px; height: 48px; flex-shrink: 0; }
.vb-orb {
  width: 48px; height: 48px; overflow: hidden;
  position: relative; z-index: 2;
}
.vb-avatar-img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.3s ease;
}

.vb-orb-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1.5px solid rgba(34, 197, 94, 0.2);
  opacity: 0; z-index: 1;
}
.vb-vc.active.speaking .vb-orb-ring { animation: vbOrbPulse 1.4s ease-out infinite; }
.vb-vc.active.listening .vb-orb-ring { animation: vbOrbPulse 2s ease-out infinite; border-color: rgba(124, 92, 252, 0.2); }
.vb-orb-ring:nth-child(2) { animation-delay: 0.5s !important; }

@keyframes vbOrbPulse {
  0% { transform: scale(1); opacity: 0.45; }
  100% { transform: scale(1.55); opacity: 0; }
}

/* Voice info */
.vb-vi { flex: 1; min-width: 0; }
.vb-vi-name { font-size: 13.5px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 1px; }
.vb-vi-sub { font-size: 13px; color: var(--text-tertiary); }

/* State badge */
.vb-badge {
  padding: 5px 10px; border-radius: 20px;
  font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em;
  background: rgba(17, 25, 39, 0.04); color: var(--text-tertiary);
  transition: all 0.3s; white-space: nowrap;
  display: flex; align-items: center; gap: 5px;
}
.vb-vc.active.speaking .vb-badge { background: rgba(34, 197, 94, 0.08); color: #16a34a; }
.vb-vc.active.listening .vb-badge { background: rgba(124, 92, 252, 0.08); color: #7C5CFC; }
.vb-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: 0.5; }
.vb-vc.active .vb-dot { animation: vbDotPulse 1.2s ease-in-out infinite; }
.vb-vc.active.speaking .vb-dot { display: none; }
@keyframes vbDotPulse { 0%,100% { opacity: 0.7; } 50% { opacity: 0.2; } }

/* Badge waveform (speaking) */
.vb-badge-bars {
  display: none; align-items: center; gap: 1.5px; height: 12px;
}
.vb-vc.active.speaking .vb-badge-bars { display: flex; }
.vb-badge-bar {
  width: 2px; border-radius: 1px; background: currentColor;
}
.vb-badge-bar:nth-child(1) { height: 35%; }
.vb-badge-bar:nth-child(2) { height: 65%; }
.vb-badge-bar:nth-child(3) { height: 45%; }
.vb-badge-bar:nth-child(4) { height: 75%; }
.vb-vc.active.speaking .vb-badge-bar {
  animation: vbBadgeBar 0.55s ease-in-out infinite alternate;
}
.vb-vc.active.speaking .vb-badge-bar:nth-child(1) { animation-delay: 0s; }
.vb-vc.active.speaking .vb-badge-bar:nth-child(2) { animation-delay: 0.12s; }
.vb-vc.active.speaking .vb-badge-bar:nth-child(3) { animation-delay: 0.24s; }
.vb-vc.active.speaking .vb-badge-bar:nth-child(4) { animation-delay: 0.08s; }
@keyframes vbBadgeBar { 0% { transform: scaleY(0.3); } 100% { transform: scaleY(1); } }

/* Transcript */
.vb-tx {
  flex: 1; position: relative; overflow: hidden;
  border-radius: 12px; background: var(--bg); border: 1px solid var(--border);
}
.vb-tx-label {
  position: absolute; top: 0; left: 0; right: 0;
  padding: 10px 14px;
  font-size: 9.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-tertiary);
  display: flex; align-items: center; gap: 5px;
  z-index: 2;
  background: linear-gradient(to bottom, var(--bg) 60%, transparent 100%);
}
.vb-tx-label svg { width: 11px; height: 11px; opacity: 0.4; }

.vb-tx-scroll {
  position: absolute; inset: 0; overflow: hidden;
  mask-image: linear-gradient(to bottom, transparent 0%, black 18%, black 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 18%, black 100%);
}
.vb-tx-track {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; flex-direction: column; gap: 8px;
  padding: 0 12px 24px;
  transition: transform 1s cubic-bezier(0.25, 1, 0.5, 1);
}

.vb-msg {
  padding: 9px 13px; border-radius: 11px;
  font-size: 13.5px; line-height: 1.45;
  flex-shrink: 0; opacity: 0;
  transition: opacity 0.8s ease;
}
.vb-msg.visible { opacity: 1; }
.vb-msg-lbl {
  display: block; font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 2px;
}
.vb-msg.ai {
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-primary); align-self: flex-start; max-width: 90%;
}
.vb-msg.ai .vb-msg-lbl { color: #22C55E; }
.vb-msg.user {
  background: var(--text-primary); color: #fff;
  align-self: flex-end; max-width: 90%;
}
.vb-msg.user .vb-msg-lbl { color: rgba(255,255,255,0.4); }

/* Right panel */
.vb-right { display: flex; flex-direction: column; overflow: hidden; }
.vb-rh {
  padding: 14px 22px 10px;
  font-size: 9.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-tertiary);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 5px;
  flex-shrink: 0;
}
.vb-rh svg { width: 11px; height: 11px; opacity: 0.4; }

.vb-fields {
  flex: 1; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: rgba(17,25,39,0.08) transparent;
}
.vb-fields::-webkit-scrollbar { width: 4px; }
.vb-fields::-webkit-scrollbar-thumb { background: rgba(17,25,39,0.1); border-radius: 4px; }

.vb-f {
  padding: 13px 22px; border-bottom: 1px solid var(--border);
  position: relative; transition: background 0.4s;
}
.vb-f:last-child { border-bottom: none; }
.vb-f.loading { background: rgba(34, 197, 94, 0.02); }
.vb-f.filling { background: rgba(34, 197, 94, 0.03); }
.vb-f::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 2.5px; background: #22C55E; border-radius: 0 2px 2px 0;
  opacity: 0; transform: scaleY(0); transition: opacity 0.3s, transform 0.3s;
}
.vb-f.filling::before { opacity: 1; transform: scaleY(1); }

.vb-f-label {
  font-size: 12.5px; font-weight: 600; color: var(--text-primary);
  margin-bottom: 3px; display: flex; align-items: center; gap: 6px;
  letter-spacing: -0.01em; line-height: 1;
}
.vb-f-chk {
  width: 14px; height: 14px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; opacity: 0; transform: scale(0.5);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  background: #22C55E;
}
.vb-f-chk.visible { opacity: 1; transform: scale(1); }
.vb-f-chk svg { width: 8px; height: 8px; color: #fff; }

/* Loading spinner */
.vb-f-spin {
  width: 0; height: 14px; border-radius: 50%;
  border: 1.5px solid rgba(34, 197, 94, 0.15);
  border-top-color: #22C55E;
  flex-shrink: 0; opacity: 0; overflow: hidden;
  transition: width 0.3s, opacity 0.3s;
}
.vb-f.loading .vb-f-spin { width: 14px; opacity: 1; animation: vbSpin 0.7s linear infinite; }
@keyframes vbSpin { to { transform: rotate(360deg); } }

.vb-f-desc {
  font-size: 13px; line-height: 1.4; color: var(--text-tertiary);
  transition: opacity 0.4s, max-height 0.4s;
  max-height: 44px; overflow: hidden;
}
.vb-f-desc.hidden { opacity: 0; max-height: 0; }

.vb-f-val {
  font-size: 13.5px; line-height: 1.45;
  color: var(--text-primary); font-weight: 500;
  opacity: 0; max-height: 0; overflow: hidden;
  transition: opacity 0.35s, max-height 0.35s;
}
.vb-f-val.visible { opacity: 1; max-height: 60px; margin-top: 2px; }

.vb-f-src {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11.5px; font-weight: 500; color: #22C55E;
  opacity: 0; transition: opacity 0.4s; margin-top: 4px;
}
.vb-f-src.visible { opacity: 1; }
.vb-f-src svg { width: 9px; height: 9px; }

.vb-cur {
  display: inline-block; width: 1.5px; height: 12px;
  background: #22C55E; margin-left: 1px; vertical-align: text-bottom;
  animation: vbBlink 0.55s ease-in-out infinite;
}
@keyframes vbBlink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }

/* ===== PODCAST PLAYER ASSET ===== */
.podcast-player-asset {
  width: 100%;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border-strong);
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(17, 25, 39, 0.10);
  overflow: hidden;
}

.pp-cover {
  width: 100%;
  aspect-ratio: 16 / 7;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(245, 158, 11, 0.02));
}

.pp-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pp-info {
  padding: 20px 24px 0;
}

.pp-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  line-height: 1.25;
}

.pp-desc {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 0;
}

.pp-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px 20px;
}

.pp-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  transition: opacity 0.15s;
}

.pp-btn:hover { opacity: 0.6; }

.pp-btn--play {
  background: var(--text-primary);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  padding: 0;
}

.pp-btn--play:hover { opacity: 0.85; }

.pp-time {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-tertiary);
  min-width: 90px;
  text-align: center;
  white-space: nowrap;
}

.pp-progress {
  flex: 1;
  min-width: 80px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
}

.pp-progress-bar {
  width: 100%;
  height: 100%;
  position: relative;
}

.pp-progress-fill {
  height: 100%;
  background: var(--text-primary);
  border-radius: 2px;
  width: 0%;
  transition: width 0.1s linear;
}

/* Volume */
.pp-volume-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-tertiary);
}

.pp-volume {
  -webkit-appearance: none;
  appearance: none;
  width: 72px;
  height: 3px;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  background: linear-gradient(to right, var(--text-primary) 100%, var(--border) 100%);
}

.pp-volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-primary);
  cursor: pointer;
}

.pp-volume::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-primary);
  border: none;
  cursor: pointer;
}

.pp-volume::-moz-range-track {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
}

.pp-volume::-moz-range-progress {
  height: 3px;
  background: var(--text-primary);
  border-radius: 2px;
}

/* ===== PODCAST SCRIPT LAYOUT ===== */
.podcast-script-layout {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 48px;
  align-items: center;
  margin-top: 40px;
}

.podcast-script-content h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.podcast-script-content p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

.podcast-tags-demo {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.podcast-tag {
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: #E91E8C;
}

.podcast-script-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.podcast-script-feature {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.podcast-script-feature svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--feature-accent);
}

/* Script visual */
.podcast-script-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.podcast-script-img {
  width: 100%;
  border-radius: 14px;
  border: 1.5px solid var(--border-strong);
  box-shadow: 0 8px 40px rgba(17, 25, 39, 0.10);
  display: block;
}

/* Podcast responsive */
@media (max-width: 900px) {
  .podcast-script-layout { grid-template-columns: 1fr; }
  .podcast-script-visual { margin-top: 24px; }
  .pp-controls { gap: 10px; flex-wrap: wrap; }
  .pp-volume-wrap { display: none; }
  .pp-progress { min-width: 100%; order: 10; }
}

/* Vocal builder responsive */
@media (max-width: 900px) {
  .vb { grid-template-columns: 1fr; height: auto; }
  .vb-left { border-right: none; border-bottom: 1px solid var(--border); min-height: 320px; }
  .vb-right { min-height: 280px; }
  .vb-orb-w, .vb-orb { width: 38px; height: 38px; }
}

/* ===== FLASHCARD DECK ASSET ===== */
.fc-deck {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  position: relative;
  user-select: none;
}

.fc-stack {
  position: relative;
  margin-bottom: 16px;
}

/* Ghost cards behind the active card */
.fc-ghost {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 92%;
  height: 100%;
  border-radius: 18px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  transform: translateX(-50%);
  pointer-events: none;
}

.fc-ghost--2 {
  width: 84%;
  bottom: -10px;
  opacity: 0.4;
  z-index: 1;
}

.fc-ghost--1 {
  width: 92%;
  bottom: -5px;
  opacity: 0.7;
  z-index: 2;
}

/* Active card */
.fc-card {
  position: relative;
  z-index: 3;
  perspective: 800px;
}

.fc-card-inner {
  position: relative;
  width: 100%;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.fc-card-inner.flipped {
  transform: rotateY(180deg);
}

.fc-card-front,
.fc-card-back {
  border-radius: 18px;
  padding: 40px 32px 32px;
  display: flex;
  flex-direction: column;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow: 0 8px 40px rgba(17, 25, 39, 0.12);
  min-height: 380px;
}

.fc-card-front {
  background: var(--text-primary);
  color: #fff;
  border: 1.5px solid var(--border-strong);
}

.fc-card-back {
  position: absolute;
  inset: 0;
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1.5px solid var(--border-strong);
  transform: rotateY(180deg);
}

p.fc-card-text {
  flex: 1;
  font-family: var(--font-display);
  font-size: clamp(17px, 2.2vw, 20px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
  display: flex;
  align-items: flex-start;
  color: inherit;
  max-width: none;
  margin: 0;
}

.fc-card-front p.fc-card-text {
  font-size: clamp(22px, 2.8vw, 28px);
  color: #ffffff;
}

.fc-card-back p.fc-card-text {
  font-size: clamp(17px, 2.2vw, 20px);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--text-secondary);
}

.fc-card-front .fc-reveal-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  padding: 12px 0;
  text-align: center;
  transition: color 0.15s;
  margin-top: auto;
}

.fc-card-front .fc-reveal-btn:hover {
  color: rgba(255, 255, 255, 0.8);
}

.fc-card-back .fc-reveal-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  padding: 12px 0;
  text-align: center;
  transition: color 0.15s;
  margin-top: auto;
  color: var(--text-tertiary);
}

.fc-card-back .fc-reveal-btn:hover {
  color: var(--text-secondary);
}

/* Navigation arrows */
.fc-controls {
  position: absolute;
  top: 50%;
  left: -56px;
  right: -56px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  transform: translateY(-50%);
  z-index: 10;
}

.fc-nav-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  transition: all 0.15s;
  box-shadow: 0 2px 8px rgba(17, 25, 39, 0.06);
}

.fc-nav-btn:hover {
  border-color: var(--feature-accent);
  color: var(--feature-accent);
  transform: scale(1.05);
}

/* Footer: restart + progress + counter */
.fc-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 4px;
}

.fc-restart-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  transition: color 0.15s;
  flex-shrink: 0;
}

.fc-restart-btn:hover {
  color: var(--text-primary);
}

.fc-progress {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  position: relative;
}

.fc-progress-fill {
  height: 100%;
  background: var(--feature-accent);
  border-radius: 2px;
  width: 0%;
  transition: width 0.3s ease;
}

.fc-progress-dot {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--feature-accent);
  transform: translate(-50%, -50%);
  transition: left 0.3s ease;
  box-shadow: 0 0 0 3px var(--bg);
}

.fc-counter {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  min-width: 40px;
  text-align: right;
}

/* Flashcard responsive */
.fc-nav-btn.fc-pulse,
.fc-reveal-btn.fc-pulse {
  animation: fc-pulse-ring 0.8s ease-in-out infinite alternate;
}
@keyframes fc-pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.5); transform: scale(1); }
  100% { box-shadow: 0 0 0 10px rgba(59, 130, 246, 0); transform: scale(1.15); }
}

@media (max-width: 900px) {
  .fc-deck { max-width: 360px; }
  .fc-card-front, .fc-card-back { min-height: 320px; }
  .fc-controls { left: -16px; right: -16px; }
  .fc-nav-btn { width: 36px; height: 36px; }
}

@media (max-width: 600px) {
  .fc-deck { max-width: 100%; }
  .fc-card-front, .fc-card-back { min-height: 300px; padding: 28px 24px 24px; }
  .fc-controls { left: -8px; right: -8px; }
}

/* ===== QUIZ INTERACTIVE ASSET ===== */
.qz-container {
  background: #ffffff;
  border-radius: 20px;
  padding: 40px 36px 28px;
  max-width: 540px;
  height: 600px;
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

p.qz-question {
  font-family: var(--font-body);
  font-size: clamp(16px, 2.2vw, 18px);
  font-weight: 600;
  line-height: 1.4;
  color: #18181B;
  margin: 0 0 24px 0;
  max-width: none;
  flex-shrink: 0;
}

.qz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.qz-option {
  display: block;
  width: 100%;
  text-align: left;
  background: #F4F4F5;
  border: 2px solid #E4E4E7;
  border-radius: 12px;
  padding: 16px 20px;
  font-family: var(--font-body);
  font-size: clamp(14px, 1.8vw, 16px);
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.qz-option:hover:not(.qz-disabled) {
  border-color: var(--feature-accent, #7C5CFC);
}

.qz-option.qz-disabled {
  cursor: default;
}

.qz-option.qz-correct {
  background: #ECFDF5;
  border-color: #22C55E;
}

.qz-option.qz-incorrect {
  background: #FEF2F2;
  border-color: #EF4444;
}

.qz-feedback {
  margin-top: 8px;
}

.qz-feedback-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 2px;
}

.qz-feedback-correct {
  color: #16A34A;
}

.qz-feedback-incorrect {
  color: #DC2626;
}

p.qz-feedback-text {
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-secondary);
  margin: 2px 0 0 0;
  max-width: none;
}

.qz-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  flex-shrink: 0;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.qz-progress {
  flex: 1;
  height: 6px;
  background: rgba(124, 92, 252, 0.15);
  border-radius: 3px;
  overflow: hidden;
}

.qz-progress-fill {
  height: 100%;
  width: 0%;
  background: #7C5CFC;
  border-radius: 3px;
  transition: width 0.4s ease;
}

.qz-counter {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-tertiary);
  white-space: nowrap;
}

.qz-next-btn {
  background: #18181B;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 10px 24px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.qz-next-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.qz-next-btn:hover:not(:disabled) {
  opacity: 0.85;
}

@media (max-width: 900px) {
  .qz-container { max-width: 400px; padding: 32px 24px 24px; height: 580px; }
}

@media (max-width: 600px) {
  .qz-container { max-width: 100%; padding: 24px 18px 20px; height: 560px; }
  .qz-header { flex-wrap: wrap; gap: 12px; }
  .qz-progress { order: 3; flex-basis: 100%; }
}
