:root {
  --yt-black: #030303;
  --yt-surface: #121212;
  --yt-card: #181818;
  --yt-card-hover: #242424;
  --yt-red: #FF0000;
  --yt-red-hover: #CC0000;
  --text-primary: #FFFFFF;
  --text-secondary: #AAAAAA;
  --border: rgba(255, 255, 255, 0.1);
  --chip-bg: #212121;
}

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

body {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--yt-black);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  padding-bottom: 86px; /* space for YouTube mini player */
  user-select: none;
}

/* Top Menu Hero (Scrolls away naturally when scrolling down) */
.top-menu-hero {
  padding: 14px 16px 8px;
  background: var(--yt-black);
  display: flex;
  flex-direction: column;
}

/* Sticky Search Header (Pins to top when scrolling down) */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(3, 3, 3, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}

/* Centered Brand Hero */
.brand-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 4px 0 16px;
}

.ytm-logo-large {
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 12px rgba(255, 0, 0, 0.45));
}

.brand-text-large {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.brand-title-large {
  font-family: 'Oswald', 'Roboto', sans-serif;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #FFFFFF;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.brand-badge-large {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Full-Width Action Buttons */
.header-full-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
  width: 100%;
}

.btn-full {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 18px;
  border-radius: 12px;
  font-family: inherit;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.6px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
  outline: none;
}

/* 4. Full-Width YouTube Button */
.yt-full-btn {
  background: linear-gradient(135deg, #FF0000 0%, #CC0000 100%);
  color: #FFFFFF;
  border: none;
  box-shadow: 0 4px 16px rgba(255, 0, 0, 0.35);
}

.yt-full-btn:hover {
  background: linear-gradient(135deg, #ff1a1a 0%, #e60000 100%);
  box-shadow: 0 6px 20px rgba(255, 0, 0, 0.5);
  transform: translateY(-1px);
}

.yt-full-btn:active {
  transform: scale(0.98);
}

.yt-icon-svg {
  flex-shrink: 0;
}

/* 3. Full-Width Support Project Button (Monobank) */
.donate-full-btn {
  background: #1c1c1e;
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.donate-full-btn:hover {
  background: #28282b;
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.donate-full-btn:active {
  transform: scale(0.98);
}

.btn-full-icon {
  font-size: 18px;
  line-height: 1;
}

/* Quick Action Row (Premiere & Live side-by-side above search) */
.quick-nav-row {
  display: flex;
  gap: 10px;
  width: 100%;
  margin-bottom: 12px;
}

.nav-btn-pill {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 14px;
  border-radius: 24px;
  font-family: inherit;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.8px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
  text-transform: uppercase;
}

/* 1. Premiere Button: Sleek, Distinct Dark Crimson Styling */
.nav-btn-premiere {
  background: linear-gradient(135deg, #2a1212 0%, #170808 100%);
  border: 1.5px solid rgba(255, 60, 60, 0.45);
  color: #FFFFFF;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.5);
}

.nav-btn-premiere:hover {
  background: linear-gradient(135deg, #3c1a1a 0%, #240c0c 100%);
  border-color: rgba(255, 80, 80, 0.8);
  transform: translateY(-1px);
}

.nav-btn-premiere:active {
  transform: scale(0.96);
}

/* 2. Live Broadcast Button: Vibrant, Glowing, Blinking LIVE */
.nav-btn-live {
  background: linear-gradient(135deg, #FF0000 0%, #B80000 100%);
  border: 1.5px solid rgba(255, 120, 120, 0.6);
  color: #FFFFFF;
  box-shadow: 0 0 16px rgba(255, 0, 0, 0.65);
  animation: livePillBlink 1.4s infinite ease-in-out;
}

@keyframes livePillBlink {
  0%, 100% {
    box-shadow: 0 0 18px rgba(255, 0, 0, 0.8);
    border-color: rgba(255, 140, 140, 0.9);
    filter: brightness(1.05);
  }
  50% {
    box-shadow: 0 0 4px rgba(255, 0, 0, 0.2);
    border-color: rgba(255, 60, 60, 0.35);
    filter: brightness(0.85);
  }
}

.nav-btn-live:hover {
  background: linear-gradient(135deg, #ff1a1a 0%, #cc0000 100%);
  transform: translateY(-1px);
}

.nav-btn-live:active {
  transform: scale(0.96);
}

/* Pulsing dot inside Live button */
.live-dot-pulse {
  width: 8px;
  height: 8px;
  background-color: #FFFFFF;
  border-radius: 50%;
  box-shadow: 0 0 6px #FFFFFF;
  animation: radarDotPing 0.9s infinite alternate;
}

@keyframes radarDotPing {
  from { transform: scale(0.7); opacity: 0.6; }
  to { transform: scale(1.35); opacity: 1; }
}

.btn-icon-symbol {
  font-size: 14px;
  line-height: 1;
}

/* YouTube Music Search Box & Wrapper */
.search-row-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-bottom: 0;
}

.search-row-wrap .search-box {
  flex: 1;
  margin-bottom: 0;
}

.cancel-search-btn {
  background: none;
  border: none;
  color: var(--yt-red);
  font-size: 14.5px;
  font-weight: 600;
  padding: 8px 4px;
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: 0.2px;
  animation: fadeIn 0.2s ease-out;
  transition: opacity 0.2s ease;
}

.cancel-search-btn:active {
  opacity: 0.7;
}

/* Search Active Mode: Hide entire top hero menu */
.top-menu-hero.search-hidden {
  display: none !important;
}

.app-header.search-active {
  padding-top: 10px;
  padding-bottom: 10px;
}

.app-header.search-active .search-row-wrap {
  margin-bottom: 0;
}

.app-header.search-active .cancel-search-btn {
  display: block !important;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 0;
}

.search-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--text-secondary);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  background: var(--chip-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 38px 10px 42px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.2s, background 0.2s;
}

.search-box input::-webkit-search-decoration,
.search-box input::-webkit-search-cancel-button,
.search-box input::-webkit-search-results-button,
.search-box input::-webkit-search-results-decoration {
  display: none;
  -webkit-appearance: none;
}

.search-box input:focus {
  border-color: rgba(255, 255, 255, 0.3);
  background: #2a2a2a;
}

.clear-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
}

/* Category Filter Pills (Iconic YouTube Style) */
.category-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.category-pills::-webkit-scrollbar {
  display: none;
}

.pill {
  flex-shrink: 0;
  background: var(--chip-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

/* YouTube active pill: White pill with black text */
.pill.active {
  background: #FFFFFF;
  color: #030303;
  font-weight: 700;
  border-color: transparent;
}

/* Tracks Container */
.tracks-container {
  padding: 16px;
}

.tracks-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.refresh-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: transform 0.3s, color 0.2s;
}

.refresh-btn:active {
  transform: rotate(180deg);
  color: #FFFFFF;
}

/* Tracks List */
.tracks-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Section Dividers in Tracklist (Top 3 vs All Tracks) - Minimalist */
.tracks-section-divider {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 4px 4px 4px;
  margin-top: 6px;
  margin-bottom: 4px;
}

.tracks-section-divider.top-divider {
  border-bottom: 1px solid rgba(255, 215, 0, 0.2);
  padding-bottom: 4px;
}

.tracks-section-divider.all-divider {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 12px;
  margin-top: 10px;
  padding-bottom: 4px;
}

.section-title-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
}

.section-icon {
  font-size: 14px;
}

.section-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.top-divider .section-title {
  color: #FFD700;
}

.section-tag {
  font-size: 11px;
  color: #666666;
}

/* Track Card (YouTube Music Horizontal List Item) */
/* Track Card (Container for main track and its versions) */
.track-card {
  display: flex;
  flex-direction: column;
  background: transparent;
  border-radius: 6px;
  padding: 0;
  margin-bottom: 4px;
  transition: all 0.15s ease;
  position: relative;
  overflow: hidden;
}

.track-main-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
}

.track-main-row:hover, .track-main-row:active {
  background: var(--yt-card-hover);
}

.track-card.playing {
  background: rgba(255, 0, 0, 0.08);
}

.track-card.playing .track-title {
  color: var(--yt-red);
}

/* Minimalist Top 3: Clean left bar across the ENTIRE container */
.track-card.top-track-card {
  border-radius: 6px;
}

/* Rank 1: Gold */
.track-card.top-rank-1 {
  border-left: 3.5px solid #FFD700;
  background: rgba(255, 215, 0, 0.03);
}
.track-card.top-rank-1:hover, .track-card.top-rank-1:active {
  background: rgba(255, 215, 0, 0.07);
}

/* Rank 2: Silver */
.track-card.top-rank-2 {
  border-left: 3.5px solid #D0D0D0;
  background: rgba(255, 255, 255, 0.02);
}
.track-card.top-rank-2:hover, .track-card.top-rank-2:active {
  background: rgba(255, 255, 255, 0.05);
}

/* Rank 3: Bronze */
.track-card.top-rank-3 {
  border-left: 3.5px solid #CD7F32;
  background: rgba(205, 127, 50, 0.02);
}
.track-card.top-rank-3:hover, .track-card.top-rank-3:active {
  background: rgba(205, 127, 50, 0.05);
}

/* Artwork Rank Corner Badge - Minimal & Crisp */
.art-rank-badge {
  position: absolute;
  top: 1px;
  left: 1px;
  font-size: 13px;
  line-height: 1;
  z-index: 2;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.9));
}

/* Subtle rank pill in metadata row (does NOT touch title) */
.top-meta-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  display: inline-block;
  line-height: 1.2;
}

.top-meta-1 {
  background: rgba(255, 215, 0, 0.2);
  color: #FFD700;
  border: 0.5px solid rgba(255, 215, 0, 0.4);
}

.top-meta-2 {
  background: rgba(220, 220, 220, 0.15);
  color: #E0E0E0;
  border: 0.5px solid rgba(220, 220, 220, 0.3);
}

.top-meta-3 {
  background: rgba(205, 127, 50, 0.15);
  color: #D78A44;
  border: 0.5px solid rgba(205, 127, 50, 0.3);
}

/* Highlighted plays count */
.stat-hot {
  color: #FF9800;
  font-weight: 700;
}

.track-info-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

/* Thumbnail Art */
.track-art {
  width: 48px;
  height: 48px;
  border-radius: 4px;
  background: #1c1c1c;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.track-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ytm-eq-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(1px);
}

/* Equalizer animation for playing track */
.ytm-eq {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 18px;
}

.ytm-eq span {
  width: 3px;
  background-color: var(--yt-red);
  border-radius: 2px;
  animation: bounce 0.8s ease-in-out infinite alternate;
}

.ytm-eq span:nth-child(1) { height: 60%; animation-delay: 0.1s; }
.ytm-eq span:nth-child(2) { height: 100%; animation-delay: 0.3s; }
.ytm-eq span:nth-child(3) { height: 40%; animation-delay: 0.2s; }

@keyframes bounce {
  0% { height: 25%; }
  100% { height: 100%; }
}

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

.track-title {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
  line-height: 1.3;
}

.track-info-group.has-versions {
  cursor: pointer;
}

.track-info-group.has-versions:active {
  opacity: 0.85;
}

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

.track-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

.track-stats {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #888888;
  font-size: 11px;
}

.track-stats span {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.btn-icon.share-btn {
  color: var(--text-secondary);
}

.btn-icon.share-btn:hover {
  color: #FFFFFF;
}

.btn-mono {
  background: #000000;
  color: #FFFFFF;
  border: 1px solid #333333;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.btn-mono:active {
  background: #111111;
}

.modal-badge-mono {
  font-size: 38px;
  margin-bottom: 10px;
}

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

.btn-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
}

.btn-icon:active {
  transform: scale(0.9);
}

.btn-icon.yt-btn {
  color: #FF0000;
}

.btn-icon.dl-btn {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.08);
}

/* Skeleton Loading */
.skeleton-card {
  height: 58px;
  background: linear-gradient(90deg, #161616 25%, #222222 50%, #161616 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: 6px;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.empty-icon {
  margin-bottom: 12px;
}

.empty-state h3 {
  font-size: 16px;
  color: var(--text-primary);
  margin-bottom: 6px;
}

/* YouTube Music Mini Player (Docked Bottom Bar) */
.bottom-player {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: #212121;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.6);
}

/* Top Progress Line (Red YouTube Style) */
.progress-container {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.15);
  cursor: pointer;
  position: relative;
}

.progress-bar {
  height: 100%;
  background: var(--yt-red);
  width: 0%;
  transition: width 0.1s linear;
}

.player-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px 10px;
}

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

