/* ==============================
   Root Variables
============================== */
:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --fg: #0f172a;
  --muted: #64748b;
  --border: #e6eaf0;
  --brand: #0ea5e9;

  /* Top Navigation */
  --tn-height: 52px;
  --tn-gap: 12px;
  --tn-padding-x: 16px;
  --tn-border: #d4d4d8;
  --tn-fg: #0f172a;
  --tn-fg-dim: #334155;
  --tn-accent: #ff5722;
  --tn-underline: 3px;
  --tn-fade-w: 46px;
  --tn-arrow-size: 38px;
}

/* ==============================
   Base Elements
============================== */
body.bg-body {
  background: var(--bg);
  color: var(--fg);
  font-feature-settings: 'ss01' 1, 'ss02' 1;
}

a {
  color: var(--brand);
  text-decoration: none;
}
a:hover {
  text-decoration: none;
}

header.sticky-top {
  background: var(--surface) !important;
  border-bottom: 1px solid var(--border) !important;
}

.navbar-brand {
  font-weight: 800;
  letter-spacing: .2px;
}

/* ==============================
   Pills (Social Buttons)
============================== */
.pill {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .55rem .9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: linear-gradient(180deg, #fff, #fafbff);
  color: var(--fg);
  transition: box-shadow .2s ease, background .2s ease;
}
.pill:hover {
  background: #fff;
  box-shadow: 0 8px 24px rgba(2, 6, 23, .07);
}
.pill-xl {
  padding: .7rem 1.1rem;
  font-weight: 700;
}
.pill i { font-size: 1.22rem; }
.pill-xl i { font-size: 1.35rem; }
.pill-label {
  font-size: .95rem;
  opacity: .9;
}
@media (max-width: 575.98px) {
  .pill-label { display: none; }
}

/* ==============================
   Hero Section
============================== */
.hero .card-body {
  border-radius: 14px;
  background: linear-gradient(120deg, rgba(14,165,233,.08), rgba(14,165,233,0) 60%);
}

/* ==============================
   Top Navigation
============================== */
.topnav {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--tn-height);
  background: none;
  padding: 0;
}

.topnav-viewport {
  position: relative;
  flex: 1;
  overflow: hidden;
}

.topnav-list {
  display: flex;
  align-items: center;
  gap: var(--tn-gap);
  height: var(--tn-height);
  margin: 0;
  padding: 0 var(--tn-padding-x);
  list-style: none;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.topnav-list::-webkit-scrollbar { display: none; }

.topnav-item {
  flex: 0 0 auto;
  display: flex;
}

.topnav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: var(--tn-height);
  padding: 0 14px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--tn-fg-dim);
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s ease, border-color .2s ease;
}
.topnav-link:hover {
  color: var(--tn-accent);
}
.topnav-link.is-active {
  color: var(--tn-accent);
}
.topnav-link.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: 6px;
  height: var(--tn-underline);
  background: var(--tn-accent);
  border-radius: var(--tn-underline);
}

.topnav-fade {
  position: absolute;
  top: 0; bottom: 0;
  width: var(--tn-fade-w);
  pointer-events: none;
  opacity: 0;
  transition: opacity .18s ease;
}
.fade-left  { left: 0;  background: linear-gradient(90deg, white, transparent); }
.fade-right { right: 0; background: linear-gradient(270deg, white, transparent); }

.topnav-arrow {
  appearance: none;
  border: none;
  background: none;
  width: var(--tn-arrow-size);
  height: var(--tn-arrow-size);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--tn-fg);
  transition: color .2s ease;
}
.topnav-arrow:hover {
  color: var(--tn-accent);
}
.topnav-arrow.is-hidden {
  display: none;
}

@media (max-width: 768px) {
  :root {
    --tn-height: 48px;
    --tn-padding-x: 10px;
  }
  .topnav-link {
    font-size: .95rem;
    padding: 0 10px;
  }
}

/* ==============================
   Cards / Surfaces
============================== */
.bg-surface,
.card.surface,
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.list-group-item {
  background: transparent;
  color: var(--fg);
  border-color: var(--border);
  transition: background .15s, transform .05s;
}
.list-group-item:hover {
  background: #f1f5f9;
}
.list-group-item.active {
  background: rgba(14,165,233,.12);
  color: #000;
}
.badge {
  border-radius: 999px;
}

.music-list-height { height: 500px; }
@media (max-width: 768px) {
  .music-list-height { height: 300px; }
}

/* ==============================
   Buttons
============================== */
.btn-primary {
  background: var(--brand, #0ea5e9) !important;
  border-color: var(--brand, #0ea5e9) !important;
  color: #fff !important;
}
.btn-primary:hover {
  filter: brightness(0.95);
}
.btn-outline-secondary {
  border-color: var(--border);
}

/* ==============================
   Player
============================== */
#playerPane .desc-title {
  margin-top: .5rem;
  font-weight: 800;
  letter-spacing: .2px;
}
#playerPane .desc-body {
  color: #334155;
  line-height: 1.75;
  white-space: pre-wrap;
}
#list, .list-group { overflow-x: hidden; }
.list-group-item { overflow: hidden; }
.list-group-item .flex-grow-1 { min-width: 0;}
.list-group-item .flex-grow-1 .fw-semibold { font-size:13px;}
.list-group-item .right-col { flex-shrink: 0; }
.list-group-item img {
  display: block;
  max-width: 100%;
}

/* ==============================
   Footer
============================== */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
}

/* ==============================
   Idle Layer
============================== */
.idle-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 16px;
}
.idle-bubble {
  position: absolute;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(2, 6, 23, .12);
  animation: floatY linear infinite;
}
.idle-bubble img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@keyframes floatY {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(-12px); }
  100% { transform: translateY(0); }
}
#idleFallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 992px) {
  #playerPane .split-7030 {
    display: flex;
    gap: 1.25rem;
    position: relative;
  }
  #playerPane .split-7030 .left  { flex: 0 0 70%; max-width: 70%; }
  #playerPane .split-7030 .right { flex: 0 0 30%; max-width: 30%; }

  #playerPane .panel {
    background: #fff;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 16px;
    box-shadow: 0 4px 14px rgba(0,0,0,.06);
  }

  #playerPane .player-sticky {
    position: sticky;
    top: var(--stickTop, 84px);
    z-index: 1;
  }

  #playerPane .scroll-pane {
    max-height: var(--videoH, 56vh);
    overflow: auto;
    padding: 1.25rem 1rem 1.5rem;
  }

  #playerPane .desc-title { margin: 10 0 .75rem 0 !important; font-weight: 700; font-size: 1rem; }
  #playerPane .desc-body  { line-height: 1.7; font-size: .95rem; color: #333; word-break: break-word; }

  #playerPane .split-7030::after {
    content: "";
    position: absolute;
    left: 70%;
    transform: translateX(50%);
    top: 0; bottom: 0; width: 1px;
    background: linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,.06), rgba(0,0,0,0));
    pointer-events: none;
  }
}

#playerPane, #playerPane .card-body { overflow: visible !important; }

