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

:root {
  --bg: #07080d;
  --surface: rgba(18, 22, 32, 0.85);
  --surface-solid: #121620;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f0f2f8;
  --muted: #7d879a;
  --accent: #6366f1;
  --accent-2: #8b5cf6;
  --accent-glow: rgba(99, 102, 241, 0.35);
  --success: #34d399;
  --error: #f87171;
  --warning: #fbbf24;
  --sidebar-w: 260px;
  --radius: 16px;
  --font: "Inter", system-ui, sans-serif;
}

html { font-size: 15px; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
}

.app-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 10% 20%, rgba(99, 102, 241, 0.15), transparent),
    radial-gradient(ellipse 60% 50% at 90% 80%, rgba(139, 92, 246, 0.1), transparent),
    var(--bg);
}

/* ── Sidebar ── */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--sidebar-w);
  z-index: 100;
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
  background: rgba(10, 12, 18, 0.95);
  border-right: 1px solid var(--border);
  backdrop-filter: blur(20px);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 4px 24px;
}

.logo-icon {
  width: 42px;
  height: 42px;
  display: block;
  object-fit: contain;
  border-radius: 12px;
  flex-shrink: 0;
}

.logo strong { display: block; font-size: 1rem; }
.logo span { font-size: 0.7rem; color: var(--muted); }

.nav { flex: 1; display: flex; flex-direction: column; gap: 4px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.15s;
}

.nav-item:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.nav-item.active {
  background: linear-gradient(135deg, rgba(99,102,241,0.2), rgba(139,92,246,0.15));
  color: var(--text);
  border: 1px solid rgba(99,102,241,0.3);
}

.nav-icon { font-size: 1.1rem; }

.sidebar-ad { margin: 16px 0; min-width: 250px; }
.sidebar-footer { padding-top: 12px; border-top: 1px solid var(--border); }

.free-badge {
  display: block;
  text-align: center;
  padding: 10px;
  border-radius: 10px;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.3);
  color: var(--success);
  font-size: 0.82rem;
  font-weight: 600;
}

.free-top-badge {
  padding: 6px 14px;
  border-radius: 99px;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.25);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--success);
  white-space: nowrap;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.about-card {
  padding: 24px;
  text-align: center;
}

.about-icon { font-size: 2rem; display: block; margin-bottom: 10px; }
.about-card h3 { margin-bottom: 8px; font-size: 1rem; }
.about-card p { color: var(--muted); font-size: 0.88rem; line-height: 1.5; }

@media (max-width: 768px) {
  .about-grid { grid-template-columns: 1fr; }
  .free-top-badge { font-size: 0.72rem; }
}

.plan-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.plan-free { background: rgba(125,135,154,0.2); color: var(--muted); }
.plan-pro { background: rgba(99,102,241,0.25); color: #a5b4fc; }
.plan-business { background: rgba(52,211,153,0.2); color: var(--success); }

.btn-upgrade {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-upgrade:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px var(--accent-glow);
}

/* ── Main layout ── */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 28px;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 12, 18, 0.6);
  backdrop-filter: blur(12px);
  gap: 16px;
}

.credits-badge {
  padding: 6px 14px;
  border-radius: 99px;
  background: rgba(99,102,241,0.15);
  border: 1px solid rgba(99,102,241,0.25);
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
}

.content { flex: 1; padding: 28px; max-width: 1200px; }

.view { display: none; animation: fadeIn 0.25s ease; }
.view.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.page-header { margin-bottom: 24px; }
.page-header.center { text-align: center; }
.page-header h1 { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.03em; }
.page-header p { color: var(--muted); margin-top: 4px; }

/* ── Stats ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.stat-card {
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.stat-value {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  background: linear-gradient(135deg, #fff, #a5b4fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label { font-size: 0.78rem; color: var(--muted); margin-top: 2px; }

/* ── Workspace ── */
.workspace {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
  align-items: start;
}

.glass {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
}

.workspace-main { padding: 22px; }
.workspace-side { display: flex; flex-direction: column; gap: 14px; }
.panel { padding: 16px; }
.voice-count { font-weight: 400; color: var(--muted); font-size: 0.7rem; }