.player-thumb {
  width: 42px;
  height: 42px;
  border-radius: 4px;
  background: #181818;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

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

.player-info h4 {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #FFFFFF;
}

.player-info p {
  font-size: 12px;
  color: var(--text-secondary);
}

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

.yt-play-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #FFFFFF;
  border: none;
  color: #030303;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  transition: transform 0.12s ease, background 0.15s ease, box-shadow 0.15s ease;
  padding: 0;
  flex-shrink: 0;
}

.yt-play-btn:active {
  transform: scale(0.92);
  background: #EEEEEE;
}

.yt-play-btn svg {
  display: block;
}

.yt-control-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
}

.yt-control-icon:active {
  transform: scale(0.9);
}

.yt-icon-red {
  color: #FF0000;
}

.dl-icon-btn {
  background: rgba(255, 255, 255, 0.1);
}

/* Modal Overlay (Subscription Gate - YouTube Music Theme) */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-card {
  background: #212121;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  max-width: 340px;
  width: 100%;
  text-align: center;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.8);
}

.modal-badge-yt {
  margin-bottom: 12px;
}

.modal-card h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #FFFFFF;
}

.modal-card p {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 20px;
}

.modal-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn {
  width: 100%;
  padding: 12px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  text-decoration: none;
  display: inline-block;
  transition: transform 0.15s, opacity 0.15s;
}

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

