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

:root {
  --bg: #0a0a0a;
  --surface: #151515;
  --surface-hover: #1f1f1f;
  --text: #f0f0f0;
  --text-muted: #888;
  --accent: #e63946;
  --accent-dim: rgba(230, 57, 70, 0.2);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

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

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1rem 0;
  border-bottom: 1px solid #222;
}

h1 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.listeners {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.player {
  background: var(--surface);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.artwork {
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 1.5rem;
  background: #222;
}

.artwork img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.info {
  margin-bottom: 1.5rem;
}

.now-playing {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.info h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  line-height: 1.2;
}

.info p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.set-name {
  font-size: 0.8rem !important;
  margin-top: 0.5rem;
  opacity: 0.6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.progress-container {
  margin-bottom: 0.5rem;
}

.progress-bar {
  height: 4px;
  background: #333;
  border-radius: 2px;
  overflow: hidden;
  cursor: pointer;
}

.progress {
  height: 100%;
  background: var(--accent);
  width: 0;
  transition: width 0.5s linear;
}

.time {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.btn {
  background: var(--surface);
  border: none;
  color: var(--text);
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.2s;
}

.btn:hover {
  background: var(--surface-hover);
}

.skip-btn {
  flex: 1;
  max-width: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.skip-btn.voted {
  background: var(--accent-dim);
  color: var(--accent);
}

.vote-count {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.secondary-controls {
  display: flex;
  gap: 0.5rem;
}

.icon-btn {
  padding: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-section {
  position: relative;
  margin-bottom: 1rem;
}

#search {
  width: 100%;
  padding: 0.875rem 1rem;
  background: var(--surface);
  border: 1px solid #333;
  border-radius: 8px;
  color: var(--text);
  font-size: 0.9rem;
}

#search:focus {
  outline: none;
  border-color: var(--accent);
}

#search::placeholder {
  color: var(--text-muted);
}

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface);
  border-radius: 8px;
  margin-top: 0.5rem;
  max-height: 300px;
  overflow-y: auto;
  z-index: 10;
  display: none;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.search-results.active {
  display: block;
}

.search-result {
  padding: 0.75rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid #222;
}

.search-result:hover {
  background: var(--surface-hover);
}

.search-result:last-child {
  border-bottom: none;
}

.search-result .artist {
  font-weight: 500;
}

.search-result .name {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.queue {
  background: var(--surface);
  border-radius: 8px;
  overflow: hidden;
}

.queue:empty {
  display: none;
}

.queue-header {
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  border-bottom: 1px solid #222;
}

.queue-item {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #222;
}

.queue-item:last-child {
  border-bottom: none;
}

.notification {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--surface);
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 0.9rem;
  opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.notification.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Play overlay */
.play-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.play-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.play-overlay-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  color: var(--accent);
}

.play-overlay-content svg {
  filter: drop-shadow(0 0 20px var(--accent));
  animation: pulse-glow 2s ease-in-out infinite;
}

.play-overlay-content span {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.2em;
}

@keyframes pulse-glow {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.8; }
}

@media (max-width: 480px) {
  .container {
    padding: 0.75rem;
  }

  header {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  .info h2 {
    font-size: 1.25rem;
  }
}
