/* Social, Shorts, channel, studio and watch-party components. */
.video-shell .video-action-pill.active { color: var(--v-accent); border-color: rgba(79,195,247,.4); background: var(--v-accent-dim); }
.video-shell .video-comment-like { display: inline-flex; align-items: center; gap: 5px; margin-top: 7px; padding: 4px 8px; border: 1px solid var(--v-border); border-radius: 7px; background: var(--v-card2); color: var(--v-muted); font-size: .72rem; cursor: pointer; }
.video-shell .video-comment-like.active { color: #ff8aa4; border-color: rgba(255,125,156,.4); }
.video-shell .video-comment-like .svg-icon { width: 13px; height: 13px; }
.video-shell .video-comment-gif { display: block; max-width: min(420px, 100%); max-height: 420px; margin-top: 8px; border-radius: 10px; border: 1px solid var(--v-border2); }
.video-shell .video-gif-picker { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border: 1px solid var(--v-border2); border-radius: 7px; color: var(--v-accent); font-size: .72rem; font-weight: 800; cursor: pointer; }
.video-shell .video-gif-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.video-shell .video-comment-gif-preview { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 7px; border: 1px solid var(--v-border); border-radius: 8px; background: var(--v-card2); font-size: .74rem; }
.video-shell .video-comment-gif-preview[hidden] { display: none; }
.video-shell .video-comment-gif-preview img { width: 54px; height: 38px; object-fit: cover; border-radius: 5px; }

/* Modal, share and context menu */
.video-modal-backdrop { position: fixed; inset: 0; z-index: 5500; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(3,6,14,.78); backdrop-filter: blur(8px); }
.video-modal-backdrop.open { display: flex; }
.video-modal { width: min(560px, 100%); max-height: min(88vh, 900px); overflow: auto; color: var(--v-txt); background: var(--panel-strong); border: 1px solid var(--v-border2); border-radius: 18px; box-shadow: 0 30px 90px rgba(0,0,0,.65); }
.video-modal.wide { width: min(940px, 100%); }
.video-modal-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; background: var(--panel-strong); border-bottom: 1px solid var(--v-border); }
.video-modal-head h2 { margin: 0; color: #fff; font-size: 1.05rem; }
.video-modal-close { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px; color: var(--v-muted); background: var(--v-card2); cursor: pointer; }
.video-modal-body { padding: 20px; }
.video-modal-body .video-field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; color: var(--v-muted); font-size: .8rem; font-weight: 700; }
.video-modal-body .video-input { width: 100%; }
.video-modal-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.video-context-menu { position: fixed; z-index: 5400; display: none; width: min(280px, calc(100vw - 20px)); padding: 6px; color: var(--v-txt); background: var(--panel-strong); border: 1px solid var(--v-border2); border-radius: 13px; box-shadow: 0 20px 60px rgba(0,0,0,.6); backdrop-filter: blur(16px); }
.video-context-menu.open { display: block; }
.video-context-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 11px; border-radius: 8px; color: inherit; text-align: left; font-size: .82rem; cursor: pointer; }
.video-context-menu button:hover { background: var(--v-card2); }
.video-context-menu button.danger { color: var(--v-danger); }
.video-share-list { display: grid; gap: 7px; }
.video-share-list button, .video-share-list a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--v-border); border-radius: 9px; background: var(--v-card2); color: var(--v-txt); text-decoration: none; cursor: pointer; }
.video-search-suggestion { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-bottom: 1px solid var(--v-border); color: var(--v-txt); text-decoration: none; }
.video-search-suggestion:hover { background: var(--v-card2); }
.video-search-suggestion small { color: var(--v-muted); }
.video-key-table { width: 100%; border-collapse: collapse; }
.video-key-table td { padding: 8px; border-bottom: 1px solid var(--v-border); color: var(--v-muted); font-size: .82rem; }
.video-key-table td:first-child { color: var(--v-accent); font-weight: 800; }

