/* CSS Variables */
:root {
  --primary: #1db954;
  --primary-hover: #1ed760;
  --bg-dark: #121212;
  --bg-elevated: #181818;
  --bg-surface: #282828;
  --text-primary: #ffffff;
  --text-secondary: #b3b3b3;
  --text-muted: #6a6a6a;
  --border-radius: 8px;
  --border-radius-lg: 12px;
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
  --safe-area-top: env(safe-area-inset-top, 0px);
  --tap-target: 48px;
  --transition: 0.2s ease;
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Base */
html {
  font-size: 16px;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  min-height: -webkit-fill-available;
  overflow-x: hidden;
  line-height: 1.5;
}

/* Prevent pull-to-refresh on mobile */
html, body {
  overscroll-behavior-y: contain;
}

/* Views */
.view {
  display: none;
  min-height: 100vh;
  min-height: -webkit-fill-available;
  position: relative;
}

.view.active {
  display: flex;
  flex-direction: column;
}

/* Lobby view must be exactly viewport height so player stays pinned at bottom */
#lobby-view.active {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

/* Landing View */
.landing-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  padding-top: calc(2rem + var(--safe-area-top));
  text-align: center;
}

.logo {
  margin-bottom: 1.5rem;
}

.logo-icon {
  width: 80px;
  height: 80px;
  border-radius: 20%;
  margin: 0 auto 1rem;
}

.logo h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.tagline {
  color: var(--text-secondary);
  font-size: 1.125rem;
  margin-bottom: 2.5rem;
  max-width: 280px;
}

.lobby-name-input-wrapper {
  width: 100%;
  max-width: 320px;
  margin-bottom: 1rem;
}

.lobby-name-input-wrapper input {
  width: 100%;
  padding: 0.625rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 0.9375rem;
  text-align: center;
  box-sizing: border-box;
}

.lobby-name-input-wrapper input::placeholder {
  color: var(--text-muted);
}

.lobby-name-input-wrapper input:focus {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

.lobby-type-selector {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  width: 100%;
  max-width: 320px;
}

.lobby-type-option {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  padding: 0.75rem 0.5rem;
  background: var(--bg-surface);
  border: 2px solid transparent;
  border-radius: var(--border-radius-lg);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}

.lobby-type-option input[type="radio"] {
  display: none;
}

.lobby-type-option.selected {
  border-color: var(--primary);
  background: rgba(29, 185, 84, 0.1);
}

.lobby-type-option:hover {
  background: rgba(255, 255, 255, 0.05);
}

.lobby-type-option.selected:hover {
  background: rgba(29, 185, 84, 0.15);
}

.lobby-type-icon {
  width: 28px;
  height: 28px;
  color: var(--text-secondary);
}

.lobby-type-option.selected .lobby-type-icon {
  color: var(--primary);
}

.lobby-type-icon svg {
  width: 100%;
  height: 100%;
}

.lobby-type-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.lobby-type-desc {
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.3;
}

.listening-mode-badge {
  display: inline-block;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
}

.listening-mode-badge.synchronized {
  background: rgba(29, 185, 84, 0.2);
  color: var(--primary);
}

.listening-mode-badge.independent {
  background: rgba(255, 165, 0, 0.2);
  color: #ffa500;
}

.join-section {
  margin-top: 2rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.landing-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1.5rem;
  padding-bottom: calc(1.5rem + var(--safe-area-bottom));
  text-align: center;
}

.landing-footer .version-text {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.landing-footer a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: color var(--transition);
}

.landing-footer a:hover {
  color: var(--text-secondary);
}

.landing-footer svg {
  width: 24px;
  height: 24px;
}

/* Language Selector */
.language-selector {
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--bg-elevated);
  border-radius: var(--border-radius);
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  cursor: pointer;
  outline: none;
  transition: all var(--transition);
}

.language-selector:hover,
.language-selector:focus {
  border-color: var(--primary);
  color: var(--text-primary);
}

.language-selector option {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  min-height: var(--tap-target);
  touch-action: manipulation;
}

.btn-primary {
  background: var(--primary);
  color: var(--bg-dark);
}

.btn-primary:hover, .btn-primary:focus {
  background: var(--primary-hover);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-large {
  padding: 1rem 2.5rem;
  font-size: 1.125rem;
  border-radius: 50px;
}

.btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--tap-target);
  height: var(--tap-target);
  background: transparent;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: var(--text-primary);
  transition: all var(--transition);
}

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

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

.btn-icon svg {
  width: 24px;
  height: 24px;
}

/* Lobby Header */
.lobby-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  padding-top: calc(0.5rem + var(--safe-area-top));
  background: var(--bg-elevated);
  flex-shrink: 0;
  z-index: 100;
}

.lobby-info {
  flex: 1;
  min-width: 0;
}

.lobby-info h2 {
  font-size: 1.125rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline;
}

.btn-rename {
  display: inline-flex;
  width: auto;
  height: auto;
  padding: 0.125rem;
  margin-left: 0.25rem;
  vertical-align: middle;
  opacity: 0.5;
  background: none;
}

.btn-rename:hover {
  opacity: 1;
}

.btn-rename svg {
  width: 14px;
  height: 14px;
}

.user-count {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Now Playing Section (solo view) */
.now-playing {
  padding: 0.75rem 1rem;
  background: linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg-dark) 100%);
}

.now-playing-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.album-art {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg-surface);
  flex-shrink: 0;
}

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

