/* Parlensky Platform — Dark Theme, Audio-First */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --black: #0D0D0D;
  --black-light: #141414;
  --charcoal: #1A1A1A;
  --dark: #2A2A2A;
  --white: #FFFFFF;
  --off-white: #F2F2F2;
  --gray: #666666;
  --gray-dark: #333333;
  --gray-light: #999999;
  --mint: #00C896;
  --mint-light: #00E6AB;
  --mint-dark: #00A67D;
  --mint-glow: rgba(0, 200, 150, 0.15);
  --red: #FF4D4D;
  --red-soft: rgba(255, 77, 77, 0.15);
  --yellow: #FFB800;
  --yellow-soft: rgba(255, 184, 0, 0.15);
  --green: #00C896;
  --green-soft: rgba(0, 200, 150, 0.15);
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --header-h: 56px;
  --radius: 12px;
  --radius-sm: 8px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--black);
  color: var(--off-white);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

/* ═══════ HEADER ═══════ */
.app-header {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: var(--black-light);
  border-bottom: 1px solid var(--gray-dark);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 12px;
  z-index: 100;
}

.header-title {
  font-family: var(--font-display);
  font-size: 14px; font-weight: 500;
  color: rgba(255,255,255,0.65);
  white-space: nowrap;
}

.header-btn {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; color: var(--off-white);
  cursor: pointer; border-radius: 8px;
  transition: background 0.15s;
}
.header-btn:hover { background: var(--gray-dark); }
.header-btn.hidden { visibility: hidden; pointer-events: none; }

/* ═══════ WRAPPER UNIFICADO CREDITOS ═══════ */
@keyframes text-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@keyframes hbu-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); }
  50%       { box-shadow: 0 0 0 4px rgba(239,68,68,0.25); }
}

