/*
  Stile für den KI-Videogenerator (seniorentreff.ai/video/)
  Angelehnt an bilder/styles.css und musik/styles.css
*/

:root {
  --base-font-size: 18px;
  --font-family: "Arial", "Helvetica", sans-serif;
  --background-color: #ffffff;
  --text-color: #222222;
  --primary-color: #20539a;
  --secondary-color: #3f79c7;
  --accent-color: #1a7a3c;
  --border-radius: 6px;
  --card-bg: #f4f8ff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-family);
  font-size: var(--base-font-size);
  background-color: var(--background-color);
  color: var(--text-color);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ===== HEADER ===== */
header { background-color: var(--primary-color); color: #ffffff; padding: 0.5rem 1rem; }
.header-content {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 960px; margin: 0 auto; gap: 0.8rem;
}
.logo img { width: 58px; height: auto; }
.title-group { flex: 1; }
.title-group h1 { margin: 0; font-size: 1.4rem; line-height: 1.2; }
.title-group .subtitle { margin: 0.2rem 0 0; font-size: 0.82rem; opacity: 0.88; }
.controls { display: flex; gap: 0.4rem; align-items: center; flex-shrink: 0; }
.controls button, .controls a {
  background: var(--secondary-color); color: #ffffff; border: none;
  padding: 0.35rem 0.65rem; border-radius: var(--border-radius);
  cursor: pointer; font-size: 0.9rem; font-weight: bold;
  text-decoration: none; display: inline-block;
}
.controls button:hover, .controls a:hover { background: #5591d8; }

/* ===== MAIN ===== */
main { flex: 1; max-width: 960px; width: 100%; margin: 0 auto; padding: 1.5rem 1rem 2rem; }

.intro {
  background: var(--card-bg); border-left: 4px solid var(--primary-color);
  border-radius: var(--border-radius); padding: 1rem 1.2rem;
  margin-bottom: 1.5rem; line-height: 1.6;
}
.intro p { margin: 0.4rem 0; }

/* ===== LIMIT ===== */
.limit-bar { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 1rem; font-size: 0.9rem; color: #555; }
.limit-dots { display: flex; gap: 5px; }
.limit-dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--secondary-color); background: #fff; }
.limit-dot.used { background: var(--secondary-color); }

/* ===== LABELS ===== */
.section-label { font-weight: bold; font-size: 1.05rem; margin: 1.2rem 0 0.6rem; color: var(--primary-color); }

/* ===== SZENEN-PRESETS ===== */
.scene-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.2rem; }
.scene-btn {
  background: var(--card-bg); border: 2px solid var(--secondary-color);
  color: var(--primary-color); padding: 0.5rem 1rem; border-radius: 20px;
  cursor: pointer; font-size: 1rem; font-family: var(--font-family);
  transition: background 0.15s, color 0.15s;
}
.scene-btn:hover, .scene-btn.active { background: var(--secondary-color); color: #ffffff; }

/* ===== PROMPT ===== */
.prompt-area {
  width: 100%; min-height: 80px; font-size: 1rem; font-family: var(--font-family);
  border: 2px solid #aac0e0; border-radius: var(--border-radius);
  padding: 0.7rem; resize: vertical; line-height: 1.5; color: var(--text-color);
}
.prompt-area:focus { outline: 3px solid var(--secondary-color); border-color: var(--secondary-color); }
.prompt-hint { font-size: 0.82rem; color: #666; margin: 0.3rem 0 1rem; }

/* ===== OPTIONEN ===== */
.options-row { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 1.2rem; align-items: flex-start; }
.option-group { flex: 1; min-width: 180px; }
.option-group > label { font-weight: bold; color: var(--primary-color); display: block; margin-bottom: 0.5rem; }

.radio-pills { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.radio-pill {
  display: flex; align-items: center; gap: 0.35rem;
  background: var(--card-bg); border: 2px solid #aac0e0; border-radius: var(--border-radius);
  padding: 0.4rem 0.8rem; cursor: pointer; font-family: var(--font-family);
  font-size: 0.95rem; transition: border-color 0.15s;
}
.radio-pill input[type="radio"] { accent-color: var(--primary-color); width: 16px; height: 16px; }
.radio-pill:has(input:checked) { border-color: var(--primary-color); background: #dce8f8; font-weight: bold; }

/* ===== GENERATE-BUTTON ===== */
.generate-btn {
  display: block; width: 100%; background: var(--accent-color); color: #ffffff;
  border: none; border-radius: var(--border-radius); padding: 0.85rem;
  font-size: 1.15rem; font-family: var(--font-family); font-weight: bold;
  cursor: pointer; transition: background 0.15s; margin-bottom: 1.5rem;
}
.generate-btn:hover:not(:disabled) { background: #15693a; }
.generate-btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ===== FEHLER ===== */
.error-box {
  display: none; background: #fff0f0; border: 2px solid #d94040;
  border-radius: var(--border-radius); padding: 0.9rem 1.2rem;
  color: #b00000; margin-bottom: 1rem;
}
.error-box.visible { display: block; }

/* ===== FORTSCHRITT ===== */
.progress-box {
  display: none; background: var(--card-bg); border: 2px solid var(--secondary-color);
  border-radius: var(--border-radius); padding: 1.2rem 1.4rem; margin-bottom: 1rem; text-align: center;
}
.progress-box.visible { display: block; }
.progress-box p { margin: 0 0 0.8rem; color: var(--primary-color); font-weight: bold; }
.progress-bar-wrap { background: #d0dff0; border-radius: 20px; height: 18px; overflow: hidden; }
.progress-bar-fill {
  height: 100%; background: var(--secondary-color); border-radius: 20px;
  width: 0%; transition: width 1s linear;
}
.progress-hint { font-size: 0.82rem; color: #666; margin-top: 0.6rem; }

/* ===== VIDEO-PLAYER ===== */
.result-box { display: none; margin-bottom: 1.5rem; }
.result-box.visible { display: block; }
.result-box h3 { color: var(--primary-color); font-size: 1.1rem; margin: 0 0 0.8rem; }

.video-wrap {
  border: 2px solid var(--secondary-color); border-radius: 8px; overflow: hidden;
  max-width: 100%; background: #000;
}
.video-wrap video { display: block; width: 100%; max-height: 480px; }

.result-actions { display: flex; gap: 0.8rem; margin-top: 0.8rem; flex-wrap: wrap; align-items: center; }
.download-btn {
  display: inline-block; background: var(--primary-color); color: #ffffff;
  text-decoration: none; padding: 0.5rem 1.2rem; border-radius: var(--border-radius);
  font-size: 0.95rem; font-weight: bold;
}
.download-btn:hover { background: var(--secondary-color); }
.result-prompt-label { font-size: 0.85rem; color: #666; font-style: italic; margin-top: 0.5rem; }

/* ===== VERLAUF ===== */
.history-section { margin-top: 2rem; }
.history-section h2 {
  font-size: 1.05rem; color: var(--primary-color);
  border-bottom: 2px solid var(--secondary-color); padding-bottom: 0.3rem; margin-bottom: 0.8rem;
}
.history-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 1rem; }
.history-item { background: var(--card-bg); border-radius: var(--border-radius); overflow: hidden; border: 1px solid #c0d0ea; }
.history-item video { display: block; width: 100%; max-height: 200px; background: #000; }
.history-item-footer { display: flex; justify-content: space-between; align-items: center; padding: 0.5rem 0.8rem; gap: 0.5rem; }
.history-item-label { font-size: 0.82rem; color: #555; font-style: italic; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-item-dl { font-size: 0.82rem; color: var(--primary-color); text-decoration: none; font-weight: bold; flex-shrink: 0; }
.history-item-dl:hover { text-decoration: underline; }

/* ===== ADSENSE ===== */
.adsense-wrap { max-width: 960px; margin: 0.5rem auto 1rem; padding: 0 1rem; text-align: center; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

@media (max-width: 600px) {
  .header-content { flex-wrap: wrap; }
  .controls { order: 3; width: 100%; justify-content: flex-end; }
  .options-row { flex-direction: column; }
}
