/* ==========================================================================
   dil.route B1 Listening Player Stylesheet
   Clean, Human-Designed, Minimalist Light Player Interface
   ========================================================================== */

/* Player Layout */
.player-hero {
  padding: 2.5rem 0 4rem;
}

.player-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 1024px) {
  .player-layout {
    grid-template-columns: 1fr;
  }
}

/* Master Player Deck Card */
.deck-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 2.2rem;
  box-shadow: var(--shadow-card);
  position: relative;
}

/* Track Header Info */
.deck-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.deck-badge-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.unit-badge {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--bg-accent-soft);
  color: var(--brand-cyan);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
}

.page-badge {
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--bg-muted);
  color: var(--text-secondary);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
}

.format-badge {
  font-size: 0.7rem;
  font-weight: 800;
  background: #f1f5f9;
  color: var(--text-muted);
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
}

.track-main-title {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--brand-navy);
  line-height: 1.25;
  margin-bottom: 0.25rem;
}

.track-sub-title {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Top Action Tools */
.deck-top-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.icon-btn {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.92rem;
  transition: var(--transition);
}

.icon-btn:hover {
  background: var(--bg-muted);
  border-color: var(--border-medium);
  color: var(--brand-navy);
}

.icon-btn.active {
  background: var(--brand-navy);
  color: #ffffff;
  border-color: var(--brand-navy);
}

/* Video Player Viewport (Collapsible) */
.video-viewport-wrapper {
  margin: 1.25rem 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: #0f172a;
  box-shadow: var(--shadow-md);
  transition: max-height 0.35s ease, opacity 0.35s ease;
  max-height: 0;
  opacity: 0;
  display: none;
}

.video-viewport-wrapper.visible {
  display: block;
  max-height: 480px;
  opacity: 1;
}

.video-viewport {
  width: 100%;
  max-height: 440px;
  display: block;
  outline: none;
  background: #000000;
}

/* Natural Visualizer Wave Display */
.visualizer-container {
  height: 75px;
  background: #f8fafc;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  margin: 1.25rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1.5rem;
  position: relative;
}

.visualizer-bars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  height: 45px;
}

.visualizer-bar {
  flex: 1;
  max-width: 5px;
  min-height: 4px;
  height: 12%;
  background: #cbd5e1;
  border-radius: 3px;
  transition: height 0.08s ease, background-color 0.2s ease;
}

.playing .visualizer-bar {
  background: var(--brand-cyan);
  animation: barBounce 0.8s ease-in-out infinite alternate;
}

@keyframes barBounce {
  0% { height: 15%; }
  50% { height: 85%; }
  100% { height: 30%; }
}

.visualizer-status-badge {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #94a3b8;
  display: inline-block;
}

.playing .live-dot {
  background: var(--accent-green);
}

.playing .visualizer-status-badge {
  color: var(--accent-green);
}

/* Scrubber / Progress Bar */
.scrubber-section {
  margin: 1.5rem 0 1rem;
}

.scrubber-track-container {
  position: relative;
  height: 24px;
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.scrubber-bar-bg {
  position: absolute;
  left: 0;
  right: 0;
  height: 6px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
  transition: height 0.15s ease;
}

.scrubber-track-container:hover .scrubber-bar-bg {
  height: 8px;
}

.scrubber-buffer {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: #cbd5e1;
  border-radius: 4px;
}

.scrubber-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: var(--brand-cyan);
  border-radius: 4px;
}

.scrubber-thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translate(-50%, -50%);
  width: 15px;
  height: 15px;
  background: #ffffff;
  border: 2.5px solid var(--brand-cyan);
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.25);
  pointer-events: none;
  opacity: 0.9;
  transition: transform 0.1s ease;
}

.scrubber-track-container:hover .scrubber-thumb {
  transform: translate(-50%, -50%) scale(1.2);
  opacity: 1;
}

.scrubber-hover-preview {
  position: absolute;
  bottom: 24px;
  transform: translateX(-50%);
  background: #0f172a;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  white-space: nowrap;
}

.scrubber-time-display {
  display: flex;
  justify-content: space-between;
  margin-top: 0.35rem;
  font-size: 0.84rem;
  color: var(--text-muted);
  font-weight: 600;
}

.time-current {
  color: var(--brand-navy);
}

/* Master Player Action Controls */
.deck-controls-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin: 1.75rem 0 2rem;
}

.btn-ctrl {
  background: #ffffff;
  border: 1px solid var(--border-medium);
  color: var(--text-secondary);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
}

.btn-ctrl:hover {
  background: var(--bg-muted);
  border-color: var(--text-muted);
  color: var(--brand-navy);
  transform: translateY(-1px);
}

.btn-ctrl:active {
  transform: translateY(0);
}

.btn-skip {
  width: 44px;
  height: 44px;
  font-size: 1.1rem;
}