.btn-tg-sub {
  background: #229ED9;
  color: #FFFFFF;
  box-shadow: 0 3px 10px rgba(34, 158, 217, 0.35);
}

.btn-tg-sub:hover {
  background: #1e8ec3;
}

.btn-yt-sub {
  background: linear-gradient(135deg, #FF0000 0%, #CC0000 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(255, 0, 0, 0.4);
}

.btn-yt-sub:hover {
  background: linear-gradient(135deg, #ff1a1a 0%, #b80000 100%);
}

.btn-sub {
  background: var(--yt-red);
  color: #FFFFFF;
}

.btn-check {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

/* Toast Message */
.toast {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: #212121;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
  z-index: 300;
  pointer-events: none;
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

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

/* ==================================================
   Track Versions Accordion & Badges
================================================== */
.versions-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #CCCCCC;
  padding: 1px 7px;
  border-radius: 12px;
  font-size: 10.5px;
  font-weight: 600;
  pointer-events: none;
  cursor: pointer;
  pointer-events: auto;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 1.3;
  flex-shrink: 0;
  outline: none;
}

.versions-badge:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #FFFFFF;
}

.versions-badge .arrow-indicator {
  font-size: 9px;
  transition: transform 0.2s ease;
  display: inline-block;
}

.versions-badge.open {
  background: rgba(255, 0, 0, 0.16);
  border-color: rgba(255, 0, 0, 0.4);
  color: #FF5555;
}

.versions-badge.open .arrow-indicator {
  transform: rotate(180deg);
}

/* Accordion Container for Versions - INSIDE track-card */
.versions-container {
  display: flex;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.35);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding: 4px 10px 6px 14px;
  gap: 3px;
  animation: slideDownVersions 0.2s ease-out;
  width: 100%;
  box-sizing: border-box;
}

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

/* Individual Version Row */
.version-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-radius: 5px;
  transition: background 0.15s ease;
  cursor: pointer;
}

