/* Панель LURI: тёмное стекло поверх фоновой картинки. */
:root {
  --ink: #f1f2ff;
  --muted: #a6abc9;
  --faint: #6f7596;
  --accent: #7b8bff;
  --accent-2: #b46cff;
  --coral: #ff6b5e;
  --ok: #3ddc97;
  --warn: #ffd166;
  --glass: rgba(16, 18, 32, 0.52);
  --glass-strong: rgba(14, 16, 28, 0.72);
  --glass-hover: rgba(255, 255, 255, 0.07);
  --edge: rgba(255, 255, 255, 0.11);
  --edge-top: rgba(255, 255, 255, 0.2);
  --r-lg: 24px;
  --r-md: 18px;
  --r-sm: 12px;
  --side: 264px;
  --player: 84px;
  --blur: blur(22px) saturate(150%);
  --font: 'Manrope', 'Noto Sans Armenian', -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: #0b0d18;
  color: var(--ink);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: var(--accent);
}

/* --- Фон --- */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(8, 10, 22, 0.55) 0%, rgba(8, 10, 22, 0.35) 40%, rgba(8, 10, 22, 0.75) 100%),
    url('/bg.jpg') center / cover no-repeat;
  transform: scale(1.02);
}

.bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 50% at 15% 10%, rgba(123, 139, 255, 0.22), transparent 70%),
    radial-gradient(50% 45% at 90% 90%, rgba(180, 108, 255, 0.2), transparent 70%);
}

/* Микшер: полупрозрачные полоски по всей ширине внизу, под стеклом. */
.mixer {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  width: 100%;
  height: 42vh;
  pointer-events: none;
  opacity: 0.9;
  transition: opacity 0.6s;
}

.mixer.off {
  opacity: 0;
}

.sc-frame {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 2px;
  height: 2px;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

#root {
  position: relative;
  z-index: 2;
}

/* --- Стекло --- */
.glass {
  border: 1px solid var(--edge);
  border-top-color: var(--edge-top);
  border-radius: var(--r-lg);
  background: var(--glass);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
}

/* --- Вход --- */
.login {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 24px 16px;
  place-items: center;
}

.login-card {
  width: min(420px, 100%);
  padding: 36px 32px 30px;
  text-align: center;
  animation: rise 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.login-card h1 {
  margin: 18px 0 6px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.login-card p {
  margin: 0 0 22px;
  color: var(--muted);
}

.logo {
  display: inline-grid;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: url('https://luri.lol/assets/brand/logo-mark.png') center / cover;
  box-shadow: 0 10px 40px rgba(123, 139, 255, 0.45);
}

.input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--edge);
  border-radius: var(--r-sm);
  outline: none;
  background: rgba(255, 255, 255, 0.06);
  font-size: 16px;
  transition: border-color 0.2s, background 0.2s;
}

.input:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.09);
}

.input-at {
  position: relative;
}

.input-at::before {
  content: '@';
  position: absolute;
  top: 50%;
  left: 16px;
  color: var(--faint);
  transform: translateY(-50%);
}

.input-at .input {
  padding-left: 34px;
}

.btn {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: var(--r-sm);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 24px rgba(123, 139, 255, 0.35);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(123, 139, 255, 0.5);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.5;
  pointer-events: none;
}

.btn.block {
  width: 100%;
  height: 48px;
  margin-top: 12px;
}

.btn.ghost {
  border: 1px solid var(--edge);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: none;
}

.btn.ghost:hover {
  background: rgba(255, 255, 255, 0.11);
}

.btn.danger {
  background: rgba(255, 107, 94, 0.16);
  box-shadow: none;
  color: #ff9a90;
}

.btn.sm {
  height: 36px;
  padding: 0 14px;
  font-size: 13px;
}

.err {
  min-height: 20px;
  margin-top: 10px;
  color: #ff9a90;
  font-size: 13px;
}

