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

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: #0a0a0a;
  color: #e0e0e0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Login page --- */

.login-container {
  width: 100%;
  max-width: 360px;
  padding: 20px;
}

.login-container h1 {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 8px;
}

.login-container p {
  color: #888;
  margin-bottom: 32px;
  font-size: 14px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-form input {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 15px;
  color: #e0e0e0;
  outline: none;
  transition: border-color 0.2s;
}

.login-form input:focus {
  border-color: #666;
}

.login-form input::placeholder {
  color: #555;
}

.login-form button {
  background: #fff;
  color: #0a0a0a;
  border: none;
  border-radius: 8px;
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.login-form button:hover {
  opacity: 0.9;
}

.login-form button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.login-error {
  color: #e55;
  font-size: 13px;
  min-height: 20px;
}

/* --- Player page --- */

.player-container {
  width: 100%;
  max-width: 640px;
  padding: 20px;
}

.player-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.player-header h1 {
  font-size: 22px;
  font-weight: 600;
}

.player-header button {
  background: none;
  border: 1px solid #333;
  border-radius: 6px;
  color: #888;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.player-header button:hover {
  border-color: #666;
  color: #e0e0e0;
}

/* Status indicator */

#status {
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 20px;
}

#status[data-state="disconnected"] {
  background: #1a1a1a;
  color: #888;
}

#status[data-state="connecting"] {
  background: #1a1800;
  color: #cc0;
}

#status[data-state="connected"] {
  background: #0a1a0a;
  color: #4c4;
}

#status[data-state="error"] {
  background: #1a0a0a;
  color: #e55;
}

/* Controls */

.controls {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
}

.controls button {
  flex: 1;
  padding: 10px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid #333;
  border-radius: 8px;
  background: #1a1a1a;
  color: #e0e0e0;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.controls button:hover:not(:disabled) {
  background: #252525;
  border-color: #555;
}

.controls button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Now Playing */

.now-playing {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.deck {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}

.deck-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.deck-label {
  color: #666;
  font-weight: 500;
  min-width: 44px;
}

.deck-track {
  color: #ccc;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deck-progress-bar {
  width: 100%;
  height: 6px;
  background: #222;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 4px;
}

.deck-progress-fill {
  height: 100%;
  width: 0%;
  background: #7aa2f7;
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* Stats */

.stats {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
  font-size: 13px;
  color: #888;
}

.stats span {
  color: #ccc;
}

/* Log */

.log-section h3 {
  font-size: 13px;
  font-weight: 500;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

#log {
  background: #111;
  border: 1px solid #222;
  border-radius: 8px;
  padding: 12px;
  height: 240px;
  overflow-y: auto;
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 12px;
  line-height: 1.6;
}

.log-entry {
  margin: 0;
}

.log-info { color: #7aa2f7; }
.log-error { color: #f7768e; }
.log-data { color: #9ece6a; }
