/* «Стримы» (/strimy): витрина эфиров, плеер в модалке, как попасть на страницу, недавние эфиры. */

.page-streams { --st-twitch: #a970ff; --st-youtube: #ff4e45; --st-vk: #2f8cff; }

/* ---------- шапка ---------- */

.strm-head { align-items: flex-end; }
.strm-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--grad-surface);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}
.strm-status b { color: var(--ink); font-size: 16px; }
.strm-status .live-pill-dot { width: 9px; height: 9px; }
.strm-status.is-on { color: var(--ink-2); border-color: rgba(229, 72, 107, 0.4); box-shadow: 0 0 0 1px rgba(229, 72, 107, 0.12) inset, 0 10px 30px rgba(229, 72, 107, 0.12); }

/* ---------- сетка эфиров ---------- */

.strm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: clamp(18px, 2vw, 26px) clamp(14px, 1.6vw, 22px);
}
@media (min-width: 900px) {
  .strm-grid .strm-card.is-hero { grid-column: span 2; grid-row: span 2; }
  .strm-grid .strm-card.is-hero .strm-title { font-size: 19px; }
  .strm-grid .strm-card.is-hero .strm-ava { --ava: 48px; }
  .strm-grid.is-single { grid-template-columns: minmax(0, 960px); }
  .strm-grid.is-single .strm-card.is-hero { grid-column: auto; grid-row: auto; }
}

.strm-card { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.strm-thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background:
    radial-gradient(120% 90% at 20% 0%, rgba(229, 72, 107, 0.22), transparent 60%),
    radial-gradient(100% 90% at 100% 100%, rgba(217, 183, 122, 0.18), transparent 60%),
    var(--surface-solid);
  color: #fff;
  cursor: pointer;
  box-shadow: var(--shadow-1);
  transition: transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease);
}
.strm-thumb-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-3) var(--ease); }
.strm-thumb-img.is-missing { display: none; }
.strm-thumb-glow { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7, 6, 10, 0.55) 0%, transparent 28%, transparent 58%, rgba(7, 6, 10, 0.78) 100%); pointer-events: none; }
.strm-thumb:hover, .strm-thumb:focus-visible { border-color: var(--line-2); box-shadow: var(--glow-gold); transform: translateY(-2px); }
.strm-thumb:hover .strm-thumb-img { transform: scale(1.04); }
.strm-thumb:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.strm-card.is-featured .strm-thumb { border-color: rgba(217, 183, 122, 0.55); box-shadow: 0 0 0 1px rgba(217, 183, 122, 0.35), 0 14px 44px rgba(217, 183, 122, 0.16); }

.strm-top { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; align-items: center; gap: 6px; }
.strm-bottom { position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.strm-pick {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 25px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--grad-gold);
  color: #1b1206;
  font-size: 11px;
  font-weight: 800;
}
.strm-pick .ico { width: 13px; height: 13px; }
.strm-plat {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-left: auto;
  border-radius: 8px;
  background: rgba(7, 6, 10, 0.62);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14) inset;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.strm-plat .ico { width: 16px; height: 16px; }
.strm-plat--twitch { color: var(--st-twitch); }
.strm-plat--youtube { color: var(--st-youtube); }
.strm-plat--vk { color: var(--st-vk); }
.strm-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 9px;
  border-radius: var(--r-pill);
  background: rgba(7, 6, 10, 0.66);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #f5ede1;
  font-size: 12px;
  font-weight: 700;
}
.strm-chip .ico { width: 14px; height: 14px; opacity: 0.85; }
.strm-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin: -31px 0 0 -31px;
  border-radius: 50%;
  background: var(--grad-gold);
  color: #1b1206;
  box-shadow: 0 10px 34px rgba(217, 183, 122, 0.45);
  opacity: 0;
  transform: scale(0.85);
  transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease-spring);
}
.strm-play .ico { width: 24px; height: 24px; margin-left: 3px; }
.strm-thumb:hover .strm-play, .strm-thumb:focus-visible .strm-play { opacity: 1; transform: scale(1); }
@media (hover: none) {
  .strm-play { opacity: 0.92; transform: scale(0.78); }
}

