/* Страница просмотра стрима (/live_watch.php) */

.page-container.no-sidebar .main-content {
    padding: 18px;
}

.live-watch-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 18px;
    align-items: start;
    max-width: 1600px;
    margin: 0 auto;
    min-height: 100%;
    color: #f1f1f1;
}

/* ==========================================
   РЕЖИМ КИНОТЕАТРА (THEATER MODE)
   ========================================== */
   body.theater-mode, body.theater-mode html {
    margin: 0 !important; padding: 0 !important;
    overflow: hidden !important; /* Жестко убиваем любой скролл на странице */
}

/* Шапку НЕ ПРЯЧЕМ, прячем только сайдбар */
body.theater-mode .sidebar { display: none !important; }

/* Убиваем боковые отступы глобального контейнера */
body.theater-mode .page-container,
body.theater-mode .page-container.no-sidebar {
    padding-left: 0 !important; 
    padding-right: 0 !important; 
    padding-bottom: 0 !important; 
    margin: 0 !important; 
    width: 100vw !important; 
    max-width: 100vw !important;
}

body.theater-mode .page-container .main-content {
    /* ВОТ ОНО: Оставляем отступ сверху под шапку! */
    padding: var(--header-height, 60px) 0 0 0 !important; 
    margin: 0 !important; 
    max-width: 100% !important; 
    height: 100vh !important; 
    box-sizing: border-box;
}

body.theater-mode .live-watch-layout { 
    display: flex; width: 100%; height: 100%; margin: 0; gap: 0; background: #000;
}

body.theater-mode .live-video-section { 
    flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; 
    justify-content: center; position: relative;
}

body.theater-mode .live-player-container { 
    width: 100%; height: 100%; max-height: 100%; border-radius: 0; border: none; 
}

/* УМНОЕ СКРЫТИЕ ИНФО-БЛОКА: Оставляем только кнопку Кинотеатра поверх видео */
body.theater-mode .live-info-container { 
    position: absolute; top: 12px; left: 12px; z-index: 50;
    background: transparent !important; border: none !important; backdrop-filter: none !important;
    padding: 0 !important; margin: 0 !important;
    pointer-events: none; /* чтобы контейнер не перекрывал клики по плееру */
}

body.theater-mode .live-theater-btn {
    pointer-events: auto; /* возвращаем клик самой кнопке */
    background: rgba(0,0,0,0.6) !important; color: #fff !important;
    border: 1px solid rgba(255,255,255,0.15) !important; backdrop-filter: blur(8px);
}
body.theater-mode .live-theater-btn:hover { background: rgba(0,0,0,0.8) !important; }
body.theater-mode .live-theater-btn span { display: inline; }

body.theater-mode .live-title,
body.theater-mode .live-author-info,
body.theater-mode .live-restream-channels,
body.theater-mode .live-description,
body.theater-mode .live-watch-actions .action-btn:not(.live-theater-btn),
body.theater-mode .live-more-actions-container { display: none !important; }

body.theater-mode .live-meta-bar {
    display: flex !important;
    justify-content: flex-start;
    align-items: center;
    pointer-events: none;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
}
body.theater-mode .live-watch-actions {
    pointer-events: auto;
    display: flex !important;
    gap: 8px;
}

body.theater-mode .live-chat-section {
    flex: 0 0 360px; height: 100%; position: static; border-radius: 0 !important;
    border-top: none; border-bottom: none; border-right: none;
    border-left: 1px solid rgba(255, 255, 255, 0.1); display: flex !important; transform: none !important;
    overflow: hidden !important;
}

body.theater-mode .live-chat-section .chat-header,
body.theater-mode .live-chat-section .chat-messages,
body.theater-mode .live-chat-section .chat-input-area {
    border-radius: 0 !important;
}

@media (max-width: 900px) {
    body.theater-mode .live-chat-section { flex: 0 0 300px; }
}

/* ==========================================
   ЛЕВАЯ ЧАСТЬ (ВИДЕО И ИНФО)
   ========================================== */
.live-video-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.live-player-container {
    width: 100%;
    background: #000;
    aspect-ratio: 16 / 9;
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.live-main-iframe {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    border: 0;
}

#live-video {
    width: 100%;
    height: 100%;
    outline: none;
}

