:root {
  --primary-color: #00E676;
  --background-color: #000000;
  --card-background: #121212;
  --text-color: #ffffff;
  --secondary-text: #888888;
  --player-background: rgba(18, 18, 18, 0.95);
  --nav-background: #121212;
  --card-hover: #1E1E1E;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: var(--background-color);
  color: var(--text-color);
}

main {
  flex: 1;
  padding: 1rem;
  margin-bottom: 80px;
}

.stations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
  padding: 0.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.station-card {
  background: var(--card-background);
  border-radius: 12px;
  padding: 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.station-icon {
  display: none;
}

.station-info {
  flex: 1;
}

.station-info h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--text-color);
}

.favorite-btn {
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  padding: 0.5rem;
  font-size: 1.2rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.favorite-btn:hover {
  background: rgba(255, 215, 0, 0.1);
}

.favorite-btn.active {
  color: #FFD700;
}

.favorite-btn i {
  font-size: 1.4rem;
}

#audio-player {
  position: fixed;
  bottom: 60px;
  left: 0;
  width: 100%;
  background: var(--player-background);
  color: var(--text-color);
  padding: 1rem;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 1.5rem;
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.control-btn {
  background: none;
  border: none;
  color: var(--primary-color);
  font-size: 1.8rem;
  cursor: pointer;
  padding: 0.5rem;
  transition: transform 0.2s ease;
}

.control-btn:hover {
  transform: scale(1.1);
}

.control-btn.hidden {
  display: none;
}

.visualizer {
  display: flex;
  gap: 3px;
  height: 30px;
  align-items: center;
}

.bar {
  width: 3px;
  background-color: var(--primary-color);
  height: 100%;
  animation: none;
  border-radius: 1px;
}

@keyframes soundBars {
  0% { height: 30%; opacity: 0.6; }
  50% { height: 100%; opacity: 1; }
  100% { height: 30%; opacity: 0.6; }
}

.playing .bar {
  animation: soundBars 1s ease-in-out infinite;
}

.bar:nth-child(1) { animation-delay: 0.0s; }
.bar:nth-child(2) { animation-delay: 0.2s; }
.bar:nth-child(3) { animation-delay: 0.4s; }
.bar:nth-child(4) { animation-delay: 0.6s; }
.bar:nth-child(5) { animation-delay: 0.8s; }

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--nav-background);
  display: flex;
  justify-content: space-around;
  padding: 0.8rem;
  box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.1);
}

.nav-btn {
  background: none;
  border: none;
  color: var(--secondary-text);
  cursor: pointer;
  padding: 0.5rem;
  transition: all 0.3s ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.nav-btn.active {
  color: var(--primary-color);
  background: rgba(0, 230, 118, 0.1);
}

.nav-btn i {
  font-size: 1.3rem;
}

.nav-btn span {
  display: none;
}

.countries-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
  padding: 0.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.country-card {
  background: var(--card-background);
  border-radius: 12px;
  padding: 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.country-card:hover {
  transform: translateY(-2px);
  background: var(--card-hover);
  border-color: var(--primary-color);
}

.country-flag {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.country-info {
  flex: 1;
}

.country-info h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--text-color);
}

.country-code {
  color: var(--secondary-text);
  font-size: 0.8rem;
}

.hidden {
  display: none !important;
}

#station-name {
  font-size: 1.1rem;
  color: var(--text-color);
}

.country-dropdown {
  position: fixed;
  bottom: 120px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--card-background);
  border-radius: 12px;
  max-height: 60vh;
  overflow-y: auto;
  width: 280px;
  z-index: 1000;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 1;
  visibility: visible;
  display: none;
  padding: 8px 0;
}

.country-dropdown.visible {
  display: block;
}

.country-dropdown ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.country-dropdown li {
  padding: 12px 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-color);
}

.country-dropdown li:hover {
  background: var(--card-hover);
  color: var(--primary-color);
}

.country-dropdown li.selected {
  color: var(--primary-color);
  background: rgba(0, 230, 118, 0.1);
}

.country-dropdown::-webkit-scrollbar {
  width: 8px;
}

.country-dropdown::-webkit-scrollbar-track {
  background: var(--card-background);
}

.country-dropdown::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

.country-selector-btn {
  display: none;
}

.country-selector-btn.visible {
  display: block;
}

.settings-view {
  padding: 1rem;
  max-width: 600px;
  margin: 0 auto;
}

.settings-section {
  background: var(--card-background);
  border-radius: 12px;
  padding: 1.2rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-section h2 {
  margin-top: 0;
  color: var(--primary-color);
  font-size: 1.2rem;
}

.setting-item {
  margin: 1rem 0;
  display: flex;
  flex-direction: column;
}

.setting-item label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.setting-item .switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.setting-item .switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.setting-item .slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 34px;
}

.setting-item .slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

.setting-item input:checked + .slider {
  background-color: var(--primary-color);
}

.setting-item input:checked + .slider:before {
  transform: translateX(26px);
}

.setting-description {
  color: var(--secondary-text);
  font-size: 0.8rem;
  margin-top: 0.5rem;
}

.setting-item input[type="number"] {
  background: var(--background-color);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.5rem;
  border-radius: 4px;
  color: var(--text-color);
  width: 100px;
}

.country-favorites {
  margin-bottom: 2rem;
}

.country-header {
  background: var(--card-background);
  padding: 1rem;
  border-radius: 12px;
  margin-bottom: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.country-header h2 {
  margin: 0;
  font-size: 1.2rem;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}