:root{
  --bg:#F3F6FB;
  --bg2:#E8EEF7;
  --accent:#5B8CFF;
  --brand:#111827;
  --card:#FFFFFF;
  --card2:#F5F8FF;
  --stroke:rgba(17,24,39,.08);
  --text:#111827;
  --muted:#4B5563;
  --muted2:#6B7280;
  --shadow: 0 12px 30px rgba(15,23,42,.10);
  --r:18px;
  --r2:12px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background: var(--bg);
  color: var(--text);
}

.bg{
  position:fixed; inset:0;
  background:
    radial-gradient(1200px 700px at 50% -25%, rgba(91,140,255,.20), transparent 65%),
    radial-gradient(900px 520px at 12% 6%, rgba(91,140,255,.12), transparent 68%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
  pointer-events:none;
}

.app{
  position:relative;
  max-width: 980px;
  margin: 0 auto;
  padding: 10px 10px 28px;
}

.top{
  display:grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 8px 10px;
  align-items:center;
  justify-items: start;
  padding: 14px 10px 8px;
  margin-bottom: 2px;
}

.brand{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  line-height:1.05;
  user-select:none;
}
.brand{
  justify-self: start;
}
.brandLogo{
  height: 36px;
  width: auto;
  display:block;
}
.brand__by,
.by{
  font-size: 10px;
  color: rgba(17,24,39,.65);
  margin-top: -5px;
  letter-spacing: .25px;
}

.searchWrap{
  display:flex;
  justify-content:center;
  align-items:center;
  gap: 8px;
  grid-column: 1 / -1;
  grid-row: 2;
  width: 100%;
  margin-top: 3%;
}
.search{
  width: 100%;
  height: 40px;
  border-radius: 16px;
  padding: 0 16px;
  font-size: 16px;
  background: rgba(255,255,255,.70);
  border: 1px solid rgba(17,24,39,.08);
  color: var(--text);
  outline:none;
}
.search::placeholder{color: rgba(17,24,39,.35)}
.search:focus{
  border-color: rgba(91,140,255,.35);
  box-shadow: 0 0 0 3px rgba(91,140,255,.15);
}

.right{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap: 8px;
  justify-self: end;
}
.badge{
  font-size: 11px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(91,140,255,.12);
  border: 1px solid rgba(91,140,255,.28);
  color: #111827;
}
.badgeExact{
  font-size: 10px;
  padding: 4px 8px;
  background: rgba(255,255,255,.02);
  border-color: rgba(255,255,255,.08);
  color: rgba(234,240,255,.85);
  cursor: pointer;
}
.badgeExact.active{
  background: rgba(110,168,255,.22);
  border-color: rgba(110,168,255,.40);
  color: rgba(234,240,255,.98);
}
.searchClear{
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(17,24,39,.10);
  background: rgba(255,255,255,.80);
  color: var(--text);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.searchClear:active{transform: translateY(1px)}
.hidden{display:none!important}

.list{
  display:flex;
  flex-direction:column;
  gap: 14px;
  margin-top: 6px;
}

.sectionTitle{
  margin: 12px 6px 4px;
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted2);
}

.resultGroup{
  padding: 6px 10px 10px;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--r2);
  background: rgba(0,0,0,.10);
}

.resultEmpty{
  padding: 16px 12px;
  text-align:center;
  color: var(--muted2);
}
.resultHint{
  margin-top: 6px;
  text-align:center;
  font-size: 11px;
  color: var(--muted2);
}

.card{
  background: linear-gradient(180deg, #FFFFFF 0%, #F7FAFF 100%);
  border: 1px solid rgba(17,24,39,.06);
  border-radius: var(--r);
  box-shadow: 0 14px 30px rgba(15,23,42,.12);
  overflow:hidden;
}

.cardTop{
  display:grid;
  grid-template-columns: 110px minmax(0,1fr) auto;
  gap: 14px;
  align-items: stretch;
  padding: 14px 14px;
}

.cover{
  width:110px; height:110px;
  border-radius: var(--r);
  background: #fff;
  border: 1px solid rgba(17,24,39,.08);
  object-fit: cover;
}

.meta{
  min-width:0;
  display:flex;
  flex-wrap:wrap;
  gap: 4px 10px;
  align-items:baseline;
}
.title{
  font-size: 16px;
  margin:0;
  white-space:nowrap;
  overflow:visible;
  text-overflow:clip;
  align-self: start;
}
.desc{
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
  white-space:nowrap;
  overflow:visible;
  text-overflow:clip;
}
.tags{
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted2);
  white-space:nowrap;
  overflow:visible;
  text-overflow:clip;
}

