:root {
  color-scheme: dark;
  --bg: #0b1120;
  --panel: rgba(17, 24, 39, 0.86);
  --panel-2: rgba(15, 23, 42, 0.88);
  --line: rgba(148, 163, 184, 0.22);
  --text: #eef2ff;
  --muted: #94a3b8;
  --accent: #22c55e;
  --accent-2: #38bdf8;
  --warning: #facc15;
  --danger: #fb7185;
  --shadow: 0 26px 80px rgba(2, 6, 23, 0.46);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background:
    radial-gradient(circle at 12% 12%, rgba(56, 189, 248, 0.16), transparent 34rem),
    radial-gradient(circle at 88% 88%, rgba(34, 197, 94, 0.13), transparent 30rem),
    var(--bg);
  color: var(--text);
}

button,
textarea,
select {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.tool-panel {
  width: min(100%, 980px);
  display: grid;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 22px;
  backdrop-filter: blur(18px);
}

.hero {
  display: grid;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}

.eyebrow,
label,
.section-title {
  color: var(--accent-2);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2.2rem, 6vw, 4rem);
  line-height: 0.95;
}

p {
  max-width: 62ch;
  color: var(--muted);
}

.composer,
.controls,
.voice-select {
  display: grid;
  gap: 10px;
}

textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  outline: none;
}

textarea {
  min-height: 150px;
  resize: vertical;
  padding: 14px;
  line-height: 1.55;
}

select {
  min-height: 46px;
  padding: 0 14px;
}

select option {
  background: #111827;
  color: var(--text);
}

textarea:focus,
select:focus {
  border-color: rgba(56, 189, 248, 0.75);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.14);
}

.conversation-card {
  display: grid;
  gap: 10px;
}

.section-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.section-title small {
  color: var(--muted);
  font-size: 0.78rem;
}

.conversation {
  min-height: 220px;
  max-height: 340px;
  overflow-y: auto;
  overflow-x: hidden;
  display: grid;
  align-content: start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.58);
  padding: 12px;
  scrollbar-color: rgba(56, 189, 248, 0.72) rgba(15, 23, 42, 0.7);
  scrollbar-width: thin;
}

.conversation:empty::before {
  content: "Aun no hay texto guardado.";
  color: var(--muted);
}

.conversation div {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.34);
  padding: 12px;
  overflow-wrap: anywhere;
}

.conversation::-webkit-scrollbar {
  width: 10px;
}

.conversation::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.7);
  border-radius: 999px;
}

.conversation::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.9), rgba(34, 197, 94, 0.75));
  border-radius: 999px;
}

.button-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

button {
  min-height: 46px;
  border: 1px solid rgba(34, 197, 94, 0.5);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.95), rgba(14, 165, 233, 0.9));
  color: #03131a;
  cursor: pointer;
  font-weight: 900;
}

button:disabled {
  border-color: var(--line);
  background: rgba(15, 23, 42, 0.78);
  color: var(--muted);
  cursor: not-allowed;
}

.notification {
  min-width: 260px;
  max-width: min(calc(100vw - 32px), 420px);
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  position: fixed;
  left: 50%;
  bottom: -120px;
  transform: translateX(-50%);
  transition: 280ms ease;
  text-align: center;
  box-shadow: var(--shadow);
  font-weight: 800;
}

.notification.show {
  bottom: 28px;
}

.info {
  background: rgba(14, 165, 233, 0.95);
  color: #03131a;
}

.warning {
  background: rgba(250, 204, 21, 0.95);
  color: #18181b;
}

.success {
  background: rgba(34, 197, 94, 0.95);
  color: #03131a;
}

@media (max-width: 720px) {
  .app-shell {
    padding: 12px;
  }

  .tool-panel {
    padding: 16px;
  }

  .button-row {
    grid-template-columns: 1fr;
  }
}
