@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* ── TOKENS ─────────────────────────────────────── */
:root {
  --bg:          #03030b;
  --bg-darker:   #010105;
  --card:        rgba(255, 255, 255, 0.02);
  --card-h:      rgba(255, 255, 255, 0.05);
  --border:      rgba(255, 255, 255, 0.06);
  --border-h:    rgba(255, 255, 255, 0.12);

  --p:           #8257e5; /* Electric Violet */
  --p-light:     #a380f9;
  --accent:      #00f5ff; /* Cyan */
  --accent2:     #ff007a; /* Magenta */
  --accent3:     #34d399; /* Emerald */

  --txt:         #ffffff;
  --txt2:        #a1a1aa;
  --txt3:        #52525b;

  --grad:        linear-gradient(135deg, #8257e5, #00f5ff);
  --grad-p:      linear-gradient(135deg, #8257e5, #5b36af);
  --grad-glass:  linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
  
  --shadow:      0 8px 32px 0 rgba(0, 0, 0, 0.8);
  --glass:       blur(12px) saturate(180%);
  
  --r:           16px;
  --r-sm:        10px;
  --r-lg:        28px;
  --sidebar:     260px;
  --trans:       all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg);
  background-image: 
    radial-gradient(at 0% 0%, rgba(130, 87, 229, 0.12) 0px, transparent 50%),
    radial-gradient(at 50% 0%, rgba(0, 245, 255, 0.08) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(255, 0, 122, 0.08) 0px, transparent 50%),
    radial-gradient(at 50% 100%, rgba(130, 87, 229, 0.1) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--txt);
  min-height: 100vh;
  overflow-x: hidden;
  animation: bgPulse 20s infinite alternate ease-in-out;
}

@keyframes bgPulse {
  0% { background-position: 0% 0%; }
  100% { background-position: 10% 5%; }
}

/* Force dark on all views and main area */
.main-content { background-color: var(--bg); }

::-webkit-scrollbar         { width: 5px; }
::-webkit-scrollbar-track   { background: transparent; }
::-webkit-scrollbar-thumb   { background: rgba(124,111,247,.35); border-radius: 10px; }

/* ── LAYOUT ─────────────────────────────────────── */
.app { display: flex; min-height: 100vh; }

/* ── SIDEBAR ─────────────────────────────────────── */
.sidebar {
  width: var(--sidebar);
  background: rgba(3, 3, 11, 0.8);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  overflow: hidden;
  transition: var(--trans);
}

.sidebar-header {
  padding: 26px 20px 22px;
  border-bottom: 1px solid var(--border);
}

.logo { display: flex; align-items: center; gap: 12px; }

.sidebar-logo-img {
  height: 38px;
  width: auto;
  display: block;
}

.sidebar-nav {
  flex: 1;
  padding: 18px 12px;
  display: flex; flex-direction: column; gap: 4px;
}

.nav-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid transparent; 
  background: none;
  color: var(--txt2);
  font: 500 14px 'Inter', sans-serif;
  cursor: pointer;
  transition: var(--trans);
  width: 100%;
  white-space: nowrap;
}
.nav-item:hover { 
  background: var(--card-h); 
  color: var(--txt); 
  transform: translateX(5px);
  border-color: var(--border);
}
.nav-item.active {
  background: rgba(130, 87, 229, 0.1);
  color: var(--p-light);
  border-color: rgba(130, 87, 229, 0.3);
  box-shadow: 0 0 20px rgba(130, 87, 229, 0.1);
}
.nav-icon { font-size: 18px; width: 24px; text-align: center; flex-shrink: 0; transition: var(--trans); }
.nav-item.active .nav-icon { transform: scale(1.1); filter: drop-shadow(0 0 8px var(--p)); }

.sidebar-footer {
  padding: 20px;
  border-top: 1px solid var(--border);
}
.storage-label { font-size: 11px; color: var(--txt3); text-transform: uppercase; letter-spacing: .5px; }
.storage-bar {
  width: 100%; height: 4px;
  background: rgba(255,255,255,.07);
  border-radius: 10px; margin: 8px 0 6px; overflow: hidden;
}
.storage-fill { height: 100%; background: var(--grad); border-radius: 10px; width: 0%; transition: width .5s; }
.storage-text { font-size: 12px; color: var(--txt2); }

/* ── MAIN ─────────────────────────────────────────── */
.main-content { flex: 1; margin-left: var(--sidebar); overflow-y: auto; min-height: 100vh; }

