/* ZHURMA-TTS Styles */

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

:root {
  --primary: #e63946;
  --primary-dark: #c1121f;
  --bg: #1a1a2e;
  --bg-light: #16213e;
  --text: #edf2f4;
  --text-muted: #8d99ae;
  --border: #2d3a5c;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 2rem 1rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 2rem;
}

.header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.header .accent {
  color: var(--primary);
}

.header .subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-top: 0.5rem;
}

/* Main content */
.main {
  flex: 1;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label,
.form-group .label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-muted);
}

textarea {
  width: 100%;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-light);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  resize: vertical;
  transition: border-color 0.2s;
}

textarea:focus {
  outline: none;
  border-color: var(--primary);
}

textarea::placeholder {
  color: var(--text-muted);
}

/* Voice selection */
.voice-select {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.voice-select .label {
  margin-bottom: 0.25rem;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  color: var(--text);
  padding: 0.75rem 1rem;
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.2s, background-color 0.2s;
}

.radio-label:hover {
  border-color: var(--primary);
}

.radio-label:has(input:checked) {
  border-color: var(--primary);
  background: rgba(230, 57, 70, 0.1);
}

.radio-label input[type="radio"] {
  accent-color: var(--primary);
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
}

.voice-name {
  font-weight: 600;
  margin-right: 0.5rem;
}

.voice-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.875rem 2rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
  text-decoration: none;
  text-align: center;
}

.btn:active {
  transform: scale(0.98);
}

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

.btn-primary {
  background: var(--primary);
  color: white;
  width: 100%;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
}

.btn-secondary {
  background: var(--bg-light);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--border);
}

/* Status message */
.status {
  text-align: center;
  padding: 0.75rem;
  margin-top: 1rem;
  border-radius: 8px;
  min-height: 2.5rem;
}

.status.error {
  background: rgba(230, 57, 70, 0.15);
  color: #ff6b6b;
}

/* Audio container */
.audio-container {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: var(--bg-light);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.audio-container.hidden {
  display: none;
}

.audio-container audio {
  width: 100%;
  margin-bottom: 1rem;
}

.audio-container .btn-secondary {
  width: 100%;
}

/* Footer */
.footer {
  text-align: center;
  padding-top: 2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

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

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

/* Responsive */
@media (max-width: 480px) {
  .header h1 {
    font-size: 2rem;
  }

  .radio-label {
    padding: 0.625rem 0.875rem;
  }
}