.placeholder-art {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.placeholder-art svg {
  width: 20px;
  height: 20px;
}

.track-info {
  min-width: 0;
  flex: 1;
  text-align: left;
}

.track-title {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.track-artist {
  color: var(--text-secondary);
  font-size: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.track-source-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--text-muted);
  font-size: 0.65rem;
  text-decoration: none;
  transition: color var(--transition);
}

.track-source-link:hover {
  color: #ff0000;
}

.track-source-link svg {
  width: 12px;
  height: 12px;
}

/* Sticky Player Bar (lobby view) */
.sticky-player {
  flex-shrink: 0;
  z-index: 200;
  background: var(--bg-elevated);
  border-top: 1px solid var(--bg-surface);
  padding: 0.5rem 0.75rem;
  padding-bottom: calc(0.5rem + var(--safe-area-bottom));
}

.sticky-player-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sticky-player-controls {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

.sticky-player-controls .btn-control {
  width: 32px;
  height: 32px;
  padding: 0;
}

.sticky-player-controls .btn-control svg {
  width: 20px;
  height: 20px;
}

.sticky-player-controls .btn-play {
  width: 36px;
  height: 36px;
  background: var(--text-primary);
  color: var(--bg-dark);
}

.sticky-player-controls .btn-play svg {
  width: 18px;
  height: 18px;
}

.sticky-player-controls .volume-bar {
  width: 60px;
  flex: none;
}

.sticky-player-progress {
  margin-top: 0.25rem;
}

.sticky-player-progress .progress-bar {
  height: 3px;
}

.sticky-player-progress .time-display {
  font-size: 0.65rem;
  margin-top: 0.125rem;
}

.sticky-player .track-source-link {
  margin-top: 0.125rem;
}

/* Progress Bar */
.progress-container {
  width: 100%;
  padding: 0;
  margin-bottom: 0.5rem;
}

.progress-bar {
  width: 100%;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--bg-surface);
  border-radius: 2px;
  cursor: pointer;
}

.progress-bar::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  background: var(--primary);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 4px rgba(29, 185, 84, 0.6);
}

.progress-bar::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: var(--primary);
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 0 4px rgba(29, 185, 84, 0.6);
}

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

/* Playback Controls (solo view) */
.playback-controls {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.btn-control svg {
  width: 32px;
  height: 32px;
}

.btn-play {
  width: 64px;
  height: 64px;
  background: var(--text-primary);
  color: var(--bg-dark);
}

.btn-play:hover {
  transform: scale(1.05);
  background: var(--text-primary);
}

.btn-play svg {
  width: 32px;
  height: 32px;
}

/* Volume Control */
.volume-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  max-width: 200px;
  margin: 0 auto;
}

.volume-control .btn-control svg {
  width: 24px;
  height: 24px;
}

.volume-bar {
  flex: 1;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--bg-surface);
  border-radius: 2px;
  cursor: pointer;
}

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

.volume-bar::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: var(--text-primary);
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

/* Shuffle Button Active State */
.btn-control.active {
  color: var(--primary);
}

/* Bottom Navigation (tab switcher) */
.bottom-nav {
  display: flex;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--bg-surface);
  flex-shrink: 0;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.75rem;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.75rem;
  cursor: pointer;
  transition: color var(--transition);
  min-height: var(--tap-target);
}

.nav-item svg {
  width: 24px;
  height: 24px;
}

.nav-item.active {
  color: var(--primary);
}

