/* ─────────────────────────────────────────
   Typisch Westerwald – Quiz Design v1.2.0
───────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;700&family=Merriweather:wght@700;900&display=swap');

:root {
  --bg:           #1a1f2e;
  --bg-card:      #242938;
  --bg-card2:     #2d3347;
  --green:        #2e7d32;
  --green-bright: #4caf50;
  --green-dark:   #1b5e20;
  --green-dim:    #1e7c1e;
  --white:        #ffffff;
  --gray:         #b0b8cc;
  --red:          #e05555;
  --border:       #3a4060;
  --radius:       12px;
  --radius-sm:    6px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background-color: var(--bg);
  color: var(--white);
  font-family: 'Lato', 'Segoe UI', system-ui, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Navigation ── */
.navbar {
  background: #0f1219;
  padding: 0.6rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 200;
  flex-wrap: wrap;
}

.navbar-logo-link { display: flex; align-items: center; }
.navbar-logo      { height: 46px; width: auto; }
.navbar-spacer    { flex: 1; }

/* Nav-Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
  margin-left: auto;
}

.nav-links a {
  color: var(--gray);
  text-decoration: none;
  font-size: 0.88rem;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--white);
  background: rgba(255,255,255,0.07);
}

/* Social Icons */
.nav-social {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  margin-left: 0.5rem;
  padding-left: 0.75rem;
  border-left: 1px solid var(--border);
}

.nav-social a {
  color: var(--gray);
  font-size: 1rem;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.15s;
  padding: 0 !important;
}

.nav-social a:hover {
  color: var(--white) !important;
  background: rgba(255,255,255,0.1) !important;
}

/* Hamburger (Mobile) */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  margin-left: auto;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--gray);
  border-radius: 2px;
  transition: all 0.2s;
}

/* ── Hero Banner ── */
.hero-banner {
  position: relative;
  width: 100%;
  height: clamp(260px, 42vw, 480px);
  overflow: hidden;
}

.hero-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  display: block;
}

/* Doppelter Overlay: dunkler Gradient unten + leichter Schleier */
.hero-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.15) 0%,
    rgba(0,0,0,0.25) 50%,
    rgba(26,31,46,0.92) 100%
  );
}

.hero-banner-text {
  position: absolute;
  bottom: 2.5rem;
  left: 0;
  right: 0;
  text-align: center;
  padding: 0 1rem;
}

.hero-headline {
  font-family: 'Merriweather', Georgia, serif;
  font-size: clamp(1.5rem, 4vw, 2.6rem);
  font-weight: 900;
  color: var(--white);
  text-shadow: 0 2px 12px rgba(0,0,0,0.7);
  margin-bottom: 0.5rem;
  line-height: 1.25;
}

.hero-subline {
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  color: rgba(255,255,255,0.85);
  text-shadow: 0 1px 6px rgba(0,0,0,0.6);
}

/* ── Hero Content (unterhalb Banner) ── */
.hero-content {
  text-align: center;
  padding: 2rem 1rem 3rem;
  max-width: 600px;
  margin: 0 auto;
}

.hero-logo-main {
  max-width: 280px;
  width: 70%;
  margin-bottom: 2rem;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.btn-hint {
  margin-top: 0.75rem;
  font-size: 0.82rem;
  color: var(--gray);
}

/* ── Hauptinhalt ── */
main {
  flex: 1;
  padding: 1rem 1rem 2rem;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}

/* ── Karten ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1.5rem;
}

/* ── Überschriften ── */
h1 {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 2rem;
  color: var(--white);
  margin-bottom: 0.5rem;
}
h2 {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 1.4rem;
  color: var(--white);
  margin-bottom: 1rem;
}
h3 { font-size: 1.1rem; color: var(--green-bright); margin-bottom: 0.75rem; }

p { line-height: 1.7; color: var(--gray); }

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.2s ease;
  font-family: 'Lato', sans-serif;
}

.btn-primary { background: var(--green); color: var(--white); }
.btn-primary:hover {
  background: var(--green-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(46,125,50,0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--green-bright);
  border: 2px solid var(--green-bright);
}
.btn-secondary:hover { background: var(--green-dim); color: var(--white); }

.btn-danger { background: var(--red); color: var(--white); }
.btn-danger:hover { background: #c04040; }

.btn-sm     { padding: 0.4rem 1rem; font-size: 0.85rem; }
.btn-block  { display: block; width: 100%; text-align: center; }

.start-btn { font-size: 1.15rem; padding: 0.9rem 2.5rem; }

/* ── Intro-Seite ── */
.hero {
  text-align: center;
  padding: 2.5rem 1rem 2rem;
}

.hero .tagline { font-size: 1.05rem; color: var(--gray); margin-bottom: 2rem; }

/* ── Fortschrittsbalken ── */
.progress-bar-wrap {
  background: var(--bg-card2);
  border-radius: 999px;
  height: 8px;
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--green);
  border-radius: 999px;
  transition: width 0.4s ease;
}

.progress-label {
  font-size: 0.85rem;
  color: var(--gray);
  margin-bottom: 0.5rem;
  text-align: right;
}

/* ── Fragebild ── */
.question-image {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
  border: 1px solid var(--border);
}

.question-text {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 1.5rem;
  line-height: 1.5;
  font-family: 'Merriweather', Georgia, serif;
}

/* ── Antworten ── */
.answers-grid { display: flex; flex-direction: column; gap: 0.75rem; }

.answer-label {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg-card2);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 1rem;
}

