body {
  margin: 0;
  background-color: #000;
  color: white;
  font-family: sans-serif;
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 100vh;
  scrollbar-gutter: stable;
}

.search-container {
  padding: 1rem;
  background: #111;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.search-wrapper {
  position: relative;
  display: inline-block;
  width: 80%;
}

.search-wrapper input {
  width: 100%;
  padding: 0.5rem 2.5rem 0.5rem 1rem;
  font-size: 1rem;
  border-radius: 8px;
  border: none;
  outline: none;
}

#clear-search {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: red;
  font-size: 1.2rem;
  cursor: pointer;
}

#random-btn, #theme-toggle, #toggle-favoris {
  margin: 0.5rem;
  padding: 0.3rem 0.6rem;
  font-size: 0.9rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  background-color: #333;
  color: white;
}

.grid {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  justify-items: center;
  align-items: start;
  margin-bottom: 120px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.radio-card {
  background: #222;
  color: white;
  border-radius: 8px;
  padding: 0.5rem;
  text-align: center;
  position: relative;
  cursor: pointer;
  transition: transform 0.2s;
  width: 100%;
  max-width: 200px;
}

.radio-card:hover {
  transform: scale(1.05);
}

.radio-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
}

.radio-card .fav {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 1.2rem;
  cursor: pointer;
  color: black;
}

.radio-card.favori {
  box-shadow: 0 0 10px gold;
}

.player-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #111;
  color: white;
  padding: 0.5rem;
  text-align: center;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.player-bar::before {
  content: "";
  position: absolute;
  top: -20px;
  left: 0;
  right: 0;
  height: 20px;
  background: linear-gradient(to bottom, transparent, #222);
}

audio {
  width: 100%;
  margin-top: 0.5rem;
}

body.light {
  background-color: #f4f4f4;
  color: black;
}

body.light .radio-card,
body.light .search-container,
body.light .player-bar {
  background-color: white;
  color: black;
}
