/* TTS Specific Styles */
:root {
  --primary-color: #e28743;
  --primary-hover: #d1702f;
  --text-color: #484d55;
  --text-muted: #888888;
  --surface-color: #ffffff;
  --border-color: #dddddd;
}

.tts-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 0;
}

.tts-header {
  text-align: center;
  margin-bottom: 3rem;
}

.tts-header h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tts-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.tts-card {
  background: var(--surface-color);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  animation: slideUp 0.5s ease-out forwards;
}

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

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

.select-wrapper {
  position: relative;
}

.select-wrapper::after {
  content: '▼';
  font-size: 0.8rem;
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-muted);
}

select, textarea {
  width: 100%;
  padding: 1rem;
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-color);
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.3s ease;
  appearance: none;
}

select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

.char-count {
  text-align: right;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.btn-large {
  width: 100%;
  padding: 1rem;
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

/* Loading animation */
.loader {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
}

.hidden {
  display: none !important;
}

/* Result Section */
.result-section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  animation: fadeIn 0.5s ease-out forwards;
}

.result-section h3 {
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.audio-player-wrapper {
  background-color: rgba(0, 0, 0, 0.2);
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

audio {
  width: 100%;
  outline: none;
}

.action-buttons {
  display: flex;
  gap: 1rem;
}

.action-buttons .btn {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

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

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .tts-header h1 {
    font-size: 2rem;
  }
  
  .action-buttons {
    flex-direction: column;
  }
}

/* Mode Switcher Tabs */
.tts-tabs {
  display: flex;
  width: 100%;
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--border-color);
  gap: 15px;
}

.tab-button {
  background: transparent !important;
  border: none !important;
  border-bottom: 3px solid transparent !important;
  color: var(--text-muted) !important;
  padding: 0.75rem 1.5rem !important;
  font-size: 1.1rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  border-radius: 0 !important;
  transition: all 0.3s ease !important;
  box-shadow: none !important;
}

.tab-button:hover {
  color: var(--text-color) !important;
}

.tab-button.active {
  color: var(--primary-color) !important; /* theme accent color */
  border-bottom-color: var(--primary-color) !important;
}

.tab-content-panel {
  display: block;
  animation: fadeIn 0.4s ease-out forwards;
}

/* File Upload Controls */
.file-upload-wrapper {
  position: relative;
  width: 100%;
}

.file-upload-wrapper input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.file-upload-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem;
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  background: #fdfdfd;
  transition: all 0.3s ease;
  text-align: center;
  cursor: pointer;
}

.file-upload-wrapper:hover .file-upload-dropzone,
.file-upload-wrapper input[type="file"]:focus + .file-upload-dropzone {
  border-color: var(--primary-color);
  background: #f7f7f7;
}

.file-upload-wrapper.dragover .file-upload-dropzone {
  border-color: var(--primary-color);
  background: rgba(226, 133, 67, 0.08);
}

.upload-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.upload-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Advanced Settings Accordion styling */
.advanced-settings-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  padding: 0.5rem;
  border-radius: 4px;
  background-color: rgba(226, 135, 67, 0.05);
  border: 1px solid rgba(226, 135, 67, 0.15);
  transition: all 0.3s ease;
  user-select: none;
}

.advanced-settings-toggle:hover {
  background-color: rgba(226, 135, 67, 0.1);
  border-color: var(--primary-color);
}

.advanced-settings-toggle .toggle-icon {
  font-size: 0.75rem;
  transition: transform 0.3s ease;
  color: var(--primary-color);
}

.advanced-settings-toggle.active .toggle-icon {
  transform: rotate(90deg);
}

.advanced-settings-toggle .toggle-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--primary-color);
}

.advanced-settings-content {
  padding: 1.5rem;
  background: #fdfdfd;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 1.5rem;
  animation: fadeIn 0.3s ease-out forwards;
}

.advanced-settings-content.hidden {
  display: none !important;
}

.slider-input {
  width: 100%;
  height: 6px;
  background: var(--border-color);
  outline: none;
  border-radius: 3px;
  -webkit-appearance: none;
  appearance: none;
  margin: 0.5rem 0;
}

.slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary-color);
  cursor: pointer;
  transition: transform 0.1s ease;
}

.slider-input::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.slider-input::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: none;
  border-radius: 50%;
  background: var(--primary-color);
  cursor: pointer;
  transition: transform 0.1s ease;
}

.slider-input::-moz-range-thumb:hover {
  transform: scale(1.2);
}