.voice-filter {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.filter-btn {
  flex: 1;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 0.75rem;
  cursor: pointer;
  font-family: var(--font);
}

.filter-btn.active {
  border-color: var(--accent);
  color: var(--text);
  background: rgba(99,102,241,0.12);
}

.panel-voices { display: flex; flex-direction: column; gap: 10px; }

.selected-voice-card {
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(99,102,241,0.35);
  background: rgba(99,102,241,0.08);
}

.selected-voice-card .voice-card {
  border: none;
  background: transparent;
  padding: 0;
  cursor: default;
  pointer-events: none;
}

.selected-voice-card .voice-card-wrap { display: block; }
.selected-voice-card .voice-fav { display: none; }

.btn-voice-pick {
  font-weight: 600;
  border-color: rgba(99,102,241,0.4) !important;
  background: rgba(99,102,241,0.1) !important;
}

.btn-voice-pick .voice-count {
  float: right;
  font-weight: 400;
  opacity: 0.7;
}

.voice-picker-modal { padding: 16px; align-items: flex-start; overflow-y: auto; }
.voice-picker-box {
  max-width: 640px;
  width: 100%;
  max-height: min(92vh, 900px);
  display: flex;
  flex-direction: column;
  padding: 24px;
  margin: auto;
}
.voice-picker-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.voice-picker-head h2 { margin: 0; font-size: 1.25rem; }
.voice-picker-box .voice-search { flex-shrink: 0; }
.voice-picker-box .voice-filter { flex-shrink: 0; }
.voice-picker-box .category-chips { flex-shrink: 0; margin-bottom: 14px; }

.voice-grid-modal {
  flex: 1;
  min-height: 280px;
  max-height: min(52vh, 520px);
  overflow-y: auto;
  margin-bottom: 0;
  padding-right: 6px;
}

.voice-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  flex: 1;
  padding-right: 4px;
  margin-bottom: 10px;
}

.voice-grid::-webkit-scrollbar { width: 4px; }
.voice-grid::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }

.voice-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(0,0,0,0.2);
  cursor: pointer;
  text-align: left;
  transition: all 0.15s;
  font-family: var(--font);
  color: var(--text);
  width: 100%;
}

.voice-card:hover { border-color: rgba(255,255,255,0.2); }
.voice-card.active {
  border-color: var(--accent);
  background: rgba(99,102,241,0.12);
  box-shadow: 0 0 0 1px rgba(99,102,241,0.2);
}

.voice-card.locked { opacity: 0.5; }

.voice-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 8px currentColor;
}

.voice-card-body { flex: 1; min-width: 0; }
.voice-card-body strong {
  display: block;
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.voice-card-body span {
  font-size: 0.7rem;
  color: var(--muted);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.voice-empty {
  padding: 20px 12px;
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.6;
  border: 1px dashed var(--border);
  border-radius: 10px;
}

.voice-empty strong { color: var(--success); }

  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 12px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.section-head label { font-size: 0.85rem; color: #c5cad4; }

.toolbar { display: flex; gap: 6px; }

textarea {
  width: 100%;
  min-height: 220px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(0,0,0,0.35);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.95rem;
  line-height: 1.7;
  resize: vertical;
}

textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.meta-row {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--muted);
}

select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(0,0,0,0.35);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
}

.preset-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.preset-featured {
  grid-column: 1 / -1;
  border-color: rgba(52, 211, 153, 0.45) !important;
  background: rgba(52, 211, 153, 0.08) !important;
}

.preset-featured.active {
  border-color: rgba(52, 211, 153, 0.7) !important;
  box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.25);
}

.enhance-toggle {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.2);
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
  cursor: pointer;
}

.generate-actions {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-generate-main {
  width: 100%;
  padding: 16px 24px !important;
  font-size: 1.05rem !important;
  letter-spacing: 0.01em;
}

.generate-actions .btn-batch {
  width: 100%;
}

.generate-actions .progress.visible {
  margin-top: 4px;
}

.generate-actions .status {
  text-align: center;
}

.enhance-toggle input {
  margin-top: 2px;
  accent-color: var(--accent);
}

.preset-btn {
  position: relative;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(0,0,0,0.25);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: all 0.15s;
}

.preset-btn strong { display: block; font-size: 0.82rem; }
.preset-btn span { font-size: 0.7rem; color: var(--muted); }
.preset-btn:hover { border-color: var(--accent); }
.preset-btn.active {
  border-color: var(--accent);
  background: rgba(99,102,241,0.15);
}
.preset-btn.locked { opacity: 0.55; }
.preset-btn .lock { position: absolute; top: 6px; right: 8px; font-size: 0.7rem; }

.slider-group { margin-top: 12px; }
.slider-group label {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 6px;
}
.slider-group input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

/* ── Buttons ── */
.btn-ghost {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 0.8rem;
  cursor: pointer;
  font-family: var(--font);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--text); }
