﻿:root {
  --bg: #0b1424;
  --bg-2: #0f1d36;
  --card: #121c2d;
  --card-dark: #101828;
  --accent: #1cc5b8;
  --accent-rgb: 28, 197, 184;
  --text: #f4f6fb;
  --muted: #8ea3c7;
  --border: rgba(255, 255, 255, 0.08);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Space Grotesk", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 18% 18%, #1d2e47, transparent 42%),
    radial-gradient(circle at 82% 0%, #0c1c31, transparent 36%),
    linear-gradient(145deg, #0c1424 0%, #0c1527 40%, #0f1f35 100%);
  color: var(--text);
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.25rem;
  align-items: center;
  padding: 0.9rem 1.2rem;
  border-radius: 1rem;
  background: rgba(10, 17, 31, 0.8);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
  box-shadow: 0 24px 40px rgb(5 10 18 / 0.35);
}

.nav-toggle {
  display: none;
  justify-self: end;
  grid-column: 3;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.7rem;
  padding: 0.5rem;
  width: 46px;
  height: 42px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.28rem;
  cursor: pointer;
  color: var(--text);
}

.nav-toggle-bar {
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.brand img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 12px;
}

.brand-name {
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand-tagline {
  color: var(--muted);
  font-size: 0.9rem;
}

.nav-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--text);
  font-weight: 500;
  padding: 0.4rem 0.55rem;
  border-radius: 0.6rem;
}

.nav-links a:hover {
  background: rgba(var(--accent-rgb), 0.12);
}

.nav-dropdown {
  position: relative;
}

.nav-drop-trigger {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
  border-radius: 0.7rem;
  padding: 0.45rem 0.65rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
}

.nav-drop-panel {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  min-width: 190px;
  background: rgba(10, 17, 31, 0.96);
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  padding: 0.4rem;
  box-shadow: 0 18px 38px rgb(5 10 18 / 0.4);
  display: none;
  flex-direction: column;
  gap: 0.15rem;
  z-index: 15;
}

.nav-drop-panel a {
  padding: 0.55rem 0.65rem;
  border-radius: 0.6rem;
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
}

.nav-drop-panel a:hover {
  background: rgba(var(--accent-rgb), 0.12);
}

.nav-dropdown.open .nav-drop-panel {
  display: flex;
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-user-menu {
  position: relative;
}

.nav-user-trigger {
  min-width: 110px;
  justify-content: space-between;
}

.nav-user-panel {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  min-width: 170px;
  display: none;
  flex-direction: column;
  gap: 0.2rem;
  background: rgba(10, 17, 31, 0.96);
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  padding: 0.4rem;
  box-shadow: 0 18px 38px rgb(5 10 18 / 0.4);
  z-index: 15;
}

.nav-user-menu.open .nav-user-panel {
  display: flex;
}

.nav-user-panel a,
.nav-user-panel button {
  width: 100%;
  border: 0;
  border-radius: 0.6rem;
  padding: 0.55rem 0.65rem;
  text-align: left;
  background: transparent;
  color: var(--text);
  font: inherit;
  cursor: pointer;
  text-decoration: none;
}

.nav-user-panel a:hover,
.nav-user-panel button:hover {
  background: rgba(var(--accent-rgb), 0.12);
  text-decoration: none;
}

.nav-cta.is-collapsed {
  display: none;
}

.nav-cta.mobile-closed {
  display: none;
}

.primary-btn,
.secondary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.1rem;
  border-radius: 0.9rem;
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
}

.primary-btn {
  background: var(--accent);
  color: #04131f;
  box-shadow: none;
}

.primary-btn:visited,
.primary-btn:hover,
.primary-btn:focus-visible {
  color: #04131f;
  text-decoration: none;
}

.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 24px 48px rgba(var(--accent-rgb), 0.55);
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.1);
}

.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.ghost-btn {
  background: transparent;
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.15);
}

.ghost-btn:hover {
  border-color: rgba(var(--accent-rgb), 0.4);
  color: var(--accent);
}

.page-content {
  display: flex;
  flex-direction: column;
  gap: 2.2rem;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.6rem;
  padding: 1.75rem;
  background: linear-gradient(135deg, rgba(21, 33, 51, 0.85), rgba(13, 26, 44, 0.9));
  border-radius: 1.5rem;
  border: 1px solid var(--border);
  box-shadow: 0 26px 60px rgb(5 10 18 / 0.42);
}