.btn-seek {
  width: 48px;
  height: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  font-size: 0.95rem;
}

.seek-label {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--brand-cyan);
  margin-top: -2px;
}

.btn-play-master {
  width: 64px;
  height: 64px;
  background: var(--brand-navy);
  color: #ffffff;
  font-size: 1.6rem;
  border-radius: 50%;
  box-shadow: 0 4px 14px rgba(15, 40, 61, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-play-master:hover {
  background: var(--brand-navy-light);
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(15, 40, 61, 0.35);
  color: #ffffff;
}

.btn-play-master:active {
  transform: scale(0.97);
}

/* ==========================================================================
   SPEED ENGINE (Clean, Human, Tactile Speed Controls)
   ========================================================================== */
.speed-control-box {
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.4rem;
  margin-top: 1.5rem;
}

.speed-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.speed-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--brand-navy);
}

.speed-badge-display {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  background: #ffffff;
  color: var(--brand-navy);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-xs);
}

.speed-badge-display.slow {
  background: #fef3c7;
  color: #b45309;
  border-color: #fde68a;
}

.speed-badge-display.fast {
  background: #e0f2fe;
  color: #0369a1;
  border-color: #bae6fd;
}

/* Speed Presets Pills */
.speed-pills {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.speed-pill-btn {
  flex: 1;
  min-width: 46px;
  padding: 0.45rem 0.2rem;
  text-align: center;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
}

.speed-pill-btn:hover {
  background: #ffffff;
  border-color: var(--brand-cyan);
  color: var(--brand-cyan);
}

.speed-pill-btn.active {
  background: var(--brand-navy);
  border-color: var(--brand-navy);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

/* Fine-tune speed slider */
.speed-slider-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.speed-step-btn {
  width: 32px;
  height: 32px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 700;
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
}

.speed-step-btn:hover {
  border-color: var(--brand-navy);
  color: var(--brand-navy);
}

.speed-range-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 4px;
  background: #e2e8f0;
  outline: none;
}

.speed-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--brand-navy);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  border: 2px solid #ffffff;
  transition: transform 0.1s ease;
}

.speed-range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Volume Bar & Extras */
.deck-extras-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 1rem;
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.volume-slider {
  width: 90px;
  -webkit-appearance: none;
  appearance: none;
  height: 5px;
  border-radius: 3px;
  background: #e2e8f0;
  outline: none;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--brand-navy);
  cursor: pointer;
}

/* ==========================================================================
   PLAYLIST & TRACKS DIRECTORY
   ========================================================================== */
.playlist-panel {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  box-shadow: var(--shadow-card);
}

.playlist-header {
  margin-bottom: 1.25rem;
}

.playlist-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.playlist-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--brand-navy);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.track-count-badge {
  font-size: 0.78rem;
  background: var(--bg-muted);
  color: var(--brand-navy);
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  font-weight: 700;
}

/* Playlist Search Bar */
.playlist-search-box {
  position: relative;
  margin-bottom: 1rem;
}

.search-input {
  width: 100%;
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.68rem 1rem 0.68rem 2.4rem;
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
}

.search-input:focus {
  background: #ffffff;
  border-color: var(--brand-cyan);
  box-shadow: 0 0 0 3px var(--bg-accent-soft);
}

.search-icon {
  position: absolute;
  top: 50%;
  left: 0.85rem;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.88rem;
  pointer-events: none;
}

.clear-search-btn {
  position: absolute;
  top: 50%;
  right: 0.85rem;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  display: none;
}

/* Track Cards List */
.track-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-height: 640px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.track-list::-webkit-scrollbar {
  width: 5px;
}

.track-list::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.track-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

/* Single Track Item Card */
.track-item-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.track-item-card:hover {
  background: #f8fafc;
  border-color: var(--border-medium);
  transform: translateX(2px);
}

.track-item-card.active {
  background: #f0f9ff;
  border-color: var(--brand-cyan);
  box-shadow: var(--shadow-sm);
}

.track-item-card.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3.5px;
  background: var(--brand-cyan);
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.track-card-main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.track-number-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f1f5f9;
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--brand-navy);
  flex-shrink: 0;
}

.track-item-card.active .track-number-circle {
  background: var(--brand-navy);
  color: #ffffff;
  border-color: var(--brand-navy);
}

.track-card-info {
  flex: 1;
  min-width: 0;
}

.track-card-title {
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--brand-navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.track-card-meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.track-card-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.fav-btn.active {
  color: #f59e0b;
  border-color: #fde68a;
  background: #fffbeb;
}

.track-card-play-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bg-muted);
  border: 1px solid var(--border-subtle);
  color: var(--brand-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  transition: var(--transition);
}

.track-item-card.active .track-card-play-btn {
  background: var(--brand-navy);
  color: #ffffff;
  border-color: var(--brand-navy);
}