.version-row:hover, .version-row:active {
  background: rgba(255, 255, 255, 0.06);
}

.version-row.playing {
  background: rgba(255, 0, 0, 0.12);
}

.version-row.playing .version-title {
  color: var(--yt-red);
  font-weight: 600;
}

.version-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.version-play-icon {
  font-size: 10px;
  color: var(--text-secondary);
  width: 14px;
  display: inline-block;
  text-align: center;
}

.version-row.playing .version-play-icon {
  color: var(--yt-red);
}

.version-title {
  font-size: 12.5px;
  color: #DDDDDD;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

.version-duration {
  font-size: 11px;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.version-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.version-plays {
  font-size: 10.5px;
  color: #777777;
}

.version-dl-btn {
  padding: 3px;
  width: 26px;
  height: 26px;
}

/* ==================================================
   Multi-Messenger Share Modal & Grid
================================================== */
.share-modal-card {
  max-width: 360px;
  width: 90%;
  padding: 22px 18px 18px;
}

.share-modal-header {
  text-align: center;
  margin-bottom: 16px;
}

.modal-badge-share {
  font-size: 32px;
  margin-bottom: 4px;
}

.share-modal-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.share-modal-desc {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin: 0;
}

.share-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 8px;
}

.share-option-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 6px;
  background: #1c1c1e;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: #FFFFFF;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
}