.wait-ring {
  position: relative;
  width: 92px;
  height: 92px;
  margin: 8px auto 18px;
}

.wait-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.wait-ring circle {
  fill: none;
  stroke-width: 6;
  stroke-linecap: round;
}

.wait-ring .track {
  stroke: rgba(255, 255, 255, 0.08);
}

.wait-ring .bar {
  stroke: url(#ringGrad);
  transition: stroke-dashoffset 1s linear;
}

.wait-ring b {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 30px;
}

/* --- Каркас --- */
.shell {
  display: grid;
  grid-template-columns: var(--side) minmax(0, 1fr);
  gap: 18px;
  min-height: 100vh;
  padding: 18px 18px calc(var(--player) + 30px);
}

.side {
  position: sticky;
  top: 18px;
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--player) - 48px);
  padding: 18px 14px;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 4px 8px 18px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand .logo {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(123, 139, 255, 0.4);
}

.brand small {
  display: block;
  color: var(--faint);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav {
  display: grid;
  flex: 1;
  gap: 4px;
  align-content: start;
  overflow-y: auto;
}

.nav button {
  display: flex;
  gap: 12px;
  align-items: center;
  height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--r-sm);
  background: none;
  color: var(--muted);
  font-weight: 600;
  text-align: left;
  transition: background 0.2s, color 0.2s;
}

.nav button i {
  width: 24px;
  font-size: 18px;
  font-style: normal;
  text-align: center;
}

.nav button:hover {
  background: var(--glass-hover);
  color: var(--ink);
}

.nav button.on {
  background: linear-gradient(135deg, rgba(123, 139, 255, 0.28), rgba(180, 108, 255, 0.18));
  box-shadow: inset 0 0 0 1px rgba(123, 139, 255, 0.35);
  color: #fff;
}

.nav .count {
  margin-left: auto;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--coral);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.me {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
  padding: 10px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.05);
}

.avatar {
  display: grid;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-weight: 800;
  place-items: center;
}

.me .who {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  line-height: 1.3;
}

.me .who b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.me .who span {
  color: var(--faint);
}

.lang-select {
  height: 30px;
  padding: 0 6px;
  border: 1px solid var(--edge);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 12px;
}

.lang-select option {
  background: #161827;
}

.main {
  min-width: 0;
}

.topbar {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
  padding: 14px 18px;
}

.topbar h1 {
  flex: 1;
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.burger {
  display: none;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.07);
  font-size: 20px;
}