/* Tab Content */
.tab-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.tab-panel {
  display: none;
  flex: 1;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

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

/* Add Song Input — pinned at bottom of queue tab */
.add-song {
  display: flex;
  gap: 0.5rem;
  padding: 1rem;
  background: var(--bg-elevated);
  flex-shrink: 0;
  order: 2;
  border-top: 1px solid var(--bg-surface);
}

.add-song input {
  flex: 1;
  padding: 0.75rem 1rem;
  background: var(--bg-surface);
  border: none;
  border-radius: var(--border-radius);
  color: var(--text-primary);
  font-size: 1rem;
  min-height: var(--tap-target);
}

.add-song input::placeholder {
  color: var(--text-muted);
}

.add-song input:focus {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

.add-song .btn {
  padding: 0.75rem;
  min-width: var(--tap-target);
}

.add-song .btn svg {
  width: 24px;
  height: 24px;
}

/* Queue Filter */
.queue-filter {
  padding: 0.5rem 1rem;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-shrink: 0;
  order: 0;
}

.queue-sort-select {
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--bg-surface);
  border-radius: var(--border-radius);
  padding: 0.25rem 0.5rem;
  font-size: 0.8125rem;
  cursor: pointer;
  outline: none;
}

.queue-sort-select:focus {
  border-color: var(--primary);
}

.queue-sort-select:hover {
  color: var(--text-primary);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.checkbox-label input[type="checkbox"] {
  cursor: pointer;
  accent-color: var(--primary);
}

.checkbox-label:hover {
  color: var(--text-primary);
}

/* Queue List — scrollable area between filter and input */
.queue-list {
  list-style: none;
  padding: 0.5rem 0;
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  order: 1;
}

.queue-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  transition: background var(--transition);
}

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

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

.queue-item.played {
  opacity: 0.45;
}

.queue-item.played .queue-item-title {
  color: var(--text-muted);
}

.queue-item.now-playing {
  background: var(--bg-surface);
  border-left: 3px solid var(--primary);
}

.queue-item.now-playing .queue-item-title {
  color: var(--primary);
  font-weight: 600;
}

.queue-item-thumb {
  width: 48px;
  height: 48px;
  border-radius: 4px;
  background: var(--bg-surface);
  flex-shrink: 0;
  overflow: hidden;
}

.queue-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.queue-item-title {
  font-size: 0.9375rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.queue-item-duration {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.queue-item-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

.queue-item-drag-handle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  flex-shrink: 0;
  cursor: grab;
  color: var(--text-muted);
  opacity: 0.5;
  transition: opacity var(--transition), color var(--transition);
}

.queue-item-drag-handle:active {
  cursor: grabbing;
}

.queue-item:hover .queue-item-drag-handle {
  opacity: 1;
  color: var(--text-secondary);
}

.queue-item-drag-handle svg {
  width: 18px;
  height: 18px;
}

.queue-item.dragging {
  opacity: 0.4;
  background: var(--bg-surface);
}

.queue-item.drag-over-top {
  box-shadow: inset 0 2px 0 0 var(--primary);
}

.queue-item.drag-over-bottom {
  box-shadow: inset 0 -2px 0 0 var(--primary);
}

.queue-item-reorder {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.btn-icon-small {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 20px;
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.btn-icon-small:hover:not(:disabled) {
  background: var(--bg-surface);
  color: var(--text-primary);
}

.btn-icon-small:active:not(:disabled) {
  transform: scale(0.95);
}

.btn-icon-small:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.btn-icon-small svg {
  width: 18px;
  height: 18px;
}

.queue-item-play {
  padding: 0.5rem;
  color: var(--text-muted);
}

.queue-item-play:hover {
  color: var(--primary);
}

.queue-item-play:active {
  transform: scale(0.9);
}

.queue-item-remove {
  padding: 0.5rem;
  color: var(--text-muted);
}

.queue-item-youtube {
  padding: 0.5rem;
  color: var(--text-muted);
}

.queue-item-youtube:hover {
  color: #ff0000;
}

.queue-item-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.queue-item-added-by {
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.8;
}

.queue-item-added-by::before {
  content: '·';
  margin-right: 0.25rem;
}

/* Download Status Indicator on Thumbnail */
.queue-item-status {
  position: absolute;
  bottom: 2px;
  right: 2px;
  font-size: 0.75rem;
  line-height: 1;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 3px;
  padding: 2px 4px;
}

.queue-item-status.ready {
  color: var(--primary);
}

.queue-item-status.downloading {
  animation: pulse-download 1.5s ease-in-out infinite;
}

.queue-item-status.pending {
  opacity: 0.7;
}

.queue-item-status.error {
  color: #e74c3c;
}

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

/* Download Status Badge */
.queue-item-badge {
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.125rem 0.375rem;
  border-radius: 3px;
  font-weight: 600;
}

.queue-item-badge.pending {
  background: var(--bg-surface);
  color: var(--text-muted);
}

.queue-item-badge.downloading {
  background: rgba(29, 185, 84, 0.2);
  color: var(--primary);
}

.queue-item-badge.error {
  background: rgba(231, 76, 60, 0.2);
  color: #e74c3c;
}

/* Download Progress Bar */
.queue-item-progress {
  margin-top: 0.375rem;
  height: 3px;
  background: var(--bg-surface);
  border-radius: 2px;
  overflow: hidden;
}

.queue-item-progress-bar {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* Make thumbnail relative for status positioning */
.queue-item-thumb {
  position: relative;
}

/* Queue item listeners (Independent mode) */
.queue-item-listeners {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  flex-shrink: 0;
  margin-right: 0.5rem;
}

.queue-listener-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.6875rem;
  color: var(--bg-dark);
  border: 2px solid var(--bg-dark);
  margin-left: -8px;
  cursor: default;
  transition: transform var(--transition);
}

.queue-listener-avatar:hover {
  transform: scale(1.1);
  z-index: 1;
}

.queue-listener-avatar:last-child {
  margin-left: 0;
}

.queue-listener-avatar.emoji {
  background: var(--bg-surface);
  font-size: 0.875rem;
}

.queue-listener-avatar.overflow {
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 0.625rem;
  font-weight: 500;
}

.queue-empty, .listener-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-secondary);
}

.queue-empty .hint, .listener-empty .hint {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

/* Profile Editor */
.profile-editor {
  padding: 0.75rem 1rem;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--bg-surface);
  flex-shrink: 0;
}

.profile-editor-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.profile-emoji-btn {
  width: 40px;
  height: 40px;
  font-size: 1.5rem;
  background: var(--bg-surface);
  border: 2px solid transparent;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color var(--transition);
}

.profile-emoji-btn:hover {
  border-color: var(--primary);
}

.profile-name-input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  background: var(--bg-surface);
  border: none;
  border-radius: var(--border-radius);
  color: var(--text-primary);
  font-size: 0.9375rem;
  min-width: 0;
}

.profile-name-input::placeholder {
  color: var(--text-muted);
}

.profile-name-input:focus {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

.profile-save-btn {
  flex-shrink: 0;
}

.emoji-picker {
  grid-template-columns: repeat(auto-fill, 2.25rem);
  gap: 0.2rem;
  padding: 0.5rem;
  max-height: 5.5rem;
  overflow-y: auto;
  background: var(--bg-surface);
  border-radius: var(--border-radius);
  margin-top: 0.4rem;
}

.emoji-picker:not([hidden]) {
  display: grid;
}

.emoji-option {
  width: 2.25rem;
  height: 2.25rem;
  font-size: 1.1rem;
  background: transparent;
  border: 2px solid transparent;
  border-radius: var(--border-radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: border-color var(--transition), transform var(--transition);
}

.emoji-option:hover {
  border-color: var(--text-muted);
  transform: scale(1.1);
}

.emoji-option.selected {
  border-color: var(--primary);
  background: rgba(29, 185, 84, 0.15);
}

/* Chat Marquee Ticker */
.chat-ticker {
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--bg-surface);
  overflow: hidden;
  white-space: nowrap;
  height: 28px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.chat-ticker-content {
  display: inline-block;
  animation: ticker-scroll 20s linear infinite;
  padding-left: 100%;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.chat-ticker-content .ticker-msg {
  display: inline;
  margin-right: 3rem;
}

.chat-ticker-content .ticker-user {
  color: var(--primary);
  font-weight: 600;
}

@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* Social Tab (Combined Chat + Listeners) */
#social-tab {
  display: none;
  flex-direction: column;
  overflow: hidden;
}

#social-tab.active {
  display: flex;
}

.social-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

/* Compact horizontal strip for listeners */
.social-listeners-strip {
  flex-shrink: 0;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--bg-surface);
  padding: 0.5rem 0.75rem;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.social-listeners-strip .listeners-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.social-listeners-strip .listener-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.5rem 0.25rem 0.25rem;
  background: var(--bg-surface);
  border-radius: 999px;
  font-size: 0.8125rem;
  white-space: nowrap;
}

.social-listeners-strip .listener-item.lobby-mode {
  opacity: 0.6;
}

.social-listeners-strip .listener-avatar {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--primary);
  color: var(--text-inverse);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.625rem;
  font-weight: 600;
  flex-shrink: 0;
}

