/* Stream Radio - Dark/Cyber Theme */

:root {
  --bg: #0a0a0f;
  --card-bg: rgba(15, 15, 25, 0.7);
  --card-border: rgba(0, 255, 255, 0.15);
  --cyan: #00ffff;
  --magenta: #ff00ff;
  --purple: #a855f7;
  --text: #e0e0e0;
  --text-dim: #666;
  --glow-cyan: 0 0 20px rgba(0, 255, 255, 0.3);
  --glow-magenta: 0 0 20px rgba(255, 0, 255, 0.3);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Background Grid */
.background-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(0, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  z-index: 0;
  pointer-events: none;
}

.container {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Station Header */
.station-header {
  text-align: center;
  margin-bottom: 2rem;
}

.station-name {
  font-size: 2.5rem;
  font-weight: 900;
  letter-spacing: 0.3em;
  color: var(--cyan);
  text-shadow: var(--glow-cyan);
  position: relative;
}

.station-tagline {
  font-size: 0.8rem;
  letter-spacing: 0.5em;
  color: var(--magenta);
  text-shadow: var(--glow-magenta);
  margin-top: 0.5rem;
}

/* Glitch Effect */
.glitch {
  animation: glitch-skew 4s infinite linear alternate-reverse;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  width: 100%;
  overflow: hidden;
}

.glitch::before {
  left: 2px;
  text-shadow: -2px 0 var(--magenta);
  clip-path: inset(0 0 70% 0);
  animation: glitch-top 2s infinite linear alternate-reverse;
}

.glitch::after {
  left: -2px;
  text-shadow: 2px 0 var(--cyan);
  clip-path: inset(70% 0 0 0);
  animation: glitch-bottom 3s infinite linear alternate-reverse;
}

@keyframes glitch-top {
  0%, 90% { clip-path: inset(0 0 70% 0); transform: translate(0); }
  92% { clip-path: inset(20% 0 50% 0); transform: translate(-3px); }
  94% { clip-path: inset(60% 0 10% 0); transform: translate(3px); }
  96% { clip-path: inset(0 0 70% 0); transform: translate(0); }
}

@keyframes glitch-bottom {
  0%, 90% { clip-path: inset(70% 0 0 0); transform: translate(0); }
  93% { clip-path: inset(40% 0 30% 0); transform: translate(2px); }
  95% { clip-path: inset(70% 0 0 0); transform: translate(-2px); }
  97% { clip-path: inset(70% 0 0 0); transform: translate(0); }
}

@keyframes glitch-skew {
  0%, 95% { transform: skew(0deg); }
  96% { transform: skew(1deg); }
  97% { transform: skew(-1deg); }
  98% { transform: skew(0.5deg); }
  100% { transform: skew(0deg); }
}

/* Glass Card */
.glass {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 2rem;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

/* Player Card */
.player-card {
  text-align: center;
  margin-bottom: 1.5rem;
}

.now-playing-label {
  font-size: 0.7rem;
  letter-spacing: 0.4em;
  color: var(--cyan);
  text-shadow: var(--glow-cyan);
  margin-bottom: 1rem;
}

.track-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.3rem;
}

.track-artist {
  font-size: 1rem;
  color: var(--text-dim);
}

/* Visualizer Bars */
.visualizer {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 3px;
  height: 40px;
  margin: 1.5rem 0;
}

.visualizer .bar {
  width: 4px;
  background: linear-gradient(to top, var(--cyan), var(--magenta));
  border-radius: 2px;
  height: 5px;
  transition: height 0.1s ease;
}

.visualizer.active .bar {
  animation: bar-dance 0.8s ease-in-out infinite;
}

.visualizer.active .bar:nth-child(1) { animation-delay: 0s; }
.visualizer.active .bar:nth-child(2) { animation-delay: 0.1s; }
.visualizer.active .bar:nth-child(3) { animation-delay: 0.05s; }
.visualizer.active .bar:nth-child(4) { animation-delay: 0.15s; }
.visualizer.active .bar:nth-child(5) { animation-delay: 0.02s; }
.visualizer.active .bar:nth-child(6) { animation-delay: 0.12s; }
.visualizer.active .bar:nth-child(7) { animation-delay: 0.07s; }
.visualizer.active .bar:nth-child(8) { animation-delay: 0.18s; }
.visualizer.active .bar:nth-child(9) { animation-delay: 0.03s; }
.visualizer.active .bar:nth-child(10) { animation-delay: 0.13s; }
.visualizer.active .bar:nth-child(11) { animation-delay: 0.08s; }
.visualizer.active .bar:nth-child(12) { animation-delay: 0.16s; }
.visualizer.active .bar:nth-child(13) { animation-delay: 0.04s; }
.visualizer.active .bar:nth-child(14) { animation-delay: 0.11s; }
.visualizer.active .bar:nth-child(15) { animation-delay: 0.06s; }
.visualizer.active .bar:nth-child(16) { animation-delay: 0.14s; }

@keyframes bar-dance {
  0%, 100% { height: 5px; }
  50% { height: calc(5px + random(35) * 1px); }
}

/* Use individual animations since CSS random isn't supported */
.visualizer.active .bar:nth-child(odd) {
  animation: bar-dance-a 0.8s ease-in-out infinite;
}
.visualizer.active .bar:nth-child(even) {
  animation: bar-dance-b 0.6s ease-in-out infinite;
}
.visualizer.active .bar:nth-child(3n) {
  animation: bar-dance-c 1s ease-in-out infinite;
}

@keyframes bar-dance-a {
  0%, 100% { height: 5px; }
  50% { height: 35px; }
}

@keyframes bar-dance-b {
  0%, 100% { height: 8px; }
  50% { height: 25px; }
}

@keyframes bar-dance-c {
  0%, 100% { height: 3px; }
  50% { height: 40px; }
}

/* Controls */
.controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.play-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid var(--cyan);
  background: transparent;
  color: var(--cyan);
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--glow-cyan);
}