.answer-label:hover {
  border-color: var(--green);
  background: rgba(46,125,50,0.12);
}

.answer-label input[type="radio"] {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--gray);
  border-radius: 50%;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.answer-label input[type="radio"]:checked {
  border-color: var(--green);
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(46,125,50,0.25);
}

.answer-label:has(input:checked) {
  border-color: var(--green);
  background: rgba(46,125,50,0.12);
}

/* ── Ergebnis ── */
.score-circle {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 5px solid var(--green);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  background: rgba(46,125,50,0.1);
}

.score-number { font-size: 2.8rem; font-weight: 700; color: var(--green-bright); line-height: 1; }
.score-label  { font-size: 0.8rem; color: var(--gray); }

.result-item {
  background: var(--bg-card2);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  border-left: 4px solid var(--border);
}
.result-item.correct { border-left-color: var(--green); }
.result-item.wrong   { border-left-color: var(--red); }
.result-q     { font-weight: 700; margin-bottom: 0.4rem; color: var(--white); }
.result-answer { font-size: 0.9rem; color: var(--gray); }

.badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  margin-left: 0.5rem;
}
.badge-correct { background: var(--green-dim); color: #d0ffd0; }
.badge-wrong   { background: #7a2020; color: #ffd0d0; }

/* ── Prize-Box ── */
.prize-box {
  background: linear-gradient(135deg, rgba(46,125,50,0.15), rgba(27,94,32,0.08));
  border: 1px solid var(--green-dim);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}
.prize-box p { color: var(--white); margin-bottom: 1rem; }

/* ── Formulare ── */
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: 0.9rem; color: var(--gray); margin-bottom: 0.4rem; }
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--white);
  font-size: 1rem;
  font-family: 'Lato', sans-serif;
  transition: border-color 0.15s;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { outline: none; border-color: var(--green); }
.form-group select option { background: var(--bg-card2); }

/* ── Flash ── */
.flash-messages { margin-bottom: 1rem; }
.flash {
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-sm);
  background: rgba(46,125,50,0.15);
  border: 1px solid var(--green-dim);
  color: #c0ffc0;
  margin-bottom: 0.5rem;
}

/* ── Admin ── */
.admin-nav {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 0.6rem 1.5rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.admin-nav a {
  color: var(--gray);
  text-decoration: none;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  transition: all 0.15s;
}
.admin-nav a:hover, .admin-nav a.active {
  background: var(--green-dim);
  color: var(--white);
}

.admin-main { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1rem; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
}
.stat-number { font-size: 2.2rem; font-weight: 700; color: var(--green-bright); }
.stat-label  { font-size: 0.8rem; color: var(--gray); margin-top: 0.25rem; }

.data-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.data-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  background: var(--bg-card2);
  color: var(--gray);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--white);
  vertical-align: middle;
}
.data-table tr:hover td { background: rgba(255,255,255,0.03); }

.status-badge { display: inline-block; padding: 0.2rem 0.65rem; border-radius: 999px; font-size: 0.78rem; font-weight: 700; }
.status-active   { background: var(--green-dim); color: #d0ffd0; }
.status-inactive { background: #3a3a3a; color: var(--gray); }

.toggle-btn { padding: 0.3rem 0.7rem; border-radius: var(--radius-sm); border: none; cursor: pointer; font-size: 0.8rem; font-weight: 700; text-decoration: none; display: inline-block; }
.toggle-activate   { background: var(--green-dim); color: #d0ffd0; }
.toggle-deactivate { background: #3a3a3a; color: var(--gray); }

.login-wrap { max-width: 380px; margin: 6rem auto; padding: 1rem; }

.answer-row { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.6rem; }
.answer-row input[type="text"] {
  flex: 1;
  padding: 0.6rem 0.9rem;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--white);
  font-size: 0.95rem;
  font-family: 'Lato', sans-serif;
}
.answer-row input[type="text"]:focus { outline: none; border-color: var(--green); }
.answer-row input[type="radio"] { width: 18px; height: 18px; accent-color: var(--green); flex-shrink: 0; }

.filter-bar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 1.5rem;
  background: var(--bg-card);
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.filter-bar label { font-size: 0.8rem; color: var(--gray); display: block; margin-bottom: 0.25rem; }
.filter-bar input[type="date"] {
  padding: 0.5rem 0.75rem;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--white);
  font-size: 0.9rem;
}

/* ── Footer ── */
footer {
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: 0.8rem;
  color: var(--border);
  border-top: 1px solid var(--border);
  margin-top: auto;
}
footer a { color: var(--green-dim); text-decoration: none; }
footer a:hover { color: var(--green-bright); }

/* ── Responsive ── */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    padding: 0.75rem 0;
    gap: 0;
  }

  .nav-links.open { display: flex; }

  .nav-links a {
    width: 100%;
    padding: 0.6rem 0.5rem;
    border-radius: 0;
    border-bottom: 1px solid var(--border);
  }

  .nav-social {
    border-left: none;
    padding-left: 0;
    margin-left: 0;
    padding-top: 0.5rem;
    width: 100%;
  }

  .hero-banner-text { bottom: 1.5rem; }
  .hero-headline    { font-size: 1.4rem; }
}

@media (max-width: 600px) {
  main { padding: 1rem 0.75rem; }
  .card { padding: 1.25rem; }
  .score-circle { width: 110px; height: 110px; }
  .score-number { font-size: 2.2rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .data-table { font-size: 0.8rem; }
  .data-table th, .data-table td { padding: 0.5rem 0.6rem; }
}
