/* Header */
header {
  text-align: center;
  margin-bottom: 2.5rem;
  animation: fadeInDown 0.8s ease-out;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.logo-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--accent-warm), var(--accent-purple));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: 0 8px 32px var(--glow-warm);
  animation: pulse 3s ease-in-out infinite;
}

h1 {
  font-family: "Outfit", sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--text-primary), var(--accent-cool));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-top: 0.5rem;
  font-weight: 300;
}

.powered-by {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.powered-by a {
  color: var(--accent-cool);
  text-decoration: none;
}

.powered-by a:hover {
  text-decoration: underline;
}

/* Filter Section */
.filter-section {
  margin-bottom: 2rem;
  animation: fadeIn 0.8s ease-out 0.2s both;
}

.filter-group {
  margin-bottom: 1rem;
}

.filter-label {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
  display: block;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-btn {
  padding: 0.6rem 1.2rem;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border-radius: 100px;
  cursor: pointer;
  font-size: 0.9rem;
  font-family: inherit;
  transition: all 0.3s ease;
}

.filter-btn:hover {
  border-color: var(--accent-cool);
  color: var(--text-primary);
  background: rgba(74, 159, 255, 0.1);
}

.filter-btn.active {
  background: linear-gradient(135deg, var(--accent-cool), var(--accent-purple));
  border-color: transparent;
  color: white;
  box-shadow: 0 4px 16px rgba(74, 159, 255, 0.3);
}

/* Stats */
.stats {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stat-count {
  color: var(--accent-cool);
  font-weight: 600;
}

/* Radio Grid */
.radio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

/* Radio Card */
.radio-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.6s ease-out both;
}

.radio-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-warm), var(--accent-purple));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.radio-card:hover {
  transform: translateY(-4px);
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.radio-card:hover::before {
  opacity: 1;
}

.radio-card.playing {
  border-color: var(--accent-warm);
  box-shadow: 0 0 40px var(--glow-warm);
}

.radio-card.playing::before {
  opacity: 0;
}

.radio-card.playing:hover::before {
  opacity: 1;
}

.card-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.station-logo {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.station-logo.kbs {
  background: linear-gradient(135deg, #1a73e8, #0d47a1);
}
.station-logo.mbc {
  background: linear-gradient(135deg, #34a853, #1e8e3e);
}
.station-logo.sbs {
  background: linear-gradient(135deg, #ea4335, #c5221f);
}
.station-logo.ebs {
  background: linear-gradient(135deg, #ff9800, #f57c00);
}
.station-logo.tbs {
  background: linear-gradient(135deg, #9c27b0, #7b1fa2);
}
.station-logo.cbs {
  background: linear-gradient(135deg, #795548, #5d4037);
}
.station-logo.ytn {
  background: linear-gradient(135deg, #607d8b, #455a64);
}
.station-logo.febc {
  background: linear-gradient(135deg, #00bcd4, #0097a7);
}
.station-logo.bbs {
  background: linear-gradient(135deg, #8d6e63, #6d4c41);
}
.station-logo.cpbc {
  background: linear-gradient(135deg, #5c6bc0, #3949ab);
}
.station-logo.tbn {
  background: linear-gradient(135deg, #26a69a, #00897b);
}
.station-logo.kugak {
  background: linear-gradient(135deg, #d81b60, #ad1457);
}
.station-logo.kookbang {
  background: linear-gradient(135deg, #546e7a, #37474f);
}
.station-logo.obs {
  background: linear-gradient(135deg, #7e57c2, #5e35b1);
}
.station-logo.ifm {
  background: linear-gradient(135deg, #42a5f5, #1e88e5);
}

.station-info {
  flex: 1;
  min-width: 0;
}

.station-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.station-category {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.category-tag {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
}

.station-desc {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.play-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.play-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.radio-card:hover .play-icon {
  background: var(--accent-warm);
  transform: scale(1.1);
}

.radio-card.playing .play-icon {
  background: var(--accent-warm);
}

/* Sound Wave Animation */
.sound-wave {
  display: none;
  align-items: center;
  gap: 2px;
  height: 16px;
}

.radio-card.playing .sound-wave {
  display: flex;
}

.radio-card.playing .play-icon svg {
  display: none;
}

.wave-bar {
  width: 3px;
  background: white;
  border-radius: 2px;
  animation: wave 0.8s ease-in-out infinite;
}

.wave-bar:nth-child(1) {
  height: 40%;
  animation-delay: 0s;
}
.wave-bar:nth-child(2) {
  height: 70%;
  animation-delay: 0.1s;
}
.wave-bar:nth-child(3) {
  height: 50%;
  animation-delay: 0.2s;
}
.wave-bar:nth-child(4) {
  height: 80%;
  animation-delay: 0.3s;
}
.wave-bar:nth-child(5) {
  height: 60%;
  animation-delay: 0.4s;
}

/* Player Bar */
.player-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(
    to top,
    var(--bg-primary),
    rgba(15, 15, 18, 0.98)
  );
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-color);
  padding: 1rem 2rem;
  z-index: 100;
  transform: translateY(0);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.player-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.now-playing {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  min-width: 0;
}

.now-playing-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  color: white;
  flex-shrink: 0;
}

.now-playing-info {
  min-width: 0;
}

.now-playing-title {
  font-weight: 600;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.now-playing-status {
  color: var(--accent-warm);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.live-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-warm);
  border-radius: 50%;
  animation: blink 1.5s ease-in-out infinite;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.control-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 1.2rem;
}

.control-btn.play-pause {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--accent-warm), var(--accent-purple));
  color: white;
  box-shadow: 0 4px 20px var(--glow-warm);
}

.control-btn.play-pause:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px var(--glow-warm);
}

.control-btn.secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
}

.control-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.volume-slider {
  width: 100px;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  outline: none;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  background: var(--text-primary);
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-secondary);
}

.empty-state svg {
  width: 80px;
  height: 80px;
  margin-bottom: 1.5rem;
  opacity: 0.5;
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 15, 18, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  flex-direction: column;
  gap: 1rem;
}

.loading-overlay.active {
  display: flex;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent-cool);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
