/* listentoget.her — Dark minimal theme */

:root {
  --bg: #0a0a0a;
  --bg-surface: #141414;
  --bg-elevated: #1e1e1e;
  --bg-hover: #252525;
  --border: #2a2a2a;
  --text: #e0e0e0;
  --text-dim: #888;
  --text-bright: #fff;
  --accent: #7c5cfc;
  --accent-hover: #9178ff;
  --accent-dim: rgba(124, 92, 252, 0.15);
  --danger: #e5484d;
  --success: #30a46c;
  --radius: 8px;
  --radius-sm: 4px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;
}

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

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Landing Page */
.landing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
}

.landing h1 {
  font-size: 2.5rem;
  font-weight: 300;
  color: var(--text-bright);
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
}

.landing h1 span {
  color: var(--accent);
  font-weight: 600;
}

.landing .tagline {
  color: var(--text-dim);
  margin-bottom: 3rem;
  font-size: 0.95rem;
}

.landing-actions {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
  max-width: 320px;
}

.landing-actions .divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-dim);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.landing-actions .divider::before,
.landing-actions .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.input-group {
  display: flex;
  gap: 0.5rem;
}

input[type="text"],
input[type="search"] {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-family: var(--font);
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
}

input:focus {
  border-color: var(--accent);
}

input::placeholder {
  color: var(--text-dim);
}

button, .btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-family: var(--font);
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}

button:hover, .btn:hover {
  background: var(--accent-hover);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

button.secondary {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
}

button.secondary:hover {
  background: var(--bg-hover);
}

button.danger {
  background: var(--danger);
}

button.small {
  padding: 0.35rem 0.7rem;
  font-size: 0.8rem;
}

/* Room Page Layout */
.room-page {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* Top Bar */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  min-height: 52px;
}

.top-bar .room-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.room-code {
  font-family: var(--mono);
  font-size: 0.95rem;
  color: var(--accent);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  background: var(--accent-dim);
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}

.room-code:hover {
  background: rgba(124, 92, 252, 0.25);
}

.room-code .copied {
  color: var(--success);
}

.listener-count {
  color: var(--text-dim);
  font-size: 0.85rem;
}

.user-list {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.user-tag {
  font-size: 0.8rem;
  padding: 0.2rem 0.5rem;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
}

.user-tag.host {
  color: var(--accent);
  background: var(--accent-dim);
}

/* Main Content */
.room-content {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.room-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Player Section */
.player-section {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
}

.track-info {
  text-align: center;
}

.track-info .title {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text-bright);
}

.track-info .artist {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-top: 0.2rem;
}

.track-info .no-track {
  color: var(--text-dim);
  font-style: italic;
}

/* Progress Bar */
.progress-container {
  width: 100%;
  max-width: 600px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.progress-time {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  min-width: 3.5em;
  text-align: center;
}

.progress-bar {
  flex: 1;
  height: 4px;
  background: var(--bg-elevated);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
  transition: height 0.1s;
}

.progress-bar:hover {
  height: 6px;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  width: 0%;
  position: relative;
  transition: width 0.1s linear;
}

.progress-fill::after {
  content: '';
  position: absolute;
  right: -5px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.15s;
}

.progress-bar:hover .progress-fill::after {
  opacity: 1;
}

/* Player Controls */
.player-controls {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.player-controls button {
  background: none;
  color: var(--text);
  padding: 0.5rem;
  font-size: 1.25rem;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-controls button:hover {
  background: var(--bg-hover);
  color: var(--text-bright);
}

.player-controls .play-btn {
  background: var(--accent);
  color: #fff;
  width: 48px;
  height: 48px;
  font-size: 1.3rem;
}

.player-controls .play-btn:hover {
  background: var(--accent-hover);
}

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

.volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 80px;
  height: 4px;
  background: var(--bg-elevated);
  border-radius: 2px;
  outline: none;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  background: var(--text);
  border-radius: 50%;
  cursor: pointer;
}

/* Sync status */
.sync-status {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-family: var(--mono);
}

.sync-status.synced {
  color: var(--success);
}

.sync-status.drifting {
  color: #e5a100;
}

/* Sidebar */
.sidebar {
  width: 340px;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border);
  background: var(--bg-surface);
}

.sidebar-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
}

.sidebar-tab {
  flex: 1;
  padding: 0.6rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-dim);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  background: none;
  border-radius: 0;
  font-weight: 400;
}

.sidebar-tab:hover {
  color: var(--text);
  background: none;
}

.sidebar-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.sidebar-panel {
  display: none;
  flex: 1;
  overflow-y: auto;
  flex-direction: column;
}

.sidebar-panel.active {
  display: flex;
}

/* Queue Panel */
.queue-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
}

