/* ==========================================================
   MOVIE TRANSLATOR AI — Stylesheet
   Mobile-First, OLED Dark Cinema Mode, iOS Safari Optimized
   ========================================================== */

:root {
  --bg-color: #070709;
  --card-bg: #111116;
  --card-border: #1e1e28;
  --accent-gold: #f59e0b;
  --accent-green: #10b981;
  --accent-blue: #3b82f6;
  --accent-cyan: #06b6d4;
  --accent-red: #ef4444;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-glow: 0 0 25px rgba(16, 185, 129, 0.25);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-family);
  min-height: 100vh;
  min-height: -webkit-fill-available;
  display: flex;
  flex-direction: column;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  overflow-x: hidden;
}

.app-container {
  max-width: 540px;
  margin: 0 auto;
  width: 100%;
  padding: 16px 20px 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}

/* Header */
.app-header {
  text-align: center;
  padding-top: 8px;
}

.logo-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.app-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #ffffff;
  margin-bottom: 6px;
}

.lang-pills {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}

.pill {
  padding: 4px 12px;
  border-radius: 20px;
}

.pill-src {
  background: #1f2937;
  color: #e5e7eb;
}

.pill-arrow {
  color: var(--accent-gold);
  font-size: 16px;
}

.pill-dst {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

/* Main Card */
.main-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Status Badge */
.status-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.error-banner {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid #ef4444;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: #fca5a5;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  line-height: 1.4;
  margin-bottom: 12px;
  word-break: break-word;
}

.error-banner.hidden {
  display: none;
}

.hidden {
  display: none !important;
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  transition: all 0.3s ease;
}

/* Status States */
.status-indicator.disconnected {
  background: rgba(156, 163, 175, 0.1);
  color: var(--text-muted);
  border: 1px solid rgba(156, 163, 175, 0.2);
}
.status-indicator.disconnected .status-dot {
  background: #6b7280;
}

.status-indicator.connecting {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-gold);
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.status-indicator.connecting .status-dot {
  background: var(--accent-gold);
  animation: pulse 1s infinite alternate;
}

.status-indicator.listening {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
}
.status-indicator.listening .status-dot {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulse 1.5s infinite alternate;
}

.status-indicator.translating {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.5);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.3);
}
.status-indicator.translating .status-dot {
  background: #fbbf24;
  box-shadow: 0 0 8px #fbbf24;
  animation: pulse 0.8s infinite alternate;
}

.status-indicator.speaking {
  background: rgba(6, 182, 212, 0.2);
  color: #22d3ee;
  border: 1px solid rgba(6, 182, 212, 0.5);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.35);
}
.status-indicator.speaking .status-dot {
  background: #22d3ee;
  box-shadow: 0 0 10px #22d3ee;
  animation: ripple 1s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.7; }
  100% { transform: scale(1.2); opacity: 1; }
}

@keyframes ripple {
  0% { transform: scale(0.8); }
  50% { transform: scale(1.3); }
  100% { transform: scale(0.8); }
}

.airpods-hint {
  font-size: 12px;
  color: var(--text-muted);
}

/* Audio VU Meter */
.vu-meter-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.vu-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.vu-track {
  width: 100%;
  height: 8px;
  background: #181822;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid #232332;
}

.vu-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #10b981 0%, #f59e0b 70%, #ef4444 100%);
  border-radius: 4px;
  transition: width 0.08s ease-out;
}

/* Big Action Button */
.action-btn-container {
  margin: 4px 0;
}

.btn {
  width: 100%;
  border: none;
  border-radius: 20px;
  padding: 20px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 72px;
}

.btn-primary {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
}

.btn-primary:active {
  transform: scale(0.97);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-stop {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4) !important;
}

.btn-icon {
  font-size: 22px;
}

/* Speaker Strip */
.speaker-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #161620;
  border: 1px solid #232332;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 13px;
}

.speaker-tag, .voice-tag {
  display: flex;
  align-items: center;
  gap: 6px;
}

.speaker-avatar, .voice-icon {
  font-size: 14px;
}

