/* =========================
   RESET
========================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background: #000;
  font-family: 'Segoe UI', Arial, sans-serif;
  color: #fff;
  display: flex;
  justify-content: center;
}

.app {
  width: 100%;
  max-width: 420px;
  min-height: 100vh;
  padding-bottom: 240px;
}

/* =========================
   VIEWS
========================= */
.view {
  display: none;
}

.view.active {
  display: block;
}

/* =========================
   SEARCH INPUT
========================= */
.search-box {
  padding: 0 16px 10px;
}

.search-box input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: none;
  background: #111;
  color: #fff;
  font-size: 14px;
  outline: none;
}

.search-box input:focus {
  background: #161616;
}

/* =========================
   FILTER BAR
========================= */
.filter-bar {
  display: flex;
  gap: 10px;
  padding: 0 16px 10px;
}

.filter-bar button {
  flex: 1;
  background: #111;
  border: 1px solid #222;
  color: #d4af37;
  padding: 10px;
  border-radius: 10px;
  font-size: 13px;
  cursor: pointer;
  transition: .2s;
}

.filter-bar button:hover {
  background: #161616;
}

/* =========================
   GENRE MENU
========================= */
.genre-menu {
  display: none;
  padding: 0 16px 10px;
}

.genre-menu button {
  width: 100%;
  margin-bottom: 6px;
  background: #0f0f0f;
  border: 1px solid #222;
  color: #fff;
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: .2s;
}

.genre-menu button:hover {
  background: #161616;
}

/* =========================
   SONG LIST
========================= */
.song-list {
  padding: 0 16px;
}

.song {
  background: #111;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .4);
  transition: .2s;
}

.song:hover {
  background: #161616;
  transform: translateY(-2px);
}

.song strong {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
}

.song button,
.song a {
  background: #1a1a1a;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d4af37;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
  transition: .2s;
}

.song button:hover,
.song a:hover {
  background: #222;
}

/* =========================
   EMPTY STATE
========================= */
.empty {
  opacity: .5;
  padding: 20px 16px;
  font-size: 14px;
}

/* =========================
   MINI PLAYER
========================= */
.mini-player {
  position: fixed;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 420px;
  background: #111;
  border-top: 1px solid #222;
  padding: 14px;
  display: flex;
  gap: 12px;
  align-items: center;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, .6);
  z-index: 10;
}

.mini-cover img {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  object-fit: cover;
}

.mini-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#miniTitle {
  font-size: 14px;
  font-weight: 500;
}

.mini-artist {
  font-size: 11px;
  color: #aaa;
}

/* =========================
   PROGRESS BAR
========================= */
.progress-bar {
  display: flex;
  align-items: center;
  gap: 6px;
}

.progress-bar span {
  font-size: 10px;
  color: #aaa;
  width: 32px;
  text-align: center;
}

.progress-bar input {
  flex: 1;
  appearance: none;
  height: 3px;
  background: #333;
  border-radius: 2px;
}

.progress-bar input::-webkit-slider-thumb {
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #d4af37;
  cursor: pointer;
}

/* =========================
   CONTROLS
========================= */
.controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  margin-top: 10px;
}

.controls button {
  background: #1a1a1a;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #d4af37;
  cursor: pointer;
  transition: .2s;
}

.controls button:hover {
  background: #222;
  transform: scale(1.05);
}

.play-btn {
  width: 64px;
  height: 64px;
  font-size: 26px;
  background: #d4af37;
  color: #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(212, 175, 55, 0.4);
  transition: .2s;
}

.play-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 24px rgba(212, 175, 55, 0.6);
}

/* =========================
   EXPAND PLAYER
========================= */
.player-expand {
  position: fixed;
  left: 50%;
  bottom: 150px;
  transform: translate(-50%, 20px);
  width: 100%;
  max-width: 420px;
  background: #141414;
  border-top: 1px solid #222;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: .25s;
  z-index: 15;
}

.player-expand.show {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.player-expand img {
  width: 100%;
  border-radius: 14px;
  margin-bottom: 12px;
}

.player-expand h3 {
  margin: 0;
  color: #d4af37;
  font-weight: 500;
}

/* =========================
   BOTTOM NAV
========================= */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 420px;
  display: flex;
  background: #000;
  border-top: 1px solid #222;
  height: 60px;
  z-index: 5;
}

.bottom-nav button {
  flex: 1;
  padding: 14px;
  background: none;
  border: none;
  color: #aaa;
  font-size: 13px;
  cursor: pointer;
  transition: .2s;
}

.bottom-nav button.active {
  color: #d4af37;
}

.bottom-nav button:hover {
  color: #fff;
}
/* =========================================================
   🔥 NEUE FUNKTIONEN (NUR ERGÄNZUNG – ALTES LAYOUT BLEIBT)
========================================================= */

/* 1️⃣ Play Button Pulse */
.play-btn.playing{
  animation: pulseGold 1.8s infinite ease-in-out;
}

@keyframes pulseGold{
  0%{ box-shadow: 0 0 0px rgba(212,175,55,0.4); }
  50%{ box-shadow: 0 0 18px rgba(212,175,55,0.8); }
  100%{ box-shadow: 0 0 0px rgba(212,175,55,0.4); }
}

/* 2️⃣ Als Nächstes Anzeige */
.next-song{
  font-size:11px;
  color:#aaa;
  margin-top:2px;
  opacity:0;
  transition:.3s ease;
}

.next-song.active{
  opacity:1;
}

/* 3️⃣ NEU Badge */
.new-badge{
  background:#d4af37;
  color:#000;
  font-size:9px;
  padding:2px 6px;
  border-radius:8px;
  margin-left:6px;
  font-weight:bold;
}

/* 4️⃣ Top 3 Styling */
.top-1{
  border-left:4px solid #d4af37;
}

.top-2{
  border-left:4px solid #c0c0c0;
}

.top-3{
  border-left:4px solid #cd7f32;
}
.song-popup{
  position:fixed;
  left:0;              /* geändert */
  right:0;             /* neu */
  bottom:-100%;
  margin:0 auto;       /* neu */
  width:100%;
  max-width:420px;
  height:85%;
  background:#121212;
  border-top-left-radius:24px;
  border-top-right-radius:24px;
  transition:.4s cubic-bezier(.22,.61,.36,1);
  z-index:20;
  box-shadow:0 -15px 40px rgba(0,0,0,.8);
  display:flex;
  flex-direction:column;
}

.song-popup.show{
  bottom:0;
}
.song-popup img{
  width:220px;
  height:220px;
  max-width:220px;
  object-fit:cover;
  border-radius:20px;
  display:block;
  margin:0 auto 20px auto;
}
.popup-content{
  padding:20px;
  overflow-y:auto;
  flex:1;                 /* 🔥 macht Content flexibel */
  text-align:center;
}
.popup-close{
  background:#d4af37;
  color:#000;
  border:none;
  padding:14px;
  border-radius:12px;
  font-weight:bold;
  cursor:pointer;
  width:90%;
  margin:0 auto 20px auto;   /* 🔥 mittig unten */
  display:block;
}
.app-header {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 0 12px;
  border-bottom: 1px solid #111;
}

.app-logo {
  height: 200px;
  width: auto;
  display: block;
}
