* {
  font-family: "Segoe UI", sans-serif;
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background: #0a0a0f;
  height: 100vh;
  overflow: hidden;
}

/* ── NAVBAR ─────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-radius: 0 0 20px 20px;
  background: rgba(10, 10, 20, 0.65);
  backdrop-filter: blur(16px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.6);
  padding: 12px 28px;
  animation: fadeSlideDown 0.8s ease;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-icon {
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  border-radius: 6px;
  object-fit: contain;
}

.navbar-brand span {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  background: linear-gradient(90deg, #a855f7, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar-actions {
  display: flex;
  gap: 8px;
}

.nav-btn {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.65);
  transition:
    background 0.25s,
    color 0.25s,
    transform 0.2s;
}

.nav-btn svg {
  width: 17px;
  height: 17px;
}

.nav-btn:hover {
  background: rgba(168, 85, 247, 0.22);
  color: white;
  transform: scale(1.07);
}

@keyframes fadeSlideDown {
  from {
    opacity: 0;
    transform: translateY(-40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

h1 {
  display: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ── PALETTE CONTAINER ───────────────────────── */
.palette-container {
  position: fixed;
  top: 74px;
  bottom: 87px;
  left: 0;
  right: 0;
  display: flex;
  z-index: 1;
}

/* ── COLOR SWATCH ────────────────────────────── */
.color-swatch {
  flex: 1;
  position: relative;
  cursor: pointer;
  transition: flex 0.38s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  animation: fadeIn 0.4s ease;
}

.color-swatch:not(:last-child) {
  border-right: 1px solid rgba(0, 0, 0, 0.12);
}

.color-swatch:hover {
  flex: 1.5;
}

/* ── SWATCH INFO ─────────────────────────────── */
.swatch-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 64px 10px 20px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.28));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  pointer-events: none;
}

.swatch-hex {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(6px);
  white-space: nowrap;
  transition: transform 0.2s;
}

.color-swatch:hover .swatch-hex {
  transform: scale(1.07);
}

.swatch-copy-hint {
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0;
  transition: opacity 0.22s;
}

.color-swatch:hover .swatch-copy-hint {
  opacity: 0.65;
}

/* ── LOCK BUTTON ─────────────────────────────── */
.lock-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition:
    opacity 0.2s,
    color 0.2s,
    background 0.2s,
    transform 0.2s;
}

.lock-btn svg {
  width: 13px;
  height: 13px;
  display: block;
  pointer-events: none;
}

.color-swatch:hover .lock-btn {
  opacity: 1;
}

.lock-btn.locked {
  opacity: 1;
  color: white;
  background: rgba(168, 85, 247, 0.55);
  border-color: rgba(168, 85, 247, 0.5);
}

.lock-btn:hover {
  transform: scale(1.12);
  color: white;
  background: rgba(168, 85, 247, 0.4);
}

/* ── TOAST ───────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: rgba(18, 18, 32, 0.96);
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: white;
  padding: 7px 20px;
  border-radius: 30px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  backdrop-filter: blur(16px);
  opacity: 0;
  transition:
    opacity 0.28s ease,
    transform 0.28s ease;
  z-index: 1000;
  pointer-events: none;
  white-space: nowrap;
}

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

/* ── COLOUR NUMBER LABEL ────────────────────────── */
.color-number {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.22s;
  white-space: nowrap;
  pointer-events: none;
}

.color-swatch:hover .color-number {
  opacity: 0.6;
}

/* ── EDIT BUTTON ──────────────────────────────── */
.edit-btn {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition:
    opacity 0.2s,
    color 0.2s,
    background 0.2s,
    transform 0.2s;
}

.edit-btn svg {
  width: 13px;
  height: 13px;
  display: block;
  pointer-events: none;
}

.color-swatch:hover .edit-btn {
  opacity: 1;
}

.edit-btn:hover {
  transform: scale(1.12);
  color: white;
  background: rgba(168, 85, 247, 0.4);
}

/* ── HIDDEN COLOUR INPUT ────────────────────────── */
.color-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* ── ACTIVE COLOUR DOT ─────────────────────────── */
.active-color-dot {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  transition: background-color 0.3s ease;
}

/* ── PLAYER FOOTER ───────────────────────────── */
.player-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  border-radius: 20px 20px 0px 0px;
  overflow: hidden;
  background: rgba(10, 10, 20, 0.88);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding: 10px 24px 12px;
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  align-items: center;
  gap: 16px;
  animation: fadeSlideUp 0.8s ease;
}

/* Track Info */
.player-track-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.player-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.player-song-title {
  color: white;
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-artist {
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.76rem;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.like-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.3);
  padding: 6px;
  border-radius: 50%;
  transition:
    color 0.25s,
    transform 0.2s;
  flex-shrink: 0;
}

.like-btn svg {
  width: 17px;
  height: 17px;
  display: block;
}

.like-btn:hover {
  color: #ec4899;
  transform: scale(1.18);
}
.like-btn.liked svg {
  fill: #ec4899;
  stroke: #ec4899;
}

/* Controls (kept for ctrl-btn base styles used by copyAllBtn) */

.ctrl-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.55);
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    color 0.2s,
    background 0.2s,
    transform 0.2s;
}

.ctrl-btn svg {
  width: 18px;
  height: 18px;
  display: block;
}

.ctrl-btn:hover {
  color: white;
  background: rgba(255, 255, 255, 0.08);
  transform: scale(1.08);
}

/* ── COLOUR INFO CENTER ────────────────────────── */
.color-info-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.color-value-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  cursor: pointer;
  padding: 6px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  transition:
    background 0.2s,
    border-color 0.2s,
    transform 0.15s;
  min-width: 90px;
}

.color-value-btn:hover {
  background: rgba(168, 85, 247, 0.15);
  border-color: rgba(168, 85, 247, 0.3);
  transform: translateY(-1px);
}

.color-value-label {
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
}

.color-value-text {
  font-size: 0.82rem;
  font-weight: 600;
  color: white;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.color-value-divider {
  width: 1px;
  height: 30px;
  background: rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

/* ── FOOTER ACTIONS ────────────────────────────── */
.footer-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

/* ── RESPONSIVE ──────────────────────────────── */
@media (max-width: 768px) {
  .navbar {
    padding: 8px 16px;
  }

  .navbar-brand span {
    font-size: 1rem;
  }

  .player-footer {
    grid-template-columns: auto 1fr;
    padding: 10px 16px 14px;
    gap: 10px;
  }

  .footer-actions {
    display: none;
  }

  .color-value-btn {
    min-width: 70px;
    padding: 5px 10px;
  }
}

@media (max-width: 480px) {
  .navbar-brand span {
    font-size: 0.9rem;
  }

  .brand-icon {
    width: 36px;
    height: 36px;
  }

  .player-footer {
    padding: 8px 12px 12px;
    gap: 6px;
  }

  .color-info-center {
    gap: 3px;
  }

  .color-value-btn {
    min-width: 60px;
    padding: 4px 8px;
  }

  .color-value-text {
    font-size: 0.72rem;
  }

  .player-song-title {
    font-size: 0.8rem;
  }

  .player-artist {
    font-size: 0.7rem;
  }
}
