:root { --pink: #f7a8c4; --pink2: #c9a7ff; --fg: #fff; --mut: rgba(255,255,255,.66); --glass: rgba(255,255,255,.08); --line: rgba(255,255,255,.14); }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: #111014; color: var(--fg); font-family: "Segoe UI", "Noto Sans Arabic", Tahoma, system-ui, sans-serif; overflow: hidden; user-select: none; }
#bg { position: fixed; inset: -60px; background: #2a1f33 center/cover no-repeat; filter: blur(46px) saturate(1.35); transform: scale(1.1); transition: background-image .6s; }
#shade { position: fixed; inset: 0; background: radial-gradient(120% 90% at 20% 10%, rgba(0,0,0,.25), rgba(0,0,0,.72)); }
.hidden { display: none !important; }

.top { position: relative; z-index: 2; display: flex; align-items: center; gap: 16px; padding: 14px 22px; }
.brand { font-weight: 800; letter-spacing: .14em; font-size: 13px; color: var(--mut); display: flex; align-items: center; gap: 8px; white-space: nowrap; direction: ltr; }
.brand b { color: var(--pink); font-weight: 800; }
.brand .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 12px var(--pink); }
.search { flex: 1; max-width: 520px; margin-inline-start: auto; display: flex; align-items: center; gap: 8px; background: rgba(0,0,0,.32); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; backdrop-filter: blur(10px); }
.search svg { width: 18px; height: 18px; fill: var(--mut); flex: none; }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: #fff; font: inherit; font-size: 15px; }
.search input::placeholder { color: rgba(255,255,255,.45); }

