/* ==========================================================================
   MusicX Web App - Converted from Android MusicX App
   Direct port of Jetpack Compose UI (HomeScreen, LibraryScreen, PlayerScreen, SettingsScreen)
   Color.kt themes: Ocean, Sunset, Night.
   Strictly NO EMOJIS - Modern SVG iconography and typography-first layout.
   ========================================================================== */

:root {
  /* Default Theme: Ocean (Color.kt) */
  --bg-primary: #0a1128;
  --bg-secondary: #0d1b2a;
  --bg-surface: rgba(27, 38, 59, 0.65);
  --bg-surface-hover: rgba(36, 52, 80, 0.85);
  --bg-surface-active: rgba(45, 66, 102, 0.95);
  --bg-glass-heavy: rgba(10, 17, 40, 0.95);
  
  --accent-primary: #00b4d8;
  --accent-secondary: #0077b6;
  --accent-gradient: linear-gradient(135deg, #00b4d8 0%, #0077b6 100%);
  --accent-glow: rgba(0, 180, 216, 0.4);

  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --border-subtle: rgba(255, 255, 255, 0.08);

  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --sidebar-width: 250px;
  --player-bar-height: 80px;
  --bottom-nav-height: 64px;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
}

/* Theme 2: Sunset (Color.kt) */
body.theme-sunset {
  --bg-primary: #10002b;
  --bg-secondary: #240046;
  --bg-surface: rgba(60, 9, 108, 0.6);
  --bg-surface-hover: rgba(90, 24, 154, 0.75);
  --bg-surface-active: rgba(123, 44, 191, 0.9);
  --bg-glass-heavy: rgba(16, 0, 43, 0.95);
  
  --accent-primary: #f72585;
  --accent-secondary: #7209b7;
  --accent-gradient: linear-gradient(135deg, #f72585 0%, #7209b7 100%);
  --accent-glow: rgba(247, 37, 133, 0.4);
}

/* Theme 3: Night (Color.kt) */
body.theme-night {
  --bg-primary: #0a0c10;
  --bg-secondary: #12151c;
  --bg-surface: rgba(22, 27, 38, 0.65);
  --bg-surface-hover: rgba(32, 40, 56, 0.85);
  --bg-surface-active: rgba(45, 55, 78, 0.95);
  --bg-glass-heavy: rgba(10, 12, 16, 0.95);
  
  --accent-primary: #6366f1;
  --accent-secondary: #818cf8;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #818cf8 100%);
  --accent-glow: rgba(99, 102, 241, 0.4);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at 50% 35%, rgba(2, 132, 199, 0.14) 0%, rgba(4, 8, 18, 0.98) 75%), #030812;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  overflow: hidden;
  user-select: none;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Hide all scrollbars globally for a sleek native app feel */
* {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* App Container Layout - Sleek Native Phone View */
.app-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 430px;
  height: 100vh;
  position: relative;
  overflow: hidden;
  background: var(--bg-primary);
  box-sizing: border-box;
}

@media (min-width: 481px) and (min-height: 600px) {
  .app-container {
    height: min(94vh, 880px);
    border-radius: 46px;
    border: 3px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 70px rgba(2, 132, 199, 0.15);
  }
}

@media (max-width: 480px) {
  .app-container {
    max-width: 100vw;
    height: 100vh;
    border-radius: 0;
    border: none;
    box-shadow: none;
  }
}



/* Desktop Sidebar Hidden (Always Native Phone App Mode) */
.app-sidebar {
  display: none !important;
}

.brand-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 36px;
  padding: 0 6px;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px var(--accent-glow);
}

.brand-icon svg {
  width: 22px;
  height: 22px;
  stroke: #ffffff;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #ffffff;
}

.brand-subtitle {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-primary);
  font-weight: 600;
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
}

.nav-link svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-surface-hover);
}

.nav-link.active {
  color: var(--text-primary);
  background: var(--bg-surface-active);
  font-weight: 600;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.nav-link.active svg {
  stroke: var(--accent-primary);
}

.sidebar-bottom {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
}

.install-app-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--accent-primary);
  color: var(--accent-primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.install-app-btn svg {
  width: 18px;
  height: 18px;
  stroke: var(--accent-primary);
  flex-shrink: 0;
}

.install-app-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 16px var(--accent-glow);
}