/* Transcripts */
.transcript-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.transcript-box {
  background: #15151f;
  border: 1px solid #242436;
  border-radius: var(--radius-md);
  padding: 14px;
  min-height: 74px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.transcript-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.transcript-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.transcript-time {
  font-size: 11px;
  color: #6b7280;
  font-variant-numeric: tabular-nums;
}

.transcript-original .transcript-label {
  color: #93c5fd;
}

.transcript-spanish .transcript-label {
  color: #6ee7b7;
}

.transcript-body {
  font-size: 16px;
  line-height: 1.45;
  color: #f3f4f6;
  word-break: break-word;
}

.transcript-spanish .transcript-body {
  color: #a7f3d0;
  font-weight: 600;
  font-size: 17px;
}

/* Latency Banner */
.latency-banner {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid #222230;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}

.lat-icon {
  font-size: 14px;
}

.lat-label {
  color: var(--text-muted);
  flex: 1;
  margin-left: 6px;
}

.lat-val {
  font-weight: 800;
  font-size: 15px;
  color: var(--accent-green);
  font-variant-numeric: tabular-nums;
}

.lat-grade {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  margin-left: 8px;
}

.grade-ideal {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}
.grade-good {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}
.grade-warn {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

/* Footer & Debug Button */
.app-footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-secondary {
  background: #181822;
  border: 1px solid #272738;
  color: var(--text-muted);
  border-radius: var(--radius-md);
  padding: 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}

.btn-secondary:hover {
  background: #20202e;
  color: #ffffff;
}

/* Debug Panel */
.debug-panel {
  background: #0f0f15;
  border: 1px solid #232334;
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.debug-panel.hidden {
  display: none;
}

.debug-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--accent-gold);
  border-bottom: 1px solid #202030;
  padding-bottom: 8px;
}

/* Telemetry Grid */
.telemetry-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.metric-card {
  background: #14141c;
  border: 1px solid #20202e;
  border-radius: var(--radius-sm);
  padding: 10px;
}

.metric-title {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.metric-value {
  font-size: 14px;
  font-weight: 700;
  color: #e5e7eb;
  margin-top: 2px;
}

/* Latency & Benchmark Dashboard */
.latency-breakdown {
  background: #12121a;
  border: 1px solid #232334;
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.latency-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.latency-breakdown h4, .settings-section h4, .log-section h4 {
  font-size: 11px;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 700;
}

.lat-stage-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #9ca3af;
  background: #161622;
  padding: 6px 10px;
  border-radius: 6px;
  border-left: 3px solid #3b82f6;
}

.lat-row.stage-1 { border-left-color: #6366f1; }
.lat-row.stage-2 { border-left-color: #3b82f6; }
.lat-row.stage-3 { border-left-color: #06b6d4; }
.lat-row.stage-4 { border-left-color: #10b981; }
.lat-row.stage-5 { border-left-color: #f59e0b; }

.lat-row strong {
  color: #ffffff;
  font-variant-numeric: tabular-nums;
  font-family: monospace;
  font-size: 13px;
}

.lat-row-total {
  background: #1a1a28;
  border: 1px solid #2d2d42;
  border-left: 4px solid var(--accent-green);
  padding: 8px 12px;
  margin-top: 4px;
  border-radius: 8px;
  color: #ffffff;
  font-weight: 700;
}

.lat-row-total strong {
  color: #34d399;
  font-size: 15px;
}

/* Percentile Badge Grid */
.percentiles-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 6px;
}

.percentile-card {
  background: #161622;
  border: 1px solid #28283c;
  border-radius: 6px;
  padding: 6px;
  text-align: center;
}

.percentile-label {
  font-size: 10px;
  color: #9ca3af;
  text-transform: uppercase;
  font-weight: 700;
}

.percentile-val {
  font-size: 13px;
  font-weight: 800;
  color: #60a5fa;
  font-family: monospace;
  margin-top: 2px;
}

/* Preset Selector Strip */
.preset-selector-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 8px 0;
}

.preset-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.btn-preset {
  background: #161622;
  border: 1px solid #2c2c40;
  border-radius: 8px;
  padding: 8px 6px;
  color: #d1d5db;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-preset.active {
  background: #1e3a8a;
  border-color: #3b82f6;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.4);
}

.btn-preset small {
  display: block;
  font-size: 9px;
  color: #9ca3af;
  margin-top: 2px;
  font-weight: 400;
}

.btn-preset.active small {
  color: #93c5fd;
}

/* Cost & Session Pill */
.session-stats-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #12121a;
  border: 1px solid #202030;
  border-radius: 12px;
  padding: 6px 12px;
  font-size: 11px;
  color: #9ca3af;
}

.session-stats-bar strong {
  color: #e5e7eb;
}

/* Form Controls */
.settings-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 12px;
  color: #d1d5db;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
}

.form-group select, .form-group input[type="text"], .form-group input[type="password"] {
  background: #181824;
  border: 1px solid #2e2e42;
  border-radius: var(--radius-sm);
  padding: 10px;
  color: #ffffff;
  font-size: 13px;
  outline: none;
}

.form-group input[type="range"] {
  accent-color: var(--accent-green);
}

.input-with-button {
  display: flex;
  gap: 8px;
}

.input-with-button input {
  flex: 1;
}

.btn-sm {
  background: #2563eb;
  border: none;
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-weight: 600;
  font-size: 12px;
  padding: 0 14px;
  cursor: pointer;
}

.btn-xs {
  background: #222230;
  border: 1px solid #333346;
  border-radius: 4px;
  color: #9ca3af;
  font-size: 11px;
  padding: 4px 8px;
  cursor: pointer;
  align-self: flex-start;
  margin-top: 6px;
}

.form-hint {
  font-size: 11px;
  color: #6b7280;
  line-height: 1.3;
}

/* Simulator */
.simulator-box {
  background: #181824;
  border: 1px dashed #35354a;
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.simulator-box p {
  font-size: 11px;
  color: #9ca3af;
}

.sim-buttons {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sim-buttons button {
  padding: 8px 12px;
  background: #242436;
  border: 1px solid #373752;
  text-align: left;
}

/* Diagnostic Log */
.debug-log {
  background: #09090d;
  border: 1px solid #1a1a24;
  border-radius: var(--radius-sm);
  padding: 10px;
  font-family: monospace;
  font-size: 11px;
  color: #a3e635;
  height: 120px;
  overflow-y: auto;
  line-height: 1.4;
  word-break: break-all;
}

/* iOS Safari Safe Area */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .app-container {
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }
}

/* ==========================================================
   2 MENTES ARCHITECTURE & CONCURRENCY MONITOR STYLES
   ========================================================== */

/* Mode Switcher */
.mode-switcher-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.mode-label {
  font-size: 11px;
  font-weight: 800;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
}

.mode-switch-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.btn-mode {
  background: #14141e;
  border: 1px solid #28283c;
  border-radius: var(--radius-sm);
  color: #9ca3af;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  transition: all 0.2s ease;
  text-align: center;
}

.btn-mode small {
  font-size: 9.5px;
  font-weight: 500;
  color: #6b7280;
}

.btn-mode:hover {
  background: #1c1c2b;
  border-color: #3b82f6;
  color: #ffffff;
}

.btn-mode.active {
  background: rgba(59, 130, 246, 0.15);
  border-color: #3b82f6;
  color: #60a5fa;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.25);
}

.btn-mode.active small {
  color: #93c5fd;
}

/* Private Audio Output Status Pill */
.private-audio-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  color: #34d399;
  font-weight: 600;
  margin-top: 4px;
}

/* Concurrency Proof Card */
.concurrency-proof-card {
  background: linear-gradient(135deg, #10101b 0%, #171728 100%);
  border: 1px solid #3b82f6;
  border-radius: var(--radius-md);
  padding: 12px;
  margin: 10px 0 14px 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.proof-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 800;
  color: #60a5fa;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-active {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid #34d399;
  color: #34d399;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 700;
  animation: pulse-border 2s infinite;
}

@keyframes pulse-border {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.minds-status-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
}

.mind-box {
  background: #0d0d14;
  border: 1px solid #232336;
  border-radius: var(--radius-sm);
  padding: 8px;
  text-align: center;
}

.mind-title {
  font-size: 10px;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.mind-state {
  font-size: 12px;
  font-weight: 800;
  color: #e5e7eb;
}

.mind-box.active-listening .mind-state {
  color: #34d399;
}

.mind-box.active-speaking .mind-state {
  color: #60a5fa;
  animation: pulse-text 1.2s infinite;
}

@keyframes pulse-text {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.mind-overlap-indicator {
  font-size: 16px;
  font-weight: 900;
  color: #fbbf24;
}

.proof-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: rgba(0, 0, 0, 0.3);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  color: #9ca3af;
}

.proof-stats-grid strong {
  color: #f3f4f6;
  font-variant-numeric: tabular-nums;
}

/* ==========================================================
   8-STAGE PHYSICAL AUDIO DIAGNOSTIC PIPELINE STYLES
   ========================================================== */
.pipeline-card {
  background: #11111a;
  border: 1px solid #29293d;
  border-radius: var(--radius-md);
  padding: 12px;
  margin: 10px 0 14px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pipeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 800;
  color: #a78bfa;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-status {
  background: rgba(167, 139, 250, 0.15);
  border: 1px solid #8b5cf6;
  color: #c4b5fd;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
}

.pipeline-steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

@media (max-width: 480px) {
  .pipeline-steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.pipe-step {
  background: #161622;
  border: 1px solid #232334;
  border-radius: 6px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: all 0.2s ease;
}

.pipe-step.status-active {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
}

.pipe-step.status-success {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.08);
}

.pipe-step.status-error {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.15);
}

.step-num {
  font-size: 9.5px;
  font-weight: 800;
  color: #9ca3af;
  text-transform: uppercase;
}

.step-status {
  font-size: 11px;
  font-weight: 800;
  color: #e5e7eb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pipe-step.status-active .step-status {
  color: #60a5fa;
}

.pipe-step.status-success .step-status {
  color: #34d399;
}

.pipe-step.status-error .step-status {
  color: #f87171;
}

.step-detail {
  font-size: 9px;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================
   COME TO FLORIDA — PUBLIC MOBILE-FIRST UI STYLES
   ========================================================== */

.ctf-page {
  background-color: #070a12;
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(37, 99, 235, 0.15), transparent 45%),
    radial-gradient(circle at 100% 100%, rgba(245, 158, 11, 0.08), transparent 40%);
  min-height: 100vh;
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: calc(env(safe-area-inset-top, 16px) + 16px) 16px calc(env(safe-area-inset-bottom, 16px) + 20px);
  box-sizing: border-box;
}

.ctf-card {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ctf-brand-box {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.ctf-brand-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  max-width: 100%;
}

.ctf-brand-title {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: #ffffff;
  margin: 0;
  text-align: center;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.ctf-brand-tagline {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #38bdf8;
  margin: 0;
  text-align: center;
}

.ctf-lang-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 6px 16px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 700;
  color: #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.ctf-lang-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
}

.ctf-tip-box {
  background: rgba(15, 23, 42, 0.8);
  border: 1px dashed rgba(148, 163, 184, 0.25);
  border-radius: 14px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: #94a3b8;
}

.ctf-tip-icon {
  font-size: 22px;
}

.ctf-main-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 10px 0;
}

.ctf-big-btn {
  width: 100%;
  min-height: 64px;
  border-radius: 32px;
  border: none;
  background: linear-gradient(135deg, #2563eb 0%, #0284c7 50%, #38bdf8 100%);
  color: #ffffff;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.4);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-tap-highlight-color: transparent;
}

.ctf-big-btn:active {
  transform: scale(0.97);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.ctf-big-btn.is-active {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  box-shadow: 0 8px 24px rgba(220, 38, 38, 0.45);
}

.ctf-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #94a3b8;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.ctf-status-badge.live {
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.3);
  background: rgba(6, 78, 59, 0.3);
}

.ctf-pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #64748b;
}

.ctf-status-badge.live .ctf-pulse-dot {
  background: #34d399;
  box-shadow: 0 0 10px #34d399;
  animation: ctfGlow 1.5s infinite;
}

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

.ctf-quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.ctf-sec-btn {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  padding: 12px 14px;
  color: #f1f5f9;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.ctf-sec-btn:active {
  background: rgba(51, 65, 85, 0.8);
  transform: scale(0.98);
}

.ctf-sec-btn.is-active {
  background: rgba(14, 165, 233, 0.25);
  border-color: #38bdf8;
  color: #38bdf8;
}

.ctf-subtitles-drawer {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.ctf-sub-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.ctf-sub-text {
  font-size: 17px;
  line-height: 1.45;
  color: #ffffff;
  font-weight: 600;
  min-height: 50px;
}

.ctf-sub-orig {
  font-size: 13px;
  color: #94a3b8;
  font-style: italic;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 6px;
}

.ctf-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 9999;
}

.ctf-modal-box {
  background: #0f172a;
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 20px;
  width: 100%;
  max-width: 360px;
  padding: 24px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ctf-pin-input {
  width: 100%;
  height: 54px;
  border-radius: 12px;
  border: 2px solid rgba(56, 189, 248, 0.3);
  background: #1e293b;
  color: #ffffff;
  font-size: 24px;
  font-weight: 800;
  text-align: center;
  letter-spacing: 6px;
  outline: none;
  box-sizing: border-box;
}

.ctf-pin-input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
}

.ctf-cancel-btn {
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #94a3b8;
  font-size: 14px;
  font-weight: 600;
  border-radius: 12px;
  padding: 10px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}

.ctf-cancel-btn:active {
  background: rgba(148, 163, 184, 0.1);
  color: #ffffff;
}

.ctf-footer {
  margin-top: auto;
  padding-top: 24px;
  text-align: center;
  font-size: 11px;
  color: #64748b;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ctf-diag-link {
  color: #475569;
  text-decoration: none;
  font-size: 11px;
}
.ctf-diag-link:hover {
  color: #94a3b8;
  text-decoration: underline;
}

/* Pre-Start Language Direction Selector (Come to Florida) */
.ctf-lang-box {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.ctf-lang-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ctf-lang-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #94a3b8;
  text-transform: uppercase;
}

.ctf-lang-active-label {
  font-size: 11px;
  font-weight: 700;
  color: #38bdf8;
}

.ctf-lang-toggle-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.ctf-lang-btn {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  padding: 10px 8px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.ctf-lang-btn:hover {
  border-color: rgba(56, 189, 248, 0.4);
  color: #ffffff;
}

.ctf-lang-btn.active {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.3) 0%, rgba(56, 189, 248, 0.2) 100%);
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
}

.ctf-lang-btn.is-locked {
  opacity: 0.5;
  pointer-events: none;
}

.ctf-lang-notice {
  font-size: 11px;
  color: #fbbf24;
  text-align: center;
  font-weight: 600;
}



