/* =====================================
   LISTENING ROOM
===================================== */

.listen {
  position: fixed;
  inset: 0;
  padding: 120px 8vw;
  display: flex;
  align-items: center;
  justify-content: center;
}

.listen-grid {
  display: grid;
  grid-template-columns: 420px minmax(320px, 460px);
  gap: 80px;
  align-items: center;
}

/* ---------- ALBUM ART ---------- */

.album-art img {
  width: 100%;
  max-width: 420px;
  border-radius: 6px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.12);
}

/* ---------- CONTENT ---------- */

.listen-content {
  max-width: 460px;
}

/* ---------- ROOM TITLE ---------- */

.room-title {
  font-size: 0.65rem;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  opacity: 0;
  margin-bottom: 10px;
  transition: opacity 1.2s ease;
}

.room-title.show {
  opacity: 0.55;
}

/* ---------- ALBUM META ---------- */

.listen-content h2 {
  font-size: 1.6rem;
  margin-bottom: 6px;
}

.listen-content .meta {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  opacity: 0.6;
  margin-bottom: 22px;
}

/* =====================================
   PLAYER
===================================== */

.player {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.player button {
  font-size: 1rem;
  background: none;
  border: none;
  cursor: pointer;
}

.player input[type="range"] {
  flex: 1;
}

.time-remaining {
  font-size: 0.9rem;
  opacity: 0.75;
  margin-left: 10px;
  font-variant-numeric: tabular-nums;
}

/* =====================================
   🎛️ PLAYER MODES (Play / Repeat)
===================================== */

.player-modes {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 26px;
}

.mode-btn {
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid #ccc;
  background: #f7f7f7;
  color: #333;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.mode-btn:hover {
  background: #eaeaea;
}

/* ---------- PLAY MODE STATES ---------- */

.mode-btn.single {
  background: #f7f7f7;
  color: #333;
}

.mode-btn.all {
  background: #0a6cff;
  color: #fff;
  border-color: #0a6cff;
}

/* ---------- REPEAT MODE STATES ---------- */

.mode-btn.repeat-all {
  background: #0a6cff;
  color: #fff;
  border-color: #0a6cff;
}

.mode-btn.repeat-one {
  background: #6a5acd;
  color: #fff;
  border-color: #6a5acd;
}

/* =====================================
   🔁 REPEAT LEGEND
===================================== */

.repeat-control {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.repeat-legend {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.repeat-pill {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 10px;
  background: rgba(0,0,0,0.05);
  color: rgba(0,0,0,0.45);
  letter-spacing: 0.04em;
}

.repeat-pill.active {
  background: rgba(10,108,255,0.15);
  color: #0a6cff;
  font-weight: 500;
}

/* =====================================
   ▶ PLAY MODE PILLS
===================================== */

.playmode-control {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.playmode-legend {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.playmode-pill {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 10px;
  background: rgba(0,0,0,0.05);
  color: rgba(0,0,0,0.45);
  letter-spacing: 0.04em;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.playmode-pill:hover {
  background: rgba(10,108,255,0.12);
  color: #0a6cff;
}

.playmode-pill.active {
  background: rgba(10,108,255,0.15);
  color: #0a6cff;
  font-weight: 500;
}

/* =====================================
   PROJECT CREDITS PANEL
===================================== */

.project-assets {
  position: relative;
}

.assets-panel {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  width: 100%;
  max-height: 60vh;
  overflow-y: auto;
  background: #fff;
  padding: 18px;
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.15);
  z-index: 20;
  animation: fadeSlideIn 0.25s ease-out;
}

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

/* =====================================
   TRACKLIST
===================================== */

.tracklist {
  list-style: none;
  padding: 0;
}

.tracklist li {
  position: relative;
  font-size: 0.9rem;
  margin-bottom: 10px;
  cursor: pointer;
  opacity: 0.65;
  padding-left: 32px;
  transition:
    opacity 0.3s ease,
    font-size 0.3s ease,
    color 0.3s ease,
    transform 0.3s ease;
}

.tracklist li:hover {
  opacity: 0.9;
}

/* =====================================
   NOW PLAYING INDICATOR
===================================== */

.tracklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 8px;
  height: 10px;
  background: rgba(0,0,0,0.45);
  clip-path: polygon(0 20%, 60% 0, 60% 100%, 0 80%);
  opacity: 0;
}

.tracklist li::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 4px;
  width: 10px;
  height: 14px;
  border-right: 2px solid rgba(0,0,0,0.35);
  border-radius: 50%;
  opacity: 0;
}

.tracklist li.playing {
  opacity: 1;
  font-size: 0.95rem;
  font-weight: 500;
  color: #1a1a1a;
  transform: translateX(2px);
}

.tracklist li.playing::before {
  opacity: 1;
}

.tracklist li.playing::after {
  opacity: 1;
  animation: soundPulse 0.9s ease-in-out infinite;
}

@keyframes soundPulse {
  0% { transform: scale(0.8); opacity: 0.35; }
  50% { transform: scale(1.1); opacity: 0.65; }
  100% { transform: scale(0.8); opacity: 0.35; }
}

/* =====================================
   MOBILE
===================================== */

@media (max-width: 768px) {
  .listen { padding: 96px 6vw; align-items: flex-start; }
  .listen-grid { display: block; }
  .album-art { margin-bottom: 1.5rem; }
  .player-modes { flex-wrap: wrap; gap: 12px; }
}

/* =====================================
   FOREGROUND EQ (EXISTING)
===================================== */

#eqCanvas {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 180px;
  pointer-events: none;
  z-index: 1;
}

.eq-controls {
  position: fixed;
  bottom: 200px;
  right: 24px;
  font-size: 12px;
  opacity: 0.6;
  z-index: 5;
}

/* =====================================
   NEW: AMBIENT WORSHIP MOTION LAYER
===================================== */

#worshipMotion {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  opacity: 0.35;
  filter: blur(1.2px);
}

/* Fullscreen Worship Mode */

body.worship-mode main {
  opacity: 0.35;
  transition: opacity 1.2s ease;
}

body.worship-mode #worshipMotion {
  opacity: 0.55;
  filter: blur(0.6px);
}

body.worship-mode {
  cursor: none;
}

/* Worship Mode Button */

#worshipModeBtn {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 10;
  background: rgba(0,0,0,0.4);
  border: none;
  color: #fff;
  font-size: 18px;
  padding: 10px 12px;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0.4;
  transition: opacity 0.3s ease;
}

#worshipModeBtn:hover {
  opacity: 0.9;
}