.share-option-btn:hover {
  background: #28282c;
  transform: translateY(-2px);
}

.share-option-btn:active {
  transform: scale(0.95);
}

.share-option-icon {
  font-size: 24px;
  line-height: 1;
}

.share-option-label {
  font-size: 11.5px;
  font-weight: 600;
  color: #EAEAEA;
}

.tg-share:hover { border-color: #2AABEE; }
.viber-share:hover { border-color: #7360F2; }
.wa-share:hover { border-color: #25D366; }
.fb-share:hover { border-color: #1877F2; }
.x-share:hover { border-color: #1DA1F2; }
.copy-share:hover { border-color: #FF0000; }

/* ==================================================
   Full-Screen Now Playing Player (YouTube Music / Spotify)
================================================== */
.full-player {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: linear-gradient(180deg, #1c0a0a 0%, #0d0d0d 35%, #050505 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px 20px calc(24px + env(safe-area-inset-bottom, 16px));
  box-sizing: border-box;
  animation: slideUpPlayer 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}

@keyframes slideUpPlayer {
  from { transform: translateY(100%); opacity: 0.5; }
  to { transform: translateY(0); opacity: 1; }
}

.full-player-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 8px;
}

.full-player-btn {
  background: none;
  border: none;
  color: #FFFFFF;
  padding: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
}

.full-player-btn:active {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(0.95);
}

.full-player-header-title {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.full-player-now-playing {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--yt-red);
}

.full-player-brand {
  font-size: 13px;
  color: #888888;
  font-weight: 500;
}

.full-player-art-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px 0;
  flex: 1;
  max-height: 340px;
}

.full-player-art {
  width: 270px;
  height: 270px;
  max-width: 74vw;
  max-height: 74vw;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.75), 0 0 35px rgba(255, 0, 0, 0.22);
  background: #181818;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.full-player-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.full-player-disc-placeholder {
  font-size: 64px;
}

.full-player-info {
  margin: 10px 0 14px;
  text-align: left;
  width: 100%;
}

.full-player-title {
  font-size: 20px;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.2px;
}

.full-player-artist {
  font-size: 14.5px;
  color: #AAAAAA;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.full-player-progress-wrap {
  width: 100%;
  margin-bottom: 12px;
}

.full-progress-container {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 3px;
  cursor: pointer;
  position: relative;
  padding: 6px 0;
  background-clip: content-box;
}

.full-progress-bar {
  width: 0%;
  height: 6px;
  background: var(--yt-red);
  border-radius: 3px;
  position: relative;
  transition: width 0.1s linear;
}

.full-progress-bar::after {
  content: '';
  position: absolute;
  right: -5px;
  top: -3px;
  width: 12px;
  height: 12px;
  background: #FFFFFF;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.6);
}

.full-time-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #888888;
  margin-top: 6px;
  font-weight: 500;
}

.full-player-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  margin-bottom: 16px;
  width: 100%;
}

.full-ctrl-btn {
  background: none;
  border: none;
  color: #FFFFFF;
  padding: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.full-ctrl-btn:active {
  transform: scale(0.9);
  opacity: 0.8;
}

.full-play-main-btn {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FF0000 0%, #D60000 100%);
  border: none;
  color: #FFFFFF;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 24px rgba(255, 0, 0, 0.45);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  padding: 0;
  flex-shrink: 0;
}

.full-play-main-btn:active {
  transform: scale(0.93);
  box-shadow: 0 2px 10px rgba(255, 0, 0, 0.3);
}

.full-play-main-btn svg {
  display: block;
}

.full-player-actions {
  display: flex;
  gap: 10px;
  width: 100%;
}

.btn-full-action {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.full-dl-btn {
  background: #222222;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
}

.full-dl-btn:active {
  background: #333333;
  transform: scale(0.97);
}

.full-yt-btn {
  background: rgba(255, 0, 0, 0.15);
  border: 1px solid rgba(255, 0, 0, 0.4);
  color: #FF5555;
}

.full-yt-btn:active {
  background: rgba(255, 0, 0, 0.25);
  transform: scale(0.97);
}

/* ==================================================
   Admin Track Edit Modal & Controls
================================================== */
.edit-track-btn {
  color: var(--text-secondary);
  transition: color 0.15s ease, transform 0.15s ease;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.edit-track-btn:hover {
  color: #FFD700;
  transform: scale(1.1);
}

.admin-edit-icon {
  color: #FFD700 !important;
}

.edit-modal-card {
  max-width: 380px;
  width: 92%;
  padding: 20px 18px 18px;
  background: #181818;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85);
  max-height: 88vh;
  overflow-y: auto;
}

.edit-modal-header {
  margin-bottom: 14px;
  text-align: left;
}

.edit-modal-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.edit-modal-title-row h3 {
  font-size: 17px;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0;
}

.admin-badge-pill {
  font-size: 11px;
  font-weight: 700;
  color: #030303;
  background: #FFD700;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.edit-modal-sub {
  font-size: 12px;
  color: #888888;
  margin: 0;
}

.edit-cover-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.04);
  padding: 10px;
  border-radius: 12px;
  margin-bottom: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.15);
}

.edit-cover-preview {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  background: #252525;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 24px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.edit-cover-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.edit-cover-actions {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.btn-edit-upload {
  display: inline-block;
  background: #2a2a2a;
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: background 0.15s;
}

.btn-edit-upload:hover, .btn-edit-upload:active {
  background: #383838;
}

.edit-hint {
  font-size: 10.5px;
  color: #777777;
}

.edit-form-group {
  margin-bottom: 12px;
  text-align: left;
}

.edit-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #CCCCCC;
  margin-bottom: 4px;
}

.edit-input {
  width: 100%;
  background: #222222;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13.5px;
  color: #FFFFFF;
  outline: none;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.15s, background 0.15s;
}

.edit-input:focus {
  border-color: #FF0000;
  background: #282828;
}

.edit-select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23AAAAAA%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 10px;
  cursor: pointer;
}

.edit-field-tip {
  display: block;
  font-size: 11px;
  color: #888888;
  margin-top: 4px;
  line-height: 1.3;
}

.edit-modal-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.btn-edit-action {
  width: 100%;
  padding: 11px 16px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
}

.btn-edit-save {
  background: linear-gradient(135deg, #FF0000 0%, #CC0000 100%);
  color: #FFFFFF;
}

.btn-edit-save:hover, .btn-edit-save:active {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-edit-delete {
  background: rgba(255, 60, 60, 0.12);
  color: #FF5555;
  border: 1px solid rgba(255, 60, 60, 0.25);
}

.btn-edit-delete:active {
  background: rgba(255, 60, 60, 0.2);
}

.btn-edit-cancel {
  background: transparent;
  color: #999999;
}

.btn-edit-cancel:active {
  color: #FFFFFF;
}
