/* Dark theme palette - exact hex values from wombat_narrates_gui.py's own
   module-level constants (see briefs/WOMBAT-NARRATES-WEB-FRONTEND-BRIEF.md
   Section 2), reused here so the website and desktop app feel like the
   same product. */
:root {
  --bg-main: #111315;
  --bg-accent: #2b3138;
  --bg-accent-active: #3a4149;
  --fg-main: #f3f4f6;
  --fg-muted: #aeb6bf;
  --fg-status-speaking: #9fc6ff;
  --fg-status-error: #ff9b9b;
  --grade-a: #5fd97a;
  --grade-c: #e0c168;
}

* {
  box-sizing: border-box;
}

body {
  background: var(--bg-main);
  color: var(--fg-main);
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
  margin: 0;
  min-height: 100vh;
}

.banner {
  display: block;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  height: auto;
}

.view {
  max-width: 640px;
  margin: 0 auto;
  padding: 16px 20px 48px;
}

.view[hidden] {
  display: none;
}

h1 {
  font-size: 1.6rem;
  margin: 0.2em 0;
}

h2 {
  font-size: 1.15rem;
  margin-top: 0;
}

.muted {
  color: var(--fg-muted);
}

.app-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.card {
  background: var(--bg-accent);
  border-radius: 10px;
  padding: 20px;
  margin-top: 16px;
}

.field {
  display: block;
  margin-bottom: 14px;
}

.field span {
  display: block;
  font-size: 0.85rem;
  color: var(--fg-muted);
  margin-bottom: 4px;
}

.field input[type="text"],
.field input[type="file"] {
  width: 100%;
  padding: 8px 10px;
  background: var(--bg-main);
  color: var(--fg-main);
  border: 1px solid var(--bg-accent-active);
  border-radius: 6px;
  font-size: 1rem;
}

button {
  font-size: 1rem;
  cursor: pointer;
}

.btn-primary {
  background: var(--fg-status-speaking);
  color: var(--bg-main);
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: bold;
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: default;
}

.login-actions {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}

.btn-secondary {
  background: transparent;
  color: var(--fg-main);
  border: 1px solid var(--bg-accent-active);
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: bold;
}

/* Bold+larger rather than underlined - matches the desktop app's Help/
   Contact link styling (see docs/PROJECT-DECISIONS.md, link-style entry). */
.btn-link {
  background: none;
  border: none;
  color: var(--fg-status-speaking);
  font-weight: bold;
  font-size: 1.05rem;
  padding: 0;
}

.status {
  font-weight: bold;
}

.log {
  font-family: monospace;
  font-size: 0.85rem;
  color: var(--fg-muted);
  white-space: pre-wrap;
  margin-top: 8px;
}

#download-area a {
  display: inline-block;
  margin-top: 10px;
  font-weight: bold;
  font-size: 1.05rem;
  color: var(--grade-a);
}

.tabs {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  border-bottom: 1px solid var(--bg-accent-active);
}

.tab-btn {
  background: none;
  border: none;
  color: var(--fg-muted);
  font-weight: bold;
  padding: 8px 14px;
  border-bottom: 2px solid transparent;
}

.tab-btn.active {
  color: var(--fg-main);
  border-bottom-color: var(--fg-status-speaking);
}

.panel[hidden] {
  display: none;
}

textarea {
  width: 100%;
  padding: 8px 10px;
  background: var(--bg-main);
  color: var(--fg-main);
  border: 1px solid var(--bg-accent-active);
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  resize: vertical;
}

audio {
  width: 100%;
  margin-top: 10px;
}

#btn-preview-play,
#btn-preview-stop {
  margin-right: 8px;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--fg-status-speaking);
}

.voice-section {
  margin-top: 14px;
}

.voice-section-heading {
  font-weight: bold;
  margin-bottom: 6px;
}

.voice-columns {
  display: flex;
  gap: 16px;
}

.voice-column {
  flex: 1;
  min-width: 0;
}

.voice-column-heading {
  color: var(--fg-muted);
  font-style: italic;
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.voice-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
}

.voice-row span:nth-child(2) {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.grade-badge {
  font-weight: bold;
  font-size: 0.85rem;
  width: 2em;
  text-align: right;
}

.help-section {
  margin-bottom: 18px;
}

.help-heading {
  font-weight: bold;
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.help-section p {
  color: var(--fg-muted);
  margin: 0;
}

.wombatex-link {
  display: block;
  margin-top: 20px;
}

.attribution {
  color: var(--fg-muted);
  font-style: italic;
  font-size: 0.8rem;
  margin-top: 4px;
}

.italic {
  font-style: italic;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 10;
}

.modal-overlay[hidden] {
  display: none;
}

.modal-box {
  background: var(--bg-accent);
  border-radius: 12px;
  padding: 24px;
  max-width: 420px;
  width: 100%;
  text-align: center;
}

.contact-title {
  margin: 0;
}

.contact-title-main {
  display: block;
  font-size: 1.4rem;
}

.contact-title-sub {
  display: block;
  font-size: 0.95rem;
  font-weight: normal;
  color: var(--fg-muted);
  margin-top: 2px;
}

.contact-image {
  max-width: 220px;
  width: 100%;
  height: auto;
  border-radius: 10px;
  margin-bottom: 12px;
}

.contact-link {
  display: block;
  margin: 8px 0;
  text-decoration: none;
}