.queue-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-sm);
  transition: background 0.1s;
}

.queue-item:hover {
  background: var(--bg-hover);
}

.queue-item .index {
  color: var(--text-dim);
  font-size: 0.8rem;
  font-family: var(--mono);
  min-width: 1.5em;
}

.queue-item .meta {
  flex: 1;
  min-width: 0;
}

.queue-item .meta .title {
  font-size: 0.85rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.queue-item .meta .artist {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.queue-item .remove-btn {
  background: none;
  color: var(--text-dim);
  padding: 0.2rem;
  font-size: 0.9rem;
  opacity: 0;
  transition: opacity 0.15s;
}

.queue-item:hover .remove-btn {
  opacity: 1;
}

.queue-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* Library Panel */
.library-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
}

.library-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.1s;
}

.library-item:hover {
  background: var(--bg-hover);
}

.library-item .meta {
  flex: 1;
  min-width: 0;
}

.library-item .meta .title {
  font-size: 0.85rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.library-item .meta .artist {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.library-item .duration {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-dim);
}

.library-item .actions {
  display: flex;
  gap: 0.25rem;
}

.library-item .actions button {
  opacity: 0;
  transition: opacity 0.15s;
}

.library-item:hover .actions button {
  opacity: 1;
}

/* Chat Panel */
.chat-panel {
  display: flex;
  flex-direction: column;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.chat-msg {
  font-size: 0.85rem;
  word-break: break-word;
}

.chat-msg .author {
  font-weight: 500;
  color: var(--accent);
  margin-right: 0.35rem;
}

.chat-msg.system {
  color: var(--text-dim);
  font-size: 0.8rem;
  font-style: italic;
}

.chat-input-area {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  border-top: 1px solid var(--border);
}

.chat-input-area input {
  flex: 1;
}

.chat-input-area button {
  padding: 0.5rem 0.75rem;
}

/* Upload Section */
.upload-section {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  color: var(--text-dim);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.drop-zone:hover,
.drop-zone.dragover {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.drop-zone input {
  display: none;
}

.upload-progress {
  margin-top: 0.75rem;
  display: none;
}

.upload-progress.active {
  display: block;
}

.upload-progress-bar {
  height: 3px;
  background: var(--bg-elevated);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.upload-progress-fill {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.2s;
}

.upload-status {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 0.35rem;
}

/* Beatport Section */
.beatport-section {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

.beatport-section h3 {
  font-size: 0.85rem;
  color: var(--text-dim);
  font-weight: 400;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.bp-results {
  max-height: 200px;
  overflow-y: auto;
  margin-top: 0.5rem;
}

.bp-result-item {
  padding: 0.5rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  transition: background 0.1s;
}

.bp-result-item:hover {
  background: var(--bg-hover);
}

.bp-progress-text {
  font-size: 0.8rem;
  color: var(--accent);
  margin-top: 0.35rem;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-dim);
}

/* Responsive */
@media (max-width: 768px) {
  .room-content {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--border);
    max-height: 50vh;
  }

  .player-section {
    padding: 1.25rem;
  }

  .top-bar .user-list {
    display: none;
  }
}

/* Utilities */
.hidden {
  display: none !important;
}

.fade-in {
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Loading */
.loading-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Username input on landing */
.username-input {
  margin-bottom: 0.5rem;
}
