/* Витрина функций: раскладка демо и элементы Discord-интерфейса (модалка, эфемерные панели). */
.page-head { padding: 72px 0 40px; }
.demo-bar + section { border-top: 0; }
section[id] { scroll-margin-top: 112px; }
.page-head h1 { font-size: clamp(32px, 5vw, 52px); margin-top: 16px; font-weight: 700; letter-spacing: -0.03em; }
.page-head p { color: var(--text-2); font-size: 18px; margin-top: 16px; max-width: 640px; }
/* Навигация по демо прилипает под шапкой и подсвечивает раздел, который сейчас на экране. */
.demo-bar {
  position: sticky; top: 60px; z-index: 15; border-bottom: 1px solid var(--line);
  background: rgba(7, 7, 11, 0.78); backdrop-filter: saturate(140%) blur(10px);
}
.demo-nav { position: relative; display: flex; gap: 4px; padding: 10px 0; overflow-x: auto; scrollbar-width: none; }
.demo-nav::-webkit-scrollbar { display: none; }
.demo-nav a {
  position: relative; z-index: 1; flex: none; text-decoration: none; font-size: 14px; padding: 7px 12px; border-radius: 999px;
  color: var(--muted); transition: color .25s var(--ease);
}
.demo-nav a:hover, .demo-nav a.active { color: var(--text); }
.demo-pill {
  position: absolute; z-index: 0; top: 10px; height: calc(100% - 20px); left: 0; width: 0; border-radius: 999px;
  background: var(--accent-soft); border: 1px solid rgba(109, 74, 255, 0.45); opacity: 0;
  transition: transform .45s var(--ease-out), width .45s var(--ease-out), opacity .25s var(--ease);
}

