/* Base styles */
:root {
  --background: #121212;
  --surface: #282828;
  --surface-light: #333333;
  --primary: #1DB954;
  --primary-hover: #1ed760;
  --text: #FFFFFF;
  --text-secondary: #B3B3B3;
  --sidebar-width: 240px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--background);
  color: var(--text);
  line-height: 1.5;
}

.app-container {
  display: grid;
  grid-template-areas:
    "sidebar main main"
    "player player player";
  grid-template-columns: var(--sidebar-width) 1fr;
  grid-template-rows: 1fr auto;
  height: 100vh;
}

/* Sidebar */
.sidebar {
  grid-area: sidebar;
  background-color: black;
  padding: 24px 12px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.logo {
  padding: 0 12px;
}

.logo h1 {
  font-size: 24px;
  font-weight: 700;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.nav-item svg {
  width: 24px;
  height: 24px;
}

.nav-item:hover {
  color: var(--text);
}

.nav-item.active {
  color: var(--text);
  background-color: var(--surface);
}

/* Main content */
.main-content {
  grid-area: main;
  background: linear-gradient(to bottom, #404040, var(--background));
  overflow-y: auto;
  padding: 24px;
}

.top-bar {
  margin-bottom: 32px;
}

.search-bar {
  background-color: var(--surface);
  border-radius: 500px;
  display: flex;
  align-items: center;
  padding: 8px 16px;
  max-width: 400px;
}

.search-bar svg {
  width: 20px;
  height: 20px;
  color: var(--text-secondary);
}

.search-bar input {
  background: none;
  border: none;
  color: var(--text);
  font-size: 14px;
  margin-left: 12px;
  width: 100%;
  outline: none;
}

.search-bar input::placeholder {
  color: var(--text-secondary);
}

.content-section h2 {
  margin-bottom: 24px;
  font-size: 24px;
  font-weight: 700;
}

/* Radio grid */
#radio-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 24px;
}

/* Radio card */
.radio-card {
  background-color: var(--surface);
  border-radius: 8px;
  padding: 16px;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.radio-card:hover {
  background-color: var(--surface-light);
  transform: translateY(-4px);
}

.radio-logo {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary), #149442);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 16px;
}

.radio-name {
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 8px;
}

.radio-description {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 16px;
}

.play-button {
  position: absolute;
  bottom: 16px;
  right: 16px;
  background-color: var(--primary);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: black;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(8px);
}

.radio-card:hover .play-button {
  opacity: 1;
  transform: translateY(0);
}

.play-button:hover {
  background-color: var(--primary-hover);
  transform: scale(1.1);
}

.play-button svg {
  width: 24px;
  height: 24px;
}

/* Playing state */
.radio-card.playing {
  background-color: var(--surface-light);
}

.radio-card.playing .play-button {
  opacity: 1;
  transform: translateY(0);
}

/* Player bar */
.player-bar {
  grid-area: player;
  background-color: var(--surface);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.now-playing {
  min-width: 180px;
}

.station-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#current-station {
  font-weight: 600;
  font-size: 14px;
}

.station-meta {
  color: var(--text-secondary);
  font-size: 12px;
}

.player-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.play-pause-btn {
  background-color: var(--text);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.play-pause-btn:hover {
  transform: scale(1.1);
}

.play-pause-btn svg {
  width: 16px;
  height: 16px;
  color: black;
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 180px;
}

.volume-control svg {
  width: 20px;
  height: 20px;
  color: var(--text-secondary);
}

input[type="range"] {
  -webkit-appearance: none;
  width: 100px;
  height: 4px;
  background: var(--text-secondary);
  border-radius: 2px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  background: var(--text);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.hidden {
  display: none;
}

/* Responsive */
@media (max-width: 768px) {
  .app-container {
    grid-template-areas:
      "main main main"
      "player player player";
  }

  .sidebar {
    display: none;
  }

  .player-bar {
    padding: 12px;
  }

  .volume-control {
    display: none;
  }
}

@media (max-width: 480px) {
  .main-content {
    padding: 16px;
  }

  #radio-list {
    grid-template-columns: 1fr;
  }

  .now-playing {
    min-width: 120px;
  }
}