.header-buy-unified {
  display: none; /* visível via JS após carregar créditos */
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 11px;
  background: rgba(0,200,150,0.08);
  border: 1px solid rgba(0,200,150,0.35);
  border-radius: 18px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.header-buy-unified:hover {
  background: rgba(0,200,150,0.15);
  transform: scale(1.02);
}
.header-buy-unified:active { transform: scale(0.97); }

/* Texto shimmer — estado normal (>30%) */
.hbu-text {
  font-size: 12px; font-weight: 600;
  white-space: nowrap;
  background: linear-gradient(90deg, #00C896 0%, #FFD700 25%, #FF6B35 50%, #00C896 75%, #00C896 100%);
  background-size: 200% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: text-shimmer 4s linear infinite;
}

/* Barra inline */
.hbu-bar-track {
  width: 56px; height: 4px;
  background: #2a2a2a;
  border-radius: 2px; overflow: hidden;
  flex-shrink: 0;
}
.hbu-bar-fill {
  height: 100%; border-radius: 2px;
  transition: width 0.4s ease, background 0.4s ease;
  width: 0;
}

/* Contagem */
.hbu-count {
  font-size: 11px; font-weight: 600;
  color: rgba(255,255,255,0.85);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Estado urgente: saldo <= 30% */
.header-buy-unified.urgent {
  border-color: rgba(245,158,11,0.5);
  background: rgba(245,158,11,0.08);
}
.header-buy-unified.urgent .hbu-text {
  background: linear-gradient(90deg, #F59E0B 0%, #FBBF24 40%, #D97706 80%, #F59E0B 100%);
  background-size: 200% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: text-shimmer 3s linear infinite;
}

/* Estado crítico: saldo <= 10% */
.header-buy-unified.critical {
  border-color: rgba(239,68,68,0.6);
  background: rgba(239,68,68,0.1);
  animation: hbu-pulse 1.5s ease-in-out infinite;
}
.header-buy-unified.critical .hbu-text {
  background: linear-gradient(90deg, #EF4444 0%, #FFD700 40%, #EF4444 80%, #EF4444 100%);
  background-size: 200% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: text-shimmer 2s linear infinite;
}

/* Respeitar prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .hbu-text,
  .header-buy-unified.urgent .hbu-text,
  .header-buy-unified.critical .hbu-text,
  .header-buy-unified.critical {
    animation: none;
  }
}

/* ═══════ DROPDOWN MENU ═══════ */
.dropdown-menu {
  position: fixed; top: var(--header-h); right: 8px;
  background: var(--charcoal); border: 1px solid var(--gray-dark);
  border-radius: var(--radius-sm);
  padding: 4px 0; min-width: 180px;
  z-index: 200; display: none;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.dropdown-menu.open { display: block; }

.dropdown-item {
  display: block; width: 100%; padding: 10px 16px;
  background: none; border: none; color: var(--off-white);
  font: inherit; text-align: left; cursor: pointer;
}
.dropdown-item:hover { background: var(--gray-dark); }

/* ═══════ SCREENS ═══════ */
.screen {
  position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0;
  overflow-y: auto; display: none;
  -webkit-overflow-scrolling: touch;
}
.screen.active { display: block; }

.screen-content {
  max-width: 560px; margin: 0 auto;
  padding: 20px 16px 40px;
}

.screen-title {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 600;
  margin-bottom: 20px;
}

/* ═══════ LOGIN ═══════ */
.login-content {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; min-height: calc(100vh - var(--header-h));
  text-align: center; padding: 40px 24px;
}

.login-logo {
  width: 72px; height: 72px;
  background: var(--mint); color: var(--black);
  font-family: var(--font-display); font-weight: 700; font-size: 44px;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 24px;
}

.login-title { font-family: var(--font-display); font-size: 26px; margin-bottom: 8px; }
.login-subtitle { color: var(--gray-light); margin-bottom: 28px; }

.login-form { width: 100%; max-width: 360px; }
.login-form .input { margin-bottom: 12px; }

.login-message {
  margin-top: 16px; padding: 12px 16px;
  border-radius: var(--radius-sm); display: none;
  font-size: 14px;
}
.login-message.success { display: block; background: var(--green-soft); color: var(--mint); }
.login-message.error { display: block; background: var(--red-soft); color: var(--red); }

.login-no-account { margin-top: 32px; color: var(--gray-light); font-size: 13px; }

/* ═══════ FORM ELEMENTS ═══════ */
.input {
  width: 100%; padding: 12px 14px;
  background: var(--charcoal); color: var(--off-white);
  border: 1px solid var(--gray-dark); border-radius: var(--radius-sm);
  font: inherit; font-size: 15px;
  transition: border-color 0.2s;
  outline: none;
}
.input:focus { border-color: var(--mint); }
.input::placeholder { color: var(--gray); }

.select { appearance: none; cursor: pointer; padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23999' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}

.textarea { resize: vertical; min-height: 80px; }

.form-group { margin-bottom: 20px; }
.form-group label {
  display: block; font-weight: 500; margin-bottom: 6px;
  font-size: 14px; color: var(--off-white);
}
.form-hint { font-size: 13px; color: var(--gray-light); margin-bottom: 8px; }
.form-age { font-size: 13px; color: var(--gray-light); margin-left: 8px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 24px; border: none; border-radius: var(--radius-sm);
  font: inherit; font-weight: 600; font-size: 15px;
  cursor: pointer; transition: all 0.2s;
  text-decoration: none;
}
.btn-primary { background: var(--mint); color: var(--black); }
.btn-primary:hover { background: var(--mint-light); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-secondary { background: var(--gray-dark); color: var(--off-white); }
.btn-secondary:hover { background: var(--dark); }
.btn-outline { background: none; color: var(--off-white); border: 1px solid var(--gray-dark); }
.btn-outline:hover { border-color: var(--gray); }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 6px; }

.link { color: var(--mint); text-decoration: none; }
.link:hover { text-decoration: underline; }

/* ═══════ SPEED SLIDER ═══════ */
.speed-control { display: flex; align-items: center; gap: 12px; }
.slider {
  flex: 1; -webkit-appearance: none; appearance: none;
  height: 6px; background: var(--gray-dark); border-radius: 3px; outline: none;
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 20px; height: 20px;
  background: var(--mint); border-radius: 50%; cursor: pointer;
}
.speed-value { font-size: 14px; font-weight: 600; color: var(--mint); min-width: 40px; text-align: center; }

/* ═══════ LEVEL WORDS ═══════ */
.level-words { display: flex; flex-wrap: wrap; gap: 8px; }
.level-word {
  padding: 6px 14px; background: var(--charcoal);
  border: 1px solid var(--gray-dark); border-radius: 20px;
  font-size: 14px; cursor: pointer; transition: all 0.2s;
  user-select: none; color: var(--off-white);
}
.level-word.selected { background: var(--mint-glow); border-color: var(--mint); color: var(--mint); }

/* ═══════ VOICE GRID ═══════ */
.voice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.voice-pick { display: flex; flex-direction: column; gap: 4px; }
.voice-label-icon { font-size: 13px; font-weight: 600; color: var(--gray-light); }

/* ═══════ SAVE INDICATOR ═══════ */
.save-indicator {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--mint); color: var(--black); padding: 8px 20px;
  border-radius: 20px; font-size: 13px; font-weight: 600;
  opacity: 0; transition: opacity 0.3s;
  pointer-events: none; z-index: 50;
}
.save-indicator.visible { opacity: 1; }

/* ═══════ CONVERSATIONS LIST ═══════ */
.conv-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.conv-actions { display: flex; gap: 6px; }
.search-input { margin-bottom: 16px; }

.conv-list { display: flex; flex-direction: column; gap: 10px; }

.conv-card {
  background: var(--charcoal); border: 1px solid var(--gray-dark);
  border-radius: var(--radius); padding: 14px; cursor: pointer;
  transition: border-color 0.2s;
}
.conv-card:hover { border-color: var(--gray); }
.conv-card.initiation { border-color: var(--mint); border-width: 2px; }
.conv-card.conv-active-nav {
  border-color: var(--mint);
  background: var(--mint-glow);
  animation: convPulse 1.5s ease-in-out infinite;
}
@keyframes convPulse {
  0%, 100% { background: var(--mint-glow); }
  50% { background: rgba(0, 200, 150, 0.08); }
}

.conv-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.conv-emoji { font-size: 24px; }
.conv-title { font-weight: 600; font-size: 15px; flex: 1; }
.conv-status {
  font-size: 12px; padding: 4px 10px; border-radius: 12px;
  font-weight: 500; white-space: nowrap;
}
.conv-status.suggested { background: var(--yellow-soft); color: var(--yellow); }
.conv-status.generating, .conv-status.audio_pending { background: var(--mint-glow); color: var(--mint); }
.conv-status.ready { background: var(--green-soft); color: var(--green); }
.conv-status.error { background: var(--red-soft); color: var(--red); }

.conv-desc { font-size: 13px; color: var(--gray-light); margin-bottom: 10px; }

.conv-scores { display: flex; gap: 6px; flex-wrap: wrap; }
.score-bar {
  flex: 1; min-width: 60px; height: 6px;
  background: var(--gray-dark); border-radius: 3px;
  overflow: hidden; position: relative;
}
.score-bar-fill { height: 100%; border-radius: 3px; transition: width 0.5s; }
.score-bar-fill.low { background: var(--red); }
.score-bar-fill.mid { background: var(--yellow); }
.score-bar-fill.high { background: var(--green); }

.conv-scores-detail {
  display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px;
}
.score-detail {
  flex: 1; min-width: 60px; font-size: 11px; color: var(--gray-light);
  text-align: center; font-variant-numeric: tabular-nums;
  font-family: var(--font-display);
}

.conv-actions-row { display: flex; gap: 8px; margin-top: 10px; }
.conv-actions-bottom { margin-top: 10px; }
.conv-generating { display: flex; flex-direction: column; gap: 4px; }
.conv-gen-label { font-size: 13px; color: var(--mint); font-weight: 500; }
.conv-time-est { font-size: 12px; color: var(--gray-light); min-height: 16px; }
.conv-ready-actions { display: flex; gap: 8px; }
.conv-generate-btn { }
.conv-play-btn { }
.conv-lines-btn { }

/* ═══════ PROGRESS BAR (generation) ═══════ */
.progress-bar {
  height: 4px; background: var(--gray-dark); border-radius: 2px;
  overflow: hidden; margin-top: 8px;
}
.progress-bar-fill {
  height: 100%; background: var(--mint); border-radius: 2px;
  transition: width 0.5s; width: 0%;
}

/* ═══════ LINES VIEW — Chat Bubbles ═══════ */
.lines-header { margin-bottom: 16px; }
.lines-filters { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.filter-btn {
  padding: 6px 12px; background: var(--charcoal);
  border: 1px solid var(--gray-dark); border-radius: 16px;
  font-size: 12px; color: var(--off-white); cursor: pointer;
  transition: all 0.2s;
}
.filter-btn.active { background: var(--mint-glow); border-color: var(--mint); color: var(--mint); }

.lines-list { display: flex; flex-direction: column; gap: 8px; }

.chat-bubble {
  max-width: 85%; padding: 12px 14px;
  border-radius: 16px; cursor: pointer;
  transition: all 0.15s; position: relative;
}
.chat-bubble:active { transform: scale(0.98); }

.bubble-left {
  align-self: flex-start; margin-right: auto;
  background: var(--charcoal); border: 1px solid var(--gray-dark);
  border-bottom-left-radius: 4px;
}
.bubble-right {
  align-self: flex-end; margin-left: auto;
  background: var(--mint-glow); border: 1px solid rgba(0,200,150,0.3);
  border-bottom-right-radius: 4px;
}

.chat-bubble.correct { border-left: 3px solid var(--green); }
.chat-bubble.incorrect { border-left: 3px solid var(--red); }

.bubble-l2 { font-weight: 500; font-size: 15px; margin-bottom: 6px; line-height: 1.4; }
.bubble-l1-box {
  background: rgba(0,0,0,0.25); border-radius: 8px;
  padding: 6px 10px; cursor: pointer;
}
.bubble-l1 { font-size: 13px; color: var(--gray-light); }
.bubble-meta {
  display: flex; justify-content: flex-end; margin-top: 4px;
}
.line-fav {
  width: 36px; height: 36px; background: none; border: none;
  color: var(--gray); cursor: pointer; font-size: 24px;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.15s;
}
.line-fav:active { transform: scale(1.3); }
.line-fav.active { color: var(--red); }

/* ═══════ MODES ═══════ */
.modes-content {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; min-height: calc(100vh - var(--header-h));
  gap: 12px;
}

.modes-list { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 320px; }

.mode-btn {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px; background: var(--charcoal);
  border: 2px solid var(--gray-dark); border-radius: var(--radius);
  color: var(--off-white); font: inherit; font-size: 16px; font-weight: 500;
  cursor: pointer; transition: all 0.2s; width: 100%;
}
.mode-btn:hover, .mode-btn.mode-active { border-color: var(--mint); background: var(--mint-glow); }
.mode-btn.mode-exit { border-color: var(--red); }
.mode-btn.mode-exit:hover { background: var(--red-soft); }
.mode-icon { font-size: 22px; }

.sub-modes { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 320px; }
.mode-btn.sub { padding: 12px 16px; font-size: 14px; }

/* ═══════ ACTIVE CONVERSATION ═══════ */
.active-content {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; min-height: calc(100vh - var(--header-h));
  position: relative;
}

.active-status {
  position: absolute; top: 20px; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 20px;
}

.active-dots { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; max-width: 60%; }
.active-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gray-dark); transition: background 0.3s;
}
.active-dot.done { background: var(--mint); }
.active-dot.fail { background: var(--red); }
.active-dot.current { background: var(--yellow); animation: dotPulse 1s ease-in-out infinite; }
@keyframes dotPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.active-timer {
  font-family: var(--font-display);
  font-size: 14px; color: var(--gray-light);
  font-variant-numeric: tabular-nums;
}

.active-text {
  font-family: var(--font-display);
  font-size: 20px; font-weight: 500;
  text-align: center; padding: 0 24px;
  max-width: 400px; line-height: 1.4;
  min-height: 60px;
  overflow: hidden;
  word-break: break-word;
}
.active-heard {
  font-size: 18px; text-align: center; margin-top: 12px;
  padding: 8px 20px; border-radius: 10px;
  max-width: 400px; word-break: break-word;
  font-weight: 600;
}
.heard-correct { color: var(--mint); background: var(--green-soft); }
.heard-incorrect { color: var(--red); background: var(--red-soft); }

.active-status-text {
  font-size: 13px; color: var(--gray-light);
  text-align: center; margin-top: 8px;
  min-height: 20px;
}

.active-countdown {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(13, 13, 13, 0.9);
}
.countdown-number {
  font-family: var(--font-display);
  font-size: 96px; font-weight: 700;
  color: var(--mint);
  animation: countPulse 0.6s ease-out;
}
@keyframes countPulse {
  0% { transform: scale(0.5); opacity: 0; }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

.active-feedback {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.feedback-icon { font-size: 80px; animation: feedbackPop 0.5s ease-out; }
@keyframes feedbackPop {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.3); }
  100% { transform: scale(1); opacity: 1; }
}

.active-mic {
  position: absolute; bottom: 60px;
  display: flex; align-items: center; justify-content: center;
}
.mic-icon { width: 48px; height: 48px; color: var(--white); z-index: 2; }
.mic-ring {
  position: absolute; width: 100px; height: 100px;
  background: var(--red); border-radius: 50%;
  animation: micPulse 1s ease-in-out infinite;
}
@keyframes micPulse {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.1); opacity: 1; }
}

/* ═══════ POST-CONVERSATION MENU ═══════ */
.post-menu {
  position: fixed; inset: 0; top: var(--header-h);
  background: var(--black); z-index: 50;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 12px; padding: 40px 24px;
}
.post-title { font-family: var(--font-display); font-size: 20px; margin-bottom: 12px; }
.post-score {
  font-size: 48px; font-weight: 700;
  font-family: var(--font-display); color: var(--mint);
  margin-bottom: 4px;
}
.post-time {
  font-size: 14px; color: var(--gray-light);
  font-family: var(--font-display); font-variant-numeric: tabular-nums;
  margin-bottom: 20px;
}
.post-btn { width: 100%; max-width: 300px; }
.post-btn.post-active { border-color: var(--mint); background: var(--mint-glow); }

/* ═══════ MODAL ═══════ */
.modal {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0, 0, 0, 0.7);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.modal-content {
  background: var(--charcoal); border: 1px solid var(--gray-dark);
  border-radius: var(--radius); padding: 24px;
  width: 100%; max-width: 400px;
}
.modal-content h3 { font-family: var(--font-display); margin-bottom: 16px; }
.modal-content .input { margin-bottom: 16px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* ═══════ LOADING SPINNER ═══════ */
.spinner {
  display: inline-block; width: 20px; height: 20px;
  border: 2px solid var(--gray-dark);
  border-top-color: var(--mint); border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════ CONV DELETE ═══════ */
.conv-delete-btn {
  background: none; border: none; color: var(--gray);
  cursor: pointer; font-size: 16px; padding: 4px 8px;
  border-radius: 6px; transition: color 0.15s, background 0.15s;
}
.conv-delete-btn:hover { color: var(--red); background: var(--red-soft); }

/* ═══════ TOAST NOTIFICATIONS ═══════ */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  padding: 12px 24px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; z-index: 600;
  opacity: 0; transition: opacity 0.3s, transform 0.3s;
  max-width: 90vw; text-align: center;
  pointer-events: none;
}
.toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast-error { background: var(--red); color: var(--white); }
.toast-info { background: var(--mint); color: var(--black); }

/* ═══════ LANGUAGE SWITCH OVERLAY ═══════ */
.lang-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(13, 13, 13, 0.85);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}
.lang-overlay.visible { opacity: 1; pointer-events: auto; }
.lang-spinner { width: 36px; height: 36px; border-width: 3px; }

/* ═══════ TUTORIAL ═══════ */
.tutorial-content {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; min-height: calc(100vh - var(--header-h));
  gap: 24px; text-align: center;
}

.tutorial-card {
  background: var(--charcoal);
  border: 2px solid var(--mint);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.tutorial-card:hover { background: var(--mint-glow); }
.tutorial-card.completed {
  border-color: var(--gray-dark);
  opacity: 0.7;
}
.tutorial-card.completed:hover { opacity: 1; background: var(--mint-glow); }
.tutorial-card.conv-active-nav {
  border-color: var(--mint);
  background: var(--mint-glow);
  animation: convPulse 1.5s ease-in-out infinite;
}

.tutorial-card-top {
  display: flex; align-items: center; gap: 10px; margin-bottom: 8px;
}
.tutorial-card-emoji { font-size: 24px; }
.tutorial-card-title { font-weight: 600; font-size: 15px; flex: 1; }
.tutorial-card-badge {
  font-size: 12px; padding: 4px 10px; border-radius: 12px;
  font-weight: 500; white-space: nowrap;
}
.tutorial-card-badge.todo { background: var(--yellow-soft); color: var(--yellow); }
.tutorial-card-badge.done { background: var(--green-soft); color: var(--green); }

.tutorial-progress {
  display: flex; gap: 10px; justify-content: center;
}
.tutorial-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--gray-dark); transition: all 0.3s;
}
.tutorial-dot.active {
  background: var(--yellow);
  animation: dotPulse 1s ease-in-out infinite;
}
.tutorial-dot.done { background: var(--mint); }

.tutorial-step {
  display: flex; flex-direction: column;
  align-items: center; gap: 20px;
  padding: 20px;
}

.tutorial-icon {
  font-size: 48px; min-height: 60px;
  display: flex; align-items: center; justify-content: center;
}

.tutorial-instruction {
  font-family: var(--font-display);
  font-size: 18px; font-weight: 500;
  line-height: 1.5; max-width: 360px;
  color: var(--off-white);
}

.tutorial-status {
  font-size: 16px; font-weight: 600;
  min-height: 28px;
  transition: color 0.2s;
}
.tutorial-status.correct { color: var(--mint); }
.tutorial-status.wrong { color: var(--red); }

/* ═══════ TOGGLE SWITCH ═══════ */
.toggle-switch {
  position: relative; display: inline-block;
  width: 48px; height: 26px;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--gray-dark); border-radius: 26px;
  transition: background 0.3s;
}
.toggle-slider::before {
  content: ''; position: absolute;
  height: 20px; width: 20px; left: 3px; bottom: 3px;
  background: var(--off-white); border-radius: 50%;
  transition: transform 0.3s;
}
.toggle-switch input:checked + .toggle-slider { background: var(--mint); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(22px); }

/* ═══════ VISUAL CONTROLS (on-screen buttons) ═══════ */
.visual-controls {
  position: absolute; bottom: 20px; left: 0; right: 0;
  display: flex; justify-content: center; align-items: center;
  gap: 24px; z-index: 40;
  pointer-events: auto;
}
.vc-btn {
  width: 56px; height: 56px;
  border-radius: 50%; border: 2px solid var(--gray-dark);
  background: var(--charcoal); color: var(--off-white);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.vc-btn:active { transform: scale(0.92); }
.vc-mic {
  width: 68px; height: 68px;
  border-color: var(--mint); background: var(--mint-glow);
  color: var(--mint);
}
.vc-mic.vc-recording {
  border-color: var(--red); background: var(--red-soft);
  color: var(--red);
  animation: micPulse 1s ease-in-out infinite;
}
.vc-back:hover, .vc-next:hover { border-color: var(--gray-light); background: var(--dark); }

/* ═══════ CUSTOM TOPIC TEXTAREA ═══════ */
.custom-topic-textarea {
  min-height: 200px;
  max-height: 60vh;
  resize: vertical;
}

/* ═══════ PROFILE ACCOUNT CARD ═══════ */
.profile-account-card {
  background: var(--charcoal);
  border: 1px solid var(--gray-dark);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 24px;
  display: flex; flex-direction: column; gap: 10px;
}
.profile-account-row {
  display: flex; justify-content: space-between; align-items: center;
  gap: 8px;
}
.profile-account-label {
  font-size: 13px; color: var(--gray-light); flex-shrink: 0;
}
.profile-account-value {
  font-size: 13px; font-weight: 500; color: var(--off-white);
  text-align: right; word-break: break-all;
}

/* ═══════ CONV USER HEADER (saudacao) ═══════ */
.conv-user-header {
  padding: 12px 0 16px;
  border-bottom: 1px solid var(--gray-dark);
  margin-bottom: 16px;
}
.conv-greeting {
  font-family: var(--font-display);
  font-size: 18px; font-weight: 600;
  color: var(--off-white); margin-bottom: 8px;
}
.conv-stats {
  font-size: 13px; color: var(--gray-light);
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.conv-stats-bar {
  flex: 1; min-width: 60px; max-width: 120px;
  height: 4px; background: var(--gray-dark);
  border-radius: 2px; overflow: hidden;
}
.conv-stats-bar-fill {
  height: 100%; background: var(--mint);
  border-radius: 2px; transition: width 0.5s;
}

/* ═══════ RESPONSIVE ═══════ */
@media (max-width: 380px) {
  .screen-content { padding: 16px 12px 32px; }
  .conv-actions { flex-wrap: wrap; }
  .hbu-bar-track { width: 40px; }
  .hbu-text { font-size: 11px; }
  .header-buy-unified { padding: 0 8px; gap: 5px; }
}