.player { position: relative; z-index: 1; height: calc(100% - 64px); display: flex; align-items: center; justify-content: center; gap: clamp(20px, 4vw, 56px); padding: 8px clamp(18px, 5vw, 64px) 28px; direction: ltr; }
.art-wrap { position: relative; flex: none; width: min(40vh, 36vw, 380px); aspect-ratio: 1; }
.art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 22px; box-shadow: 0 24px 60px rgba(0,0,0,.55); background: #2a1f33; }
.art.ph { display: grid; place-items: center; background: linear-gradient(135deg, var(--pink), var(--pink2)); font-weight: 900; letter-spacing: .12em; font-size: 28px; color: rgba(255,255,255,.92); }
.info { flex: 1; min-width: 0; max-width: 640px; }
.label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; letter-spacing: .12em; color: var(--pink); }
.ldot { width: 9px; height: 9px; border-radius: 2px; background: currentColor; }
.label.paused { color: #fee75c; } .label.live { color: #ff6b6b; }
.pill { margin-inline-start: 6px; font-size: 11px; letter-spacing: .04em; color: #fff; background: var(--glass); border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; font-weight: 700; }
h1 { margin: 8px 0 4px; font-size: clamp(22px, 3.6vw, 40px); line-height: 1.15; font-weight: 800; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sub { display: flex; align-items: center; gap: 12px; color: var(--mut); font-size: clamp(14px, 1.8vw, 19px); min-height: 26px; }
.sub #artist { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link { flex: none; background: none; border: 1px solid var(--line); color: #fff; border-radius: 999px; padding: 3px 10px; font: inherit; font-size: 13px; cursor: pointer; }
.link:hover { background: var(--glass); }

.seek { position: relative; height: 28px; margin: 22px 0 4px; cursor: pointer; touch-action: none; }
.rail { position: absolute; left: 0; right: 0; top: 11px; height: 6px; border-radius: 6px; background: rgba(255,255,255,.22); overflow: hidden; }
.fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--pink), #ffc4da); border-radius: 6px; }
.knob { position: absolute; top: 6px; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.45); transform: scale(.85); transition: transform .12s; }
.seek:hover .knob, .seek.drag .knob { transform: scale(1.15); }
.seek.drag .rail { height: 8px; top: 10px; }
.seek.off { cursor: default; opacity: .55; }
.tip { position: absolute; bottom: 30px; transform: translateX(-50%); background: rgba(0,0,0,.75); padding: 3px 8px; border-radius: 6px; font-size: 13px; font-weight: 700; }
.times { display: flex; justify-content: space-between; font-size: 14px; font-weight: 700; color: var(--mut); font-variant-numeric: tabular-nums; }

.controls { display: flex; align-items: center; justify-content: center; gap: clamp(18px, 3vw, 34px); margin: 14px 0 8px; }
.ic { position: relative; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 0; background: transparent; color: #fff; cursor: pointer; transition: transform .1s, background .15s; }
.ic svg { width: 26px; height: 26px; fill: currentColor; }
.ic:hover { background: var(--glass); }
.ic:active { transform: scale(.92); }
.ic.on { color: var(--pink); }
.ic.big { width: 68px; height: 68px; background: #fff; color: #111; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.ic.big svg { width: 32px; height: 32px; }
.ic.big:hover { background: #fff; transform: scale(1.04); }
.ic.sm { width: 34px; height: 34px; } .ic.sm svg { width: 20px; height: 20px; }
.ic:disabled { opacity: .4; cursor: default; }
.badge { position: absolute; top: 6px; right: 5px; font-size: 10px; font-weight: 900; background: var(--pink); color: #111; border-radius: 6px; padding: 0 4px; line-height: 14px; }

.vol { display: flex; align-items: center; gap: 10px; max-width: 360px; margin: 6px auto 12px; color: var(--mut); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.vol svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.vol span { width: 44px; text-align: right; }
input[type=range] { flex: 1; -webkit-appearance: none; appearance: none; height: 5px; border-radius: 5px; background: rgba(255,255,255,.22); outline: 0; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 15px; height: 15px; border-radius: 50%; background: #fff; cursor: pointer; }
input[type=range]::-moz-range-thumb { width: 15px; height: 15px; border: 0; border-radius: 50%; background: #fff; cursor: pointer; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 4px; }
.chip { border: 1px solid var(--line); background: rgba(0,0,0,.22); color: #fff; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.chip:hover { background: var(--glass); }
.chip.on { background: var(--pink); color: #1a1017; border-color: transparent; }
.chip:disabled { opacity: .45; cursor: default; }
.next { margin-top: 14px; text-align: center; color: var(--mut); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.next b { color: #fff; font-weight: 700; }
.hint { margin-top: 10px; text-align: center; font-size: 13px; color: #fee75c; }

.sheet { position: fixed; z-index: 5; top: 64px; right: 16px; bottom: 16px; width: min(440px, calc(100% - 32px)); background: rgba(18,16,22,.92); border: 1px solid var(--line); border-radius: 18px; backdrop-filter: blur(16px); display: flex; flex-direction: column; box-shadow: 0 24px 60px rgba(0,0,0,.5); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.list { overflow-y: auto; padding: 6px; }
.row { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; cursor: pointer; direction: ltr; }
.row:hover { background: var(--glass); }
.row img, .row .ph { width: 64px; height: 48px; object-fit: cover; border-radius: 8px; flex: none; background: #2a1f33; }
.row .t { flex: 1; min-width: 0; }
.row .t b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .t span { display: block; font-size: 12px; color: var(--mut); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .d { font-size: 12px; color: var(--mut); font-variant-numeric: tabular-nums; }
.empty { padding: 24px; text-align: center; color: var(--mut); }

.boot { position: fixed; inset: 0; z-index: 9; display: grid; place-content: center; justify-items: center; gap: 14px; background: #111014; text-align: center; padding: 24px; font-size: 15px; }
.spin { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255,255,255,.15); border-top-color: var(--pink); animation: r 0.9s linear infinite; }
@keyframes r { to { transform: rotate(360deg); } }
.toast { position: fixed; z-index: 8; left: 50%; bottom: 22px; transform: translateX(-50%); background: rgba(0,0,0,.82); border: 1px solid var(--line); padding: 10px 16px; border-radius: 12px; font-size: 14px; max-width: 90%; text-align: center; }

@media (max-width: 680px), (max-aspect-ratio: 4/5) {
  .top { padding: 12px 14px; gap: 10px; }
  .brand { display: none; }
  .search { max-width: none; }
  .player { flex-direction: column; justify-content: flex-start; gap: 16px; height: calc(100% - 60px); overflow-y: auto; padding: 8px 20px 24px; }
  .art-wrap { width: min(70vw, 42vh, 340px); }
  .info { width: 100%; text-align: center; }
  .label, .sub { justify-content: center; }
  h1 { font-size: 24px; }
  .sheet { top: 60px; right: 8px; left: 8px; width: auto; }
}