.social-listeners-strip .listener-avatar.emoji {
  font-size: 0.875rem;
  background: transparent;
}

.social-listeners-strip .listener-name {
  font-weight: 500;
  color: var(--text-primary);
}

.social-listeners-strip .listener-info {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.social-listeners-strip .listener-track {
  display: none; /* Hide track info in compact view */
}

.social-listeners-strip .mode-icon {
  width: 0.875rem;
  height: 0.875rem;
  flex-shrink: 0;
  color: var(--text-muted);
}

.social-listeners-strip .mode-icon.lobby {
  color: var(--text-muted);
}

.social-listeners-strip .mode-icon.listening {
  color: var(--primary);
}

.social-listeners-strip .listener-badge {
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--primary);
  background: rgba(29, 185, 84, 0.15);
  padding: 0.125rem 0.375rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.social-listeners-strip .listener-empty {
  display: flex;
  align-items: center;
  padding: 0;
}

.social-listeners-strip .listener-empty p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0;
}

.social-listeners-strip .listener-empty .hint {
  display: none;
}

.social-chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.5rem 0;
  display: flex;
  flex-direction: column;
}

.chat-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-secondary);
}

.chat-empty .hint {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

.chat-msg {
  display: flex;
  gap: 0.5rem;
  padding: 0.375rem 1rem;
  align-items: flex-start;
}

.chat-msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.chat-msg-body {
  min-width: 0;
  flex: 1;
}

.chat-msg-header {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.chat-msg-user {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary);
}

.chat-msg-time {
  font-size: 0.6875rem;
  color: var(--text-muted);
}

.chat-msg-text {
  font-size: 0.875rem;
  color: var(--text-primary);
  word-break: break-word;
  line-height: 1.4;
}

.chat-input-bar {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--bg-elevated);
  border-top: 1px solid var(--bg-surface);
  flex-shrink: 0;
}

.chat-input-bar input {
  flex: 1;
  padding: 0.625rem 0.75rem;
  background: var(--bg-surface);
  border: none;
  border-radius: var(--border-radius);
  color: var(--text-primary);
  font-size: 0.9375rem;
  min-height: var(--tap-target);
}

.chat-input-bar input::placeholder {
  color: var(--text-muted);
}

.chat-input-bar input:focus {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

.chat-input-bar .btn {
  padding: 0.625rem;
  min-width: var(--tap-target);
}

/* Song mention button */
.chat-mention-song-btn {
  color: var(--text-muted);
  padding: 0.5rem;
  border-radius: var(--border-radius);
  transition: color 0.15s, background 0.15s;
}

.chat-mention-song-btn:hover {
  color: var(--primary);
  background: var(--bg-surface);
}

.chat-mention-song-btn.active {
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 15%, transparent);
}

.chat-mention-song-btn svg {
  width: 20px;
  height: 20px;
}

/* Song mention preview bar (above input) */
.chat-song-preview {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 1rem;
  background: color-mix(in srgb, var(--primary) 10%, var(--bg-elevated));
  border-top: 1px solid var(--bg-surface);
  font-size: 0.8125rem;
  flex-shrink: 0;
}

.chat-song-preview-info {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.chat-song-preview-label {
  color: var(--text-muted);
  white-space: nowrap;
}

.chat-song-preview-title {
  color: var(--primary);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Song mention card in chat messages */
.chat-song-mention {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.375rem;
  padding: 0.375rem 0.5rem;
  background: var(--bg-surface);
  border-radius: var(--border-radius);
  border-left: 3px solid var(--primary);
}

.chat-song-mention-thumb {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
}

.chat-song-mention-thumb-placeholder {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-muted);
}

.chat-song-mention-thumb-placeholder svg {
  width: 18px;
  height: 18px;
}

.chat-song-mention-title {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Song badge in ticker */
.ticker-song-badge {
  display: inline-block;
  padding: 0 0.375rem;
  margin-left: 0.25rem;
  background: color-mix(in srgb, var(--primary) 20%, transparent);
  border-radius: 3px;
  font-size: 0.75rem;
  color: var(--primary);
}

.chat-input-bar .btn svg {
  width: 20px;
  height: 20px;
}

/* Listeners List */
.listeners-list {
  list-style: none;
  padding: 0.5rem 0;
}

.listener-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
}

.listener-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1rem;
  color: var(--bg-dark);
  flex-shrink: 0;
}

.listener-avatar.emoji {
  background: var(--bg-surface);
  font-size: 1.375rem;
}