/* Оверлей HLS загрузки */
.live-hls-loading {
    position: absolute; inset: 0; background: rgba(0,0,0,0.8);
    display: none; flex-direction: column; align-items: center; justify-content: center; color: #fff; z-index: 10;
}
.live-hls-loading .spinner {
    width: 40px; height: 40px; border: 4px solid rgba(255,255,255,0.2);
    border-top-color: #a970ff; border-radius: 50%; animation: spin 1s linear infinite; margin-bottom: 16px;
}
@keyframes spin { 100% { transform: rotate(360deg); } }
.live-hls-loading .text { font-size: 16px; font-weight: 600; }

.live-offline-screen {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
}
.live-offline-screen img {
    width: 100%; height: 100%; object-fit: cover; opacity: 0.3; filter: blur(8px); transform: scale(1.05);
}
.offline-text {
    position: absolute; font-size: 24px; font-weight: bold; text-shadow: 0 2px 10px rgba(0,0,0,0.8); 
    background: rgba(0,0,0,0.5); padding: 12px 24px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.1); backdrop-filter: blur(4px);
}

.live-info-container {
    margin-top: 12px; padding: 16px 18px; border-radius: 14px;
    background: rgba(17, 17, 19, 0.88); border: 1px solid rgba(255, 255, 255, 0.08); backdrop-filter: blur(10px);
}

.live-title { font-size: 18px; font-weight: 700; margin: 0 0 10px 0; letter-spacing: -0.01em; }

.live-embed-http-hint {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.45;
    color: #fff;
    background: rgba(0, 0, 0, 0.82);
    pointer-events: none;
}

.live-meta-bar {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    padding-bottom: 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); margin-bottom: 10px;
}

