/* ===============================
   :ROOT – Farb- und Designvariablen
   ============================== */
:root {
  --bg-main: #f4f6fb;
  --primary: #4f46e5;
  --primary-dark: #3730a3;
  --accent: #22d3ee;
  --text-dark: #1f2937;
  --card-bg: #ffffff;
}

/* ===============================
   BODY & GRUNDEINSTELLUNGEN
   ============================== */
body {
  background: var(--bg-main);
  color: var(--text-dark);
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
}

/* ===============================
   CONTENT-BEREICH
   ============================== */
#content {
  min-height: 100vh;
  padding: 1.5rem;
  background: var(--bg-main);
}

/* ===============================
   NAVBAR (angepasst – ohne Bootstrap)
   ============================== */
#navbar {
  position: sticky;
  top: 0;
  z-index: 1000;

  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0.5rem;

  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  padding: 0.5rem 1rem;
  min-height: 80px;
}

/* Navbar Buttons – FIX für Umbruch */
#navbar .btn {
  flex: 1 1 0;
  min-width: 0;
  margin: 0 !important;

  height: 70px !important;
  font-size: 1.3rem !important;
  font-weight: 700 !important;
  padding: 0.75rem 1rem !important;

  border-radius: 999px !important;
  border-width: 3px !important;

  color: white;
  border-color: rgba(255, 255, 255, 0.6);
  transition: all 0.2s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

#navbar .btn:hover {
  transform: translateY(-4px) scale(1.05);
  background: var(--accent) !important;
  color: #000 !important;
  border-color: transparent !important;
  box-shadow: 0 15px 35px rgba(34, 211, 238, 0.4);
}

/* ===============================
   OPTIONAL: Bereich wie Navbar
   ============================== */
.navbar-style {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* ===============================
   RESPONSIVE NAVBAR
   ============================== */
@media (max-width: 992px) {
  #navbar .btn {
    height: 55px !important;
    font-size: 1.1rem !important;
    padding: 0.6rem 0.8rem !important;
  }
}

@media (max-width: 768px) {
  #navbar .btn {
    height: 50px !important;
    font-size: 1rem !important;
    padding: 0.5rem 0.6rem !important;
  }
}

@media (max-width: 480px) {
  #navbar {
    padding: 0.3rem 0.5rem;
  }

  #navbar .btn {
    height: 45px !important;
    font-size: 0.85rem !important;
    padding: 0.4rem 0.4rem !important;
  }
}

/* ===============================
   BUTTONS – allgemeine Touch-Optimierung
   ============================== */
button {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* ===============================
   RADIO / GENRE CARDS
   ============================== */
.card {
  border: none;
  border-radius: 18px;
  background: var(--card-bg);
  box-shadow: 0 8px 18px rgba(0,0,0,0.12);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  text-align: center;
  width: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 35px rgba(0,0,0,0.14);
}

.card img {
  border-radius: 50%;
  width: 80px;
  height: 80px;
  object-fit: cover;
  margin-top: 0.5rem;
}

.card-body {
  padding: 0.5rem;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
}

.card.active {
  border: 3px solid var(--accent);
}

/* ===============================
   FEEDBACK NACHRICHT
   ============================== */
#feedback {
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: green;
  transition: opacity 0.3s ease;
}

#feedback.hidden {
  opacity: 0;
}

/* ===============================
   GENRE BUTTONS
   ============================== */
.genre-btn {
  border-radius: 999px;
  font-weight: 600;
  padding: 8px 16px;
  border: 2px solid var(--primary);
  color: white;
  background: var(--primary);
  transition: all 0.2s ease;
}

.genre-btn:hover {
  background: var(--accent);
  color: #002;
  transform: translateY(-2px);
}

.genre-btn.active {
  background: var(--accent);
  border-color: transparent;
  color: #002;
}

/* ===============================
   HINZUGEFÜGTE / AUSGEGRAUTE SENDER
   ============================== */
.added {
  opacity: 0.6 !important;
}

/* ===============================
   ADMIN BUTTONS
   ============================== */
#logoutBtn {
  float: right;
}

.admin-edit {
  background: var(--primary);
  color: white;
  border-radius: 999px;
  border: none;
  padding: 4px 14px;
  font-weight: 600;
}

.admin-edit:hover {
  background: var(--accent);
  color: #002;
}

.admin-delete {
  background: #ef4444;
  color: white;
  border-radius: 999px;
  border: none;
  padding: 4px 14px;
  font-weight: 600;
}

.admin-delete:hover {
  background: #dc2626;
}

/* ===============================
   FLEX CONTAINER FÜR GRIDS
   ============================== */
#stationsContainer,
#genreContainer {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  user-select: none;
}

/* ===============================
   RADIO CONTROLS
   ============================== */
#radioControls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

#radioControls button {
  flex: none;
  padding: 12px 18px;
  font-size: 1rem;
}

#volumeSlider {
  flex: 1 1 auto;
  min-width: 150px;
  height: 24px;
  border-radius: 12px;
  background: #ddd;
  cursor: pointer;
}

/* ===============================
   ➤ NOW PLAYING – SMARTER FALLBACK (NEU!)
   ============================== */
#nowPlayingText {
  font-size: 1.25rem !important;
  min-height: 28px !important;
  line-height: 1.4 !important;
  padding: 2px 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  transition: all 0.2s ease !important;
}

#nowPlayingText.has-title {
  font-size: 1.2rem !important;
  color: var(--primary-dark) !important;  /* Dunkleres Blau für besseren Kontrast */
  font-weight: 700 !important;
}

#nowPlayingText.live-station {
  font-size: 1.2rem !important;
  color: #374151 !important;  /* Dunkleres Grau */
  font-style: italic;
  font-weight: 600 !important;
}

/* ===============================
   MOBILE OPTIMIERUNG (KOMBINIERT)
   ============================== */
@media (max-width: 480px) {
  #content { 
    padding: 1rem; 
    overflow-y: auto; 
  }
  
  #nowPlayingText {
    font-size: 1.15rem !important;
  }
  #nowPlayingText.has-title {
    font-size: 1.1rem !important;
  }
  
  #radioControls button { 
    padding: 14px 20px; 
    font-size: 1.1rem; 
  }
  #volumeSlider { 
    height: 28px; 
    min-width: 100%; 
    margin-top: 0.7rem; 
  }
  .card { 
    width: 48%; 
    margin-bottom: 0.7rem; 
    padding: 0.7rem; 
  }
}

@media (max-width: 360px) {
  .card { 
    width: 100%; 
    margin-bottom: 0.5rem; 
    padding: 0.5rem; 
  }
  #radioControls button { 
    padding: 12px 16px; 
    font-size: 1rem; 
  }
  #volumeSlider { 
    height: 24px; 
  }
}

/* ===============================
   MOBIL-LOGO
   ============================== */
#mobileLogoSection {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 35px;
  box-shadow: 0 12px 35px rgba(79, 70, 229, 0.4);
  margin-bottom: 2rem;
}

.logo-clickable {
  height: 200px !important;
  width: auto !important;
  max-width: 100% !important;
  cursor: pointer;
  transition: all 0.4s ease;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.logo-clickable:hover {
  transform: scale(1.3);
  box-shadow: 0 20px 40px rgba(79,70,229,0.4);
}

.logo-clickable:active {
  transform: scale(1);
}

@media (min-width: 768px) {
  #mobileLogoSection { 
    display: none !important; 
  }
}

@media (max-width: 767px) {
  h2 { 
    font-size: 1.5rem !important; 
    margin-bottom: 1rem; 
  }
  #stationTitleMobile { 
    font-size: 1.1rem !important; 
  }
}