/* Shorts */
.video-shorts-layout { display: flex; justify-content: center; align-items: flex-start; gap: 18px; min-height: 70vh; }
.video-shorts-layout > #shortsPlayer { width: min(440px, 92vw); flex: 0 0 auto; }
.video-shorts-rail { display: flex; flex-direction: column; gap: 10px; align-items: center; padding-top: 8px; }
.video-rail-btn { width: 58px; min-height: 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 6px; color: var(--v-txt); background: var(--v-card2); border: 1px solid var(--v-border2); border-radius: 50%; font-size: .58rem; font-weight: 800; cursor: pointer; }
.video-rail-btn.active { color: var(--v-accent); border-color: var(--v-accent); }
.video-rail-btn .svg-icon { width: 20px; height: 20px; }
.video-shorts-meta { width: min(620px, 100%); margin: 16px auto 0; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.video-shorts-meta .video-avatar { width: 46px; height: 46px; }
.video-shorts-copy { min-width: 0; flex: 1; }
.video-shorts-copy strong { display: block; margin-bottom: 5px; color: #fff; }
.video-shorts-copy p { margin: 0; color: var(--v-muted); font-size: .82rem; line-height: 1.5; }

/* Channel */
.video-channel-banner { position: relative; aspect-ratio: 5/1; min-height: 130px; overflow: hidden; margin-bottom: 18px; border: 1px solid var(--v-border); border-radius: 16px; background: linear-gradient(120deg, #0a0f18, #171b2b); }
.video-channel-banner img { width: 100%; height: 100%; object-fit: cover; }
.video-channel-banner span { height: 100%; display: grid; place-items: center; color: var(--v-muted); }
.video-channel-head { display: flex; align-items: flex-start; gap: 18px; margin-bottom: 20px; }
.video-channel-avatar { width: 112px; height: 112px; flex: 0 0 auto; border-radius: 50%; object-fit: cover; border: 3px solid var(--v-border2); background: var(--v-card2); }
.video-channel-info { min-width: 0; flex: 1; }
.video-channel-info h1 { margin: 0 0 6px; color: #fff; font-size: clamp(1.5rem, 3vw, 2.2rem); }
.video-channel-stats { margin-bottom: 8px; color: var(--v-muted); font-size: .84rem; }
.video-channel-desc { max-width: 780px; color: #c4cfdd; font-size: .88rem; line-height: 1.6; white-space: pre-wrap; }
.video-channel-links { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 10px; }
.video-channel-links a { padding: 5px 9px; border: 1px solid var(--v-border); border-radius: 7px; color: var(--v-accent); background: var(--v-card2); font-size: .76rem; }
.video-channel-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.video-channel-tabs, .video-studio-tabs, .video-insight-tabs { display: flex; gap: 4px; overflow-x: auto; margin-bottom: 16px; border-bottom: 1px solid var(--v-border); }
.video-channel-tabs a, .video-studio-tabs a, .video-insight-tabs button { flex: 0 0 auto; padding: 10px 13px; color: var(--v-muted); background: transparent; border: 0; border-bottom: 2px solid transparent; font-size: .82rem; font-weight: 800; text-decoration: none; cursor: pointer; }
.video-channel-tabs a.active, .video-studio-tabs a.active, .video-insight-tabs button.active { color: #fff; border-bottom-color: var(--v-accent); }
.video-channel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.video-post-card { padding: 15px; margin-bottom: 12px; background: var(--v-card); border: 1px solid var(--v-border); border-radius: 12px; }
.video-post-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.video-post-head img, .video-post-head .video-avatar { width: 38px; height: 38px; }
.video-post-text { color: #d2dbe8; line-height: 1.6; white-space: pre-wrap; }
.video-post-actions { display: flex; gap: 8px; margin-top: 11px; }

/* Playlists and downloads */
.video-playlist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.video-playlist-card { display: flex; gap: 12px; align-items: center; padding: 13px; background: var(--v-card); border: 1px solid var(--v-border); border-radius: 12px; }
.video-playlist-cover { width: 120px; aspect-ratio: 16/9; flex: 0 0 auto; overflow: hidden; border-radius: 9px; background: var(--v-card3); }
.video-playlist-cover img { width: 100%; height: 100%; object-fit: cover; }
.video-playlist-copy { min-width: 0; flex: 1; }
.video-playlist-copy strong { display: block; margin-bottom: 5px; color: #fff; }
.video-playlist-copy small { color: var(--v-muted); }
.video-playlist-row { display: flex; align-items: center; gap: 12px; padding: 11px; margin-bottom: 9px; background: var(--v-card); border: 1px solid var(--v-border); border-radius: 11px; }
.video-playlist-row.dragging { opacity: .45; }
.video-playlist-row .video-thumb { width: 150px; flex: 0 0 auto; }
.video-playlist-row .video-drag-handle { color: var(--v-muted); cursor: grab; }
.video-download-row { display: flex; align-items: center; gap: 12px; padding: 11px; margin-bottom: 9px; background: var(--v-card); border: 1px solid var(--v-border); border-radius: 11px; }
.video-download-row .video-thumb { width: 150px; flex: 0 0 auto; }

/* Studio */
.video-studio-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.video-studio-profile { display: flex; align-items: center; gap: 13px; }
.video-studio-profile img, .video-studio-profile .video-avatar { width: 64px; height: 64px; font-size: 1.2rem; }
.video-studio-profile h1 { margin: 0 0 4px; color: #fff; font-size: 1.7rem; }
.video-studio-profile p { margin: 0; color: var(--v-muted); }
.video-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 18px; }
.video-metric { padding: 15px; background: var(--v-card); border: 1px solid var(--v-border); border-radius: 11px; }
.video-metric b { display: block; margin-bottom: 5px; color: var(--v-accent); font-size: 1.55rem; }
.video-metric span { color: var(--v-muted); font-size: .76rem; }
.video-dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.video-dashboard-card { padding: 16px; background: var(--v-card); border: 1px solid var(--v-border); border-radius: 12px; }
.video-dashboard-card h3 { margin: 0 0 12px; color: #fff; font-size: .95rem; }
.video-chart { width: 100%; height: auto; display: block; }
.video-chart-bars { height: 220px; display: flex; align-items: flex-end; gap: 3px; padding: 12px 6px 0; border-bottom: 1px solid var(--v-border2); background: linear-gradient(180deg, rgba(79,195,247,.04), transparent); }
.video-chart-bar { position: relative; flex: 1; min-width: 2px; height: 0; background: linear-gradient(180deg,var(--v-accent),rgba(139,92,246,.45)); border-radius: 3px 3px 0 0; transition: height .2s; }
.video-chart-bar i { position: absolute; inset: 0; background: repeating-linear-gradient(0deg,transparent 0 39px,rgba(255,255,255,.08) 39px 40px); }
.video-list-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--v-border); }
.video-list-row:first-child { border-top: 0; }
.video-list-row img { width: 72px; aspect-ratio: 16/9; object-fit: cover; border-radius: 6px; }
.video-list-row .grow { min-width: 0; flex: 1; }
.video-list-row small { color: var(--v-muted); }
.video-content-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.video-content-toolbar input, .video-content-toolbar select { width: auto; }
.video-manage-row { position: relative; }
.video-manage-row input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--v-accent); }
.video-select-bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; margin-bottom: 12px; color: var(--v-accent); background: var(--v-accent-dim); border: 1px solid rgba(79,195,247,.25); border-radius: 9px; }
.video-settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.video-banner-preview { aspect-ratio: 5/1; overflow: hidden; margin-bottom: 11px; border: 1px solid var(--v-border2); border-radius: 12px; background: linear-gradient(120deg,#0a0f18,#171b2b); }
.video-banner-preview img { width: 100%; height: 100%; object-fit: cover; }
.video-banner-editor { position: relative; aspect-ratio: 5/1; overflow: hidden; border: 1px solid var(--v-border2); border-radius: 12px; background: #000; cursor: grab; touch-action: none; }
.video-banner-editor:active { cursor: grabbing; }
.video-banner-editor img { position: absolute; max-width: none; pointer-events: none; user-select: none; }
.video-safe-zone { position: absolute; border: 1px dashed rgba(79,195,247,.9); pointer-events: none; }
.video-safe-zone b { position: absolute; top: 5px; left: 7px; padding: 3px 6px; color: #fff; background: rgba(0,0,0,.7); border-radius: 5px; font-size: 10px; }
.video-safe-tv { inset: 0; border-style: solid; border-color: rgba(255,255,255,.35); }
.video-safe-desktop { left: 0; right: 0; top: 18%; bottom: 18%; }
.video-safe-mobile { left: 28%; right: 28%; top: 18%; bottom: 18%; }
.video-link-row { display: flex; gap: 8px; margin-bottom: 8px; }
.video-link-row input { min-width: 0; flex: 1; }

/* Upload queue */
.video-upload-modal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.video-dropzone { padding: 30px 18px; text-align: center; border: 2px dashed var(--v-border2); border-radius: 14px; background: rgba(79,195,247,.03); cursor: pointer; }
.video-dropzone.drag { border-color: var(--v-accent); background: rgba(79,195,247,.09); }
.video-dropzone .svg-icon { width: 38px; height: 38px; margin: 0 auto 10px; color: var(--v-accent); }
.video-queue-list { display: flex; flex-direction: column; gap: 7px; margin-top: 12px; }
.video-queue-row { display: flex; align-items: center; gap: 9px; padding: 9px 10px; background: var(--v-card2); border: 1px solid var(--v-border); border-radius: 9px; font-size: .78rem; }
.video-queue-row .status { margin-left: auto; color: var(--v-muted); font-size: .7rem; font-weight: 800; }
.video-queue-row .status.ok { color: var(--success); }
.video-queue-row .status.work { color: var(--warning); }
.video-queue-row .status.err { color: var(--danger); }
.video-upload-progress-track { height: 8px; overflow: hidden; margin: 12px 0; background: var(--v-card3); border-radius: 99px; }
.video-upload-progress-track i { display: block; width: 0; height: 100%; background: linear-gradient(90deg,var(--v-accent),#8b5cf6); transition: width .2s; }
.video-upload-log { max-height: 180px; overflow: auto; padding: 11px; color: var(--v-muted); background: #080b11; border: 1px solid var(--v-border); border-radius: 9px; font: .74rem/1.5 ui-monospace, monospace; white-space: pre-wrap; }

/* Watch party */
.video-party-bar { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; padding: 10px 12px; margin-bottom: 14px; background: var(--v-card); border: 1px solid var(--v-border); border-radius: 11px; }
.video-sync-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(74,222,128,.1); }
.video-sync-dot.ping { animation: video-ping .5s ease; }
@keyframes video-ping { 50% { box-shadow: 0 0 0 9px rgba(74,222,128,.05); } }
.video-party-code { color: var(--v-accent); font: 800 .9rem ui-monospace, monospace; letter-spacing: .12em; }
.video-party-members { display: flex; }
.video-party-members img { width: 28px; height: 28px; margin-left: -5px; border: 2px solid var(--v-card); border-radius: 50%; object-fit: cover; }
.video-party-side { display: flex; flex-direction: column; height: min(620px, 72vh); overflow: hidden; background: var(--v-card); border: 1px solid var(--v-border); border-radius: 12px; }
.video-party-tabs { display: flex; border-bottom: 1px solid var(--v-border); }
.video-party-tabs button { flex: 1; padding: 10px; color: var(--v-muted); background: transparent; border: 0; cursor: pointer; }
.video-party-tabs button.active { color: #fff; background: var(--v-card2); }
.video-party-body { flex: 1; overflow-y: auto; padding: 12px; }
.video-party-message { display: flex; gap: 8px; margin-bottom: 11px; }
.video-party-message img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.video-party-message .bubble { min-width: 0; padding: 8px 10px; background: var(--v-card2); border-radius: 9px; }
.video-party-message .name { margin-bottom: 3px; color: var(--v-accent); font-size: .72rem; font-weight: 800; }
.video-party-message .text { color: #d5deea; font-size: .8rem; line-height: 1.45; white-space: pre-wrap; }
.video-party-message.sys { justify-content: center; color: var(--v-muted); font-size: .7rem; }
.video-party-foot { padding: 10px; border-top: 1px solid var(--v-border); }
.video-party-input-row { display: flex; gap: 7px; }
.video-party-input-row input { min-width: 0; flex: 1; }
.video-party-reactions { display: flex; gap: 5px; margin-top: 8px; }
.video-party-reactions button { width: 34px; height: 30px; border-radius: 7px; background: var(--v-card2); cursor: pointer; }

@media (max-width: 900px) {
    .video-shorts-layout { gap: 10px; }
    .video-channel-head { flex-direction: column; }
    .video-channel-avatar { width: 92px; height: 92px; }
    .video-playlist-row, .video-download-row { align-items: flex-start; flex-wrap: wrap; }
    .video-playlist-row .video-thumb, .video-download-row .video-thumb { width: 120px; }
}
@media (max-width: 640px) {
    .video-modal-backdrop { padding: 8px; }
    .video-modal-body { padding: 15px; }
    .video-shorts-layout { flex-direction: column; align-items: stretch; gap: 10px; }
    .video-shorts-layout > #shortsPlayer { width: 100%; max-width: none; }
    .video-shorts-rail { flex-direction: row; flex-wrap: wrap; justify-content: center; padding-top: 0; }
    .video-rail-btn { width: auto; min-width: 48px; min-height: 44px; border-radius: 14px; flex-direction: row; gap: 6px; padding: 6px 10px; }
    .video-channel-banner { min-height: 100px; }
    .video-playlist-cover { width: 92px; }
    .video-playlist-row .video-thumb, .video-download-row .video-thumb { width: 100px; }
    .video-studio-profile img, .video-studio-profile .video-avatar { width: 52px; height: 52px; }
    .video-party-side { height: 480px; }
}
@media (pointer: coarse) {
    .video-rail-btn, .video-modal-close, .video-party-reactions button { min-width: 44px; min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
    .video-shell *, .video-shell *::before, .video-shell *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