/* Main Viewport Content */
.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.top-bar {
  display: flex;
  align-items: center;
  padding: 14px 14px 12px 14px;
  z-index: 20;
  background: var(--bg-glass-heavy);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  width: 100%;
  box-sizing: border-box;
}

.search-bar-container {
  position: relative;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon-svg {
  position: absolute;
  left: 16px;
  width: 18px;
  height: 18px;
  stroke: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 12px 42px 12px 44px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
}

.search-input:focus {
  border-color: var(--accent-primary);
  background: var(--bg-surface-hover);
  box-shadow: 0 0 16px var(--accent-glow);
}

.search-clear-btn {
  position: absolute;
  right: 14px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
}

.search-suggestions-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg-glass-heavy);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  z-index: 50;
  display: none;
}

.suggestion-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-secondary);
  transition: background 0.15s;
}

.suggestion-item:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}

.suggestion-item svg {
  width: 16px;
  height: 16px;
  stroke: var(--text-muted);
}

/* Scrollable Views */
.content-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  padding: 14px;
  padding-bottom: calc(var(--player-bar-height) + var(--bottom-nav-height) + 16px);
  width: 100%;
  box-sizing: border-box;
}

.content-scroll::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.app-view {
  display: none;
  width: 100%;
  box-sizing: border-box;
}

.app-view.active {
  display: block;
}

.section-title-wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
  width: 100%;
  box-sizing: border-box;
}

.section-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.section-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

/* Horizontal Scroll for Recently Played (HomeScreen.kt LazyRow) */
.horizontal-scroll-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  padding-bottom: 8px;
  margin-bottom: 22px;
  width: 100%;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
}

.horizontal-scroll-row::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.recent-track-card {
  width: 124px;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.recent-track-card:hover {
  transform: translateY(-3px);
}

.recent-track-thumb-box {
  width: 124px;
  height: 124px;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  background: var(--bg-surface);
  margin-bottom: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.recent-track-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Category Filter Chips */
.chips-container {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding-bottom: 6px;
  margin-bottom: 20px;
  width: 100%;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
}

.chips-container::-webkit-scrollbar {
  display: none;
}

.chip-btn {
  padding: 7px 14px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.chip-btn:hover {
  color: var(--text-primary);
  background: var(--bg-surface-hover);
}

.chip-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
  font-weight: 600;
  border-color: var(--accent-primary);
  box-shadow: 0 2px 10px var(--accent-glow);
}

/* Search History Tags (SearchScreen.kt) */
.history-tags-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  width: 100%;
  box-sizing: border-box;
}

.history-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 11.5px;
  cursor: pointer;
  transition: all 0.15s;
}

.history-tag:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}

/* Track Card Grid / List */
.tracks-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
  width: 100%;
  box-sizing: border-box;
}

.folders-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
  width: 100%;
  box-sizing: border-box;
}

.track-card {
  position: relative;
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  padding: 12px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
}

.track-card:hover {
  background: var(--bg-surface-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-subtle);
}

.track-thumb-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-secondary);
  margin-bottom: 12px;
}

.track-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.track-card:hover .track-thumb {
  transform: scale(1.05);
}

.track-card-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.track-card:hover .track-card-play-overlay {
  opacity: 1;
}

.play-circle-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px var(--accent-glow);
}

.play-circle-btn svg {
  width: 20px;
  height: 20px;
  fill: #ffffff;
  margin-left: 2px;
}

.track-duration-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: #f1f5f9;
}

.track-info {
  display: flex;
  flex-direction: column;
}

.track-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.track-artist {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-muted);
}

/* Track List View */
.track-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.track-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  width: 100%;
  box-sizing: border-box;
}

.track-row:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-subtle);
}

.track-row.active {
  background: var(--bg-surface-active);
  border-color: var(--accent-primary);
}

.track-row.active .track-row-title {
  color: var(--accent-primary);
}

.track-row-index {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.track-row-thumb {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-secondary);
}

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