/* ── VIEWS ───────────────────────────────────────── */
.view { display: none; padding: 44px 40px; min-height: 100vh; }
.view.active { display: block; animation: viewSlideUp 0.6s cubic-bezier(0.23, 1, 0.32, 1); }

@keyframes viewSlideUp {
  from { opacity: 0; transform: translateY(30px) scale(0.98); filter: blur(10px); }
  to   { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

.view-header { margin-bottom: 36px; }
.view-header h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 34px; font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}
.subtitle { color: var(--txt2); font-size: 15px; }

/* ── STATS ───────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 44px;
}

.stat-card {
  background: var(--grad-glass);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 28px;
  display: flex; align-items: center; gap: 20px;
  transition: var(--trans);
  position: relative; overflow: hidden;
}
.stat-card::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--grad); opacity: 0; transition: var(--trans);
}
.stat-card:hover::after { opacity: 1; }
.stat-card:hover { border-color: var(--border-h); transform: translateY(-2px); box-shadow: 0 8px 32px rgba(0,0,0,.3); }

.stat-icon {
  width: 52px; height: 52px;
  background: var(--grad-card);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; flex-shrink: 0;
}
.stat-value {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 30px; font-weight: 700;
}
.stat-label { font-size: 13px; color: var(--txt2); }

/* ── SECTION TITLE ───────────────────────────────── */
.section-title {
  font-size: 18px; font-weight: 600;
  margin-bottom: 20px; color: var(--txt);
}

/* ── GENRE GRID ──────────────────────────────────── */
.genre-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
  margin-bottom: 12px;
}