.listener-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.listener-name {
  font-weight: 500;
}

.listener-track {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.listener-badge {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-surface);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.listener-badge.following {
  color: var(--primary);
  background: rgba(var(--primary-rgb, 29, 185, 84), 0.15);
}

/* Follow button in listener list */
.follow-btn {
  background: none;
  border: 1.5px solid var(--text-muted);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.follow-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(var(--primary-rgb, 29, 185, 84), 0.1);
}

.follow-btn.following {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(var(--primary-rgb, 29, 185, 84), 0.15);
}

.follow-btn svg {
  width: 16px;
  height: 16px;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: calc(80px + var(--safe-area-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: calc(100% - 2rem);
  max-width: 400px;
}

.toast {
  background: var(--bg-surface);
  color: var(--text-primary);
  padding: 0.875rem 1rem;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  animation: toast-in 0.3s ease;
}

.toast.error {
  border-left: 3px solid #e74c3c;
}

.toast.success {
  border-left: 3px solid var(--primary);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(1rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Connection Status */
.connection-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.connection-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
}

.connection-dot.connected {
  background: var(--primary);
}

/* Sticky player: hide secondary controls on small screens */
@media (max-width: 479px) {
  .sticky-player-controls .volume-bar,
  .sticky-player-controls #volume-btn,
  .sticky-player-controls #repeat-btn,
  .sticky-player-controls #shuffle-btn {
    display: none;
  }
}

/* Responsive - Tablet and up */
@media (min-width: 600px) {
  .now-playing .album-art {
    width: 64px;
    height: 64px;
  }

  .now-playing .track-title {
    font-size: 1rem;
  }

  .playback-controls {
    gap: 1.5rem;
  }

  .sticky-player-controls .volume-bar {
    width: 80px;
  }

  .sticky-player .album-art {
    width: 48px;
    height: 48px;
  }
}

/* Responsive - Desktop */
@media (min-width: 900px) {
  .lobby-view {
    max-width: 800px;
    margin: 0 auto;
  }
}

/* Landscape orientation */
@media (max-height: 500px) and (orientation: landscape) {
  .now-playing .album-art {
    width: 48px;
    height: 48px;
  }

  .playback-controls {
    gap: 0.5rem;
  }
}

/* Dark mode scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-surface);
  border-radius: 4px;
}

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

/* Focus visible for accessibility */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Disabled state */
.btn:disabled, .btn-icon:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Audio unlock prompt for mobile Safari */
.audio-unlock-prompt {
  position: fixed;
  bottom: calc(100px + var(--safe-area-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 1001;
  animation: unlock-pulse 2s ease-in-out infinite;
}

.audio-unlock-prompt .unlock-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--primary);
  color: var(--bg-dark);
  padding: 1rem 1.5rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(29, 185, 84, 0.4);
  transition: transform var(--transition), box-shadow var(--transition);
}

.audio-unlock-prompt .unlock-content:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 24px rgba(29, 185, 84, 0.5);
}

.audio-unlock-prompt .unlock-content:active {
  transform: scale(0.98);
}

.audio-unlock-prompt svg {
  flex-shrink: 0;
}

@keyframes unlock-pulse {
  0%, 100% {
    transform: translateX(-50%) scale(1);
  }
  50% {
    transform: translateX(-50%) scale(1.02);
  }
}

/* Dashboard View */
.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  padding-top: calc(1rem + var(--safe-area-top));
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--bg-surface);
}

.dashboard-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
}

.dashboard-uptime {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.dashboard-content {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
}

.dashboard-stats {
  display: grid;
  grid-template-columns: 1fr repeat(3, auto);
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  align-items: stretch;
}

.stat-card {
  background: var(--bg-elevated);
  border-radius: var(--border-radius-lg);
  padding: 0.75rem;
  text-align: center;
}

.stat-card--disk {
  padding: 1rem 1.25rem;
}

.stat-card--disk .stat-value {
  font-size: 1.5rem;
}

.stat-card--mini {
  padding: 0.5rem 0.75rem;
}

.stat-card--mini .stat-value {
  font-size: 1.25rem;
}

.stat-card--mini .stat-label {
  font-size: 0.625rem;
}

.stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.125rem;
}

.stat-label {
  font-size: 0.6875rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dashboard-lobbies h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.dashboard-lobby-list {
  list-style: none;
}

.dashboard-lobby-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-elevated);
  border-radius: var(--border-radius);
  margin-bottom: 0.75rem;
}

.dashboard-lobby-id {
  font-family: monospace;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--bg-surface);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.dashboard-lobby-info {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.dashboard-lobby-track {
  color: var(--text-muted);
  font-style: italic;
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-lobby-track.playing::before {
  content: '▶ ';
  color: var(--primary);
}

.dashboard-lobby-age {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.dashboard-lobby-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-small {
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
}

.btn-danger {
  background: #dc3545;
}

.btn-danger:hover {
  background: #c82333;
}

.btn-warning {
  background: #e67e22;
}

.btn-warning:hover {
  background: #d35400;
}

.cache-header-actions {
  display: flex;
  gap: 0.5rem;
}

.dashboard-empty {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border-radius: var(--border-radius);
}

/* Cache Management Section */
.dashboard-cache {
  margin-top: 2rem;
}

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

.cache-header h2 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 0;
}

.cache-stats-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: 0.75rem;
}

.cache-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  background: var(--bg-elevated);
  color: var(--text-secondary);
}

.cache-stat-pill span {
  font-weight: 700;
}