.track-row-title {
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-row-artist {
  font-size: 11.5px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.row-action-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 5px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.row-action-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.row-action-btn.favorited svg {
  fill: #f43f5e;
  stroke: #f43f5e;
}

.track-row-duration {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
  width: 36px;
  text-align: right;
  flex-shrink: 0;
}

/* Floating Bottom Mini-Player Bar */
.mini-player-bar {
  position: absolute;
  bottom: var(--bottom-nav-height) !important;
  left: 0;
  right: 0;
  width: 100%;
  height: var(--player-bar-height);
  background: var(--bg-surface);
  backdrop-filter: blur(24px);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  z-index: 35;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}

.player-bar-scrubber {
  position: absolute;
  top: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

.player-bar-scrubber-progress {
  height: 100%;
  width: 0%;
  background: var(--accent-gradient);
  position: relative;
  box-shadow: 0 0 10px var(--accent-primary);
}

.player-bar-track {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.player-thumb-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-surface-hover);
}

.player-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-thumb-spin {
  animation: discRotate 18s linear infinite;
  border-radius: var(--radius-full);
}

.player-thumb-spin.paused {
  animation-play-state: paused;
}

@keyframes discRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

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

.player-track-title {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
}

.player-track-artist {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-track-fav-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.player-track-fav-btn.favorited svg {
  fill: #f43f5e;
  stroke: #f43f5e;
}

/* Center Playback Controls */
.player-controls-center {
  display: flex;
  align-items: center;
  gap: 8px;
  width: auto;
}

.player-btn-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

#mini-prev-btn {
  display: none !important;
}

.scrubber-time-row {
  display: none !important;
}

.player-actions-right {
  display: none !important;
}

.control-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.control-btn:hover {
  color: var(--text-primary);
  transform: scale(1.08);
}

.control-btn.active {
  color: var(--accent-primary);
}

.play-pause-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--text-primary);
  color: #0a0c10;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.2);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.play-pause-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.35);
}

.play-pause-btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.scrubber-time-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.time-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  width: 40px;
  text-align: center;
}

.range-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.15);
  outline: none;
  cursor: pointer;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
  background: var(--text-primary);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.range-slider:hover::-webkit-slider-thumb {
  transform: scale(1.3);
  background: var(--accent-primary);
}

.player-actions-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  width: 30%;
  min-width: 200px;
}

.volume-control-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 120px;
}

.volume-slider {
  width: 80px;
}

