/* Views: шапка + вторичные страницы. Использует переменные главной (style.css): --bg, --card, --accent, --text, --muted, --border, --radius. */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: 56px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: rgba(14, 17, 22, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.1px;
}

.brand-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-line);
  flex-shrink: 0;
}

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

.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 9px;
}

.nav-link:hover {
  color: var(--text);
  background: var(--card2, #1c2330);
}

.hbtn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  padding: 7px 13px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card, #161b22);
}

.hbtn:hover { border-color: var(--accent); }

.hbtn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #0e1116;
}

.hbtn img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
}

.hbtn span.uname {
  max-width: 130px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Главная (app.js) — опускаем ниже фиксированной шапки, сам плеер не трогаем */
.wrap {
  padding-top: 68px;
  padding-bottom: 12px;
}

/* Контейнер вторичных страниц */
#view {  position: fixed;
  inset: 56px 0 0 0;
  z-index: 1;
  overflow-y: auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 20px 12px 40px;
}

#view[hidden] { display: none; }

.vcol {
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vcard {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.vcard h2 {
  margin: 0 0 4px;
  font-size: 18px;
}

.vcard p.sub {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.vrow { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.vinput {
  flex: 1;
  min-width: 160px;
  background: var(--card2, #1c2330);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
}

.vinput:focus { border-color: var(--accent); }

.vbtn {
  background: var(--accent);
  color: #0e1116;
  border: 1px solid var(--accent);
  border-radius: 10px;
  padding: 9px 16px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
}

.vbtn:hover { filter: brightness(1.07); }
.vbtn:disabled { opacity: 0.5; cursor: default; }

.vbtn.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.vbtn.ghost:hover { border-color: var(--accent); }

.vbtn.danger {
  background: transparent;
  color: #f85149;
  border: 1px solid var(--border);
}

.vbtn.danger:hover { border-color: #f85149; }

.vbtn.small { padding: 6px 10px; font-size: 12.5px; border-radius: 8px; }

.vlist { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }

.vitem {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 11px;
}

.vitem:hover { background: var(--card2, #1c2330); }

.vitem .meta { flex: 1; min-width: 0; }
.vitem .t { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vitem .a { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vitem .d { font-size: 12px; color: var(--muted); flex-shrink: 0; }

.vitem .ops { display: flex; gap: 4px; flex-shrink: 0; }

.iconbtn {
  background: none;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  padding: 5px 7px;
  font-size: 14px;
  line-height: 1;
}

.iconbtn:hover { color: var(--accent); border-color: var(--border); }

.plink { color: var(--text); text-decoration: none; flex: 1; min-width: 0; }
.plink:hover .t { text-decoration: underline; }

.notice {
  background: var(--card2, #1c2330);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 10px;
  padding: 11px 13px;
  font-size: 13px;
  line-height: 1.55;
}

.notice.disabled {
  background: #1a1e26;
  color: var(--muted);
}

.sharebox {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  align-items: center;
}

.sharebox code {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  background: var(--card2, #1c2330);
  border: 1px solid var(--border);
  padding: 9px 10px;
  border-radius: 9px;
  color: var(--accent);
}

.profile-top { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.profile-top img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border); }
.profile-top .nm { font-size: 16px; font-weight: 700; margin: 0; }
.profile-top .em { font-size: 13px; color: var(--muted); margin: 2px 0 0; }

.stat-row { display: flex; gap: 8px; margin: 12px 0; }
.stat { flex: 1; background: var(--card2, #1c2330); border: 1px solid var(--border); border-radius: 10px; padding: 10px; text-align: center; }
.stat b { display: block; font-size: 18px; }
.stat span { font-size: 11.5px; color: var(--muted); }

.upl-progress { font-size: 12.5px; color: var(--muted); margin-top: 8px; line-height: 1.7; white-space: pre-wrap; }

/* Компактный плеер комнаты (стили в духе главной) */
.room-card { text-align: center; padding: 24px 22px; }
.room-card .rtitle { margin: 0; font-size: 19px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room-card .rartist { margin: 4px 0 0; color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room-card .time-row { width: 100%; display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin: 16px 0 6px; font-variant-numeric: tabular-nums; }
.room-card input[type="range"] { width: 100%; }
.room-card input[type="range"]:disabled { opacity: 0.35; cursor: default; }
.room-card .controls { display: flex; gap: 16px; margin-top: 16px; justify-content: center; }
.room-card .controls .btn { width: 58px; height: 58px; transition: background-color 0.6s ease, border-color 0.6s ease, transform 0.12s; }
.room-card .controls .btn:disabled { opacity: 0.35; cursor: default; transform: none; }
.room-card .volume-row { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 16px; color: var(--muted); }
.room-card .rlist { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; max-height: 280px; overflow-y: auto; overflow-x: hidden; text-align: left; scrollbar-width: none; }
.room-card .rlist::-webkit-scrollbar { display: none; }
.room-card .rlist .vitem { padding: 13px 14px; }
.room-card .rconn { margin-top: 12px; font-size: 12px; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 6px; }
.room-card .rdot { width: 8px; height: 8px; border-radius: 50%; background: #f0a35e; display: inline-block; }
.room-card .rdot.on { background: #7ee787; box-shadow: 0 0 8px #7ee787; }
.room-card .rdot.off { background: #f85149; }

@media (max-width: 520px) {
  .hbtn span.uname { display: none; }
  .nav-link { padding: 8px 6px; }
}

.vdetails {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
}
.vdetails summary {
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  list-style: none;
}
.vdetails summary::-webkit-details-marker { display: none; }
.vdetails summary::before { content: "+ "; color: var(--accent); }
.vdetails[open] summary::before { content: "– "; }
