*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0f1117;
  color: #e1e4e8;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.container {
  background: #eee;
  border: 1px solid #30363d;
  border-radius: 12px;
  padding: 32px;
  width: 100%;
  max-width: 860px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
h1 {
  font-size: 1.4rem;
  margin-bottom: 24px;
  color: #f0f6fc;
  text-align: center;
}
.glow-title {
  font-family: 'Orbitron', 'Segoe UI', sans-serif;
  font-weight: 700;
  font-size: 2rem;
  color: #58a6ff;
  text-shadow: 0 0 8px rgba(88, 166, 255, 0.6), 0 0 20px rgba(88, 166, 255, 0.3), 0 0 40px rgba(88, 166, 255, 0.15);
  animation: glow-pulse 3s ease-in-out infinite;
}
@keyframes glow-pulse {
  0%, 100% { text-shadow: 0 0 8px rgba(88, 166, 255, 0.6), 0 0 20px rgba(88, 166, 255, 0.3), 0 0 40px rgba(88, 166, 255, 0.15); }
  50% { text-shadow: 0 0 12px rgba(88, 166, 255, 0.8), 0 0 30px rgba(88, 166, 255, 0.5), 0 0 60px rgba(88, 166, 255, 0.25); }
}
.description {
  font-size: 0.95rem;
  color: #000;
  text-align: center;
  line-height: 1.5;
  margin-bottom: 24px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.template-title {
  font-size: 1.1rem;
  color: #58a6ff;
  text-align: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #30363d;
}
label {
  display: block;
  font-size: 0.85rem;
  color: #8b949e;
  margin-bottom: 6px;
}
select, input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #30363d;
  border-radius: 8px;
  background: #0d1117;
  color: #e1e4e8;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}
select:focus, input[type="text"]:focus {
  border-color: #58a6ff;
}
input[type="radio"] {
  width: auto;
  accent-color: #58a6ff;
  cursor: pointer;
}
input[type="text"].input-error {
  border-color: #f85149;
}
input[type="text"].input-error:focus {
  border-color: #f85149;
}
#inputs-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.field { margin-bottom: 0; }
.field-error {
  font-size: 0.75rem;
  color: #f85149;
  margin-top: 4px;
  min-height: 16px;
}
button {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(to bottom, #1f6feb, #58a6ff);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}
button:hover:not(:disabled) { background: linear-gradient(to bottom, #388bfd, #79c0ff); }
button:disabled { opacity: 0.5; cursor: not-allowed; }
.phrase-output {
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 14px;
  margin: 16px 0;
  font-size: 1.9rem;
  line-height: 1.5;
  color: #f0f6fc;
  min-height: 48px;
  word-wrap: break-word;
  text-align: center;
  display: none;
}
.phrase-output.visible {
  display: block;
}
.audio-note {
  text-align: center;
  font-size: 0.7rem;
  color: #484f58;
  margin-top: 8px;
}
.status {
  text-align: center;
  margin-top: 16px;
  font-size: 0.85rem;
  color: #8b949e;
  min-height: 20px;
}
.status.loading { color: #58a6ff; }
.status.error { color: #f85149; }
.voice-divider {
  border: none;
  border-top: 1px solid #30363d;
  margin: 20px 0;
}
.voice-section {
  margin-bottom: 16px;
}
.voice-label {
  display: block;
  font-size: 0.85rem;
  color: #8b949e;
  margin-bottom: 10px;
}
.voice-radios {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}
.voice-option {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.4rem;
  color: #58a6ff;
  cursor: pointer;
}