.cache-stat-pill.ready { background: rgba(29, 185, 84, 0.15); color: var(--primary); }
.cache-stat-pill.downloading { background: rgba(255, 193, 7, 0.15); color: #ffc107; }
.cache-stat-pill.pending { background: rgba(108, 117, 125, 0.15); color: #6c757d; }
.cache-stat-pill.error { background: rgba(220, 53, 69, 0.15); color: #dc3545; }
.cache-stat-pill.duration { background: var(--bg-elevated); color: var(--text-secondary); }
.cache-stat-pill.unused { background: rgba(255, 152, 0, 0.15); color: #ff9800; }

.cache-controls {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.cache-search-input {
  flex: 1;
  padding: 0.375rem 0.625rem;
  border: 1px solid var(--bg-surface);
  border-radius: var(--border-radius);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 0.8125rem;
}

.cache-search-input::placeholder {
  color: var(--text-muted);
}

.cache-sort-select {
  padding: 0.375rem 0.5rem;
  border: 1px solid var(--bg-surface);
  border-radius: var(--border-radius);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: 0.8125rem;
  cursor: pointer;
}

.cache-song-list {
  list-style: none;
  max-height: 400px;
  overflow-y: auto;
}

.cache-song-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.5rem;
  background: var(--bg-elevated);
  border-radius: var(--border-radius);
  margin-bottom: 0.25rem;
}

.cache-song-thumb {
  width: 32px;
  height: 32px;
  border-radius: 3px;
  object-fit: cover;
  background: var(--bg-surface);
  flex-shrink: 0;
}

.cache-song-thumb-placeholder {
  width: 32px;
  height: 32px;
  border-radius: 3px;
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cache-song-thumb-placeholder svg {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

.cache-song-info {
  flex: 1;
  min-width: 0;
}

.cache-song-title {
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.125rem;
}

.cache-song-meta {
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.cache-song-status {
  font-size: 0.625rem;
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  text-transform: uppercase;
  font-weight: 600;
}

.cache-song-status.ready {
  background: rgba(29, 185, 84, 0.2);
  color: var(--primary);
}

.cache-song-status.downloading {
  background: rgba(255, 193, 7, 0.2);
  color: #ffc107;
}

.cache-song-status.pending {
  background: rgba(108, 117, 125, 0.2);
  color: #6c757d;
}

.cache-song-status.error {
  background: rgba(220, 53, 69, 0.2);
  color: #dc3545;
}

.cache-song-status.unused {
  background: rgba(255, 152, 0, 0.2);
  color: #ff9800;
}

.cache-song-status.used {
  background: rgba(29, 185, 84, 0.15);
  color: var(--primary);
}

.cache-song-unused {
  opacity: 0.7;
}

.cache-song-actions {
  display: flex;
  gap: 0.375rem;
  flex-shrink: 0;
}

.cache-song-actions .btn-icon {
  width: 32px;
  height: 32px;
}

.cache-song-actions .btn-icon svg {
  width: 16px;
  height: 16px;
}

/* Rejoin Lobby Prompt */
.rejoin-prompt {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  width: calc(100% - 2rem);
  max-width: 360px;
  animation: rejoin-slide-up 0.3s ease;
}

.rejoin-content {
  background: var(--bg-elevated);
  border-radius: var(--border-radius-lg);
  padding: 1.25rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  border: 1px solid var(--bg-surface);
  text-align: center;
}

.rejoin-content p {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.rejoin-lobby-id {
  font-family: monospace;
  font-size: 0.875rem;
  color: var(--primary);
  background: var(--bg-surface);
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
  display: inline-block;
}

.rejoin-actions {
  display: flex;
  gap: 0.75rem;
}

.rejoin-btn {
  flex: 1;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--text-muted);
}

@keyframes rejoin-slide-up {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(1rem);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Mode Toggle Button */
#mode-btn {
  position: relative;
  color: var(--text-secondary);
  transition: all var(--transition);
}

#mode-btn.active {
  color: var(--primary);
}

#mode-btn:not(.active) {
  color: var(--text-muted);
  opacity: 0.7;
}

#mode-btn:hover {
  background: var(--bg-surface);
}

/* Pin Button */
#pin-btn {
  color: var(--text-muted);
  opacity: 0.7;
  transition: all var(--transition);
}

#pin-btn.active {
  color: var(--primary);
  opacity: 1;
}

#pin-btn:hover {
  background: var(--bg-surface);
  opacity: 1;
}

/* Pin indicator on lobby cards */
.pin-indicator {
  display: inline-block;
  vertical-align: middle;
  margin-right: 0.25rem;
  color: var(--primary);
}

/* Mode Indicators in Listener List */
.listener-item .mode-icon {
  width: 18px;
  height: 18px;
  margin-left: auto;
  margin-right: 0.5rem;
  flex-shrink: 0;
}

.listener-item .mode-icon.listening {
  color: var(--primary);
}

.listener-item .mode-icon.lobby {
  color: var(--text-muted);
}

.listener-item.lobby-mode {
  opacity: 0.7;
}

.listener-item.lobby-mode .listener-avatar {
  background: var(--bg-surface);
  color: var(--text-muted);
}

/* Active Lobbies Section */
.lobbies-section {
  width: 100%;
  max-width: 500px;
  margin-top: 2rem;
  text-align: left;
}

.lobbies-section h2 {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.lobbies-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

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

.lobby-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--bg-elevated);
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: background var(--transition);
}

.lobby-card:hover {
  background: var(--bg-surface);
}

.lobby-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.lobby-card-id {
  font-family: monospace;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
}

