/* Overlays / Sheets */
/* 10. Overlays / Sheets */
/* ========= Search hint ========= */
.search-hint {
  position: fixed;
  z-index: 1200;
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .25s ease, transform .25s ease;
}

.search-hint.show {
  opacity: 1;
  transform: translateY(0);
}

.search-hint .hint-bubble {
  pointer-events: none;
  background: rgba(255,255,255,.92);
  color: #111;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.25;
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
  text-align: center;
  backdrop-filter: saturate(160%) blur(8px);
  -webkit-backdrop-filter: saturate(160%) blur(8px);
  white-space: nowrap;
}

@media (prefers-color-scheme: dark) {
  .search-hint .hint-bubble {
    background: rgba(30,30,30,.9);
    color: #f2f2f2;
    border-color: rgba(255,255,255,.10);
    box-shadow: 0 8px 28px rgba(0,0,0,.5);
  }
}

.search-hint .hint-arrow {
  display: block;
  margin: 6px auto 0;
  fill: var(--accent-color);
  animation: hint-bounce 1.2s ease-in-out infinite;
  opacity: .95;
}

@keyframes hint-bounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(4px); }
}

/* ========= Marquee ========= */
.marquee{
  overflow: hidden;
  position: relative;
}

.marquee .marquee-inner{
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  will-change: transform;
  transform: translate3d(0,0,0);
}

.marquee .mq-text{
  display: inline-block;
  white-space: nowrap;
}

.marquee .mq-gap{
  display: inline-block;
  width: var(--mq-gap, 28px);
  flex: 0 0 var(--mq-gap, 28px);
}

.marquee.is-marquee .marquee-inner{
  animation: mgMarqueeLoop var(--mq-dur, 10s) linear infinite;
}

@keyframes mgMarqueeLoop{
  0%   { transform: translate3d(0,0,0); }
  12%  { transform: translate3d(0,0,0); }
  88%  { transform: translate3d(calc(-1 * var(--mq-shift, 0px)),0,0); }
  100% { transform: translate3d(calc(-1 * var(--mq-shift, 0px)),0,0); }
}


/* ========= Splash ========= */
.splash{
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  background: var(--app-bg);
  opacity: 1;
  transition: opacity .35s ease, visibility 0s linear .35s;
  visibility: visible;
  pointer-events: auto;
}

.splash-inner{
  position: relative;
  display: grid;
  place-items: center;
  transform: translateZ(0);
}

.splash-logo{
  width: min(260px, 72vw);
  height: auto;
  display: block;
  filter: drop-shadow(0 18px 44px rgba(0,0,0,.10));
  animation: splashPop .9s cubic-bezier(.2,.9,.2,1) both;
}

.splash-glow{
  position: absolute;
  inset: -90px;
  background:
    radial-gradient(circle at 50% 55%,
      color-mix(in srgb, var(--accent-color) 22%, transparent) 0%,
      transparent 58%),
    radial-gradient(circle at 50% 50%,
      color-mix(in srgb, var(--accent-color) 10%, transparent) 0%,
      transparent 70%);
  filter: blur(22px);
  opacity: .55;
  z-index: -1;
}

@keyframes splashPop{
  0%   { transform: scale(.92); opacity: 0; }
  60%  { transform: scale(1.02); opacity: 1; }
  100% { transform: scale(1.0); }
}

.splash.is-hide{
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.tg-track-list{
  padding: 2px 0 8px;
}

/* ========= Track actions sheet (three-dots menu) ========= */
.track-actions-sheet{
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  display: none;
}

.track-actions-sheet.is-open{
  display: block;
  pointer-events: auto;
}

.track-actions-sheet.is-hiding{
  display: block;
  pointer-events: auto;
}

.track-actions-sheet.is-hiding .track-actions-backdrop{ opacity: 0; }
.track-actions-sheet.is-hiding .track-actions-panel{ transform: translateY(110%); }

.track-actions-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.35);
  opacity: 0;
  transition: opacity .18s ease;
}

.track-actions-panel{
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px) + var(--track-actions-lift, 72px));
  background: var(--tg-secondary-bg-color, var(--secondary-bg-color, #f5f5f5));
  color: var(--tg-text-color, var(--text-color, #000));
  border-radius: 18px;
  transform: translateY(110%);
  transition: transform .22s ease;
  box-shadow: 0 12px 40px rgba(0,0,0,.18);
  overflow: hidden;
}

.track-actions-sheet.is-open{ pointer-events: auto; }
.track-actions-sheet.is-open .track-actions-backdrop{ opacity: 1; }
.track-actions-sheet.is-open .track-actions-panel{ transform: translateY(0); }

.track-actions-head{
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(0,0,0,.08);
}

.track-actions-head-row{
  display: flex;
  align-items: center;
  gap: 12px;
}

.track-actions-cover{
  width: 46px;
  height: 46px;
  border-radius: 12px;
  overflow: hidden;
  flex: 0 0 46px;
  background: rgba(0,0,0,.06);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.track-actions-cover-fallback{
  font-size: 20px;
  opacity: .7;
}

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

.track-actions-title{
  font-weight: 700;
  font-size: 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-actions-subtitle{
  margin-top: 4px;
  font-size: 13px;
  color: var(--tg-hint-color, var(--hint-color, #777));
  line-height: 1.25;
  word-break: break-word;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-actions-source{
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: .95;
}

.track-actions-source .src-ico{
  display: inline-flex;
}

.track-actions-source svg{
  width: 22px;
  height: 22px;
}

.track-actions-list{
  display: flex;
  flex-direction: column;
}

.track-action-btn{
  appearance: none;
  border: none;
  background: transparent;
  padding: 14px 16px;
  text-align: left;
  font-size: 16px;
  color: inherit;
  cursor: pointer;
}

.track-action-btn + .track-action-btn{
  border-top: 1px solid rgba(0,0,0,.08);
}

.track-action-btn:active{ transform: none; }

.track-action-btn.primary{
  color: var(--tg-link-color, var(--accent-color, #65aed0));
  font-weight: 700;
}

.track-action-btn.danger{
  color: #e53935;
  font-weight: 700;
}

.track-action-btn.with-ico{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.track-action-btn.with-ico .track-action-ico{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  opacity: .9;
}

.track-action-btn.with-ico svg{
  width: 20px;
  height: 20px;
}

.track-action-btn.cancel{
  font-weight: 700;
}

body.has-actions-sheet{
  overscroll-behavior: none;
}

/* ======= */

.home-appbar-left{
  display: flex;
  align-items: center;
  min-width: 44px;
}

.home-logo{
  grid-column: 2;
  justify-self: center;
  border: 0;
  background: transparent;
  padding: 0;
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  pointer-events: none;
  -webkit-tap-highlight-color: transparent;
  outline: none;
  box-shadow: none;
}

.home-logo img{
  width: 56px;
  height: 56px;
  display: block;
  object-fit: contain;
}


/* ========= Playlist sources row in actions ========= */
.track-actions-sources-list{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 120px;
}

.track-actions-source-chip{
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--tg-secondary-bg-color, #f5f5f5) 80%, transparent);
  border: 1px solid color-mix(in srgb, var(--text-color) 10%, transparent);
}

.track-actions-source-chip .src-ico{
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}