.genre-card {
  background: var(--grad-glass);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 24px 20px;
  cursor: pointer;
  transition: var(--trans);
  text-align: center;
  position: relative;
}
.genre-card::before {
  content: ''; position: absolute; inset: 0; border-radius: var(--r);
  background: var(--grad); opacity: 0; transition: var(--trans); z-index: -1;
}
.genre-card:hover {
  border-color: var(--p-light);
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(130, 87, 229, 0.2);
}
.genre-card:hover .genre-emoji { transform: scale(1.2) rotate(5deg); }
.genre-emoji { font-size: 36px; display: block; margin-bottom: 12px; transition: var(--trans); }
.genre-name  { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.genre-desc  { font-size: 12px; color: var(--txt2); }

/* ── RECENT / PROJECT CARDS ──────────────────────── */
.recent-list    { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.projects-grid  { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }

.project-card {
  background: var(--grad-glass);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 24px;
  transition: var(--trans);
  position: relative; overflow: hidden;
}
.project-card:hover {
  border-color: var(--p);
  transform: translateY(-5px);
  box-shadow: 0 15px 45px rgba(0,0,0,0.4), 0 0 20px rgba(130, 87, 229, 0.1);
}
.pc-top    { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.pc-name   { font-weight: 600; font-size: 16px; }
.pc-date   { font-size: 11px; color: var(--txt3); }
.pc-preview {
  font-size: 13px; color: var(--txt2);
  line-height: 1.6; margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pc-footer  { display: flex; justify-content: space-between; align-items: center; }
.pc-meta    { font-size: 12px; color: var(--txt3); }
.pc-actions { display: flex; gap: 8px; }

.icon-btn {
  background: var(--card-h);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 11px;
  cursor: pointer; font-size: 12px;
  color: var(--txt2);
  transition: var(--trans);
}
.icon-btn:hover            { color: var(--p-light); border-color: rgba(124,111,247,.35); background: var(--grad-card); }
.icon-btn.del:hover        { color: var(--accent2); border-color: rgba(247,37,133,.35); background: rgba(247,37,133,.1); }

/* ── EMPTY STATE ─────────────────────────────────── */
.empty-state {
  text-align: center; padding: 72px 20px;
  color: var(--txt2); grid-column: 1/-1;
}
.empty-icon { font-size: 52px; margin-bottom: 16px; opacity: .4; }
.empty-state p { margin-bottom: 20px; font-size: 15px; }

/* ── EDITOR ──────────────────────────────────────── */
.editor-header-row {
  display: flex; justify-content: space-between;
  align-items: flex-end; flex-wrap: wrap; gap: 16px;
}
.editor-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.name-input {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 10px 16px;
  color: var(--txt);
  font: 500 14px 'Inter',sans-serif;
  outline: none; transition: var(--trans); width: 210px;
}
.name-input:focus { border-color: rgba(124,111,247,.45); box-shadow: 0 0 0 3px rgba(124,111,247,.1); }

.editor-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px; align-items: start;
}

/* ── SCRIPT PANEL ────────────────────────────────── */
.editor-panel {
  background: var(--grad-glass);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  transition: var(--trans);
}
.editor-panel:focus-within {
  border-color: var(--p);
  box-shadow: 0 0 30px rgba(130, 87, 229, 0.15);
}
.panel-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
}
.panel-header h3 { font-size: 15px; font-weight: 600; }
.word-count {
  font-size: 12px; color: var(--txt3);
  background: var(--bg2);
  padding: 4px 12px; border-radius: 20px;
}

.script-textarea {
  width: 100%; min-height: 420px;
  background: transparent; border: none;
  padding: 26px;
  color: var(--txt);
  font: 400 15px/1.85 'Inter',sans-serif;
  resize: vertical; outline: none;
}
.script-textarea::placeholder { color: var(--txt3); }

/* ── PLAYBACK BAR ────────────────────────────────── */
.playback-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 22px;
  border-top: 1px solid var(--border);
  background: rgba(0,0,0,.18);
}

.play-btn {
  padding: 10px 26px;
  background: var(--grad);
  border: none; border-radius: var(--r-sm);
  color: #fff; font: 600 14px 'Inter',sans-serif;
  cursor: pointer; transition: var(--trans);
  box-shadow: 0 4px 16px rgba(124,111,247,.4);
}
.play-btn:hover   { opacity: .9; transform: translateY(-1px); box-shadow: 0 6px 22px rgba(124,111,247,.55); }
.play-btn.paused  { background: linear-gradient(135deg,#06d6c7,#4cc9f0); box-shadow: 0 4px 16px rgba(6,214,199,.4); }

.ctrl-btn {
  padding: 10px 16px;
  background: var(--card-h);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--txt2);
  font: 400 13px 'Inter',sans-serif;
  cursor: pointer; transition: var(--trans);
}
.ctrl-btn:hover:not(:disabled) { border-color: var(--border-h); color: var(--txt); }
.ctrl-btn:disabled { opacity: .4; cursor: not-allowed; }

.pb-status { font-size: 13px; color: var(--txt3); margin-left: auto; font-style: italic; }

/* ── WAVEFORM ─────────────────────────────────────── */
.waveform { display: flex; align-items: center; gap: 3px; height: 22px; }
.wave-bar {
  width: 3px; background: var(--grad); border-radius: 10px;
  animation: wave 1.2s ease-in-out infinite;
}
.wave-bar:nth-child(2) { animation-delay: .1s; }
.wave-bar:nth-child(3) { animation-delay: .2s; }
.wave-bar:nth-child(4) { animation-delay: .3s; }
.wave-bar:nth-child(5) { animation-delay: .4s; }
@keyframes wave {
  0%,100% { height: 5px; }
  50%      { height: 19px; }
}

/* ── CONTROLS PANEL ──────────────────────────────── */
.controls-panel {
  display: flex; flex-direction: column; gap: 16px;
  position: sticky; top: 24px;
}

.ctrl-card {
  background: var(--grad-glass);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 24px;
  transition: var(--trans);
}
.ctrl-card:hover {
  border-color: var(--border-h);
}
.ctrl-card h3 { font-size: 14px; font-weight: 600; margin-bottom: 14px; }

.search-input {
  width: 100%;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 9px 14px;
  color: var(--txt); font: 400 13px 'Inter',sans-serif;
  outline: none; transition: var(--trans); margin-bottom: 10px;
}
.search-input:focus { border-color: rgba(124,111,247,.4); }

.voice-list { max-height: 210px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }

.voice-item {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  cursor: pointer; transition: var(--trans);
  display: flex; align-items: center; gap: 10px;
}
.voice-item:hover     { background: var(--card-h); border-color: var(--border-h); }
.voice-item.selected  { background: var(--grad-card); border-color: rgba(124,111,247,.45); }
.v-dot   { width: 8px; height: 8px; border-radius: 50%; background: var(--txt3); flex-shrink: 0; }
.voice-item.selected .v-dot { background: var(--p); box-shadow: 0 0 6px rgba(124,111,247,.6); }
.v-name  { font-size: 13px; font-weight: 500; }
.v-lang  { font-size: 11px; color: var(--txt3); margin-left: auto; }

/* ── SLIDERS ─────────────────────────────────────── */
.slider-row { margin-bottom: 16px; }
.slider-row:last-child { margin-bottom: 0; }
.slider-row label { display: flex; justify-content: space-between; font-size: 13px; color: var(--txt2); margin-bottom: 8px; }
.slider-row label span { color: var(--p-light); font-weight: 600; }

input[type="range"] {
  width: 100%; -webkit-appearance: none; appearance: none;
  height: 4px; border-radius: 10px;
  background: rgba(255,255,255,.1);
  outline: none; cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--p); cursor: pointer;
  box-shadow: 0 0 8px rgba(124,111,247,.5);
  transition: transform .15s;
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.25); }

