/* KillazTTS — Dark theme, mobile-first */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #1F1F1F;
  color: #E0E0E0;
  min-height: 100vh;
}

header {
  background: #2A2A2A;
  padding: 1rem;
  border-bottom: 1px solid #3A3A3A;
}

header h1 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

nav {
  display: flex;
  gap: 0.5rem;
}

nav button {
  background: #3A3A3A;
  color: #E0E0E0;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
}

nav button.active {
  background: #4A90E2;
}

main {
  padding: 1rem;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

textarea {
  width: 100%;
  background: #2A2A2A;
  color: #E0E0E0;
  border: 1px solid #3A3A3A;
  border-radius: 4px;
  padding: 0.75rem;
  font-size: 1rem;
  resize: vertical;
  margin-bottom: 1rem;
}

.controls {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

button {
  background: #3A3A3A;
  color: #E0E0E0;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
}

button.primary {
  background: #4A90E2;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.status {
  padding: 0.75rem;
  background: #2A2A2A;
  border-radius: 4px;
  font-size: 0.9rem;
}

label {
  display: block;
  margin-bottom: 1rem;
}

label input, label select {
  width: 100%;
  background: #2A2A2A;
  color: #E0E0E0;
  border: 1px solid #3A3A3A;
  border-radius: 4px;
  padding: 0.5rem;
  font-size: 1rem;
  margin-top: 0.25rem;
}

input[type="range"] {
  width: 100%;
}

#library-list {
  margin-top: 1rem;
}

.library-item {
  background: #2A2A2A;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.library-item button {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

/* --- K5 additions --- */
.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}
.meta-row {
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
}
.char-count {
  color: #8A8A8A;
}
.char-count.over {
  color: #E25C5C;
  font-weight: 600;
}
.chip {
  background: #333;
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  font-size: 0.8rem;
  color: #9FC7F5;
}
.quick-controls {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.quick-controls label.inline,
label.checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0;
  font-size: 0.95rem;
}
.quick-controls select {
  flex: 1;
  background: #2A2A2A;
  color: #E0E0E0;
  border: 1px solid #3A3A3A;
  border-radius: 4px;
  padding: 0.4rem;
}
label.checkbox input[type="checkbox"] {
  width: auto;
  accent-color: #4A90E2;
}
.progress {
  height: 6px;
  background: #2A2A2A;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}
.progress-bar {
  height: 100%;
  width: 100%;
  background: #3A3A3A;
}
.progress-bar.indeterminate {
  background: linear-gradient(90deg, #4A90E2, #7FB8FF, #4A90E2);
  background-size: 200% 100%;
  animation: indeterminate 1.2s linear infinite;
}
@keyframes indeterminate {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
.status.info { color: #9FC7F5; }
.status.warn { color: #F0C674; }
.status.error { color: #E25C5C; }
button.danger { background: #5A2A2A; }
button.small { padding: 0.4rem 0.8rem; font-size: 0.85rem; }
.hint {
  color: #8A8A8A;
  font-size: 0.85rem;
  margin: 0.5rem 0 1rem;
}
.lib-info {
  flex: 1;
  min-width: 0;
  margin-right: 0.5rem;
}
.lib-text {
  overflow-wrap: anywhere;
  margin-bottom: 0.25rem;
}
.lib-meta {
  color: #8A8A8A;
  font-size: 0.78rem;
}
.lib-btns {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}
/* touch targets for Android */
nav button, .controls button {
  min-height: 44px;
}
textarea {
  font-family: inherit;
}
