:root {
  --ha-blue: #03a9f4;
  --ha-blue-dark: #0288d1;
  --bg-primary: #1c1c1c;
  --bg-card: #2d2d2d;
  --bg-card-hover: #3d3d3d;
  --text-primary: #ffffff;
  --text-secondary: #b0b0b0;
  --border-color: #404040;
  --success: #4caf50;
  --error: #f44336;
}

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

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

a {
  color: var(--text-secondary);
}

.container {
  max-width: 400px;
  margin: 0 auto;
}

header {
  text-align: center;
  margin-bottom: 24px;
}

header h1 {
  font-size: 28px;
  font-weight: 600;
  color: var(--ha-blue);
  margin-bottom: 4px;
}

.card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}

.hidden {
  display: none !important;
}

/* Start */
.start {
  text-align: center;
}

.start .btn {
  width: 100%;
}

/* Buttons */
.btn {
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  border-radius: 8px;
  background: var(--bg-card-hover);
  color: var(--text-primary);
  transition: all 0.2s;
}

.btn:hover:not(:disabled):not(.disabled) {
  background: var(--border-color);
}

.btn:disabled,
.btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--ha-blue);
  color: white;
}

.btn-primary:hover:not(:disabled):not(.disabled) {
  background: var(--ha-blue-dark);
}

.btn-xlarge {
  padding: 20px 32px;
  font-size: 18px;
  font-weight: 600;
}

.btn-small {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-icon {
  padding: 8px 12px;
  font-size: 20px;
}

.btn-danger {
  background: var(--error);
  color: white;
}

.btn-danger:hover:not(:disabled) {
  background: #d32f2f;
}

/* Player card */
.player {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.player-volume {
  display: flex;
  align-items: center;
  gap: 12px;
}

#volume-slider {
  flex: 1;
  height: 6px;
  -webkit-appearance: none;
  background: var(--border-color);
  border-radius: 3px;
  outline: none;
}

#volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: var(--ha-blue);
  border-radius: 50%;
  cursor: pointer;
}

#volume-value {
  min-width: 40px;
  text-align: right;
  color: var(--text-secondary);
  font-size: 14px;
}

.player-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

.sync-badge {
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--bg-primary);
  padding: 4px 10px;
  border-radius: 12px;
}

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

/* Share card */
.share {
  text-align: center;
}

.share h2 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.share p {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

#qr-code {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

#qr-code svg {
  background: white;
}

.share-buttons {
  display: flex;
  gap: 12px;
}

.share-buttons .btn {
  flex: 1;
  text-align: center;
  text-decoration: none;
}

/* About card */
.about h2 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.about p {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 1em 0;
}

/* Footer */
footer {
  text-align: center;
  padding: 16px 0;
  font-size: 13px;
}

footer a {
  color: var(--text-secondary);
  text-decoration: none;
}

footer a:hover {
  color: var(--ha-blue);
}

footer .separator {
  color: var(--border-color);
  margin: 0 8px;
}