.strm-body { display: flex; gap: 12px; min-width: 0; }
.strm-ava {
  --ava: 40px;
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: var(--ava);
  height: var(--ava);
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(217, 183, 122, 0.3), rgba(229, 72, 107, 0.28));
  box-shadow: 0 0 0 1px var(--line-2), 0 0 0 3px rgba(7, 6, 10, 0.6);
}
.strm-ava b { font-family: var(--display); font-size: calc(var(--ava) * 0.5); font-weight: 700; color: var(--gold-2); }
.strm-ava img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.strm-ava img.is-missing { display: none; }
.strm-info { min-width: 0; display: grid; gap: 3px; }
.strm-title {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.strm-who { margin: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; font-size: 13.5px; }
.strm-name { color: var(--ink-2); font-weight: 600; overflow-wrap: anywhere; }
.strm-name:hover { color: var(--gold-2); }
.strm-player-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--r-pill);
  background: rgba(217, 183, 122, 0.1);
  box-shadow: 0 0 0 1px var(--line) inset;
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
}
.strm-player-tag .ico { width: 12px; height: 12px; }
.strm-cat { margin: 0; color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }

/* ---------- пусто ---------- */

.strm-empty {
  display: flex;
  align-items: center;
  gap: clamp(20px, 4vw, 44px);
  padding: clamp(26px, 5vw, 56px) clamp(20px, 5vw, 64px);
  overflow: hidden;
}
.strm-empty::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 120% at 0% 50%, rgba(229, 72, 107, 0.14), transparent 70%), radial-gradient(50% 100% at 100% 0%, rgba(217, 183, 122, 0.1), transparent 70%);
  pointer-events: none;
}
.strm-empty-mark {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: clamp(88px, 12vw, 128px);
  aspect-ratio: 1;
  border-radius: 50%;
  color: var(--gold-2);
  background: radial-gradient(circle, rgba(217, 183, 122, 0.16), rgba(7, 6, 10, 0.4) 70%);
  box-shadow: 0 0 0 1px var(--line-2), 0 0 0 10px rgba(217, 183, 122, 0.05), 0 0 0 22px rgba(217, 183, 122, 0.025);
}
.strm-empty-mark .ico { width: 46%; height: 46%; filter: drop-shadow(0 0 12px rgba(217, 183, 122, 0.5)); }
.strm-empty-text { position: relative; min-width: 0; }
.strm-empty-text h2 { margin: 0; }
.strm-empty-text p { margin: 12px 0 0; max-width: 56ch; color: var(--ink-2); font-size: clamp(15.5px, 1.3vw, 17.5px); line-height: 1.6; }
.strm-empty-text p b { color: var(--gold-2); }
.strm-empty-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
@media (max-width: 640px) {
  .strm-empty { flex-direction: column; text-align: center; }
  .strm-empty-cta { justify-content: center; }
  .strm-empty-cta .btn { width: 100%; }
}

.strm-where { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 24px 0 0; color: var(--muted); font-size: 13.5px; }
.strm-where-p {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font-weight: 600;
}
.strm-where-p .ico { width: 15px; height: 15px; }
.strm-where-p.strm-plat--twitch .ico { color: var(--st-twitch); }
.strm-where-p.strm-plat--youtube .ico { color: var(--st-youtube); }
.strm-where-p.strm-plat--vk .ico { color: var(--st-vk); }

/* ---------- как попасть ---------- */

.strm-join { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: start; scroll-margin-top: calc(var(--nav-h, 72px) + 16px); }
@media (min-width: 960px) {
  .strm-join { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
}
.strm-join h2 { margin-top: 8px; }
.strm-steps { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 14px; counter-reset: st; }
.strm-steps li {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 2px 0 2px 58px;
  counter-increment: st;
  color: var(--ink-2);
  line-height: 1.55;
}
.strm-steps li::before {
  content: counter(st);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: radial-gradient(circle at 30% 25%, rgba(217, 183, 122, 0.22), rgba(7, 6, 10, 0.5));
  color: var(--gold-2);
  font-family: var(--display);
  font-size: 22px;
  font-weight: 700;
}
.strm-steps b { color: var(--ink); font-size: 16px; }
.strm-steps code, .strm-form code { padding: 1px 6px; border-radius: 6px; background: rgba(217, 183, 122, 0.1); color: var(--gold-2); font-family: var(--mono); font-size: 0.88em; overflow-wrap: anywhere; }
.strm-tip { display: flex; gap: 10px; align-items: flex-start; margin: 22px 0 0; padding: 14px 16px; border-radius: var(--r-md); border: 1px dashed var(--line-2); color: var(--ink-2); font-size: 14px; line-height: 1.5; }
.strm-tip .ico { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--gold); }