.hero.hero-centered {
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
  gap: 0.35rem;
}

.hero .hero-icon {
  width: 72px;
  height: 72px;
  min-width: 72px;
}

.hero-brand--centered img {
  max-width: 240px;
  max-height: 120px;
  margin-top: 0.2rem;
  margin-bottom: 0.1rem;
}

.hero.hero-centered .hero-icon {
  margin-bottom: 0.2rem;
}

.auth-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.1rem 1.4rem;
}

.auth-hero img {
  max-width: 220px;
  max-height: 120px;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.hero-copy h1 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  margin: 0.2rem 0 0.4rem;
  letter-spacing: -0.01em;
}

.hero .lede {
  margin: 0.1rem 0 1rem;
  color: var(--muted);
  line-height: 1.6;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  color: rgba(var(--accent-rgb), 0.9);
  font-weight: 700;
  margin: 0 0 0.35rem;
}

.hero-actions {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin: 1rem 0 0.6rem;
}

.hero-points {
  list-style: disc;
  padding-left: 1.1rem;
  color: var(--muted);
  margin: 0.5rem 0 1rem;
  line-height: 1.5;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.stat {
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  text-align: left;
}

.stat-number {
  font-size: 1.6rem;
  font-weight: 700;
}

.stat-label {
  color: var(--muted);
  font-size: 0.92rem;
}

.hero-panel {
  background: var(--card);
  border-radius: 1.25rem;
  border: 1px solid var(--border);
  padding: 1.25rem 1.35rem;
  box-shadow: 0 24px 50px rgb(6 10 20 / 0.4);
}

.hero-panel__header h2 {
  margin: 0.15rem 0 0.45rem;
  font-size: 1.4rem;
}

.panel-list {
  list-style: none;
  padding-left: 0;
  margin: 0.5rem 0 1rem;
  display: grid;
  gap: 0.55rem;
  color: var(--muted);
}

.panel-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  padding: 0.85rem 1rem;
  border-radius: 1rem;
  border: 1px dashed rgba(var(--accent-rgb), 0.45);
  background: rgba(var(--accent-rgb), 0.06);
  color: var(--text);
}

.section {
  background: rgba(15, 22, 35, 0.82);
  border-radius: 1.35rem;
  border: 1px solid var(--border);
  padding: 1.6rem 1.4rem;
  box-shadow: 0 20px 45px rgb(5 10 18 / 0.32);
}

.section-header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.section-header h2 {
  margin: 0;
  font-size: 1.6rem;
}

.section-lede {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.feature-card {
  padding: 1.1rem;
  border-radius: 1.1rem;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.feature-card h3 {
  margin: 0 0 0.35rem;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.demo-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.demo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
}

.demo-pill {
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  border-radius: 999px;
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  transition: border 0.2s, background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.demo-pill:hover {
  border-color: rgba(var(--accent-rgb), 0.6);
  background: rgba(var(--accent-rgb), 0.08);
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(var(--accent-rgb), 0.15);
}

.demo-icon {
  font-weight: 700;
  color: var(--accent);
}

.demo-note {
  margin: 0;
  color: var(--muted);
}

.usecase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.1rem;
}

.usecase-item {
  padding: 1rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
}

.usecase-item h3 {
  margin: 0 0 0.35rem;
}

.usecase-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.step {
  border: 1px solid var(--border);
  border-radius: 1.1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.02);
}

.step-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(var(--accent-rgb), 0.14);
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.step h3 {
  margin: 0 0 0.4rem;
}

.step p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.compliance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.compliance-card {
  padding: 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  background: rgba(var(--accent-rgb), 0.07);
  color: var(--text);
}

.compliance-card p {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.faq-item {
  padding: 1rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.faq-item h3 {
  margin: 0 0 0.4rem;
}

.faq-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.app-shell {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 0 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.tts-shell {
  margin-top: 0.5rem;
}

.card {
  background: var(--card);
  border-radius: 1.2rem;
  border: 1px solid var(--border);
  padding: 1.7rem;
  box-shadow: 0 20px 45px rgb(5 10 18 / 0.35);
}

.card + .card {
  margin-top: 1.4rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.field label {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
}

.field-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

#char-remaining {
  color: var(--muted);
  font-size: 0.85rem;
}

#char-remaining.warning {
  color: #f0b429;
}

#char-remaining.limit {
  color: #f87171;
}

textarea {
  resize: vertical;
  font: inherit;
  color: var(--text);
  background: var(--card-dark);
  border: 1px solid transparent;
  border-radius: 1rem;
  padding: 1.05rem 1.2rem;
  min-height: 150px;
  outline: none;
  transition: border 0.2s, box-shadow 0.2s;
}

textarea:focus {
  border-color: rgba(var(--accent-rgb), 0.5);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.08);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
  margin-top: 1.4rem;
}

.custom-dropdown {
  position: relative;
}

.custom-dropdown .dropdown-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.25rem;
  border-radius: 1.3rem;
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  background: var(--card-dark);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition: border 0.2s, box-shadow 0.2s;
}