.demo { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 56px; align-items: start; }
.demo-text h2 { font-size: clamp(24px, 3.2vw, 34px); margin-top: 14px; }
.demo-text > p { color: var(--text-2); margin-top: 14px; }
.steps { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; font-size: 14px; color: var(--text-2); }
.steps li { display: grid; grid-template-columns: 16px 1fr; gap: 10px; }
.steps li::before { content: ''; width: 6px; height: 6px; margin: 8px 0 0 4px; border-radius: 1px; background: var(--grad); }
.try { margin-top: 20px !important; font-size: 14px; color: var(--muted) !important; padding-left: 12px; border-left: 2px solid var(--line-2); }
.demo-dc { position: relative; min-height: 420px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#web .scene { margin-bottom: 16px; min-height: 0; }
.cell-link { text-decoration: none; color: inherit; display: block; }
.muted-sm { color: var(--muted); font-size: 13px; }
.row-actions { display: flex; align-items: center; gap: 12px; margin-top: 12px; }

/* ---------- вкладки каналов ---------- */
.dc-tabs { gap: 4px; padding: 8px 10px; }
.dc-tab { background: transparent; border: 0; color: var(--dc-muted); font: 600 14px/1 inherit; padding: 8px 10px; border-radius: 4px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; font-family: inherit; }
.dc-tab .hash { font-size: 18px; }
.dc-tab:hover { color: var(--dc-text); background: rgba(79, 84, 92, 0.32); }
.dc-tab.active { color: #fff; background: rgba(79, 84, 92, 0.6); }

/* ---------- эфемерные сообщения ---------- */
.dc-ephemeral { background: rgba(88, 101, 242, 0.08); border-left: 2px solid var(--dc-blurple); padding: 10px 12px; border-radius: 4px; font-size: 14px; animation: rise .4s var(--ease-out); }
.eph-note { font-size: 12px; color: var(--dc-muted); }
.eph-title { font-weight: 700; color: #f2f3f5; margin: 6px 0 10px; }
.eph-step { font-size: 13px; font-weight: 600; color: #f2f3f5; margin: 12px 0 6px; }
.dc-panel .dc-label { margin-top: 0; }

.dc-log { display: grid; gap: 10px; }
.dc-log .dc-msg { animation: rise .35s var(--ease); }

/* ---------- модальное окно Discord ---------- */
.dc-modal-wrap { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.6); display: grid; place-items: center; padding: 16px; z-index: 2; animation: fade .2s var(--ease); }
.dc-modal { width: 100%; max-width: 440px; background: var(--dc-bg); border-radius: 8px; padding: 16px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5); animation: pop .25s var(--ease); max-height: 100%; overflow: auto; }
.dc-modal-head { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 18px; color: #f2f3f5; margin-bottom: 8px; }
.dc-x { background: transparent; border: 0; color: var(--dc-muted); font-size: 22px; cursor: pointer; line-height: 1; }
.dc-label { display: grid; gap: 6px; margin-top: 14px; font-size: 12px; font-weight: 700; text-transform: uppercase; color: #b5bac1; letter-spacing: .02em; }
.dc-label i { color: var(--dc-red); font-style: normal; }
.dc-input, .dc-select {
  width: 100%; font: 15px/1.4 inherit; font-family: inherit; color: var(--dc-text); background: var(--dc-bg-3);
  border: 1px solid transparent; border-radius: 4px; padding: 9px 10px; text-transform: none; letter-spacing: 0; resize: vertical; outline: none;
  transition: border-color .15s var(--ease);
}
.dc-input:focus, .dc-select:focus { border-color: var(--dc-blurple); }
.dc-error { color: #fa777c; font-size: 13px; margin-top: 10px; }
.dc-modal-foot { display: flex; justify-content: flex-end; gap: 12px; margin-top: 16px; background: var(--dc-bg-2); margin: 16px -16px -16px; padding: 14px 16px; border-radius: 0 0 8px 8px; }
.dc-link { background: transparent; border: 0; color: #fff; font: 500 14px inherit; font-family: inherit; cursor: pointer; }
.dc-link:hover { text-decoration: underline; }

/* ---------- сегменты ---------- */
.seg { display: inline-flex; background: var(--dc-bg-3); border-radius: 6px; padding: 3px; gap: 2px; margin-bottom: 8px; }
.seg-btn { background: transparent; border: 0; color: var(--dc-muted); font: 500 13px/1 inherit; font-family: inherit; padding: 7px 10px; border-radius: 4px; cursor: pointer; transition: background .15s var(--ease), color .15s var(--ease); }
.seg-btn.active { background: var(--dc-grey); color: #fff; }

/* ---------- список с анимацией перестановки (FLIP) ---------- */
.rows { min-height: 26px; }

/* ---------- панель игроков (демо тиров) ---------- */
.roster-ctl { margin-top: 24px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg-1); }
.roster-ctl-head { display: flex; justify-content: space-between; padding: 10px 14px; font: 500 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); border-bottom: 1px solid var(--line); }
.player { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 8px 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
.player:last-child { border-bottom: 0; }
.player .pname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tiers { display: inline-flex; background: var(--bg-3); border-radius: 6px; padding: 2px; gap: 1px; }
.tiers button { background: transparent; border: 0; color: var(--muted); font: 600 11px/1 var(--mono); padding: 6px 7px; border-radius: 4px; cursor: pointer; transition: background .15s var(--ease), color .15s var(--ease); }
.tiers button.active { background: var(--line-2); color: var(--text); }
.tiers button.active[data-tier='1'] { background: rgba(109, 74, 255, 0.32); color: #d2c8ff; }
.tiers button.active[data-tier='2'] { background: rgba(61, 123, 255, 0.28); color: #b0cbff; }
.tiers button.active[data-tier='3'] { background: rgba(56, 189, 248, 0.18); color: #a4e0f2; }
.player { transition: background .25s var(--ease); }
.player:hover { background: var(--bg-2); }
.join { min-width: 108px; }
.join.on { border-color: rgba(61, 123, 255, 0.5); color: var(--blue-text); }

/* Кольцо-подсказка вокруг кнопки, которую стоит нажать (до первого нажатия). */
.dc-btn.nudge { animation: nudge 2.2s var(--ease) infinite; }
@keyframes nudge {
  0% { box-shadow: 0 0 0 0 rgba(132, 103, 255, 0.55); }
  70%, 100% { box-shadow: 0 0 0 10px rgba(132, 103, 255, 0); }
}


@media (max-width: 980px) {
  .demo { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}
@media (max-width: 720px) {
  .grid.two { grid-template-columns: minmax(0, 1fr); }
  .player { grid-template-columns: minmax(0, 1fr) auto; }
  .player .join { grid-column: 1 / -1; width: 100%; }
}
