/* Страница «🎬 Видео» (/video): шапка 56 px, слева список роликов (листается внутри), справа проигрыватель */
html, body { height: 100%; }
body.vd-page { margin: 0; display: flex; flex-direction: column; overflow: hidden; background: #010409; color: #e6edf3; font: 15px/1.5 Inter, system-ui, "Segoe UI", Roboto, sans-serif; }
.hidden { display: none !important; }
.vd-brand { font-size: 15px; white-space: nowrap; }
.vd-brand b { font-weight: 700; }
.vd-brand-sub { color: #8b949e; }
.vd-wrap { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(300px, 380px) 1fr; gap: 16px; padding: 16px clamp(12px, 2vw, 24px); }
.vd-side { min-height: 0; display: flex; flex-direction: column; gap: 12px; }
.vd-main { min-height: 0; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.vd-empty { margin: 32px auto; max-width: 420px; color: #8b949e; text-align: center; }

/* добавить ролик */
.vd-add { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid #30363d; border-radius: 10px; background: #0d1117; }
.vd-add-row { display: flex; gap: 8px; align-items: center; }
.vd-add input[type=url], .vd-modal input { flex: 1; min-width: 0; height: 34px; padding: 0 10px; border: 1px solid #3d444d; border-radius: 7px; background: #010409; color: #e6edf3; font: 14px Inter, system-ui, sans-serif; }
.vd-add input:focus, .vd-modal input:focus { outline: none; border-color: #1f6feb; box-shadow: 0 0 0 3px rgba(31, 111, 235, .25); }
.vd-hint { color: #8b949e; font-size: 12.5px; line-height: 1.35; }
.vd-btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid #3d444d; border-radius: 7px; background: #21262d; color: #e6edf3; font: 600 13px/1 Inter, system-ui, sans-serif; white-space: nowrap; cursor: pointer; }
.vd-btn:hover { border-color: #8b949e; background: #30363d; }
.vd-btn.primary { border-color: #238636; background: #238636; color: #fff; }
.vd-btn.primary:hover { background: #2ea043; }
.vd-btn.danger:hover { border-color: #f85149; background: rgba(248, 81, 73, .15); }

/* список */
.vd-list { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding-right: 4px; scrollbar-gutter: stable; }
.vd-item { display: grid; grid-template-columns: 132px 1fr; gap: 10px; padding: 8px; border: 1px solid #30363d; border-radius: 10px; background: #0d1117; color: inherit; text-align: left; font: inherit; cursor: pointer; }
.vd-item:hover { border-color: #3d444d; background: #161b22; }
.vd-item.active { border-color: #1f6feb; background: #161b22; box-shadow: inset 3px 0 0 #1f6feb; }
.vd-item.wait .vd-thumb { opacity: .6; }
.vd-thumb { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: #161b22; }
.vd-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vd-noimg { display: grid; place-items: center; height: 100%; font-size: 26px; }
.vd-dur { position: absolute; right: 4px; bottom: 4px; padding: 1px 5px; border-radius: 4px; background: rgba(0, 0, 0, .8); font: 600 11px/1.4 "JetBrains Mono", monospace; }
.vd-meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.vd-title { font-size: 13.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vd-ch { color: #8b949e; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vd-st { color: #8b949e; font-size: 12px; line-height: 1.3; }
.vd-st.open { color: #3fb950; }
.vd-st.err { color: #f85149; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.vd-bar { display: block; height: 4px; border-radius: 2px; background: #30363d; overflow: hidden; }
.vd-bar i { display: block; height: 100%; background: #1f6feb; transition: width .4s; }

/* проигрыватель */
.vd-stage { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; border: 1px solid #30363d; border-radius: 12px; background: #000; overflow: hidden; }
.vd-stage video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.vd-full { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border: 1px solid rgba(255, 255, 255, .25); border-radius: 8px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 18px; cursor: pointer; opacity: .6; transition: opacity .2s; }
.vd-stage:hover .vd-full { opacity: 1; }
.vd-info-row { display: flex; align-items: flex-start; gap: 12px; }
.vd-info h1 { flex: 1; margin: 0; font-size: 18px; line-height: 1.3; }
.vd-sub { margin: 2px 0 0; color: #8b949e; font-size: 13px; }
.vd-src { color: #58a6ff; text-decoration: none; }
.vd-src:hover { text-decoration: underline; }
.vd-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.vd-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #e6edf3; cursor: pointer; white-space: nowrap; }
.vd-check input { width: 16px; height: 16px; accent-color: #238636; }

.vd-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; max-width: min(560px, 90vw); padding: 10px 16px; border: 1px solid #3d444d; border-radius: 10px; background: #161b22; box-shadow: 0 8px 24px rgba(0, 0, 0, .5); font-size: 14px; }
.vd-modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: rgba(1, 4, 9, .7); }
.vd-modal-box { display: flex; flex-direction: column; gap: 10px; width: min(480px, 90vw); padding: 16px; border: 1px solid #3d444d; border-radius: 12px; background: #161b22; }
.vd-modal-box input { flex: none; }

@media (max-width: 860px) {
  body.vd-page { overflow: auto; display: block; }
  .vd-wrap { display: flex; flex-direction: column-reverse; padding: 12px; }
  .vd-stage { aspect-ratio: 16 / 9; flex: none; }
  .vd-list { overflow: visible; }
  .vd-brand-sub { display: none; }
}

/* показ всем */
.vd-st.live { color: #ff7b72; font-weight: 600; }
.vd-btn.live { border-color: #8957e5; background: #6e40c9; color: #fff; }
.vd-btn.live:hover { background: #8957e5; }
.vd-btn.stop { border-color: #da3633; background: #b62324; color: #fff; }
.vd-btn.stop:hover { background: #da3633; }
.vd-air { margin: 6px 0 0; padding: 8px 12px; border: 1px solid rgba(248, 81, 73, .4); border-radius: 8px; background: rgba(248, 81, 73, .08); color: #e6edf3; font-size: 13px; }
.vd-air > b:first-child { color: #ff7b72; }