.clock {
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.view {
  animation: rise 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

/* --- Карточки и сетки --- */
.grid {
  display: grid;
  gap: 18px;
}

.grid.stats {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.grid.two {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.card {
  padding: 20px;
}

.card h2 {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 800;
}

.card h2 .sp {
  flex: 1;
}

.stat {
  position: relative;
  overflow: hidden;
  padding: 18px 20px;
}

.stat b {
  display: block;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.stat span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.stat i {
  position: absolute;
  top: 14px;
  right: 16px;
  font-size: 22px;
  font-style: normal;
  opacity: 0.8;
}

.stat.hot {
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px rgba(255, 107, 94, 0.45);
}

.hello {
  margin: 0 0 18px;
  padding: 26px 26px;
}

.hello h2 {
  margin: 0 0 4px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hello p {
  margin: 0;
  color: var(--muted);
}

.quick {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.quick button {
  display: grid;
  gap: 8px;
  padding: 18px 16px;
  border: 1px solid var(--edge);
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.05);
  font-weight: 700;
  text-align: left;
  transition: transform 0.15s, background 0.2s;
}

.quick button i {
  font-size: 26px;
  font-style: normal;
}

.quick button:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.list {
  display: grid;
  gap: 6px;
}

.item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 0;
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.04);
  text-align: left;
  transition: background 0.2s;
}

button.item:hover {
  background: rgba(255, 255, 255, 0.09);
}

.item .grow {
  flex: 1;
  min-width: 0;
}

.item .grow b,
.item .grow span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item .grow span {
  color: var(--muted);
  font-size: 13px;
}

.tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.tag.new {
  background: rgba(255, 209, 102, 0.16);
  color: var(--warn);
}

.tag.taken {
  background: rgba(123, 139, 255, 0.18);
  color: #aab5ff;
}

.tag.done,
.tag.ok {
  background: rgba(61, 220, 151, 0.14);
  color: var(--ok);
}

.tag.owner {
  background: rgba(255, 107, 94, 0.16);
  color: #ff9a90;
}

.muted {
  color: var(--muted);
}

.empty {
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 10px var(--ok);
}

/* --- Встроенное приложение техподдержки --- */
.frame-wrap {
  overflow: hidden;
  padding: 0;
}

.frame-wrap iframe {
  display: block;
  width: 100%;
  height: calc(100vh - var(--player) - 140px);
  min-height: 520px;
  border: 0;
  background: transparent;
}

/* --- Права --- */
.perms {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.perm {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--edge);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s, border-color 0.2s;
}

.perm input {
  display: none;
}

.perm.on {
  border-color: rgba(123, 139, 255, 0.6);
  background: rgba(123, 139, 255, 0.2);
  color: #fff;
}

.perm.locked {
  cursor: default;
  opacity: 0.75;
}

table.simple {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

table.simple th,
table.simple td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--edge);
  text-align: left;
  vertical-align: top;
}

table.simple th {
  color: var(--faint);
  font-weight: 700;
}

/* --- Музыка --- */
.add-pl {
  display: flex;
  gap: 10px;
}

.add-pl .input {
  flex: 1;
}

.pl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.pl {
  position: relative;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--edge);
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.05);
  text-align: left;
  transition: transform 0.2s, box-shadow 0.2s;
}

.pl:hover {
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.4);
  transform: translateY(-3px);
}

.pl.playing {
  box-shadow:
    0 14px 40px rgba(0, 0, 0, 0.4),
    0 0 0 2px var(--accent);
}