/* ── TEMPLATES ───────────────────────────────────── */
.template-list { display: flex; flex-direction: column; gap: 7px; max-height: 280px; overflow-y: auto; }

.tmpl-item {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  cursor: pointer; transition: var(--trans);
  display: flex; align-items: center; gap: 10px; font-size: 13px;
}
.tmpl-item:hover { background: var(--grad-card); border-color: rgba(124,111,247,.35); }
.tmpl-emoji { font-size: 18px; flex-shrink: 0; }
.tmpl-name  { font-weight: 500; }
.tmpl-hint  { font-size: 11px; color: var(--txt3); margin-left: auto; }

/* ── BUTTONS ─────────────────────────────────────── */
.btn-primary {
  padding: 12px 28px;
  background: var(--grad);
  border: none; border-radius: 12px;
  color: #fff; font: 600 14px 'Inter', sans-serif;
  cursor: pointer; transition: var(--trans);
  box-shadow: 0 4px 15px rgba(130, 87, 229, 0.3);
  position: relative;
  overflow: hidden;
}
.btn-primary:hover { 
  opacity: 0.9; 
  transform: translateY(-2px); 
  box-shadow: 0 8px 25px rgba(130, 87, 229, 0.5);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  padding: 11px 24px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--txt); font: 500 14px 'Inter', sans-serif;
  cursor: pointer; transition: var(--trans);
}
.btn-secondary:hover { 
  background: rgba(255, 255, 255, 0.08); 
  border-color: var(--border-h);
  transform: translateY(-1px);
}
.btn-secondary:hover { border-color: var(--border-h); color: var(--txt); }

.btn-danger {
  padding: 10px 20px;
  background: rgba(247,37,133,.1); border: 1px solid rgba(247,37,133,.3); border-radius: var(--r-sm);
  color: var(--accent2); font: 500 14px 'Inter',sans-serif;
  cursor: pointer; transition: var(--trans);
}
.btn-danger:hover { background: rgba(247,37,133,.2); }

.hint-text { font-size: 13px; color: var(--txt3); text-align: center; padding: 20px 0; }

/* ── SETTINGS ────────────────────────────────────── */
.settings-stack { display: flex; flex-direction: column; gap: 20px; max-width: 580px; }
.settings-card { 
  background: var(--grad-glass); 
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  border: 1px solid var(--border); 
  border-radius: var(--r); 
  padding: 30px; 
  transition: var(--trans);
}
.settings-card:hover { border-color: var(--border-h); }
.settings-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 20px; }
.setting-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 13px 0; border-bottom: 1px solid var(--border);
  font-size: 14px; color: var(--txt2);
}
.setting-row:last-child { border-bottom: none; }
.danger-row span { color: var(--accent2); }
.about-text { font-size: 14px; color: var(--txt2); line-height: 1.7; }

/* ── TOAST ───────────────────────────────────────── */
.toast {
  position: fixed; bottom: 28px; right: 28px;
  background: rgba(13,13,46,.96);
  border: 1px solid rgba(124,111,247,.35);
  border-radius: 12px; padding: 14px 22px;
  font-size: 14px; color: var(--txt);
  z-index: 9999;
  transform: translateY(80px); opacity: 0;
  transition: all .3s cubic-bezier(.4,0,.2,1);
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
  max-width: 300px;
}
.toast.show   { transform: translateY(0); opacity: 1; }
.toast.ok     { border-color: rgba(6,214,199,.45); }
.toast.err    { border-color: rgba(247,37,133,.45); }