.custom-dropdown .dropdown-trigger:focus-visible,
.custom-dropdown.open .dropdown-trigger {
  border-color: rgba(var(--accent-rgb), 0.6);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.16);
}

.custom-dropdown .dropdown-icon svg {
  width: 18px;
  height: 18px;
  transition: transform 0.2s;
}

.custom-dropdown.open .dropdown-icon svg {
  transform: rotate(180deg);
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  width: 100%;
  padding: 0.5rem;
  background: #0c1728;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 25px 45px rgba(3, 8, 20, 0.5);
  max-height: 220px;
  overflow-y: auto;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.18s, transform 0.18s;
  z-index: 10;
}

.custom-dropdown.open .dropdown-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Contact form modern select */
.select-wrapper select {
  appearance: none;
  background: var(--card-dark);
  color: var(--text);
  padding: 0.9rem 1rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  font: inherit;
  width: 100%;
}

.select-wrapper {
  position: relative;
}

.select-wrapper::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 10px;
  height: 10px;
  transform: translateY(-50%) rotate(45deg);
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  pointer-events: none;
}

.select-wrapper select:focus {
  outline: none;
  border-color: rgba(var(--accent-rgb), 0.6);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.14);
}

.dropdown-item {
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  padding: 0.65rem 0.85rem;
  border-radius: 0.85rem;
  cursor: pointer;
}

.dropdown-item:hover,
.dropdown-item.is-selected {
  background: rgba(var(--accent-rgb), 0.18);
  color: var(--text);
}

button {
  font: inherit;
  border: none;
  cursor: pointer;
}

#generate-btn {
  margin-top: 1.8rem;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.95rem 1.5rem;
  background: var(--accent);
  color: #04131f;
  font-weight: 700;
  border-radius: 1rem;
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
}

#generate-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 30px rgba(var(--accent-rgb), 0.25);
}

#generate-btn.loading .btn-text {
  opacity: 0.35;
}

.btn-icon svg {
  width: 22px;
  height: 22px;
}

.btn-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-top-color: currentColor;
  border-radius: 50%;
  display: none;
}

#generate-btn.loading .btn-spinner {
  display: inline-flex;
  animation: spin 0.9s linear infinite;
}

.error {
  margin-top: 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  background: rgba(255, 86, 86, 0.12);
  border: 1px solid rgba(255, 86, 86, 0.35);
  color: #ff8a8a;
}

.audio-card {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.audio-card[data-ready="false"] {
  display: none;
}

.visualizer-shell {
  background: var(--card-dark);
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--border);
  padding: 1rem;
}

canvas {
  width: 100%;
  height: 220px;
  display: block;
}

.timeline {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--muted);
}

.timeline input[type="range"] {
  flex: 1;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 5px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: -5px;
}

input[type="range"]::-moz-range-track {
  height: 5px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
}

input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
}

.controls-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.pill {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--card-dark);
  color: var(--text);
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  font-size: 1.2rem;
  transition: border 0.2s, transform 0.2s;
}

.pill svg {
  width: 24px;
  height: 24px;
  display: block;
}

.pill:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

#play-btn [data-pause] {
  display: none;
}

#play-btn.playing [data-play] {
  display: none;
}

#play-btn.playing [data-pause] {
  display: inline;
}

.volume {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1rem;
  color: var(--muted);
}

.volume input[type="range"] {
  flex: 1;
}

.volume-button {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border 0.2s, background 0.2s;
}

.volume-button svg {
  width: 22px;
  height: 22px;
}

.volume-button:hover {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.05);
}