.btn-full { width: 100%; margin-top: 8px; }
.btn-sm { padding: 6px 10px; font-size: 0.78rem; }

.btn-generate {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-generate:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--accent-glow);
}

.btn-generate:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-batch {
  width: 100%;
  padding: 10px;
  margin-top: 8px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 0.82rem;
  cursor: pointer;
  font-family: var(--font);
}
.btn-batch:hover:not(:disabled) { border-color: var(--accent); color: var(--text); }
.btn-batch:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-download {
  display: inline-flex;
  margin-top: 12px;
  padding: 10px 18px;
  border-radius: 10px;
  background: rgba(52,211,153,0.12);
  border: 1px solid rgba(52,211,153,0.3);
  color: var(--success);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.btn-download:hover { background: rgba(52,211,153,0.2); }

/* ── Result ── */
.result-panel {
  display: none;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.result-panel.visible { display: block; }
.result-head { font-weight: 600; margin-bottom: 10px; color: var(--success); }
.result-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--muted);
}

audio { width: 100%; margin-top: 8px; }

.progress {
  display: none;
  margin-top: 10px;
  height: 3px;
  background: rgba(255,255,255,0.06);
  border-radius: 99px;
  overflow: hidden;
}
.progress.visible { display: block; }
.progress-bar {
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  animation: slide 1.2s ease-in-out infinite;
}
@keyframes slide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

.status { margin-top: 8px; font-size: 0.82rem; min-height: 1.2rem; }
.status.error { color: var(--error); }
.status.success { color: var(--success); }
.status.loading { color: #a5b4fc; }

/* ── Ads ── */
.ads-hidden .ad-slot { display: none !important; }

/* Po podpięciu AdSense — ukryj placeholdery, pokaż slot tylko gdy zamontowany */
.ads-enabled .ad-placeholder { display: none !important; }
.ads-enabled .ad-slot:not(.ad-mounted) { display: none !important; margin: 0 !important; padding: 0 !important; min-height: 0 !important; border: none !important; }
.ads-enabled .footer-ad.ad-mounted { display: block; padding: 12px 28px; border-top: 1px solid var(--border); }
.ads-enabled .topbar-ad.ad-mounted { display: block; }
.ads-enabled .sidebar-ad.ad-mounted { display: block; margin: 16px 0; }
.ads-enabled .ad-result.ad-mounted { display: block; margin-top: 16px; }

.ad-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 16px;
  border: 2px dashed rgba(255,255,255,0.1);
  border-radius: 12px;
  background: rgba(0,0,0,0.2);
  text-align: center;
  min-height: 80px;
}

.ad-placeholder small {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--warning);
}

.ad-placeholder span, .ad-placeholder p {
  font-size: 0.75rem;
  color: var(--muted);
}

.ad-banner { min-height: 60px; flex-direction: row; gap: 12px; }
.ad-result { margin-top: 16px; }
.ad-interstitial { min-height: 200px; padding: 32px; }
.ad-interstitial h3 { font-size: 1rem; margin: 8px 0; }

.topbar-ad { flex: 1; max-width: 728px; min-width: 320px; }
.ad-slot ins.adsbygoogle { min-height: 50px; }
.footer-ad { padding: 16px 28px; border-top: 1px solid var(--border); }

.site-footer {
  text-align: center;
  padding: 14px 28px 18px;
  color: var(--muted);
  font-size: 0.82rem;
  border-top: 1px solid var(--border);
  background: rgba(10, 12, 18, 0.85);
  margin-top: auto;
}

.site-footer a {
  color: var(--accent-2);
  text-decoration: none;
  font-weight: 500;
}

.site-footer a:hover { text-decoration: underline; }

/* ── Templates ── */
.templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.template-card {
  display: flex;
  gap: 14px;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.15s;
  align-items: flex-start;
}

.template-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.template-icon { font-size: 1.8rem; }
.template-card strong { display: block; font-size: 0.95rem; }
.template-cat {
  font-size: 0.7rem;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
}
.template-card p {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.4;
}

/* ── History ── */
.history-list { display: flex; flex-direction: column; gap: 12px; }

.history-item {
  padding: 16px 20px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}

.history-meta {
  display: flex;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.history-voice {
  color: #a5b4fc;
  font-weight: 600;
  text-transform: capitalize;
}

.history-text { font-size: 0.88rem; line-height: 1.5; margin-bottom: 10px; }

.tag {
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(99,102,241,0.2);
  color: #a5b4fc;
  font-size: 0.7rem;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}
.empty-state span { font-size: 3rem; display: block; margin-bottom: 12px; }

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

.pricing-card {
  position: relative;
  padding: 28px 24px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  text-align: center;
}

.pricing-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 40px var(--accent-glow);
  transform: scale(1.03);
}