.play-btn:hover {
  background: rgba(0, 255, 255, 0.1);
  box-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
  transform: scale(1.05);
}

.play-btn:active {
  transform: scale(0.95);
}

.play-icon {
  margin-left: 3px;
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.volume-icon {
  font-size: 1.2rem;
  color: var(--text-dim);
}

.volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100px;
  height: 4px;
  background: linear-gradient(to right, var(--cyan), var(--purple));
  border-radius: 2px;
  outline: none;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--cyan);
  cursor: pointer;
  box-shadow: var(--glow-cyan);
}

.volume-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--cyan);
  cursor: pointer;
  border: none;
  box-shadow: var(--glow-cyan);
}

/* Listener Count */
.listener-count {
  font-size: 0.8rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(0, 255, 255, 0.5); }
  50% { opacity: 0.7; box-shadow: 0 0 0 8px rgba(0, 255, 255, 0); }
}

/* Schedule Card */
.schedule-card {
  margin-bottom: 1.5rem;
}

.section-title {
  font-size: 0.8rem;
  letter-spacing: 0.4em;
  color: var(--magenta);
  text-shadow: var(--glow-magenta);
  margin-bottom: 1.5rem;
  text-align: center;
}

.schedule-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.schedule-item {
  display: flex;
  align-items: center;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: all 0.3s ease;
}

.schedule-item:hover {
  background: rgba(0, 255, 255, 0.05);
  border-color: var(--card-border);
}

.schedule-item.active {
  background: rgba(0, 255, 255, 0.08);
  border-color: var(--cyan);
  box-shadow: inset 0 0 20px rgba(0, 255, 255, 0.05);
}

.schedule-time {
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  color: var(--cyan);
  min-width: 110px;
  letter-spacing: 0.05em;
}

.schedule-name {
  flex: 1;
  font-weight: 600;
  color: #fff;
}

.schedule-desc {
  font-size: 0.75rem;
  color: var(--text-dim);
  display: none;
}

.schedule-item.active .schedule-desc {
  display: block;
}

.schedule-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-left: 0.5rem;
}

.schedule-item.active .schedule-indicator {
  background: var(--cyan);
  box-shadow: var(--glow-cyan);
  animation: pulse 2s infinite;
}

/* Footer */
.footer {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.7rem;
  padding-top: 1rem;
}

/* Responsive */
@media (max-width: 480px) {
  .station-name {
    font-size: 1.8rem;
    letter-spacing: 0.2em;
  }

  .glass {
    padding: 1.5rem;
  }

  .track-title {
    font-size: 1.2rem;
  }

  .volume-slider {
    width: 70px;
  }

  .schedule-time {
    min-width: 90px;
    font-size: 0.75rem;
  }
}