.strm-form { display: grid; gap: 16px; padding: clamp(18px, 2.6vw, 30px); }
.strm-form h3 { margin: 0; }
.strm-form > .muted { margin: -6px 0 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.strm-form .strm-field { display: grid; gap: 7px; }
.strm-form .strm-field .label { margin: 0; }
.strm-form input[type="text"] { width: 100%; }
.strm-check { display: flex; align-items: flex-start; gap: 12px; color: var(--ink-2); font-size: 14px; line-height: 1.45; cursor: pointer; }
.strm-check input { flex: none; margin-top: 1px; }
.strm-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.strm-form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.strm-form-msg { margin: 0; min-height: 1em; font-size: 14px; line-height: 1.45; color: var(--muted); }
.strm-form-msg:empty { display: none; }
.strm-form-msg.is-ok { color: var(--ok); }
.strm-form-msg.is-err { color: var(--danger); }
@media (max-width: 520px) {
  .strm-form-foot .btn { width: 100%; }
}

/* ---------- недавние ---------- */

.strm-recent-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 12px; }
.strm-recent-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-md); color: inherit; transition: border-color var(--dur-2) var(--ease), transform var(--dur-2) var(--ease); }
.strm-recent-item:hover { border-color: var(--line-2); transform: translateY(-1px); }
.strm-recent-item .strm-ava { --ava: 44px; }
.strm-recent-text { display: grid; gap: 2px; min-width: 0; flex: 1; }
.strm-recent-name { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--ink); font-size: 14.5px; }
.strm-recent-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.strm-plat-mini { display: inline-grid; flex: none; }
.strm-plat-mini .ico { width: 14px; height: 14px; }
.strm-recent-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); font-size: 13.5px; }
.strm-recent-meta { color: var(--muted); font-size: 12.5px; }
.strm-recent-go { flex: none; width: 18px; height: 18px; color: var(--faint); }

/* ---------- плеер ---------- */

html.strm-lock { overflow: hidden; }
.strm-dlg {
  width: min(1320px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  background: var(--surface-solid);
  color: var(--ink);
  box-shadow: var(--shadow-2), 0 0 80px rgba(217, 183, 122, 0.08);
  overflow: hidden;
}
.strm-dlg::backdrop { background: rgba(4, 3, 6, 0.84); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.strm-dlg[open] { animation: strm-in var(--dur-2) var(--ease); }
@keyframes strm-in { from { opacity: 0; transform: translateY(10px) scale(0.985); } }
.strm-dlg-box { display: flex; flex-direction: column; max-height: inherit; }
.strm-dlg-top { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 16px; border-bottom: 1px solid var(--line); }
.strm-dlg-who { display: grid; min-width: 0; flex: 1; }
.strm-dlg-who b { font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.strm-dlg-who span { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.strm-dlg-open { flex: none; }
.strm-dlg-together { flex: none; }
.strm-dlg-together[hidden] { display: none; }
.strm-dlg-x { flex: none; }
.strm-dlg-body { display: grid; grid-template-columns: minmax(0, 1fr); background: #000; min-height: 0; }
.strm-dlg-body.has-chat { grid-template-columns: minmax(0, 1fr) 340px; }
.strm-dlg-frame { position: relative; aspect-ratio: 16 / 9; max-height: calc(100dvh - 120px); }
.strm-dlg-frame iframe, .strm-dlg-chat iframe { display: block; width: 100%; height: 100%; border: 0; background: #000; }
.strm-dlg-chat { border-left: 1px solid var(--line); background: var(--bg-2); min-height: 0; }
@media (max-width: 1099px) {
  .strm-dlg-body.has-chat { grid-template-columns: minmax(0, 1fr); }
  .strm-dlg-chat { display: none; }
}
@media (max-width: 700px) {
  .strm-dlg {
    width: 100vw;
    max-height: 100dvh;
    margin: auto 0 0;
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    border-width: 1px 0 0;
  }
  .strm-dlg-top { padding: 10px 8px 10px 14px; gap: 10px; }
  .strm-dlg-open span { display: none; }
  .strm-dlg-open { width: 40px; padding: 0; justify-content: center; }
  .strm-dlg-body { padding-bottom: env(safe-area-inset-bottom); }
}

@media (prefers-reduced-motion: reduce) {
  .strm-status .live-pill-dot::after { animation: none; }
  .strm-thumb, .strm-thumb-img, .strm-play, .strm-dlg[open] { transition: none; animation: none; }
}

/* Эфир без превью: знак эфира по центру вместо картинки. */
.strm-thumb-ph { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(241, 217, 166, 0.22); }
.strm-thumb-ph .ico { width: 30%; height: 30%; }
.strm-thumb:hover .strm-thumb-ph { color: rgba(241, 217, 166, 0.1); }