/* ── MODAL ───────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(10px);
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: var(--trans);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 34px;
  max-width: 360px; width: 90%;
  box-shadow: 0 24px 64px rgba(0,0,0,.6);
}
.modal h3 { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.modal p  { color: var(--txt2); font-size: 14px; margin-bottom: 24px; }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; }

/* ── RESPONSIVE ──────────────────────────────────── */
@media (max-width: 860px) {
  .main-content { margin-left: 0; }
  .sidebar { display: none; }
  .editor-layout { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .view { padding: 28px 16px; }
}
@media (max-width: 520px) {
  .stats-grid { grid-template-columns: 1fr; }
}

/* ── ELEVENLABS SETTINGS ─────────────────────────── */
.el-card {
  border-color: rgba(124,111,247,.25);
  background: linear-gradient(135deg, rgba(124,111,247,.07), rgba(6,214,199,.04));
}
.oai-card {
  border-color: rgba(16,185,129,.25);
  background: linear-gradient(135deg, rgba(16,185,129,.07), rgba(6,214,199,.03));
}
.oai-card h3 { color: #6ee7b7; }
.el-card-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  flex-wrap: wrap; gap: 12px; margin-bottom: 20px;
}
.el-card-header h3 { margin-bottom: 6px; }
.el-sub { font-size: 13px; color: var(--txt2); line-height: 1.5; }

.el-status {
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 12px; font-weight: 600;
  background: rgba(255,255,255,.07);
  border: 1px solid var(--border);
  color: var(--txt3);
  white-space: nowrap;
  flex-shrink: 0;
}
.el-status.connected {
  background: rgba(6,214,199,.12);
  border-color: rgba(6,214,199,.4);
  color: var(--accent);
}

.el-key-row {
  display: flex; gap: 10px; margin-bottom: 14px;
}
.key-input {
  flex: 1;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 11px 16px;
  color: var(--txt);
  font: 400 14px 'Inter',sans-serif;
  outline: none; transition: var(--trans);
}
.key-input:focus { border-color: rgba(124,111,247,.5); box-shadow: 0 0 0 3px rgba(124,111,247,.1); }

.el-actions {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px; margin-bottom: 16px;
}
.el-link {
  font-size: 13px; color: var(--p-light);
  text-decoration: none; transition: var(--trans);
}
.el-link:hover { color: var(--accent); }

.el-info-box {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 14px 16px;
  font-size: 13px; color: var(--txt2); line-height: 1.6;
}
.el-info-box strong { color: var(--txt); }

/* ── VOICE ENGINE BADGE (in editor) ─────────────── */
.voice-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px;
}
.voice-header h3 { margin-bottom: 0; }

.engine-badge {
  font-size: 11px; font-weight: 600; padding: 4px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--txt2);
  white-space: nowrap;
  animation: pulseLight 4s infinite alternate;
}
@keyframes pulseLight {
  from { opacity: 0.8; box-shadow: 0 0 0px var(--p); }
  to { opacity: 1; box-shadow: 0 0 10px rgba(130, 87, 229, 0.2); }
}
.engine-badge.el {
  background: rgba(6,214,199,.1);
  border-color: rgba(6,214,199,.35);
  color: var(--accent);
}
.engine-badge.oai {
  background: rgba(16,185,129,.12);
  border-color: rgba(16,185,129,.4);
  color: #6ee7b7;
}

.elevenlabs-hint {
  background: rgba(6,214,199,.07);
  border: 1px solid rgba(6,214,199,.2);
  border-radius: var(--r-sm);
  padding: 7px 12px; margin-bottom: 10px;
  font-size: 12px; color: var(--accent);
}

/* Loading spinner inside voice list */
.el-loading {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; padding: 20px 0;
  font-size: 13px; color: var(--txt3);
}
.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(124,111,247,.3);
  border-top-color: var(--p);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ElevenLabs voice card extras */
.v-gender {
  font-size: 10px; color: var(--txt3);
  background: rgba(255,255,255,.05);
  border-radius: 4px; padding: 2px 6px;
  border: 1px solid var(--border);
}
.v-desc {
  font-size: 11px; color: var(--txt3);
  margin-top: 2px; display: block;
}
.voice-item .v-info { flex: 1; min-width: 0; }


/* ── SPLASH SCREEN ── */
#splash-screen {
  position: fixed;
  inset: 0;
  background: #07071a;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

#splash-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

.splash-logo {
  width: 280px;
  height: auto;
  animation: floating 3s ease-in-out infinite;
  filter: drop-shadow(0 0 30px rgba(124,111,247,0.3));
}

@keyframes floating {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

.app {
  opacity: 0;
  transition: opacity 1s ease;
}

.app.visible {
  opacity: 1;
}
