:root {
  color-scheme: dark;
  --bg: #080d18;
  --bg-elevated: #0d1524;
  --surface: #111c2e;
  --surface-2: #17243a;
  --line: rgba(164, 190, 230, .11);
  --text: #f4f7ff;
  --muted: #91a0b9;
  --blue: #3c8cff;
  --blue-2: #2161d9;
  --cyan: #62d6ed;
  --green: #76dfad;
  --danger: #ff7187;
  --shadow: 0 18px 52px rgba(0, 0, 0, .32);
  --tg-safe-top: env(safe-area-inset-top, 0px);
  --tg-safe-bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  margin: 0; min-height: 100vh; color: var(--text);
  background: radial-gradient(ellipse at 80% -10%, rgba(34, 94, 180, .22), transparent 38%), var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { color: inherit; cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.app-shell { min-height: 100vh; padding-bottom: calc(94px + var(--tg-safe-bottom)); }
.topbar {
  height: 68px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(18px, 4vw, 52px); border-bottom: 1px solid var(--line);
  background: rgba(8, 13, 24, .78); backdrop-filter: blur(18px);
  position: sticky; top: 0; z-index: 20;
}
.brand { color: var(--text); text-decoration: none; font-size: 19px; font-weight: 900; letter-spacing: .19em; display: flex; align-items: center; gap: 11px; }
.brand-mark { display: inline-flex; align-items: center; gap: 3px; height: 22px; }
.brand-mark i { width: 4px; border-radius: 6px; display: block; background: linear-gradient(180deg, #69ddff, #367bff); box-shadow: 0 0 12px rgba(63, 149, 255, .45); }
.brand-mark i:nth-child(1) { height: 10px; }.brand-mark i:nth-child(2) { height: 20px; }.brand-mark i:nth-child(3) { height: 15px; }.brand-mark i:nth-child(4) { height: 8px; }
.brand-mark.large { transform: scale(1.8); }
.topbar-right { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.connection-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px rgba(118,223,173,.8); }
.user-chip { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.main-content { width: min(1180px, 100%); margin: 0 auto; padding: 30px clamp(16px, 4vw, 44px) 36px; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 22px; }
.eyebrow { color: var(--cyan); text-transform: uppercase; letter-spacing: .18em; font-weight: 800; font-size: 10px; margin: 0 0 9px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(28px, 5vw, 42px); line-height: 1.05; letter-spacing: -.045em; margin-bottom: 9px; }
h2 { font-size: 21px; letter-spacing: -.025em; margin-bottom: 15px; }
h3 { font-size: 15px; margin-bottom: 7px; }
.subheading { color: var(--muted); font-size: 13px; line-height: 1.55; margin: 0; }
.section { margin-top: 30px; }
.hero {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(220px, .85fr); gap: 24px;
  min-height: 260px; padding: clamp(22px, 4vw, 38px); border: 1px solid rgba(94, 155, 255, .23); border-radius: 25px;
  background: radial-gradient(circle at 80% 18%, rgba(74, 169, 255, .25), transparent 31%),
              linear-gradient(125deg, #122b53 0%, #0d1b35 48%, #101827 100%);
  box-shadow: var(--shadow); overflow: hidden; position: relative;
}
.hero:after { content: ""; position: absolute; width: 270px; height: 270px; right: 7%; top: 15%; border-radius: 50%; border: 1px solid rgba(109, 198, 255, .22); box-shadow: 0 0 0 22px rgba(109,198,255,.035), 0 0 0 48px rgba(109,198,255,.025), inset 0 0 80px rgba(44,143,255,.12); pointer-events: none; }
.hero-copy { position: relative; z-index: 1; align-self: center; max-width: 530px; }
.hero h1 { font-size: clamp(32px, 5vw, 48px); }
.hero p { color: #b8c9e6; font-size: 14px; max-width: 420px; line-height: 1.6; margin-bottom: 22px; }
.hero-art { min-height: 180px; display: grid; place-items: center; position: relative; z-index: 1; }
.disc { width: 174px; height: 174px; border-radius: 50%; display: grid; place-items: center; background: repeating-radial-gradient(circle, #101a2d 0 3px, #1d3456 4px 5px, #0b1425 6px 8px); border: 1px solid rgba(121,192,255,.32); box-shadow: 0 18px 50px rgba(0,0,0,.45), 0 0 35px rgba(52,139,255,.25); animation: float 6s ease-in-out infinite; }
.disc:before { content: ""; width: 58px; height: 58px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #8ae9ff, #3287ff 45%, #122c59 100%); border: 6px solid #13233e; box-shadow: 0 0 28px rgba(73,166,255,.6); }
@keyframes float { 0%,100% { transform: translateY(0) rotate(-7deg); } 50% { transform: translateY(-8px) rotate(7deg); } }
.primary-button, .secondary-button, .danger-button, .small-button {
  border: 0; border-radius: 13px; font-weight: 750; transition: transform .16s ease, filter .16s ease, background .16s ease;
}
.primary-button { padding: 13px 19px; color: white; background: linear-gradient(135deg, #469eff, #2861e0); box-shadow: 0 9px 24px rgba(38, 111, 238, .28); }
.secondary-button { padding: 11px 15px; background: var(--surface-2); color: var(--text); border: 1px solid var(--line); }
.danger-button { padding: 11px 15px; background: rgba(255, 91, 119, .1); color: #ff9eaa; border: 1px solid rgba(255, 91, 119, .2); }
.small-button { padding: 8px 11px; font-size: 11px; background: rgba(67, 143, 255, .13); color: #94c4ff; border: 1px solid rgba(67, 143, 255, .22); }
.primary-button:active, .secondary-button:active, .small-button:active { transform: scale(.97); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat-card { background: linear-gradient(145deg, rgba(20,33,54,.98), rgba(13,22,37,.98)); border: 1px solid var(--line); border-radius: 17px; padding: 17px; }
.stat-label { display: block; color: var(--muted); font-size: 11px; margin-bottom: 8px; }
.stat-value { font-size: 25px; letter-spacing: -.04em; font-weight: 850; }
.stat-icon { float: right; color: #6bb8ff; font-size: 19px; }
.track-list { display: flex; flex-direction: column; gap: 7px; }
.track-row { display: grid; grid-template-columns: 43px minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 9px 11px; min-height: 62px; border: 1px solid transparent; border-radius: 15px; transition: background .16s ease, border .16s ease; }
.track-row:hover { background: rgba(24,39,62,.72); border-color: var(--line); }
.cover { width: 43px; height: 43px; display: grid; place-items: center; border-radius: 11px; color: rgba(255,255,255,.88); font-size: 22px; background: linear-gradient(140deg, #17477c, #2742a0 52%, #111b38); box-shadow: inset 0 0 20px rgba(112,201,255,.13); flex: 0 0 auto; }
.cover.c2 { background: linear-gradient(140deg, #3e326e, #153f70, #0b182a); }.cover.c3 { background: linear-gradient(140deg, #175c70, #263c82, #101a33); }.cover.c4 { background: linear-gradient(140deg, #5a2c61, #263f84, #121c34); }
.track-main { min-width: 0; }.track-title { display: block; font-size: 13px; font-weight: 760; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }.track-sub { display: block; color: var(--muted); font-size: 11px; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-actions { display: flex; align-items: center; gap: 5px; }
.icon-button { width: 34px; height: 34px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 17px; display: inline-grid; place-items: center; }
.icon-button:hover { background: rgba(90,143,220,.13); color: var(--text); }
.icon-button.liked { color: #ff7891; }
.play-button { width: 35px; height: 35px; display: grid; place-items: center; border: 0; border-radius: 50%; color: white; background: linear-gradient(135deg, #439aff, #245edb); box-shadow: 0 6px 18px rgba(41,112,222,.25); font-size: 12px; }
.searchbar { width: min(340px, 100%); position: relative; }
.searchbar input, .field-input { width: 100%; padding: 12px 14px; border-radius: 13px; background: #101a2a; color: var(--text); border: 1px solid var(--line); outline: none; font-size: 13px; }
.searchbar input:focus, .field-input:focus { border-color: rgba(80,160,255,.65); }
.searchbar input::placeholder, .field-input::placeholder { color: #6f809b; }
.split-layout { display: grid; grid-template-columns: minmax(0,1fr) 280px; gap: 22px; align-items: start; }
.side-card { background: var(--bg-elevated); border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.playlist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 13px; }
.playlist-card { text-align: left; min-height: 150px; padding: 17px; border: 1px solid var(--line); border-radius: 17px; background: linear-gradient(145deg, #152945, #101827 70%); position: relative; overflow: hidden; }
.playlist-card:after { content: "♫"; position: absolute; right: 13px; bottom: -20px; font-size: 100px; line-height: 1; color: rgba(108,174,255,.07); }
.playlist-card strong { position: relative; z-index: 1; display: block; max-width: 85%; font-size: 15px; margin: 12px 0 7px; }
.playlist-card small { position: relative; z-index: 1; color: var(--muted); font-size: 11px; }
.playlist-symbol { color: #7dbaff; font-size: 22px; }
.wave-panel { display: grid; grid-template-columns: minmax(0, 1fr) 280px; align-items: center; gap: 22px; padding: 26px; border-radius: 23px; border: 1px solid rgba(93,158,255,.22); background: radial-gradient(circle at 78% 45%, rgba(55,136,255,.22), transparent 33%), linear-gradient(130deg, #122b50, #0e1a2e 72%); }
.wave-cover { width: 210px; aspect-ratio: 1; border-radius: 25px; justify-self: center; display: grid; place-items: center; background: radial-gradient(circle, #8bdfff 0 4%, #3779dd 5% 14%, transparent 15%), repeating-radial-gradient(circle, #1a3660 0 4px, #0d1b35 5px 9px); border: 1px solid rgba(143,202,255,.32); box-shadow: 0 18px 45px rgba(0,0,0,.4), 0 0 35px rgba(50,141,255,.22); }
.wave-cover span { font-size: 52px; color: rgba(255,255,255,.8); text-shadow: 0 4px 20px #276eff; }
.wave-reason { display: inline-block; color: #98c5ff; border: 1px solid rgba(104,169,255,.22); background: rgba(64,134,234,.12); border-radius: 100px; padding: 7px 10px; font-size: 11px; margin: 7px 0 18px; }
.profile-card { display: flex; gap: 16px; align-items: center; padding: 22px; border-radius: 20px; border: 1px solid var(--line); background: var(--bg-elevated); }
.avatar { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 18px; background: linear-gradient(135deg, #439dff, #3545a9); color: white; font-size: 23px; font-weight: 850; }
.empty-state { padding: 35px 20px; border: 1px dashed rgba(141,166,202,.22); border-radius: 18px; text-align: center; color: var(--muted); }
.empty-state .empty-icon { font-size: 35px; color: #6e9bd4; margin-bottom: 10px; }
.empty-state strong { display: block; color: var(--text); margin-bottom: 7px; }
.empty-state p { max-width: 350px; margin: 0 auto 15px; font-size: 12px; line-height: 1.55; }
.bottom-nav { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; gap: 3px; padding: 9px 8px calc(9px + var(--tg-safe-bottom)); border-top: 1px solid var(--line); background: rgba(8,13,24,.93); backdrop-filter: blur(20px); }
.nav-item { min-width: 65px; flex: 0 1 110px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 7px 5px; background: transparent; border: 0; color: #75849d; font-size: 9px; font-weight: 650; border-radius: 11px; }
.nav-item.active { color: #83bdff; background: rgba(54,130,238,.12); }
.nav-icon { font-size: 20px; line-height: 1; }
.player-dock { position: fixed; z-index: 25; left: 50%; transform: translateX(-50%); bottom: calc(76px + var(--tg-safe-bottom)); width: min(880px, calc(100% - 28px)); display: grid; grid-template-columns: minmax(120px,1fr) auto; align-items: center; gap: 8px 14px; padding: 10px 13px; border: 1px solid rgba(112,164,234,.2); border-radius: 17px; background: rgba(17,28,46,.97); box-shadow: 0 12px 40px rgba(0,0,0,.42); backdrop-filter: blur(18px); }
.player-dock.hidden { display: none; }
.player-track { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cover.mini { width: 37px; height: 37px; font-size: 16px; }
.player-meta { min-width: 0; }.player-meta strong,.player-meta small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }.player-meta strong { font-size: 12px; }.player-meta small { margin-top: 4px; font-size: 10px; color: var(--muted); }
.player-controls { display: flex; align-items: center; gap: 5px; }
.player-progress { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 9px; font-variant-numeric: tabular-nums; }
.player-progress input { min-width: 0; flex: 1; accent-color: #4b9cff; height: 4px; }
.modal-layer { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 18px; background: rgba(1,5,12,.74); backdrop-filter: blur(7px); }
.modal-layer.hidden { display: none; }.modal-card { width: min(420px,100%); padding: 22px; border: 1px solid var(--line); border-radius: 20px; background: #111c2e; box-shadow: var(--shadow); }.modal-card h2 { margin-bottom: 8px; }.modal-card p { color: var(--muted); font-size: 12px; line-height: 1.5; }.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 17px; }.field-label { display: block; color: var(--muted); font-size: 11px; margin: 13px 0 7px; }
.toast { position: fixed; z-index: 80; left: 50%; bottom: calc(160px + var(--tg-safe-bottom)); transform: translate(-50%, 15px); background: #203755; border: 1px solid rgba(132,185,255,.25); color: #eaf4ff; border-radius: 12px; padding: 11px 15px; max-width: calc(100% - 32px); font-size: 12px; opacity: 0; pointer-events: none; transition: .2s ease; box-shadow: var(--shadow); }.toast.show { opacity: 1; transform: translate(-50%, 0); }
.loading-screen { min-height: 65vh; display: grid; place-content: center; justify-items: center; gap: 18px; color: var(--muted); font-size: 13px; }.loading-screen p { margin: 0; }.loader-logo { padding: 20px 30px; border-radius: 22px; background: linear-gradient(145deg, #152c4f, #0c1424); border: 1px solid var(--line); }
.error-panel { max-width: 520px; margin: 8vh auto; text-align: center; padding: 30px 22px; border: 1px solid var(--line); border-radius: 22px; background: var(--bg-elevated); }.error-panel .error-icon { font-size: 35px; margin-bottom: 10px; }.error-panel p { color: var(--muted); font-size: 13px; line-height: 1.6; }
.hidden { display: none !important; }.muted { color: var(--muted); }.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }.action-row { display: flex; flex-wrap: wrap; gap: 8px; }.count-pill { border: 1px solid var(--line); border-radius: 100px; padding: 6px 9px; color: var(--muted); font-size: 10px; }
@media (min-width: 900px) { .app-shell { padding-bottom: 28px; }.bottom-nav { position: static; margin: 5px auto 0; width: max-content; border: 1px solid var(--line); border-radius: 16px; padding: 6px; background: rgba(15,24,39,.9); }.nav-item { min-width: 100px; flex-direction: row; justify-content: center; gap: 8px; padding: 11px 14px; font-size: 11px; }.player-dock { bottom: 18px; } }
@media (max-width: 700px) { .main-content { padding-top: 23px; }.hero { grid-template-columns: 1fr; min-height: 260px; }.hero-art { position: absolute; right: -26px; bottom: -40px; opacity: .45; }.hero-copy { max-width: 82%; }.stats-grid { grid-template-columns: repeat(2,1fr); gap: 9px; }.stat-card { padding: 14px; }.stat-value { font-size: 22px; }.page-heading { align-items: flex-start; flex-direction: column; }.searchbar { width: 100%; }.wave-panel { grid-template-columns: 1fr; }.wave-cover { width: 145px; grid-row: 1; }.split-layout { grid-template-columns: 1fr; }.player-dock { grid-template-columns: minmax(0,1fr) auto; }.player-progress { grid-column: 1/-1; } }
@media (max-width: 380px) { .nav-item { min-width: 0; font-size: 8px; }.nav-icon { font-size: 18px; }.hero-copy { max-width: 95%; }.hero h1 { font-size: 31px; }.track-actions { gap: 0; }.track-row { grid-template-columns: 38px minmax(0,1fr) auto; gap: 8px; padding: 7px 5px; }.cover { width: 38px; height: 38px; } }