.pricing-card.current { border-color: var(--success); }

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 14px;
  border-radius: 99px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-size: 0.72rem;
  font-weight: 700;
}

.pricing-card h3 { font-size: 1.1rem; margin-bottom: 8px; }

.pricing-price {
  font-size: 2.2rem;
  font-weight: 800;
  margin: 12px 0 20px;
}

.pricing-price span { font-size: 0.85rem; font-weight: 400; color: var(--muted); }

.pricing-card ul {
  list-style: none;
  text-align: left;
  margin-bottom: 24px;
}

.pricing-card li {
  padding: 6px 0;
  font-size: 0.85rem;
  color: #c5cad4;
  border-bottom: 1px solid var(--border);
}

.pricing-card .btn-primary,
.pricing-card .btn-generate {
  font-size: 0.85rem;
  padding: 12px;
}

.btn-outline {
  background: transparent !important;
  border: 1px solid var(--success) !important;
  color: var(--success) !important;
  box-shadow: none !important;
}

.monetize-pro {
  max-width: 880px;
  margin: 32px auto 0;
  padding: 36px 32px;
  border: 1px solid rgba(99, 102, 241, 0.2);
  background: linear-gradient(160deg, rgba(99, 102, 241, 0.07), rgba(10, 12, 18, 0.4));
}

.monetize-pro-head { text-align: center; margin-bottom: 28px; }
.monetize-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(139, 92, 246, 0.35);
  background: rgba(139, 92, 246, 0.1);
  margin-bottom: 14px;
}

.monetize-pro h2,
.monetize-faq h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.monetize-lead {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 640px;
  margin: 0 auto;
}

.monetize-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 28px 0;
}

.monetize-item {
  padding: 18px 20px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.18);
}

.monetize-num {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.monetize-item h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.monetize-item p {
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.55;
}

.monetize-footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.65;
  max-width: 560px;
  margin: 0 auto 16px;
}

.monetize-link { display: block; width: fit-content; margin: 0 auto; }

.monetize-faq .monetize-lead { margin: 0 0 20px; text-align: left; max-width: none; }

.monetize-points { display: flex; flex-direction: column; gap: 14px; }

.monetize-point {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
  line-height: 1.6;
}

.monetize-point:last-child { border-bottom: none; padding-bottom: 0; }
.monetize-point strong { color: var(--text); font-weight: 600; }
.monetize-point span { color: var(--muted); }

@media (max-width: 640px) {
  .monetize-grid { grid-template-columns: 1fr; }
  .monetize-point { grid-template-columns: 1fr; gap: 6px; }
  .monetize-pro { padding: 24px 18px; }
}

/* legacy */
.monetize-note {
  padding: 24px;
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.monetize-note h3 { margin-bottom: 8px; }
.monetize-note p { color: var(--muted); font-size: 0.9rem; line-height: 1.6; }

/* ── Modal ── */
.modal, .interstitial {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  place-items: center;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  padding: 20px;
}

.modal.open, .interstitial.open { display: grid; }

.modal-box, .interstitial-box {
  position: relative;
  width: 100%;
  max-width: 440px;
  padding: 32px;
  border-radius: var(--radius);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.2rem;
  cursor: pointer;
}

.modal-box h2 { font-size: 1.4rem; margin-bottom: 8px; }
.modal-box p { color: var(--muted); font-size: 0.9rem; }

.modal-features {
  list-style: none;
  margin: 20px 0;
}

.modal-features li {
  padding: 8px 0;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
}

.modal-note {
  margin-top: 12px;
  font-size: 0.75rem !important;
  text-align: center;
}

/* ── Toast ── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 18px;
  border-radius: 10px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  opacity: 0;
  transform: translateX(20px);
  transition: all 0.3s;
}

.toast.show { opacity: 1; transform: none; }
.toast-success { border-color: rgba(52,211,153,0.4); }
.toast-error { border-color: rgba(248,113,113,0.4); }

/* ── Hero ── */
.hero {
  position: relative;
  padding: 28px 32px;
  margin-bottom: 24px;
  overflow: hidden;
  border: 1px solid rgba(99,102,241,0.25);
  background: linear-gradient(135deg, rgba(99,102,241,0.12), rgba(139,92,246,0.08));
}

.hero-glow {
  position: absolute;
  top: -40%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  pointer-events: none;
}

.hero-content { position: relative; z-index: 1; }
.hero-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-2);
  margin-bottom: 8px;
}
.hero h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: 8px; }
.hero p { color: var(--muted); font-size: 0.92rem; margin-bottom: 14px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-badges span {
  font-size: 0.78rem;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
}

.page-header.compact { margin-bottom: 16px; }
.page-header.compact h1 { font-size: 1.35rem; }

/* ── Topbar extras ── */
.topbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.topbar-right { margin-left: auto; }
.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.15s;
}
.btn-icon:hover { border-color: var(--accent); background: rgba(99,102,241,0.1); }