.lobby-card-stats {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.lobby-card-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.lobby-card-stat svg {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
}

.lobby-card-age {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Playlists Section */
.playlists-section {
  width: 100%;
  max-width: 500px;
  margin-top: 2rem;
  text-align: left;
}

.playlists-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.playlists-header h2 {
  font-size: 1.1rem;
  color: var(--text-primary);
}

.playlists-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

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

.playlist-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-elevated);
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: background var(--transition);
}

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

.playlist-item-icon {
  width: 40px;
  height: 40px;
  background: var(--bg-surface);
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

.playlist-item-icon svg {
  width: 20px;
  height: 20px;
}

.playlist-item-info {
  flex: 1;
  min-width: 0;
}

.playlist-item-name {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.playlist-item-meta {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

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

.playlist-item-actions .btn-icon {
  width: 32px;
  height: 32px;
}

.playlist-item-actions .btn-icon svg {
  width: 16px;
  height: 16px;
}

/* Playlist Confirmation Dialog */
.playlist-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: dialog-fade-in 0.2s ease;
}

.playlist-dialog {
  background: var(--bg-elevated);
  border-radius: var(--border-radius-lg);
  padding: 1.5rem;
  width: 100%;
  max-width: 340px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--bg-surface);
  animation: dialog-scale-in 0.2s ease;
}

.playlist-dialog-selection {
  max-width: 480px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.playlist-selection-controls {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.playlist-search-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--bg-surface);
  border-radius: var(--border-radius);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 0.875rem;
  box-sizing: border-box;
}

.playlist-search-input::placeholder {
  color: var(--text-muted);
}

.playlist-select-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.playlist-selected-count {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-left: auto;
}

.btn-small {
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  border-radius: var(--border-radius);
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: none;
  cursor: pointer;
}

.btn-small:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.playlist-song-list {
  flex: 1;
  overflow-y: auto;
  max-height: 300px;
  border: 1px solid var(--bg-surface);
  border-radius: var(--border-radius);
  margin-bottom: 0.75rem;
}

.playlist-song-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  border-bottom: 1px solid var(--bg-surface);
  font-size: 0.8125rem;
}

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

.playlist-song-item:hover {
  background: var(--bg-surface);
}

.playlist-song-item input[type="checkbox"] {
  flex-shrink: 0;
  accent-color: var(--primary);
}

.playlist-song-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary);
}

.playlist-song-duration {
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.playlist-dialog-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

.playlist-dialog-header h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.playlist-dialog-info {
  background: var(--bg-surface);
  border-radius: var(--border-radius);
  padding: 0.875rem 1rem;
  margin-bottom: 1.25rem;
}

.playlist-dialog-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.25rem;
}

.playlist-dialog-count {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.playlist-dialog-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.playlist-dialog-btn {
  width: 100%;
  justify-content: center;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
}

.playlist-dialog-cancel {
  background: transparent;
  color: var(--text-muted);
}

.playlist-dialog-cancel:hover {
  background: var(--bg-surface);
  color: var(--text-secondary);
}

.playlist-dialog-option {
  display: flex;
  text-align: left;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
}

.playlist-dialog-option-detail {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.btn-primary .playlist-dialog-option-detail {
  color: rgba(255, 255, 255, 0.7);
}

/* Playlist Loading State */
.playlist-loading-dialog {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem 1.5rem;
}

.playlist-loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--bg-surface);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spinner-rotate 0.8s linear infinite;
}

.playlist-loading-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

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

@keyframes dialog-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes dialog-scale-in {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Room Type Selection Modal */
.room-type-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: dialog-fade-in 0.2s ease;
}

.room-type-overlay[hidden] {
  display: none;
}

.room-type-dialog {
  background: var(--bg-elevated);
  border-radius: var(--border-radius-lg);
  padding: 1.5rem;
  width: 100%;
  max-width: 340px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--bg-surface);
  animation: dialog-scale-in 0.2s ease;
}

.room-type-dialog-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  color: var(--primary);
}

.room-type-dialog-header svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.room-type-dialog-header h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.room-type-lobby-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border-radius: var(--border-radius);
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.75rem;
  text-align: center;
}

.room-type-prompt {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.room-type-selector {
  margin-bottom: 1.25rem;
}

.room-type-actions {
  display: flex;
  gap: 0.75rem;
}

.room-type-actions .btn {
  flex: 1;
}

/* Share Dialog */
.share-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.share-dialog {
  background: var(--bg-elevated);
  border-radius: var(--border-radius-lg);
  padding: 1.5rem;
  max-width: 320px;
  width: 100%;
  text-align: center;
  position: relative;
}

.share-dialog h3 {
  margin-bottom: 1rem;
  font-size: 1.125rem;
}

.share-qr {
  border-radius: var(--border-radius);
  background: #fff;
  padding: 8px;
  margin-bottom: 1rem;
}

.share-url {
  font-size: 0.75rem;
  color: var(--text-secondary);
  word-break: break-all;
  background: var(--bg-surface);
  padding: 0.5rem;
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
}

.share-actions {
  display: flex;
  gap: 0.5rem;
}

.share-actions .btn {
  flex: 1;
}

.share-close-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
}

/* Library / Import Playlist Dialogs */
.library-dialog {
  background: var(--bg-elevated);
  border-radius: var(--border-radius-lg);
  padding: 1.25rem;
  max-width: 420px;
  width: 100%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

.library-dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.library-dialog-header h3 {
  font-size: 1rem;
}

.library-search {
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: var(--bg-surface);
  border: 1px solid transparent;
  border-radius: var(--border-radius);
  color: var(--text-primary);
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
  box-sizing: border-box;
}

.library-search:focus {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

.library-list {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.library-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.library-thumb {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
}

.library-thumb-placeholder {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  background: var(--bg-surface);
  flex-shrink: 0;
}

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

.library-item-title {
  font-size: 0.8125rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.library-item-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.library-add-btn, .import-all-btn {
  flex-shrink: 0;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
}

.library-loading, .library-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 2rem 0;
  font-size: 0.875rem;
}

/* ==========================================
   Login View
   ========================================== */

.login-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  padding-top: calc(2rem + var(--safe-area-top));
  min-height: 0;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-elevated);
  border-radius: var(--border-radius-lg);
  padding: 2.5rem 2rem;
  text-align: center;
}

.login-card .logo {
  margin-bottom: 0.5rem;
}

.login-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 2rem;
}