.volume-button .icon-volume-off {
  display: none;
}

.volume-button.muted .icon-volume-on {
  display: none;
}

.volume-button.muted .icon-volume-off {
  display: inline-flex;
}

.speed-row,
.options-row,
.vis-speed {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.options-row {
  flex-wrap: wrap;
}

.option-group > span {
  color: var(--muted);
  font-weight: 600;
}

.speed-row {
  flex-direction: column;
  align-items: stretch;
}

.speed-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.speed-header span:last-child {
  color: var(--text);
  font-weight: 700;
}

#speed-slider {
  width: 100%;
}

.speed-buttons,
.chip-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.speed-buttons button,
.chip-group button {
  background: #0f1a2b;
  color: var(--muted);
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.9rem;
}

.speed-buttons button.active,
.chip-group button.active {
  background: rgba(var(--accent-rgb), 0.15);
  color: var(--text);
  border-color: rgba(var(--accent-rgb), 0.3);
}

.color-group {
  display: flex;
  gap: 0.6rem;
}

.option-group--color {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 0.4rem;
}

.option-group--color .color-group {
  width: 100%;
  justify-content: flex-end;
}

.option-group--vis-speed {
  flex: 1 1 100%;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.option-group--vis-speed span {
  color: var(--muted);
  font-weight: 600;
}

.option-group--vis-speed .vis-speed {
  width: 100%;
}

.option-group--vis-speed input[type="range"] {
  width: 100%;
}

.color-group button {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: currentColor;
  padding: 0;
}

.color-group button[data-color="#1cc5b8"] {
  color: #1cc5b8;
}

.color-group button[data-color="#a96bff"] {
  color: #a96bff;
}

.color-group button[data-color="#ff8b5e"] {
  color: #ff8b5e;
}

.color-group button[data-color="#f2d45c"] {
  color: #f2d45c;
}

.color-group button.active {
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 6px rgb(255 255 255 / 0.08);
}

footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.6rem;
  padding-bottom: 0.6rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.35rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--accent);
  text-decoration: none;
}

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

.success {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  background: rgba(28, 197, 184, 0.12);
  border: 1px solid rgba(28, 197, 184, 0.35);
  color: var(--accent);
}

.success.error {
  background: rgba(242, 83, 83, 0.12);
  border-color: rgba(242, 83, 83, 0.35);
  color: #ffb6b6;
}

.danger-zone {
  border-color: rgba(242, 83, 83, 0.35);
}

.danger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.1rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(242, 83, 83, 0.45);
  background: rgba(242, 83, 83, 0.14);
  color: #ffcaca;
  font-weight: 700;
  cursor: pointer;
}

.danger-btn:hover {
  background: rgba(242, 83, 83, 0.2);
}

input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--card-dark);
  border: 1px solid transparent;
  border-radius: 0.9rem;
  padding: 0.85rem 1rem;
  outline: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
  border-color: rgba(var(--accent-rgb), 0.6);
}

.primary-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 960px) {
  .site-header {
    grid-template-columns: auto 1fr auto;
    align-items: center;
  }

  .nav-links {
    justify-content: flex-start;
    gap: 0.75rem;
  }
}

@media (max-width: 640px) {
  .page {
    padding: 1rem 1rem 3rem;
  }

  .card {
    padding: 1.35rem;
  }

  .hero {
    padding: 1.4rem;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    display: none;
  }

  .nav-dropdown {
    width: 100%;
  }

  .nav-drop-panel {
    position: static;
    display: flex !important;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    gap: 0.4rem;
  }

  .nav-drop-trigger {
    width: 100%;
    justify-content: space-between;
  }

  .nav-cta {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.55rem;
    width: 100%;
    margin-top: 0.6rem;
  }

  .nav-cta.mobile-closed {
    display: none;
  }

  .nav-user-trigger {
    width: 100%;
  }

  .nav-user-panel {
    position: static;
    margin-top: 0.5rem;
  }

  .site-header {
    grid-template-columns: auto auto auto;
    align-items: center;
  }

  .controls-row {
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
  }

  #play-btn {
    order: 1;
  }

  #download-btn {
    order: 2;
  }

  .volume {
    order: 3;
    width: 100%;
  }

  .speed-row,
  .options-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .vis-speed {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
  }

  .vis-speed input[type="range"] {
    width: 100%;
  }
}