.nav-badge {
  margin-left: auto;
  font-size: 0.65rem;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(99,102,241,0.25);
  color: var(--accent-2);
  font-weight: 700;
}

/* ── Voice search & categories ── */
.voice-search {
  width: 100%;
  padding: 10px 14px;
  margin-bottom: 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.2);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.85rem;
}
.voice-search:focus { outline: none; border-color: var(--accent); }

.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.chip {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 0.72rem;
  cursor: pointer;
  transition: all 0.15s;
}
.chip:hover { color: var(--text); border-color: rgba(255,255,255,0.15); }
.chip.active {
  background: rgba(99,102,241,0.2);
  border-color: rgba(99,102,241,0.4);
  color: var(--text);
}

.filter-fav.active { color: var(--warning); border-color: rgba(251,191,36,0.4); }

.voice-card-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
}
.voice-card-wrap .voice-card { flex: 1; }
.voice-fav {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 8px;
  background: rgba(0,0,0,0.4);
  color: var(--muted);
  cursor: pointer;
  font-size: 0.85rem;
  opacity: 0;
  transition: all 0.15s;
}
.voice-card-wrap:hover .voice-fav,
.voice-fav.active { opacity: 1; }
.voice-fav.active { color: var(--warning); }

.voice-card.featured { border-color: rgba(251,191,36,0.25); }
.feat-tag { color: var(--warning); font-style: normal; }
.voice-cat-tag {
  display: block;
  font-size: 0.65rem !important;
  color: var(--accent-2) !important;
  margin-top: 2px;
  opacity: 0.85;
}

.voice-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }

/* ── Voices gallery ── */
.gallery-toolbar {
  padding: 16px;
  margin-bottom: 20px;
}
.voices-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.gallery-card {
  padding: 14px;
  border-radius: var(--radius);
}
.gallery-card.featured {
  border-color: rgba(251,191,36,0.3);
  background: linear-gradient(135deg, rgba(251,191,36,0.06), transparent);
}
.gallery-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.btn-sm { padding: 6px 12px !important; font-size: 0.78rem !important; }

.compare-box { max-width: 480px; }
.compare-selects {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 20px 0;
}
.compare-selects label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--muted);
}
.compare-selects select {
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.25);
  color: var(--text);
  font-family: var(--font);
}
.btn-generate.btn-sm {
  padding: 12px !important;
  font-size: 0.9rem !important;
}

/* ── Light theme ── */
[data-theme="light"] {
  --bg: #eef1f8;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-solid: #ffffff;
  --border: rgba(15, 23, 42, 0.1);
  --text: #0f172a;
  --muted: #64748b;
  --accent-glow: rgba(99, 102, 241, 0.2);
}
[data-theme="light"] .app-bg {
  background:
    radial-gradient(ellipse 80% 60% at 10% 20%, rgba(99, 102, 241, 0.08), transparent),
    radial-gradient(ellipse 60% 50% at 90% 80%, rgba(139, 92, 246, 0.06), transparent),
    var(--bg);
}
[data-theme="light"] .sidebar { background: rgba(255,255,255,0.95); }
[data-theme="light"] .voice-search,
[data-theme="light"] .compare-selects select {
  background: rgba(15,23,42,0.04);
}
[data-theme="light"] .hero { background: linear-gradient(135deg, rgba(99,102,241,0.08), rgba(139,92,246,0.05)); }
[data-theme="light"] .hero-badges span { background: rgba(15,23,42,0.04); }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .workspace { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .pricing-card.featured { transform: none; }
  .stats-row { grid-template-columns: 1fr; }
  .voice-picker-box { max-height: 95vh; padding: 18px; }
  .voice-grid-modal { max-height: 45vh; min-height: 220px; }
}

@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 12px;
  }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .sidebar-ad, .sidebar-footer { display: none; }
  .main { margin-left: 0; }
  .topbar { flex-direction: column; }
}