.live-restream-channels {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.live-restream-channels-title {
    font-size: 13px;
    color: #aaa;
    margin-right: 4px;
    flex: 0 0 auto;
}
.live-restream-channels-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.live-platform-channel {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 6px 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-decoration: none;
    color: inherit;
    user-select: none;
}
.live-platform-channel--link {
    cursor: pointer;
    pointer-events: auto;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.live-platform-channel--link:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}
.live-platform-channel--twitch { border-color: rgba(145, 70, 255, 0.35); }
.live-platform-channel--youtube { border-color: rgba(255, 0, 51, 0.28); }
.live-avatar-wrap--platform .live-avatar { object-fit: contain; background: rgba(255, 255, 255, 0.06); padding: 4px; box-sizing: border-box; }
.live-platform-channel-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.live-platform-channel-name {
    font-size: 14px;
    font-weight: 600;
    color: #f1f1f1;
}

.live-author-info { display: flex; align-items: center; gap: 12px; }
.live-avatar-wrap { position: relative; flex-shrink: 0; }
.live-avatar-wrap--host .live-avatar { width: 48px; height: 48px; }
.live-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; display: block; }
.chat-host-crown {
    display: inline-block;
    width: 18px;
    height: 18px;
    vertical-align: -3px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 2px solid #121212;
    background-color: #e8b020;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%231a1200'%3E%3Cpath d='M4 18h16l-1.2-8.5L12 11 5.2 9.5 4 18zm2.2-10.3L12 10l5.8-2.3L15.5 4h-7L6.2 7.7z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 11px 11px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
    pointer-events: none;
}
.live-author-name-row {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 4px;
}
.live-author-badges {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.live-host-crown-svg {
    display: block;
    color: #f0c040;
    filter: drop-shadow(0 0 4px rgba(240, 192, 64, 0.4));
}
.live-author-name {
    font-weight: bold;
    font-size: 16px;
    color: #fff;
    text-decoration: none;
}
.live-author-name--plain { font-weight: bold; font-size: 16px; color: #fff; }
.live-author-name:hover { text-decoration: underline; }
.live-author-name--platform:hover { color: #fff; opacity: 0.92; }

.live-viewers-breakdown { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.viewer-chip {
    display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600;
    padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.1);
}
.viewer-chip--site { color: #ff6262; border-color: rgba(255, 78, 78, 0.25); }
.viewer-chip--youtube { color: #ff4063; border-color: rgba(255, 0, 51, 0.25); }
.viewer-chip--twitch { color: #b384ff; border-color: rgba(145, 70, 255, 0.32); }

.live-watch-actions { display: flex; align-items: center; gap: 8px; }
.live-watch-actions .action-btn {
    border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(255, 255, 255, 0.06); color: #fff;
    border-radius: 999px; height: 40px; display: inline-flex; align-items: center; gap: 8px; padding: 0 14px;
    cursor: pointer; text-decoration: none; font-size: 14px; font-weight: 600;
}
.live-watch-actions .action-btn:hover { background: rgba(255, 255, 255, 0.13); }
.live-watch-actions .live-subscribe-btn:not(.live-subscribe-btn--owner):not(.subscribed) {
    background: #f1f1f1;
    color: #0f0f0f;
    border-color: transparent;
}
.live-watch-actions .live-subscribe-btn:not(.live-subscribe-btn--owner):not(.subscribed):hover {
    background: #ffffff;
}
.live-watch-actions .live-subscribe-btn.subscribed,
.live-watch-actions .live-subscribe-btn--owner {
    background: rgba(255, 255, 255, 0.11);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.16);
}
.live-watch-actions .live-subscribe-btn--owner:hover,
.live-watch-actions .live-subscribe-btn--owner:focus-visible,
.live-watch-actions .live-subscribe-btn.subscribed:hover,
.live-watch-actions .live-subscribe-btn.subscribed:focus-visible {
    background: rgba(62, 166, 255, 0.22);
    color: #fff;
    border-color: rgba(62, 166, 255, 0.45);
}
.live-watch-actions .watch-share-btn img,
.live-watch-actions .more-actions-btn img { width: 18px; height: 18px; filter: invert(1); }
.live-watch-actions .more-actions-btn { width: 40px; justify-content: center; padding: 0; }

.live-watch-actions .live-more-actions-container { position: relative; }
.live-watch-actions .more-actions-dropdown {
    display: none; position: absolute; top: calc(100% + 8px); right: 0; min-width: 190px;
    border-radius: 12px; background: #28282d; border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 14px 30px rgba(0,0,0,0.42); padding: 6px 0; z-index: 20;
}
.live-watch-actions .more-actions-dropdown.active { display: block; }
.live-watch-actions .more-actions-dropdown a {
    display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; padding: 10px 12px; font-size: 14px;
}
.live-watch-actions .more-actions-dropdown a:hover { background: rgba(255, 255, 255, 0.08); }
.live-watch-actions .more-actions-dropdown a img { width: 18px; height: 18px; filter: invert(1); }

.red-dot {
    width: 8px; height: 8px; background-color: #ff4e4e; border-radius: 50%; animation: pulse 1.5s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

.live-description {
    font-size: 14px; line-height: 1.5; color: #aaa; background: rgba(255, 255, 255, 0.04);
    padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.06);
}

/* ==========================================
   ПРАВАЯ ЧАСТЬ (ЧАТ)
   ========================================== */
.live-chat-section {
    width: auto; position: sticky; top: 0; height: calc(100vh - var(--header-height, 60px) - 36px);
    display: flex; flex-direction: column; min-height: 0; border-radius: 14px; overflow: hidden;
    background: rgba(17, 17, 19, 0.92); border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 14px 42px rgba(0, 0, 0, 0.45);
}

/* Логика скрытия чата */
.live-watch-layout.chat-is-hidden { grid-template-columns: 1fr; }
.live-watch-layout.chat-is-hidden .live-chat-section { display: none !important; }

.show-chat-overlay-btn {
    position: absolute; top: 20px; right: 20px; z-index: 50; background: rgba(0, 0, 0, 0.6);
    color: #fff; border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 8px; padding: 8px 12px 8px 8px;
    display: flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; cursor: pointer;
    backdrop-filter: blur(8px); transition: background 0.2s, transform 0.2s;
}
.show-chat-overlay-btn:hover { background: rgba(0, 0, 0, 0.8); transform: scale(1.05); }

.chat-header {
    display: flex; justify-content: space-between; align-items: center; padding: 8px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08); background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0));
}
.chat-header-title { margin: 0; font-size: 14px; font-weight: bold; text-transform: uppercase; letter-spacing: 1px; }

.chat-tabs { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; justify-content: flex-start; }
.chat-tab {
    padding: 6px 10px; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 8px;
    background: rgba(0, 0, 0, 0.25); color: #adadb8; font-size: 11px; font-weight: 600;
    text-transform: uppercase; cursor: pointer; font-family: inherit;
}
.chat-tab:hover { color: #efeff1; border-color: #53535f; }
.chat-tab.is-active { color: #fff; border-color: rgba(169, 112, 255, 0.7); background: rgba(169, 112, 255, 0.12); }

.hide-chat-btn {
    background: transparent; border: none; color: #adadb8; cursor: pointer; padding: 4px;
    border-radius: 6px; display: flex; align-items: center; justify-content: center; transition: background 0.2s, color 0.2s;
}
.hide-chat-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }

.chat-panes { flex: 1; display: flex; flex-direction: column; min-height: 0; position: relative; }
.chat-pane { display: none; flex: 1; flex-direction: column; min-height: 0; overflow: hidden; }
.chat-pane.is-active { display: flex; }
.chat-pane--embed { padding: 0; }
.chat-external-iframe { flex: 1; width: 100%; min-height: 280px; border: 0; background: #000; }

.chat-messages-container { flex: 1; position: relative; display: flex; flex-direction: column; min-height: 0; }
.chat-welcome {
    flex-shrink: 0;
    padding: 4px 6px 10px;
    margin-bottom: 2px;
}
.chat-welcome-line,
.chat-welcome-rules {
    margin: 0;
    font-style: italic;
    color: #adadb8;
    font-size: 12px;
    line-height: 1.45;
}
.chat-welcome-rules { margin-top: 4px; }
.chat-messages {
    flex: 1; overflow-y: auto; padding: 6px 4px 8px; display: flex; flex-direction: column; gap: 0;
    font-size: 13px; min-height: 0; background: #0e0e10; font-family: inherit;
}

/* ==========================================
   ЦВЕТА ПЛАШКИ "НОВЫЕ СООБЩЕНИЯ"
   ========================================== */
.chat-new-messages-btn {
    position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
    border: none; padding: 6px 16px; border-radius: 20px; font-size: 13px; font-weight: 600; 
    cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,0.5); transition: background 0.2s, transform 0.2s; z-index: 5;
}
.chat-new-messages-btn:hover { transform: translateX(-50%) translateY(-2px); }

.platform-youtube .chat-new-messages-btn { background: rgba(230, 33, 23, 0.95); color: #fff; }
.platform-youtube .chat-new-messages-btn:hover { background: #ff0000; }

.platform-twitch .chat-new-messages-btn { background: rgba(145, 70, 255, 0.95); color: #fff; }
.platform-twitch .chat-new-messages-btn:hover { background: #9146ff; }

.platform-site .chat-new-messages-btn { background: rgba(255, 255, 255, 0.95); color: #000; }
.platform-site .chat-new-messages-btn:hover { background: #fff; }

/* СООБЩЕНИЯ В ЧАТЕ */
.chat-msg { line-height: 1.35; padding: 0; }
.chat-msg-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 4px;
    padding: 1px 4px 1px 2px;
    border-radius: 4px;
}
.chat-msg:hover .chat-msg-row { background: rgba(255, 255, 255, 0.05); }

.chat-msg-actions {
    display: flex;
    align-items: flex-start;
    gap: 2px;
    flex-shrink: 0;
    padding-top: 0;
}

.chat-msg-ban {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    margin-top: 0;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: #c4c4c4;
    cursor: pointer;
    opacity: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.chat-msg-ban:hover { background: rgba(255, 90, 90, 0.35); color: #fff; }
.chat-msg:hover .chat-msg-ban { opacity: 1; }

.chat-msg-mod-svg {
    display: block;
    color: #7ab8ff;
    filter: drop-shadow(0 0 4px rgba(122, 184, 255, 0.35));
}
.chat-msg-badges--mod {
    margin-right: 2px;
}

/* ПРАВИЛЬНЫЙ ПЕРЕНОС СЛОВ */
.chat-msg-main {
    flex: 1;
    min-width: 0;
    line-height: 1.35;
}
.chat-msg-text {
    color: #efeff1;
    font-weight: 400;
    overflow-wrap: anywhere; /* Идеально ломает "312222..." */
    word-break: break-word;
    white-space: pre-wrap; /* Сохраняет пробелы пользователя */
}
.chat-msg-text--deleted {
    color: #adadb8;
    font-style: italic;
    font-weight: 400;
}

.chat-msg-badges { display: inline-flex; align-items: center; vertical-align: middle; margin-right: 4px; gap: 2px; }
.chat-msg-badges .live-host-crown-svg { vertical-align: -2px; }
.chat-msg-author {
    font-weight: 700; 
    text-decoration: none !important; 
    margin: 0; 
    display: inline;
    word-break: break-word; 
}
.chat-msg-colon { color: #adadb8; font-weight: 600; margin-right: 4px; margin-left: 1px; }

.chat-msg-reply {
    flex-shrink: 0; width: 24px; height: 24px; margin-top: 0; padding: 0; border: none; border-radius: 5px;
    background: rgba(255, 255, 255, 0.08); color: #efeff1; font-size: 15px; cursor: pointer; opacity: 0;
}
.chat-msg:hover .chat-msg-reply { opacity: 1; }
.chat-msg-reply:hover { background: rgba(145, 70, 255, 0.35); color: #fff; }
@media (hover: none) { .chat-msg-reply { opacity: 0.35; } }

/* ВВОД СООБЩЕНИЯ */
.chat-input-area { padding: 12px; background: rgba(0, 0, 0, 0.18); border-top: 1px solid rgba(255, 255, 255, 0.08); }
#chat-form { display: flex; gap: 6px; align-items: center; }

.chat-input-wrapper { flex: 1; position: relative; display: flex; align-items: center; }

#chat-input {
    width: 100%; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff; padding: 10px 55px 10px 12px; border-radius: 10px; outline: none; font-family: inherit;
    min-height: 40px; box-sizing: border-box;
}
#chat-input:focus { border-color: rgba(62, 166, 255, 0.7); background: rgba(0, 0, 0, 0.35); }
#chat-input.input-error { border-color: #ff4e4e !important; background: rgba(255, 78, 78, 0.1) !important; }

/* Счетчик поверх поля ввода справа */
.chat-char-counter { position: absolute; right: 12px; font-size: 11px; color: #888; pointer-events: none; }

.chat-limit-warning {
    color: #ff4e4e; font-size: 12px; font-weight: 600; margin-bottom: 6px; text-align: center;
    animation: fadeIn 0.2s ease-in-out;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

#chat-submit {
    background: #a970ff; color: #fff; border: none; border-radius: 10px;
    width: 40px; height: 40px; min-height: 40px; padding: 0;
    flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer; transition: background 0.2s; align-self: center;
}

#chat-submit .chat-submit-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

#chat-submit .chat-submit-icon svg {
    display: block;
}
#chat-submit:hover { background: #9146ff; }
#chat-submit:disabled { background: #444; cursor: not-allowed; color: #888; }
.chat-submit-timer { font-size: 14px; font-weight: bold; }

.chat-login-prompt { text-align: center; font-size: 14px; color: #aaa; }
.chat-login-prompt a { color: #a970ff; text-decoration: none; font-weight: bold; }

/* ОВЕРЛЕЙ: ВЫГНАН / ЗАБАНЕН НА ЭФИРЕ */
.live-restricted-overlay {
    position: fixed;
    inset: 0;
    z-index: 15000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(8px);
}
.live-restricted-overlay[hidden] {
    display: none !important;
}
.live-restricted-card {
    width: min(420px, 100%);
    padding: 24px 22px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #18181b;
    text-align: center;
}
.live-restricted-title {
    margin: 0 0 10px;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}
.live-restricted-text {
    margin: 0 0 18px;
    font-size: 14px;
    line-height: 1.5;
    color: #adadb8;
}
.live-restricted-btn {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 10px;
    background: #9146ff;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
}
.live-restricted-btn:hover {
    background: #a970ff;
}

/* МОДАЛКА ОГРАНИЧЕНИЙ ЧАТА */
.live-mod-modal {
    position: fixed; inset: 0; z-index: 12000;
    display: flex; align-items: center; justify-content: center;
    padding: 16px; pointer-events: none; opacity: 0;
    transition: opacity 0.2s ease;
}
.live-mod-modal.is-open {
    pointer-events: auto; opacity: 1;
}
.live-mod-modal-backdrop {
    position: absolute; inset: 0; background: rgba(0, 0, 0, 0.72);
}
.live-mod-modal-card {
    position: relative; z-index: 1; width: min(420px, 100%);
    background: #18181b; border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px; padding: 20px 20px 16px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
}
.live-mod-modal-close {
    position: absolute; top: 12px; right: 12px; width: 32px; height: 32px;
    border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 50%;
    background: rgba(255, 255, 255, 0.06); color: #fff; font-size: 20px;
    cursor: pointer; line-height: 1;
}
.live-mod-modal-close:hover { background: rgba(255, 255, 255, 0.14); }
.live-mod-modal-title {
    margin: 0 36px 8px 0; font-size: 18px; font-weight: 700; color: #fff;
}
.live-mod-modal-user {
    margin: 0 0 8px; font-size: 15px; font-weight: 600; color: #efeff1;
}
.live-mod-modal-hint {
    margin: 0 0 14px; font-size: 13px; line-height: 1.45; color: #adadb8;
}
.live-mod-modal-options {
    display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px;
}
.live-mod-option {
    display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
    width: 100%; text-align: left; padding: 12px 14px;
    border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04); color: #efeff1; cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.live-mod-option:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.22);
}
.live-mod-option--danger {
    border-color: rgba(235, 64, 52, 0.35);
    background: rgba(235, 64, 52, 0.08);
}
.live-mod-option--danger:hover {
    border-color: rgba(235, 64, 52, 0.55);
    background: rgba(235, 64, 52, 0.14);
}
.live-mod-option-title { font-size: 14px; font-weight: 700; }
.live-mod-option-desc { font-size: 12px; line-height: 1.4; color: #adadb8; }
.live-mod-cancel {
    width: 100%; padding: 10px; border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.14); background: transparent;
    color: #efeff1; font-size: 14px; font-weight: 600; cursor: pointer;
}
.live-mod-cancel:hover { background: rgba(255, 255, 255, 0.06); }
.live-mod-option:disabled,
.live-mod-cancel:disabled { opacity: 0.55; cursor: not-allowed; }

/* МОДАЛКА ШЕРА */
#live-share-modal .sharex-close {
    position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border: 1px solid rgba(255,255,255,.2);
    border-radius: 50%; background: rgba(255,255,255,.06); color: #fff; font-size: 20px;
    display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
#live-share-modal .sharex-close:hover { background: rgba(255,255,255,.16); }

/* Адаптивность */
@media (max-width: 1024px) {
    .live-watch-layout { grid-template-columns: 1fr; gap: 14px; }
    .live-chat-section { position: static; height: min(560px, 70vh); }
    body.theater-mode .live-chat-section { height: 50vh; }
}

@media (max-width: 780px) {
    .live-meta-bar { flex-direction: column; align-items: flex-start; }
    .live-watch-actions { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
}

@media (max-width: 520px) {
    .page-container.no-sidebar .main-content { padding: 12px; }
    .live-info-container { padding: 12px; }
    .chat-messages { padding: 8px 6px; }
    .live-watch-actions { width: 100%; justify-content: flex-end; }
    .live-watch-actions .watch-share-btn span,
    .live-watch-actions .live-theater-btn span { display: none; }
}

/* Чат закрыт ведущим */
.live-chat-locked-banner {
    margin: 0 0 10px 0;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.35;
    color: #f1d4a4;
    background: rgba(245, 176, 65, 0.12);
    border: 1px solid rgba(245, 176, 65, 0.35);
}