.login-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.875rem 1.5rem;
  border: none;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  min-height: var(--tap-target);
  font-family: inherit;
}

.login-btn:active {
  transform: scale(0.98);
}

.login-btn-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Google button - white background per Google branding */
.login-btn-google {
  background: #ffffff;
  color: #3c4043;
}

.login-btn-google:hover {
  background: #f8f9fa;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* GitHub button - dark theme */
.login-btn-github {
  background: #24292e;
  color: #ffffff;
}

.login-btn-github:hover {
  background: #2f363d;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.login-no-providers {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: 1rem;
}

/* Pending approval state */
.login-pending {
  margin-top: 0;
}

.pending-icon {
  color: var(--primary);
  margin-bottom: 1rem;
}

.pending-icon svg {
  width: 64px;
  height: 64px;
}

.pending-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.pending-message {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.pending-user-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg-surface);
  border-radius: var(--border-radius);
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.pending-user-info img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.login-logout-btn {
  width: 100%;
}

.login-footer-text {
  color: var(--text-muted);
  font-size: 0.875rem;
}

@media (max-width: 480px) {
  .login-card {
    padding: 2rem 1.25rem;
    border-radius: var(--border-radius);
  }
}

/* Pending Approval View */
.pending-approval-card {
  background: var(--bg-elevated);
  border-radius: var(--border-radius-lg);
  padding: 2.5rem 2rem;
  text-align: center;
  max-width: 400px;
  width: 100%;
}

.pending-approval-card h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

/* Dashboard User Management */
.dashboard-users {
  margin-top: 2rem;
}

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

.users-header h2 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 0;
}

.users-stats-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: 0.75rem;
}

.cache-stat-pill.user-approved { background: rgba(29, 185, 84, 0.15); color: var(--primary); }
.cache-stat-pill.user-pending { background: rgba(255, 193, 7, 0.15); color: #ffc107; }
.cache-stat-pill.user-rejected { background: rgba(220, 53, 69, 0.15); color: #dc3545; }

.users-controls {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.users-controls input {
  flex: 1;
}

.dashboard-user-list {
  list-style: none;
}

.dashboard-user-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg-elevated);
  border-radius: var(--border-radius);
  margin-bottom: 0.5rem;
}

.dashboard-user-avatar {
  font-size: 1.5rem;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  border-radius: 50%;
  flex-shrink: 0;
}

.dashboard-user-avatar-img {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.dashboard-user-handle {
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 0.35rem;
  font-size: 0.8rem;
}

.dashboard-user-info {
  flex: 1;
  min-width: 0;
}

.dashboard-user-name {
  font-weight: 600;
  font-size: 0.875rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-user-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.dashboard-user-status {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.status-pending {
  background: rgba(255, 193, 7, 0.15);
  color: #ffc107;
}

.status-approved {
  background: rgba(29, 185, 84, 0.15);
  color: var(--primary);
}

.status-rejected {
  background: rgba(220, 53, 69, 0.15);
  color: #dc3545;
}

.dashboard-user-actions {
  display: flex;
  gap: 0.375rem;
  flex-shrink: 0;
}

.btn-approve {
  background: var(--primary);
  color: #fff;
}

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

.btn-reject {
  background: #dc3545;
  color: #fff;
}

.btn-reject:hover {
  background: #c82333;
}

/* ==========================================
   Profile Page
   ========================================== */

.landing-profile-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--bg-elevated);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: background 0.2s, color 0.2s;
  z-index: 10;
}

.landing-profile-btn:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.landing-profile-btn svg {
  width: 22px;
  height: 22px;
}

.profile-content {
  padding: 1rem;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.profile-card {
  background: var(--bg-surface);
  border: 1px solid var(--bg-elevated);
  border-radius: var(--border-radius-lg);
  padding: 1.25rem;
}

.profile-card-actions {
  display: flex;
  justify-content: center;
}

.profile-avatar-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1rem;
  position: relative;
}

.profile-page-emoji-btn {
  font-size: 3rem;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 2px solid var(--bg-surface);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s;
}

.profile-page-emoji-btn:hover {
  border-color: var(--primary);
}

.profile-avatar-section .emoji-picker {
  position: absolute;
  top: 88px;
  z-index: 20;
}

.profile-name-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.profile-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.profile-name-row {
  display: flex;
  gap: 0.5rem;
}

.profile-name-row .profile-name-input {
  flex: 1;
}

.profile-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}

.profile-section-title {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  font-weight: 600;
}

.profile-providers-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.profile-provider-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem;
  background: var(--bg-dark);
  border-radius: var(--border-radius);
  border: 1px solid var(--bg-elevated);
}

.profile-provider-item.connected {
  border-color: var(--primary);
}

.profile-provider-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.profile-provider-info > div {
  display: flex;
  flex-direction: column;
}

.provider-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.profile-provider-name {
  font-weight: 600;
  font-size: 0.9rem;
}

.profile-provider-email {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.profile-provider-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 1rem;
}

.profile-link-btn,
.profile-unlink-btn {
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