.track-expand-btn {
  width: 26px;
  height: 26px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  border-radius: 4px;
}

.track-expand-btn:hover {
  background: var(--bg-muted);
  color: var(--brand-navy);
}

.track-details-drawer {
  padding-top: 0.6rem;
  margin-top: 0.4rem;
  border-top: 1px dashed var(--border-subtle);
  display: none;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.track-details-drawer.open {
  display: block;
}

.vocab-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.4rem;
}

.vocab-tag {
  background: var(--bg-muted);
  color: var(--brand-navy);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid var(--border-subtle);
}

/* Keyboard Shortcuts Modal (Clean Light) */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 100%;
  padding: 1.8rem;
  box-shadow: var(--shadow-lg);
  position: relative;
  transform: translateY(15px);
  transition: transform 0.2s ease;
}

.modal-overlay.open .modal-card {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--brand-navy);
}

.modal-close-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bg-muted);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

.modal-close-btn:hover {
  background: #e2e8f0;
  color: var(--brand-navy);
}

.shortcut-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.shortcut-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.kbd-badge {
  background: var(--bg-muted);
  border: 1px solid var(--border-medium);
  border-radius: 4px;
  padding: 0.15rem 0.55rem;
  font-family: monospace;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--brand-navy);
}

/* Top Book Info Strip */
.player-top-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 0.85rem 1.4rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-card);
}

.top-strip-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.95rem;
  color: var(--brand-navy);
}

.strip-book-icon {
  font-size: 1.25rem;
}

.strip-book-title {
  font-weight: 700;
  color: var(--brand-navy);
}

.strip-dot {
  color: var(--text-light);
}

.strip-units-count {
  color: var(--brand-cyan);
  font-weight: 600;
  font-size: 0.88rem;
}

.strip-back-link {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--brand-navy);
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-full);
  background: var(--bg-muted);
  border: 1px solid var(--border-subtle);
  transition: var(--transition);
}

.strip-back-link:hover {
  background: var(--brand-navy);
  color: #ffffff;
  border-color: var(--brand-navy);
}

