:root {
  --bg: #0b1020;
  --panel: #141a32;
  --accent: #7aa2ff;
  --muted: #9aa3b2;
  --text: #e8ecf8;
  --success: #a0ffbf;
  --error: #ffb3c1;
}

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

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(180deg, #0b1020, #0a0d18 40%, #0b1020);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  line-height: 1.5;
}

.app {
  width: min(980px, 100%);
  background: rgba(20, 26, 50, .75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(122, 162, 255, .15);
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .45);
  overflow: hidden;
}

header {
  padding: 22px 24px;
  border-bottom: 1px solid rgba(122, 162, 255, .15);
  display: flex;
  gap: 12px;
  align-items: center;
}

header h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .2px;
}

header .badge {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
}

main {
  padding: 18px 24px 24px;
  display: grid;
  gap: 16px;
}

.row {
  display: grid;
  gap: 12px;
}

.grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(12, 1fr);
}

.col-12 {
  grid-column: span 12;
}

.col-6 {
  grid-column: span 6;
}

@media (max-width: 768px) {
  .col-6 {
    grid-column: span 12;
  }
}

.panel {
  background: var(--panel);
  border: 1px solid rgba(122, 162, 255, .15);
  border-radius: 16px;
  padding: 16px;
}

label {
  font-size: 12px;
  color: var(--muted);
  display: block;
  margin: 0 0 8px 2px;
}

textarea {
  width: 100%;
  min-height: 180px;
  resize: vertical;
  background: #0e1429;
  color: var(--text);
  border: 1px solid rgba(122, 162, 255, .25);
  border-radius: 12px;
  padding: 12px;
  font-size: 16px;
  line-height: 1.5;
  outline: none;
  font-family: inherit;
}

textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(122, 162, 255, .2);
}

select, input[type="range"], button {
  width: 100%;
  font-family: inherit;
}

select {
  background: #0e1429;
  color: var(--text);
  border: 1px solid rgba(122, 162, 255, .25);
  border-radius: 12px;
  padding: 10px;
  font-size: 14px;
  outline: none;
}

select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(122, 162, 255, .2);
}

.controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.controls button {
  flex: 1 1 160px;
  appearance: none;
  border: 1px solid rgba(122, 162, 255, .3);
  background: linear-gradient(180deg, #1b2347, #151c39);
  color: var(--text);
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .04s ease, box-shadow .2s ease, border-color .2s ease;
}

.controls button:hover {
  border-color: var(--accent);
  box-shadow: 0 6px 20px rgba(122, 162, 255, .15);
}

.controls button:active {
  transform: translateY(1px);
}

.controls button[disabled] {
  opacity: .5;
  cursor: not-allowed;
}

.slider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.slider input {
  accent-color: var(--accent);
  flex: 1;
}

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

.status {
  font-size: 13px;
  color: var(--success);
}

footer {
  padding: 10px 16px 18px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

.pill {
  display: inline-block;
  padding: 4px 8px;
  border: 1px solid rgba(122, 162, 255, .25);
  border-radius: 999px;
}

.count {
  font-variant-numeric: tabular-nums;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-content {
  background: var(--panel);
  padding: 24px;
  border-radius: 16px;
  max-width: 500px;
  width: 100%;
  border: 1px solid rgba(122, 162, 255, .15);
}

.modal h3 {
  margin-bottom: 16px;
  color: var(--accent);
}

.modal p {
  margin-bottom: 12px;
}

.modal button {
  margin-top: 16px;
  padding: 8px 16px;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  color: var(--bg);
  font-weight: 600;
  cursor: pointer;
}

.voice-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
}

.feature-section {
  margin-bottom: 24px;
}

.feature-section:last-child {
  margin-bottom: 0;
}

.feature-header {
  margin-bottom: 16px;
}

.feature-header h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--accent);
  margin: 0;
}

input[type="text"] {
  width: 100%;
  background: #0e1429;
  color: var(--text);
  border: 1px solid rgba(122, 162, 255, .25);
  border-radius: 12px;
  padding: 12px;
  font-size: 16px;
  outline: none;
  font-family: inherit;
}

input[type="text"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(122, 162, 255, .2);
}

