:root {
  --background-color: #121212;
  --surface-color: #1e1e1e;
  --primary-color: #bb86fc;
  --primary-variant-color: #3700b3;
  --secondary-color: #03dac6;
  --on-background-color: #e0e0e0;
  --on-surface-color: #ffffff;
  --border-color: #2c2c2c;
  --error-color: #cf6679;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--background-color);
  color: var(--on-background-color);
  margin: 0;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}

.container {
  max-width: 900px;
  width: 100%;
  padding: 1rem;
}

header {
  width: 100%;
  max-width: 900px;
  padding-bottom: 1rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1 {
  color: var(--on-surface-color);
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
}

nav a {
  color: var(--on-background-color);
  text-decoration: none;
  margin-left: 1.5rem;
  font-weight: 600;
  font-size: 1rem;
  transition: color 0.2s ease;
}

nav a:hover, nav a.active {
  color: var(--primary-color);
}

main {
  width: 100%;
}

.card {
  background: var(--surface-color);
  padding: 2.5rem;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  margin-bottom: 2rem;
  border: 1px solid var(--border-color);
}

.form-group, .form-row {
  margin-bottom: 1.75rem;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--on-surface-color);
  font-size: 1rem;
}

input[type="text"], input[type="number"], textarea {
  width: 100%;
  padding: 0.9rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  box-sizing: border-box;
  background-color: var(--background-color);
  color: var(--on-background-color);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus, textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(187, 134, 252, 0.25);
  outline: none;
}

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

.form-row {
  display: flex;
  gap: 1.5rem;
  align-items: flex-end;
}

.form-row .form-group {
  flex: 1;
  margin-bottom: 0;
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 0.5rem;
}

.checkbox-group label {
  margin-bottom: 0;
}

button, .btn {
  background-color: var(--primary-color);
  color: #000;
  border: none;
  padding: 0.9rem 1.8rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  transition: background-color 0.3s ease, transform 0.1s ease;
  text-align: center;
}

button:hover, .btn:hover {
  background-color: var(--primary-variant-color);
  color: var(--on-surface-color);
  transform: translateY(-2px);
}

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

.btn-secondary:hover {
    background-color: #018786;
}

#podcast-output {
  margin-top: 2rem;
}

.output-heading { 
  font-size: 1.8rem; 
  color: var(--on-surface-color); 
  margin-bottom: 1.5rem; 
  text-align: center; 
  font-weight: 700; 
}

.turn {
  margin-bottom: 2rem;
  padding: 1.5rem;
  border-radius: 8px;
  background-color: var(--background-color);
  border: 1px solid var(--border-color);
}

.speaker {
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

.dialogue {
  line-height: 1.7;
  font-size: 1rem;
  color: var(--on-background-color);
}

.loader {
  text-align: center;
  padding: 3rem;
  font-size: 1.2rem;
  color: var(--on-background-color);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.spinner {
  border: 4px solid rgba(255,255,255,0.1);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin-bottom: 1.5rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

#error-message {
  color: var(--on-surface-color);
  background-color: var(--error-color);
  border: 1px solid var(--error-color);
  padding: 1.25rem;
  border-radius: 8px;
  margin-top: 2rem;
  text-align: center;
  font-weight: 600;
  display: none;
}

#speakers-list {
  list-style: none;
  padding: 0;
  margin-top: 1rem;
}

#speakers-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--background-color);
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-bottom: 0.5rem;
  border: 1px solid var(--border-color);
}

.remove-speaker {
  background: var(--error-color);
  color: white;
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  cursor: pointer;
  font-weight: bold;
  font-size: 12px;
  line-height: 22px;
  text-align: center;
  transition: background-color 0.2s ease;
}

.remove-speaker:hover {
  background: #b00020;
}