.pl .cover {
  display: grid;
  aspect-ratio: 1;
  background: linear-gradient(135deg, #2a2f55, #4b2a66) center / cover;
  font-size: 44px;
  place-items: center;
}

.pl .meta {
  padding: 12px 14px 14px;
}

.pl .meta b,
.pl .meta span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pl .meta span {
  color: var(--muted);
  font-size: 12px;
}

.pl .acts {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.2s;
}

.pl:hover .acts,
.pl .acts .faved {
  opacity: 1;
}

.pl .acts span {
  display: grid;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(10, 12, 24, 0.7);
  backdrop-filter: blur(8px);
  font-size: 15px;
  place-items: center;
}

.pl .play-badge {
  position: absolute;
  bottom: 70px;
  left: 12px;
  display: grid;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 20px rgba(123, 139, 255, 0.5);
  opacity: 0;
  place-items: center;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s;
}

.pl:hover .play-badge,
.pl.playing .play-badge {
  opacity: 1;
  transform: none;
}

.tracks {
  max-height: 420px;
  overflow-y: auto;
}

.track {
  display: flex;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: var(--r-sm);
  background: none;
  text-align: left;
}

.track:hover {
  background: rgba(255, 255, 255, 0.06);
}

.track.on {
  background: rgba(123, 139, 255, 0.18);
}

.track img,
.track .noimg {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #2a2f55;
  object-fit: cover;
}

.track .n {
  width: 22px;
  color: var(--faint);
  font-size: 12px;
  text-align: right;
}

.track .grow {
  flex: 1;
  min-width: 0;
}

.track .grow b,
.track .grow span {
  display: block;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track .grow span {
  color: var(--muted);
  font-size: 12px;
}

/* --- Мини-плеер внизу --- */
.player {
  position: fixed;
  right: 18px;
  bottom: 18px;
  left: calc(var(--side) + 36px);
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr);
  gap: 18px;
  align-items: center;
  height: var(--player);
  padding: 0 18px;
  border-radius: var(--r-lg);
}

.player .now {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.player .art {
  flex: none;
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: linear-gradient(135deg, #2a2f55, #4b2a66) center / cover;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.player.is-playing .art {
  animation: breathe 2.4s ease-in-out infinite;
}

@keyframes breathe {
  50% {
    box-shadow: 0 6px 30px rgba(123, 139, 255, 0.55);
  }
}

.player .title {
  min-width: 0;
  line-height: 1.3;
}

.player .title b,
.player .title span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player .title b {
  font-size: 14px;
}

.player .title span {
  color: var(--muted);
  font-size: 12px;
}

.player .center {
  display: grid;
  gap: 6px;
  justify-items: center;
  width: min(520px, 42vw);
}

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

.ctl {
  display: grid;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--muted);
  font-size: 16px;
  place-items: center;
  transition: color 0.2s, background 0.2s;
}

.ctl:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.ctl.main-btn {
  width: 46px;
  height: 46px;
  background: #fff;
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.2);
  color: #0b0d18;
  font-size: 18px;
}

.ctl.main-btn:hover {
  background: #fff;
  transform: scale(1.05);
}

.ctl.on {
  color: var(--accent);
}

.seek {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  color: var(--faint);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.range {
  flex: 1;
  height: 4px;
  border-radius: 4px;
  outline: none;
  background: linear-gradient(90deg, var(--accent) var(--p, 0%), rgba(255, 255, 255, 0.15) var(--p, 0%));
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.range::-webkit-slider-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(123, 139, 255, 0.3);
  appearance: none;
  -webkit-appearance: none;
}

.range::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: #fff;
}

.player .right {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.player .right .range {
  flex: none;
  width: 110px;
}

/* --- Уведомление --- */
.toast {
  position: fixed;
  bottom: calc(var(--player) + 34px);
  left: 50%;
  z-index: 20;
  padding: 12px 18px;
  border: 1px solid var(--edge);
  border-radius: var(--r-sm);
  background: var(--glass-strong);
  backdrop-filter: var(--blur);
  font-weight: 600;
  transform: translateX(-50%);
  animation: rise 0.3s;
}

/* --- Телефон и планшет --- */
@media (max-width: 960px) {
  :root {
    --player: 132px;
  }

  .shell {
    grid-template-columns: 1fr;
    padding: 12px 12px calc(var(--player) + 24px);
  }

  .side {
    position: fixed;
    top: 12px;
    bottom: 12px;
    left: 12px;
    z-index: 10;
    width: min(300px, calc(100vw - 24px));
    height: auto;
    background: var(--glass-strong);
    transform: translateX(-120%);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  }

  .side.open {
    transform: none;
  }

  .burger {
    display: grid;
    place-items: center;
  }

  .topbar {
    position: sticky;
    top: 12px;
    z-index: 6;
    padding: 10px 12px;
  }

  .topbar h1 {
    font-size: 18px;
  }

  .clock {
    display: none;
  }

  .player {
    right: 12px;
    bottom: 12px;
    left: 12px;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 6px 12px;
    padding: 12px 14px;
  }

  .player .center {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
  }

  .player .controls {
    display: none;
  }

  .player .right .range {
    display: none;
  }

  .player .mobile-ctl {
    display: flex !important;
  }

  .frame-wrap iframe {
    height: calc(100dvh - var(--player) - 120px);
  }

  .card {
    padding: 16px;
  }

  .add-pl {
    flex-direction: column;
  }

  .pl-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .pl .acts {
    opacity: 1;
  }
}

.mobile-ctl {
  display: none;
  gap: 4px;
  align-items: center;
}

.scrim {
  position: fixed;
  inset: 0;
  z-index: 9;
  background: rgba(0, 0, 0, 0.4);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
