/* Modern, Sleek TTS Generator Styles */
body {
  background: linear-gradient(135deg, #181c20 0%, #23272e 100%);
  color: #f3f3f3;
  font-family: 'Segoe UI', Arial, sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tts-container {
  background: rgba(36, 41, 54, 0.82);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-radius: 18px;
  border: 1.5px solid rgba(255, 255, 255, 0.13);
  max-width: 440px;
  width: 100%;
  margin: 48px auto;
  padding: 38px 32px 28px 32px;
  transition: box-shadow 0.2s;
}

.tts-container:hover {
  box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.45);
}

h1 {
  margin-top: 0;
  font-size: 2.1rem;
  font-weight: 700;
  background: linear-gradient(90deg, #7ecfff 30%, #a6ffcb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-fill-color: transparent;
  text-align: center;
  letter-spacing: 0.5px;
}

label {
  display: block;
  margin-top: 18px;
  margin-bottom: 6px;
  font-size: 1.05rem;
  color: #b7c9d9;
  font-weight: 500;
}

textarea {
  width: 100%;
  min-height: 100px;
  resize: vertical;
  border-radius: 10px;
  border: 1.5px solid #3a4250;
  background: rgba(24, 28, 32, 0.95);
  color: #f3f3f3;
  font-size: 1.12rem;
  padding: 12px;
  margin-bottom: 18px;
  box-sizing: border-box;
  outline: none;
  transition: border 0.18s;
}

textarea:focus {
  border: 1.5px solid #7ecfff;
}

.controls {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.controls select,
.controls input[type="checkbox"] {
  margin-left: 6px;
}

#tts-language {
  background: #23272e;
  color: #f3f3f3;
  border-radius: 7px;
  border: 1.2px solid #3a4250;
  padding: 6px 12px;
  font-size: 1rem;
  transition: border 0.18s;
}

#tts-language:focus {
  border: 1.2px solid #7ecfff;
}

.auto-tts-label {
  display: flex;
  align-items: center;
  font-size: 1rem;
  margin-left: auto;
  color: #b7c9d9;
  font-weight: 500;
  user-select: none;
}

.button-group {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 16px;
}

button {
  background: linear-gradient(90deg, #7ecfff 0%, #a6ffcb 100%);
  color: #181c20;
  border: none;
  border-radius: 8px;
  padding: 10px 28px;
  font-size: 1.08rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(126, 207, 255, 0.08);
  transition: background 0.18s, transform 0.13s;
  outline: none;
}

button:active {
  transform: scale(0.97);
}

button:disabled {
  background: #3a4250;
  color: #b7c9d9;
  cursor: not-allowed;
  box-shadow: none;
}

.status {
  min-height: 24px;
  text-align: center;
  font-size: 1.08rem;
  color: #ffb86c;
  margin-top: 10px;
  letter-spacing: 0.1px;
  font-weight: 500;
  transition: color 0.18s;
}

/* Progress bar for segmented TTS (optional, for future use) */
.tts-progress-bar {
  width: 0%;
  height: 5px;
  background: linear-gradient(90deg, #7ecfff 0%, #a6ffcb 100%);
  border-radius: 3px;
  margin: 10px 0 0 0;
  transition: width 0.3s;
  box-shadow: 0 1px 4px rgba(126, 207, 255, 0.12);
  display: none;
}

/* Spinner for download loading */
.spinner {
  display: none;
  margin: 0 auto 8px auto;
  border: 4px solid #e0e0e0;
  border-top: 4px solid #7ecfff;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
