:root {
  --gelb: #FFD93D;
  --orange: #FF9A3C;
  --pink: #FF6FB5;
  --tuerkis: #4ECDC4;
  --lila: #A66CFF;
  --dunkel: #33334D;
  --hell: #FFFDF7;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Baloo 2', 'Comic Sans MS', 'Trebuchet MS', sans-serif;
  background: linear-gradient(180deg, #FFF6E0 0%, #FFEAD1 100%);
  color: var(--dunkel);
  min-height: 100vh;
}

header.top {
  background: linear-gradient(90deg, var(--pink), var(--lila));
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  position: sticky;
  top: 0;
  z-index: 10;
}

header.top a { text-decoration: none; }

.logo {
  font-size: 28px;
  font-weight: 800;
  color: white;
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo .stern { animation: dreh 6s linear infinite; display: inline-block; }
@keyframes dreh { from { transform: rotate(0deg);} to { transform: rotate(360deg);} }

nav.top-nav a {
  color: white;
  font-weight: 700;
  margin-left: 18px;
  font-size: 16px;
  opacity: 0.9;
}
nav.top-nav a:hover { opacity: 1; text-decoration: underline; }

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 20px 60px;
}

.hero {
  text-align: center;
  margin-bottom: 28px;
}
.hero h1 {
  font-size: 36px;
  margin: 6px 0;
  color: var(--dunkel);
}
.hero p {
  font-size: 18px;
  color: #55556b;
}

.filter-leiste {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 30px;
}

.filter-btn {
  border: none;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  background: white;
  color: var(--dunkel);
  box-shadow: 0 3px 0 rgba(0,0,0,0.08);
  transition: transform 0.15s ease;
}
.filter-btn:hover { transform: translateY(-2px) scale(1.03); }
.filter-btn.aktiv {
  background: var(--tuerkis);
  color: white;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 22px;
}

.karte {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(51,51,77,0.12);
  text-decoration: none;
  color: var(--dunkel);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  display: block;
  position: relative;
}
.karte:hover {
  transform: translateY(-6px) rotate(-0.5deg);
  box-shadow: 0 12px 24px rgba(51,51,77,0.2);
}
.karte .bild-wrap {
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, var(--gelb), var(--orange));
}
.karte img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.karte .info {
  padding: 14px 16px 18px;
}
.karte h3 {
  margin: 0 0 6px;
  font-size: 18px;
  line-height: 1.25;
}
.badge-reihe { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--tuerkis);
  color: white;
}
.badge.alter { background: var(--lila); }
.badge.bald { background: #aaa; }

.karte.gesperrt {
  opacity: 0.55;
  pointer-events: none;
}
.play-icon {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255,255,255,0.9);
  border-radius: 50%;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}

/* Player-Seite */
.player-wrap {
  max-width: 640px;
  margin: 10px auto 0;
  text-align: center;
}
.player-bild {
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 14px 30px rgba(51,51,77,0.25);
  background: linear-gradient(135deg, var(--gelb), var(--pink));
  position: relative;
}
.player-bild img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.player-wrap h1 { margin: 20px 0 4px; font-size: 28px; }
.player-wrap .beschreibung { color: #55556b; font-size: 16px; margin-bottom: 20px; }

.audio-leiste {
  background: white;
  border-radius: 999px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 8px 20px rgba(51,51,77,0.15);
}
.play-btn {
  background: var(--pink);
  color: white;
  border: none;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  flex-shrink: 0;
}
.play-btn:hover { background: var(--lila); }
input[type=range] { flex: 1; accent-color: var(--tuerkis); }
.zeit { font-variant-numeric: tabular-nums; font-size: 13px; color: #777; min-width: 42px; }

.zurueck-link {
  display: inline-block;
  margin-top: 24px;
  font-weight: 700;
  color: var(--lila);
  text-decoration: none;
}
.zurueck-link:hover { text-decoration: underline; }

/* Admin */
.admin-form {
  background: white;
  border-radius: 18px;
  padding: 26px;
  max-width: 520px;
  margin: 0 auto;
  box-shadow: 0 8px 20px rgba(51,51,77,0.12);
}
.admin-form label {
  display: block;
  font-weight: 700;
  margin: 14px 0 6px;
}
.admin-form input, .admin-form textarea, .admin-form select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 2px solid #eee;
  font-family: inherit;
  font-size: 15px;
}
.admin-form textarea { resize: vertical; min-height: 70px; }
.absenden-btn {
  margin-top: 20px;
  background: var(--tuerkis);
  color: white;
  border: none;
  padding: 14px 20px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 16px;
  cursor: pointer;
  width: 100%;
}
.absenden-btn:hover { background: var(--lila); }
.hinweis { margin-top: 14px; font-weight: 700; }
.hinweis.ok { color: #1b9e5b; }
.hinweis.fehler { color: #d1425c; }

footer {
  text-align: center;
  padding: 20px;
  color: #999;
  font-size: 13px;
}

/* Smartphone-Ansicht */
@media (max-width: 640px) {
  header.top {
    padding: 12px 16px;
  }
  .logo {
    font-size: 20px;
    gap: 6px;
  }
  nav.top-nav a {
    font-size: 12px;
    margin-left: 10px;
  }
  main {
    padding: 20px 14px 40px;
  }
  .hero {
    margin-bottom: 20px;
  }
  .hero h1 {
    font-size: 24px;
    line-height: 1.3;
  }
  .hero p {
    font-size: 15px;
  }
  .filter-leiste {
    gap: 8px;
    margin-bottom: 18px;
  }
  .filter-btn {
    padding: 8px 14px;
    font-size: 13px;
  }
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .karte .info {
    padding: 10px 12px 14px;
  }
  .karte h3 {
    font-size: 14px;
  }
  .badge {
    font-size: 10px;
    padding: 3px 8px;
  }
  .play-icon {
    width: 34px;
    height: 34px;
    font-size: 14px;
    top: 8px;
    right: 8px;
  }

  .player-wrap {
    margin-top: 4px;
  }
  .player-bild {
    border-radius: 18px;
  }
  .player-wrap h1 {
    font-size: 21px;
    margin: 16px 0 4px;
  }
  .player-wrap .beschreibung {
    font-size: 14px;
    margin-bottom: 16px;
  }
  .audio-leiste {
    padding: 10px 14px;
    gap: 10px;
  }
  .play-btn {
    width: 44px;
    height: 44px;
    font-size: 17px;
  }
  .zeit {
    font-size: 11px;
    min-width: 32px;
  }

  .admin-form {
    padding: 18px;
  }
}

@media (max-width: 360px) {
  .grid {
    grid-template-columns: 1fr;
  }
}