.actions{
  display:flex;
  gap: 8px;
  align-items:center;
}
.packActions{
  align-self: stretch;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
}
.packActions .btnPrimary{
  margin-top: auto;
}
.packActions .chev{
  order: -1;
  margin-top: 2px;
}

.btn{
  height: 34px;
  padding: 0 12px;
  border-radius: 14px;
  border: 1px solid rgba(91,140,255,.28);
  background: rgba(91,140,255,.12);
  color: var(--text);
  font-size: 12px;
  cursor:pointer;
}
.proToggle{
  min-width: 70px;
  color: #2f3f2f;
  border-color: #779977;
  background: rgba(119,153,119,.18);
  font-weight: 600;
}
.proToggle.active{
  background: rgba(119,153,119,.35);
  border-color: #779977;
  color: #0b1222;
}
.proToggle::after{
  content:"+";
  margin-left: 5px;
  font-weight: 700;
}
.proToggle.active::after{
  content:"✓";
}
.btn:active{transform: translateY(1px)}
.btnPrimary{
  background: rgba(91,140,255,.22);
  border-color: rgba(91,140,255,.45);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6);
}
.btnDownload{
  background: rgba(119,153,119,.18);
  border-color: #779977;
}
.btnGhost{
  background: transparent;
}
.btnPro{
  color: #2f3f2f;
  border-color: #779977;
  background: rgba(119,153,119,.18);
  font-weight: 600;
}
.chev{
  width: 30px;
  padding: 0;
  display:flex;
  justify-content:center;
  align-items:center;
}

.expand{
  padding: 8px 12px 12px;
  border-top: 1px solid rgba(17,24,39,.06);
  background: #F8FAFF;
}

.tr{
  display:grid;
  grid-template-columns: minmax(0,1fr) max-content;
  grid-template-rows: auto auto;
  gap: 8px 10px;
  align-items:center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(17,24,39,.08);
}
.tr:last-child{border-bottom:none}

.trName{
  font-size: 13px;
  font-family: "SF Pro Text", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  min-width: 0;
  opacity: .95;
  grid-column: 1 / 2;
  grid-row: 1;
}
.trMatch .trName{
  opacity: 1;
}
.hl{
  background: rgba(110,168,255,.28);
  border-radius: 4px;
  padding: 0 2px;
}
.trackMatch{
  margin-top: 6px;
  font-size: 10px;
  color: rgba(234,240,255,.75);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.trackMatchName{
  color: rgba(234,240,255,.95);
}

.timeline{
  height: 6px;
  border-radius: 999px;
  background: rgba(17,24,39,.15);
  position:relative;
  overflow:hidden;
  width: 100%;
  min-width: 0;
  grid-column: 1 / 3;
  grid-row: 2;
}
.fill{
  position:absolute; left:0; top:0; bottom:0;
  width:0%;
  background: var(--accent);
}

.trBtns{
  display:flex;
  gap:8px;
  justify-content:flex-end;
  min-width: 0;
  grid-column: 2 / 3;
  grid-row: 1;
  justify-self: end;
}
.trBtns .btn{
  height: 30px;
  padding: 0 10px;
  font-size: 11px;
}
.trBtns .playBtn{
  width: 30px;
  height: 30px;
}

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

.toast{
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  max-width: min(560px, calc(100vw - 24px));
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15,20,35,.92);
  border: 1px solid rgba(255,255,255,.10);
  color: rgba(234,240,255,.92);
  font-size: 12px;
  box-shadow: var(--shadow);
  z-index: 9999;
}

.proBadge,
#proBadge{
  display:none !important;
}

/* Play button as icon */
.playBtn{
  width: 34px;
  padding: 0;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius: 999px;
  font-size: 13px;
  line-height: 1;
}
