/* ─── Player Body ─── */
.player-body {
  background: #0d1b2a;
  color: #faf8f5;
  min-height: 100vh;
}

/* Override landing page styles for dark player context */
.player-body body {
  background: #0d1b2a;
  color: #faf8f5;
}

/* Nav */
.nav-player {
  background: rgba(13, 27, 42, 0.95) !important;
  border-bottom-color: rgba(200, 182, 226, 0.1) !important;
}
.nav-player .nav-logo { color: #faf8f5; }
.nav-player .nav-tagline { color: rgba(250, 248, 245, 0.4); }

/* Main */
.player-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 5rem 2rem 2rem;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 3rem;
  border-bottom: 1px solid rgba(200, 182, 226, 0.15);
}
.tab-btn {
  background: none;
  border: none;
  color: rgba(250, 248, 245, 0.45);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.2s, border-color 0.2s;
  letter-spacing: 0.02em;
}
.tab-btn:hover { color: rgba(250, 248, 245, 0.7); }
.tab-btn.active {
  color: #faf8f5;
  border-bottom-color: #c8b6e2;
}

/* Tab content */
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Section header */
.section-header {
  margin-bottom: 2rem;
}
.section-heading {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 500;
  color: #faf8f5;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}
.section-sub {
  color: rgba(250, 248, 245, 0.45);
  font-size: 0.9rem;
  font-weight: 300;
}

/* Audio grid */
.audio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

/* Audio card */
.audio-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  padding: 1.5rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
  position: relative;
  overflow: hidden;
}
.audio-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--card-gradient, linear-gradient(135deg, #162033 0%, #1a2a3a 100%));
  opacity: 0.4;
  z-index: 0;
  border-radius: 16px;
}
.audio-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(200, 182, 226, 0.25);
  transform: translateY(-2px);
}
.audio-card.active {
  border-color: rgba(200, 182, 226, 0.5);
  background: rgba(200, 182, 226, 0.08);
}
.audio-card > * { position: relative; z-index: 1; }

.card-icon {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  display: block;
  filter: grayscale(0.2);
}
.card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 500;
  color: #faf8f5;
  margin-bottom: 0.4rem;
}
.card-desc {
  font-size: 0.8rem;
  color: rgba(250, 248, 245, 0.5);
  line-height: 1.5;
  font-weight: 300;
  margin-bottom: 1rem;
}
.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-tag {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c8b6e2;
  font-weight: 500;
}
.card-duration {
  font-size: 0.75rem;
  color: rgba(250, 248, 245, 0.35);
}
.card-play-indicator {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(200, 182, 226, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}
.audio-card.active .card-play-indicator { opacity: 1; }

/* Spacer for fixed player bar */
.player-spacer { height: 120px; }

/* ─── Now Playing Bar ─── */
.now-playing-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 88px;
  background: rgba(13, 27, 42, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(200, 182, 226, 0.12);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 1rem;
  z-index: 200;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.now-playing-bar.visible {
  transform: translateY(0);
}

/* Left: info */
.npb-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}
.npb-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}
.npb-meta { min-width: 0; }
.npb-title {
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  color: #faf8f5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}
.npb-type {
  font-size: 0.7rem;
  color: rgba(250, 248, 245, 0.4);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 500;
}

/* Center: controls */
.npb-center {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.npb-btn {
  background: none;
  border: none;
  color: rgba(250, 248, 245, 0.7);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, background 0.15s;
  position: relative;
}
.npb-btn:hover { color: #faf8f5; background: rgba(255, 255, 255, 0.08); }
.npb-btn:focus { outline: 2px solid rgba(200, 182, 226, 0.5); outline-offset: 2px; }

.npb-play {
  width: 44px;
  height: 44px;
  background: rgba(200, 182, 226, 0.15) !important;
  color: #c8b6e2 !important;
  border: 1px solid rgba(200, 182, 226, 0.25);
}
.npb-play:hover {
  background: rgba(200, 182, 226, 0.25) !important;
  color: #e8e0f5 !important;
}
.npb-loop.active { color: #c8b6e2; }

/* Loop dot indicator */
.loop-dot {
  display: none;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #c8b6e2;
  position: absolute;
  top: 6px;
  right: 6px;
}
.npb-loop.active .loop-dot { display: block; }

/* Right: progress + timer */
.npb-right {
  flex: 2;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: flex-end;
}
.npb-time, .npb-duration {
  font-size: 0.72rem;
  color: rgba(250, 248, 245, 0.4);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  min-width: 32px;
}
.npb-time { text-align: right; }

/* Progress bar */
.npb-progress {
  flex: 1;
  max-width: 280px;
  cursor: pointer;
  padding: 8px 0;
}
.progress-track {
  position: relative;
  height: 3px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}
.progress-fill {
  height: 100%;
  background: #c8b6e2;
  border-radius: 3px;
  width: 0%;
  transition: width 0.1s linear;
}
.progress-thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translate(-50%, -50%) scale(0);
  width: 12px;
  height: 12px;
  background: #c8b6e2;
  border-radius: 50%;
  transition: transform 0.15s;
}
.npb-progress:hover .progress-thumb,
.npb-progress:focus .progress-thumb { transform: translate(-50%, -50%) scale(1); }
.npb-progress:hover .progress-track { height: 4px; }

/* Timer */
.npb-timer {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  position: relative;
  flex-shrink: 0;
}
.timer-btn {
  background: none;
  border: none;
  color: rgba(250, 248, 245, 0.5);
  cursor: pointer;
  padding: 0.35rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  transition: color 0.15s;
}
.timer-btn:hover { color: rgba(250, 248, 245, 0.8); }
.timer-btn.active { color: #c8b6e2; }

.timer-dropdown {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  background: #162033;
  border: 1px solid rgba(200, 182, 226, 0.2);
  border-radius: 10px;
  padding: 0.4rem;
  display: none;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 100px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}
.timer-dropdown.open { display: flex; }
.timer-option {
  background: none;
  border: none;
  color: rgba(250, 248, 245, 0.6);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}
.timer-option:hover { background: rgba(200, 182, 226, 0.1); color: #faf8f5; }
.timer-option.selected { color: #c8b6e2; }

.timer-label {
  font-size: 0.7rem;
  color: rgba(200, 182, 226, 0.7);
  font-variant-numeric: tabular-nums;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .player-main { padding: 5rem 1.25rem 2rem; }
  .audio-grid { grid-template-columns: 1fr 1fr; }

  .npb-info { flex: 0 0 auto; }
  .npb-meta { display: none; }
  .npb-right { flex: 1; }
  .npb-progress { max-width: none; }

  .now-playing-bar { padding: 0 1rem; gap: 0.75rem; }
  .npb-time, .npb-duration { display: none; }
  .npb-title { max-width: 120px; }
}

@media (max-width: 480px) {
  .audio-grid { grid-template-columns: 1fr; }
  .tabs { gap: 0; }
  .tab-btn { flex: 1; text-align: center; padding: 0.75rem 0.5rem; }
}

/* Fade animation for cards */
@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.audio-card { animation: cardFadeIn 0.3s ease both; }
.audio-card:nth-child(2) { animation-delay: 0.05s; }
.audio-card:nth-child(3) { animation-delay: 0.1s; }
.audio-card:nth-child(4) { animation-delay: 0.15s; }
.audio-card:nth-child(5) { animation-delay: 0.2s; }
.audio-card:nth-child(6) { animation-delay: 0.25s; }
.audio-card:nth-child(7) { animation-delay: 0.3s; }
.audio-card:nth-child(8) { animation-delay: 0.35s; }