/* Full Screen Player Modal / Drawer (PlayerScreen.kt) */
.player-drawer-modal {
  position: fixed;
  inset: 0;
  background: var(--bg-glass-heavy);
  backdrop-filter: blur(40px);
  z-index: 100;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.player-drawer-modal.open {
  transform: translateY(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px;
}

.drawer-close-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.drawer-close-btn:hover {
  color: var(--text-primary);
  background: var(--bg-surface-hover);
}

.drawer-header-title {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.drawer-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 40px;
  overflow: hidden;
}

.drawer-nowplaying-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 440px;
  width: 100%;
}

.drawer-artwork-wrap {
  position: relative;
  width: 300px;
  height: 300px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  margin-bottom: 20px;
}

.drawer-artwork {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* VisualizerView Canvas (VisualizerView.kt) */
.visualizer-canvas {
  width: 100%;
  height: 48px;
  margin-bottom: 20px;
}

.drawer-track-meta {
  text-align: center;
  margin-bottom: 20px;
  width: 100%;
}

.drawer-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drawer-artist {
  font-size: 15px;
  color: var(--text-secondary);
}

/* Lyrics Container */
.drawer-lyrics-view {
  display: none;
  width: 100%;
  max-width: 600px;
  height: 80%;
  overflow-y: auto;
  text-align: center;
  padding: 20px;
}

.lyrics-text {
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 2;
  color: var(--text-secondary);
  white-space: pre-line;
  font-weight: 600;
}

.lyrics-empty {
  font-size: 16px;
  color: var(--text-muted);
  margin-top: 60px;
}

/* Queue Container */
.drawer-queue-view {
  display: none;
  width: 100%;
  max-width: 600px;
  height: 80%;
  overflow-y: auto;
}

/* Settings Screen (SettingsScreen.kt) */
.settings-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 24px;
}

.settings-section-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.theme-options-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.theme-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  background: var(--bg-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.theme-card.active {
  border-color: var(--accent-primary);
  box-shadow: 0 0 16px var(--accent-glow);
}

.theme-preview-disc {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
}

.theme-ocean-disc { background: linear-gradient(135deg, #00b4d8, #0077b6); }
.theme-sunset-disc { background: linear-gradient(135deg, #f72585, #7209b7); }
.theme-night-disc { background: linear-gradient(135deg, #6366f1, #818cf8); }

.theme-card-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.settings-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.settings-action-row:last-child {
  border-bottom: none;
}

.settings-action-text {
  display: flex;
  flex-direction: column;
}

.settings-action-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.settings-action-desc {
  font-size: 12px;
  color: var(--text-muted);
}

.btn-secondary {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-hover);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: var(--bg-surface-active);
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 150;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open {
  display: flex;
}

.modal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
}

.modal-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.modal-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  margin-bottom: 20px;
}

.modal-input:focus {
  border-color: var(--accent-primary);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.modal-btn {
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  border: none;
}

.modal-btn-cancel {
  background: transparent;
  color: var(--text-muted);
}

.modal-btn-confirm {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: 0 4px 12px var(--accent-glow);
}

/* Track Options Bottom Sheet Modal */
.sheet-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: inherit;
}

.sheet-modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.sheet-modal-container {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  border-radius: 28px 28px 0 0;
  width: 100%;
  padding: 14px 18px 24px;
  box-shadow: 0 -16px 45px rgba(0, 0, 0, 0.75);
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.sheet-modal-backdrop.open .sheet-modal-container {
  transform: translateY(0);
}

.sheet-drag-pill {
  width: 38px;
  height: 4px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.22);
  margin: 0 auto 16px;
  flex-shrink: 0;
}

.sheet-track-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 14px;
}

.sheet-track-thumb {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-surface-hover);
}

.sheet-track-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.sheet-track-title {
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sheet-track-artist {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sheet-menu-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.sheet-menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  transition: all 0.18s ease;
  font-family: inherit;
}

.sheet-menu-item:hover {
  background: var(--bg-surface-hover);
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.sheet-menu-item:active {
  transform: scale(0.985);
}

.sheet-menu-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.sheet-menu-icon.favorited {
  background: rgba(244, 63, 94, 0.18);
  color: #f43f5e;
}

.sheet-menu-icon.favorited svg {
  fill: #f43f5e;
  stroke: #f43f5e;
}

.sheet-menu-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.sheet-menu-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.sheet-menu-desc {
  font-size: 11.5px;
  color: var(--text-secondary);
}

.sheet-cancel-btn {
  width: 100%;
  padding: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.18s ease;
  text-align: center;
}

.sheet-cancel-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
}

/* Toast */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--bg-glass-heavy);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--accent-primary);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  animation: slideToast 0.3s ease;
}

@keyframes slideToast {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
  display: flex !important;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: var(--bottom-nav-height);
  background: var(--bg-glass-heavy);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-subtle);
  z-index: 40;
  align-items: center;
  justify-content: space-around;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  padding: 6px 12px;
}

.mobile-nav-item svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
}

.mobile-nav-item.active {
  color: var(--accent-primary);
  font-weight: 600;
}

#yt-player-container {
  position: fixed;
  bottom: 0;
  right: 0;
  width: 240px;
  height: 180px;
  opacity: 0.001;
  pointer-events: none;
  z-index: -999;
}

/* Full Screen Player Drawer scoped to Native Phone Frame */
.player-drawer-modal {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  border-radius: inherit;
}

.drawer-artwork-wrap {
  width: 220px !important;
  height: 220px !important;
}

@media (max-width: 480px) {
  .top-bar {
    padding: 10px 14px;
  }

  .content-scroll {
    padding: 12px;
    padding-bottom: calc(var(--player-bar-height) + var(--bottom-nav-height) + 14px);
  }

  .tracks-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }

  .recent-track-card {
    width: 120px;
  }

  .recent-track-thumb-box {
    width: 120px;
    height: 120px;
  }

  .drawer-artwork-wrap {
    width: 200px !important;
    height: 200px !important;
  }
}