/* Quick Unit Filter Pills */
.quick-unit-filters {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 0.85rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.quick-unit-filters::-webkit-scrollbar {
  display: none;
}

.filter-pill {
  white-space: nowrap;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.38rem 0.85rem;
  border-radius: var(--radius-full);
  background: #f8fafc;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.filter-pill:hover {
  background: #e2e8f0;
  color: var(--brand-navy);
}

.filter-pill.active {
  background: var(--brand-navy);
  color: #ffffff;
  border-color: var(--brand-navy);
  box-shadow: 0 2px 6px rgba(15, 40, 61, 0.2);
}

/* Mobile Segmented Tabs (Desktop hidden) */
.mobile-segmented-tabs {
  display: none;
}

/* Mobile Mini Player (Desktop hidden) */
.mobile-mini-player {
  display: none;
}

/* ==========================================================================
   Mobile Responsive Player Styles
   ========================================================================== */
@media (max-width: 1024px) {
  .player-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .player-hero {
    padding: 1rem 0 3rem;
  }

  /* Top strip mobile */
  .player-top-strip {
    padding: 0.65rem 0.95rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
  }

  .strip-units-count {
    display: none;
  }

  .strip-back-link {
    font-size: 0.8rem;
    padding: 0.35rem 0.75rem;
  }

  /* Segmented tabs on mobile */
  .mobile-segmented-tabs {
    display: flex;
    background: #e2e8f0;
    padding: 4px;
    border-radius: var(--radius-full);
    gap: 4px;
    margin-bottom: 1.25rem;
    box-shadow: inset 0 1px 3px rgba(15, 23, 42, 0.08);
  }

  .mobile-segment-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .mobile-segment-btn.active {
    background: #ffffff;
    color: var(--brand-navy);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
  }

  .mobile-segment-btn .segment-badge {
    background: #cbd5e1;
    color: var(--brand-navy);
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 800;
  }

  .mobile-segment-btn.active .segment-badge {
    background: var(--brand-navy);
    color: #ffffff;
  }

  /* Switchable views on mobile */
  .player-layout[data-active-view="player"] .player-deck-column {
    display: block;
    animation: fadeInView 0.25s ease;
  }

  .player-layout[data-active-view="player"] .playlist-column {
    display: none;
  }

  .player-layout[data-active-view="playlist"] .player-deck-column {
    display: none;
  }

  .player-layout[data-active-view="playlist"] .playlist-column {
    display: block;
    animation: fadeInView 0.25s ease;
  }

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

  /* Mobile Mini Player */
  .mobile-mini-player {
    display: block;
    position: fixed;
    bottom: 12px;
    left: 12px;
    right: 12px;
    z-index: 150;
    background: rgba(15, 40, 61, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: #ffffff;
    border-radius: var(--radius-lg);
    padding: 0.65rem 0.85rem;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transform: translateY(140%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  }

  .mobile-mini-player.visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .mini-player-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
  }

  .mini-track-info {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex: 1;
    min-width: 0;
    cursor: pointer;
  }

  .mini-track-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--brand-cyan);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
    flex-shrink: 0;
  }

  .mini-track-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }

  .mini-track-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mini-track-time {
    font-size: 0.72rem;
    color: #94a3b8;
    font-variant-numeric: tabular-nums;
  }

  .mini-player-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
  }

  .mini-btn {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border-radius: var(--radius-full);
    padding: 0.35rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 700;
    transition: var(--transition);
  }

  .mini-btn:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.2);
  }

  .mini-play-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #ffffff;
    color: var(--brand-navy);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 800;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
  }

  .mini-play-btn:active {
    transform: scale(0.92);
  }

  /* Extra bottom padding on playlist panel when mini player is active */
  .playlist-panel {
    padding-bottom: 5.5rem;
  }

  .deck-card {
    padding: 1.25rem 1rem;
    border-radius: var(--radius-lg);
  }

  .deck-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    position: relative;
  }

  .deck-top-actions {
    position: absolute;
    top: 0;
    right: 0;
  }

  .deck-badge-group {
    max-width: calc(100% - 90px);
    gap: 0.35rem;
  }

  .unit-badge,
  .page-badge,
  .format-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.55rem;
  }

  .track-main-title {
    font-size: 1.25rem;
    line-height: 1.3;
    margin-top: 0.25rem;
  }

  .track-sub-title {
    font-size: 0.85rem;
  }

  .visualizer-container {
    height: 54px;
    margin: 1rem 0;
    padding: 0 0.85rem;
  }

  .scrubber-section {
    margin: 1rem 0 0.75rem;
  }

  .deck-controls-main {
    gap: 0.5rem;
    margin: 1.25rem 0 1.5rem;
  }

  .btn-skip {
    width: 38px;
    height: 38px;
    font-size: 0.95rem;
  }

  .btn-seek {
    width: 44px;
    height: 44px;
    font-size: 0.88rem;
  }

  .seek-label {
    font-size: 0.6rem;
  }

  .btn-play-master {
    width: 58px;
    height: 58px;
    font-size: 1.45rem;
  }

  /* Speed Engine on Mobile */
  .speed-control-box {
    padding: 1rem 0.85rem;
    margin-top: 1.25rem;
    border-radius: var(--radius-md);
  }

  .speed-box-header {
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
  }

  .speed-title {
    font-size: 0.88rem;
  }

  .speed-badge-display {
    font-size: 0.76rem;
    padding: 0.2rem 0.55rem;
  }

  .speed-pills {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.35rem;
    margin-bottom: 0.75rem;
  }

  .speed-pill-btn {
    min-width: 0;
    padding: 0.45rem 0.15rem;
    font-size: 0.78rem;
  }

  .speed-slider-row {
    gap: 0.5rem;
  }

  .speed-step-btn {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
    flex-shrink: 0;
  }

  /* Volume & Extras */
  .deck-extras-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 0.85rem;
  }

  .volume-control {
    width: 100%;
    justify-content: flex-start;
  }

  .volume-slider {
    flex: 1;
    max-width: 160px;
  }

  .deck-extras-row > div:last-child {
    font-size: 0.75rem;
    color: var(--text-muted);
  }

  /* Playlist on Mobile */
  .playlist-panel {
    padding: 1.25rem 1rem;
    border-radius: var(--radius-lg);
  }

  .playlist-title {
    font-size: 1.15rem;
  }

  .track-list {
    max-height: 480px;
  }

  .track-item-card {
    padding: 0.75rem 0.85rem;
  }

  .track-number-circle {
    width: 32px;
    height: 32px;
    font-size: 0.82rem;
  }

  .track-card-title {
    font-size: 0.88rem;
  }

  .track-card-meta {
    font-size: 0.75rem;
  }

  /* Tabs inside deck */
  .deck-tabs-header {
    gap: 0.25rem;
  }

  .deck-tab-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.82rem;
  }

  /* Modal on Mobile */
  .modal-card {
    padding: 1.25rem;
    margin: 1rem;
  }
}

@media (max-width: 440px) {
  .deck-controls-main {
    gap: 0.35rem;
  }

  .btn-skip {
    width: 34px;
    height: 34px;
    font-size: 0.85rem;
  }

  .btn-seek {
    width: 40px;
    height: 40px;
  }

  .btn-play-master {
    width: 52px;
    height: 52px;
    font-size: 1.3rem;
  }

  .speed-pills {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.25rem;
  }

  .speed-pill-btn {
    font-size: 0.72rem;
    padding: 0.4rem 0.1rem;
  }
}
