/* Смотреть вместе — макет (Nunito, #e300ff, glow-card, Lucide) */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&display=swap');

* {
    box-sizing: border-box;
}

html.h-full,
html.h-full body.page-watch-together {
    height: 100%;
    margin: 0;
}

body.page-watch-together {
    font-family: 'Nunito', sans-serif;
    background: linear-gradient(135deg, #0d0d14 0%, #1a0d2e 50%, #0d0d14 100%);
    color: #e8e0ec;
    position: relative;
}

body.page-watch-together::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 50%, rgba(227, 0, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(227, 0, 255, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.page-watch-together .main-layout,
.page-watch-together .main-content-wrapper.wt2-page {
    background: transparent;
    position: relative;
    z-index: 1;
}

.page-watch-together .main-content-wrapper.wt2-page {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 72px);
    max-height: calc(100vh - 72px);
}

.page-watch-together #wtApp {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    max-height: 100%;
}

.wt2-page {
    color: #e8e0ec;
    min-height: 0;
}

::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(227, 0, 255, 0.02);
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #e300ff, #a855f7);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #ff00ff, #c800e0);
}

@keyframes glow-pulse {
    0%,
    100% {
        box-shadow: 0 0 20px rgba(227, 0, 255, 0.2), inset 0 0 20px rgba(227, 0, 255, 0.05);
    }
    50% {
        box-shadow: 0 0 40px rgba(227, 0, 255, 0.35), inset 0 0 20px rgba(227, 0, 255, 0.1);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

@keyframes pulse-ring {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalSlideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes headerSlideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes titleGlow {
    0%,
    100% {
        text-shadow: 0 0 10px rgba(227, 0, 255, 0.3);
    }
    50% {
        text-shadow: 0 0 20px rgba(227, 0, 255, 0.6);
    }
}

.glow-card {
    background: rgba(227, 0, 255, 0.06);
    border: 1.5px solid rgba(227, 0, 255, 0.25);
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.glow-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(227, 0, 255, 0.1), transparent);
    transform: rotate(45deg);
    animation: shimmer 3s infinite;
    pointer-events: none;
}

.glow-card:hover {
    border-color: rgba(227, 0, 255, 0.6);
    background: rgba(227, 0, 255, 0.1);
    box-shadow: 0 0 30px rgba(227, 0, 255, 0.3), inset 0 0 30px rgba(227, 0, 255, 0.08);
    transform: translateY(-2px);
}

.avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    flex-shrink: 0;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px currentColor;
}

.avatar:hover {
    transform: scale(1.1);
    box-shadow: 0 0 25px currentColor;
}

.btn-primary {
    background: linear-gradient(135deg, #e300ff, #c800e0);
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 15px rgba(227, 0, 255, 0.3);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}
.btn-primary:hover {
    background: linear-gradient(135deg, #ff00ff, #e300ff);
    box-shadow: 0 8px 25px rgba(227, 0, 255, 0.5);
    transform: translateY(-2px);
}
.btn-primary:active {
    transform: scale(0.95);
}
.btn-primary:disabled {
    background: #555;
    cursor: not-allowed;
    opacity: 0.5;
    box-shadow: none;
}

.btn-outline {
    background: rgba(227, 0, 255, 0.05);
    color: #e300ff;
    border: 2px solid rgba(227, 0, 255, 0.4);
    padding: 8px 14px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.btn-outline::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(227, 0, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition:
        width 0.6s,
        height 0.6s;
}

.btn-outline:hover::before {
    width: 300px;
    height: 300px;
}
.btn-outline:hover {
    border-color: #e300ff;
    background: rgba(227, 0, 255, 0.15);
    box-shadow: 0 0 20px rgba(227, 0, 255, 0.2);
    transform: translateY(-1px);
}

.btn-icon {
    background: rgba(227, 0, 255, 0.08);
    border: 1.5px solid rgba(227, 0, 255, 0.2);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #e300ff;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    flex-shrink: 0;
    position: relative;
}

.btn-icon:hover {
    background: rgba(227, 0, 255, 0.25);
    border-color: #e300ff;
    box-shadow: 0 0 20px rgba(227, 0, 255, 0.3);
    transform: scale(1.1) rotate(5deg);
}
.btn-icon.active {
    background: linear-gradient(135deg, #e300ff, #c800e0);
    color: #fff;
    box-shadow: 0 0 20px rgba(227, 0, 255, 0.5);
}

.page-watch-together .btn-icon svg,
.page-watch-together .btn-icon .lucide {
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    stroke: currentColor;
    flex-shrink: 0;
}

/* Кнопки только с иконкой — не сжимать в полоску (flex + input) */
.page-watch-together .wt-btn-icon-svg {
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    flex-shrink: 0;
    display: block;
}

.page-watch-together .wt-btn-icon-svg--md {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
}

.page-watch-together .wt-header-leave-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
}

.page-watch-together .wt-creator-search-row {
    display: flex;
    align-items: stretch;
    gap: 8px;
    margin-bottom: 12px;
}

.page-watch-together .wt-creator-search-row .wt-input {
    flex: 1;
    min-width: 0;
}

.page-watch-together .wt-icon-btn.btn-primary {
    flex-shrink: 0;
    min-width: 46px;
    width: auto;
    min-height: 42px;
    padding: 8px 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    overflow: visible;
}

.page-watch-together .wt-chat-form-bar {
    display: flex;
    align-items: stretch;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid rgba(227, 0, 255, 0.12);
    flex-shrink: 0;
    border-radius: 0 0 16px 16px;
}

.page-watch-together .wt-chat-form-bar .wt-input {
    flex: 1;
    min-width: 0;
}

.page-watch-together .wt-chat-form-bar .btn-primary {
    flex-shrink: 0;
    min-width: 46px;
    width: auto;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    overflow: visible;
}

.page-watch-together .wt-host-action-btn {
    flex-shrink: 0;
}

.page-watch-together .wt-host-action-btn svg,
.page-watch-together .wt-host-action-btn .lucide {
    display: block;
    flex-shrink: 0;
}

.player-placeholder {
    width: 100%;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, rgba(227, 0, 255, 0.2), rgba(227, 0, 255, 0.08));
    border: 2px solid rgba(227, 0, 255, 0.3);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(232, 224, 236, 0.4);
    font-weight: 600;
    font-size: 14px;
    position: relative;
    overflow: hidden;
    animation: glow-pulse 3s ease-in-out infinite;
}

.player-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(227, 0, 255, 0.1), transparent);
    animation: shimmer 2s infinite;
    pointer-events: none;
}

.wt-player-live {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid rgba(227, 0, 255, 0.35);
    background: #000;
    position: relative;
}

/* Глобальная пауза синхронизации (сеть / зависший плеер) */
.wt-player-live.wt-player-frozen {
    min-height: 220px;
    aspect-ratio: 16 / 9;
    max-height: min(56vw, 72vh);
    border-color: rgba(251, 191, 36, 0.45);
    background: radial-gradient(ellipse 80% 70% at 50% 30%, rgba(227, 0, 255, 0.14), #0a0610 72%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(16px, 4vw, 28px);
}

.wt-sync-frozen-inner {
    text-align: center;
    max-width: 420px;
    width: 100%;
}

.wt-sync-frozen-title {
    font-size: clamp(1rem, 2.5vw, 1.15rem);
    font-weight: 900;
    color: #fde68a;
    margin: 0 0 10px;
    letter-spacing: 0.02em;
}

.wt-sync-frozen-desc {
    margin: 0 0 18px;
    font-size: 13px;
    line-height: 1.55;
    color: rgba(232, 224, 236, 0.76);
}

.wt-sync-wait-host {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: rgba(165, 243, 252, 0.85);
}

.wt-sync-resume-box {
    margin-top: 4px;
    padding: 16px;
    border-radius: 14px;
    border: 1px solid rgba(227, 0, 255, 0.28);
    background: rgba(0, 0, 0, 0.42);
    text-align: left;
}

.wt-sync-resume-label {
    margin: 0 0 12px;
    font-size: 12px;
    font-weight: 700;
    color: rgba(232, 224, 236, 0.72);
    line-height: 1.45;
}

.wt-sync-resume-inputs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    align-items: flex-end;
    margin-bottom: 14px;
}

.wt-sync-resume-inputs label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    color: rgba(232, 224, 236, 0.55);
}

.wt-sync-resume-inputs .wt-input {
    width: min(120px, 100%);
    flex: 0 0 auto;
}

.wt-sync-resume-btn {
    width: 100%;
    margin-top: 2px;
    padding: 11px 14px !important;
    font-weight: 800 !important;
    font-size: 13px !important;
}

/* Хост: ручная привязка серии/секунды гостям */
.wt-host-sync-row {
    margin-top: 4px;
}

.wt-host-sync-inputs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 8px;
}

.wt-host-sync-inputs .wt-input {
    width: 88px;
    flex: 0 0 auto;
}

.wt-host-sync-apply {
    flex: 1 1 auto;
    min-width: 140px;
    padding: 10px 14px !important;
    font-weight: 800 !important;
    font-size: 12px !important;
}

.wt-host-sync-note {
    margin: 10px 0 0;
    font-size: 11px;
    line-height: 1.45;
    color: rgba(232, 224, 236, 0.48);
    font-weight: 600;
}

.wt-sync-emergency-row {
    padding: 10px 16px 14px;
    border-top: 1px solid rgba(227, 0, 255, 0.1);
}

.wt-sync-emergency-btn {
    width: 100%;
    font-size: 11px !important;
    font-weight: 700 !important;
    padding: 10px 12px !important;
    border-color: rgba(251, 191, 36, 0.35) !important;
    color: rgba(253, 230, 138, 0.95) !important;
}

.wt-sync-emergency-btn:hover {
    border-color: rgba(251, 191, 36, 0.6) !important;
    background: rgba(251, 191, 36, 0.1) !important;
}

.wt-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.wt-player-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
}

.wt-player-loading-text {
    font-size: 13px;
    font-weight: 700;
    color: rgba(232, 224, 236, 0.85);
}

/* Плеер как на anime/view: responsive 16:9 через padding-bottom */
.page-watch-together .anime-kodik-frame-wrap {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 14px;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.page-watch-together .anime-kodik-frame-wrap .anime-kodik-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Перебить autopointer: гость не должен кликать по Kodik (см. ниже — полноэкранный блокирующий слой) */
.page-watch-together .wt-kodik-player-shell--viewer .anime-kodik-frame-wrap .anime-kodik-iframe {
    pointer-events: none;
}

.page-watch-together .anime-kodik-hint {
    font-size: 0.85rem;
    line-height: 1.45;
    margin: 0;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border: 1px solid rgba(251, 191, 36, 0.35);
    background: rgba(251, 191, 36, 0.08);
    color: #e8e0ec;
}

.page-watch-together .anime-kodik-hint code {
    font-size: 0.8em;
    word-break: break-all;
}

.page-watch-together .anime-kodik-hint--warn {
    border-color: rgba(251, 191, 36, 0.45);
}

.page-watch-together .wt-kodik-token-hint {
    border-radius: 14px;
}

/* Полноэкранный плеер с «стеклянным» чатом поверх видео */
.wt-player-fs-root {
    position: relative;
    width: 100%;
}

.wt-fs-inner {
    position: relative;
    width: 100%;
}

/* Панель «Выйти» только в полноэкранном плеере — прозрачная, проявляется при наведении */
.wt-fs-toolbar--fullscreen-exit {
    display: none;
}

.wt-player-fs-root:fullscreen .wt-fs-toolbar--fullscreen-exit,
.wt-player-fs-root:-webkit-full-screen .wt-fs-toolbar--fullscreen-exit,
.wt-player-fs-root:-moz-full-screen .wt-fs-toolbar--fullscreen-exit {
    display: inline-flex;
    position: absolute;
    top: max(8px, env(safe-area-inset-top, 0px));
    right: max(8px, env(safe-area-inset-right, 0px));
    left: auto;
    z-index: 60;
    margin: 0;
    max-width: none;
    padding: 10px 12px;
    border-radius: 14px;
    background: transparent;
    border: 1px solid transparent;
    box-shadow: none;
    gap: 0;
    opacity: 1;
    pointer-events: auto;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.wt-player-fs-root:fullscreen .wt-fs-toolbar--fullscreen-exit:hover,
.wt-player-fs-root:-webkit-full-screen .wt-fs-toolbar--fullscreen-exit:hover,
.wt-player-fs-root:-moz-full-screen .wt-fs-toolbar--fullscreen-exit:hover,
.wt-player-fs-root:fullscreen .wt-fs-toolbar--fullscreen-exit:focus-within,
.wt-player-fs-root:-webkit-full-screen .wt-fs-toolbar--fullscreen-exit:focus-within,
.wt-player-fs-root:-moz-full-screen .wt-fs-toolbar--fullscreen-exit:focus-within {
    background: rgba(0, 0, 0, 0.58);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
}

/* Кнопка «Выйти» из полноэкрана — едва видна, при наведении на зону — ярче */
.wt-player-fs-root:fullscreen .wt-fs-exit-fs-btn,
.wt-player-fs-root:-webkit-full-screen .wt-fs-exit-fs-btn,
.wt-player-fs-root:-moz-full-screen .wt-fs-exit-fs-btn {
    opacity: 0.28;
    transition: opacity 0.2s ease;
}

.wt-player-fs-root:fullscreen .wt-fs-toolbar--fullscreen-exit:hover .wt-fs-exit-fs-btn,
.wt-player-fs-root:-webkit-full-screen .wt-fs-toolbar--fullscreen-exit:hover .wt-fs-exit-fs-btn,
.wt-player-fs-root:-moz-full-screen .wt-fs-toolbar--fullscreen-exit:hover .wt-fs-exit-fs-btn,
.wt-player-fs-root:fullscreen .wt-fs-toolbar--fullscreen-exit:focus-within .wt-fs-exit-fs-btn,
.wt-player-fs-root:-webkit-full-screen .wt-fs-toolbar--fullscreen-exit:focus-within .wt-fs-exit-fs-btn,
.wt-player-fs-root:-moz-full-screen .wt-fs-toolbar--fullscreen-exit:focus-within .wt-fs-exit-fs-btn {
    opacity: 1;
}

.wt-fs-toolbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 10px;
    border: 1.5px solid rgba(227, 0, 255, 0.35);
    background: rgba(227, 0, 255, 0.1);
    color: #e8e0ec;
    font-family: 'Nunito', sans-serif;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition:
        background 0.2s,
        border-color 0.2s;
}

.wt-fs-toolbar-btn:hover {
    border-color: rgba(227, 0, 255, 0.55);
    background: rgba(227, 0, 255, 0.18);
}

.wt-fs-toolbar-btn--primary {
    border-color: rgba(227, 0, 255, 0.5);
    background: linear-gradient(135deg, rgba(227, 0, 255, 0.22), rgba(168, 85, 247, 0.14));
}

.wt-fs-toolbar-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.wt-fs-video-slot {
    position: relative;
    width: 100%;
}

.wt-fs-chat-overlay:not([hidden]) {
    box-sizing: border-box;
    display: block;
    position: absolute;
    inset: 0;
    z-index: 25;
    pointer-events: none;
}

.wt-fs-chat-glass {
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 52px;
    right: 12px;
    left: auto;
    bottom: auto;
    width: min(100%, 264px);
    max-width: calc(100% - 24px);
    max-height: min(62vh, calc(100% - 68px));
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(12, 8, 20, 0.42);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    transition:
        width 0.22s ease,
        min-width 0.22s ease;
}

.wt-fs-chat-head {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 6px 8px;
    border-bottom: 1px solid rgba(227, 0, 255, 0.1);
    background: rgba(227, 0, 255, 0.05);
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}

.wt-fs-chat-head--dragging {
    cursor: grabbing;
}

.wt-fs-chat-head-title {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(240, 235, 248, 0.82);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
}

.wt-fs-chat-grip-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    opacity: 0.55;
    stroke: currentColor;
}

.wt-fs-chat-collapse {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: #e8e0ec;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
    touch-action: manipulation;
}

.wt-fs-chat-collapse:hover {
    background: rgba(227, 0, 255, 0.22);
}

.wt-fs-chat-messages {
    flex: 1 1 auto;
    min-height: 72px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    line-height: 1.35;
    color: rgba(248, 244, 252, 0.92);
    text-shadow:
        0 0 6px rgba(0, 0, 0, 0.75),
        0 1px 2px rgba(0, 0, 0, 0.85);
}

.wt-fs-chat-messages .msg-bubble {
    text-shadow:
        0 0 10px rgba(0, 0, 0, 0.95),
        0 1px 2px rgba(0, 0, 0, 0.92);
}

.wt-fs-chat-form {
    flex-shrink: 0;
    display: flex;
    align-items: stretch;
    gap: 6px;
    padding: 8px;
    border-top: 1px solid rgba(227, 0, 255, 0.08);
    background: rgba(0, 0, 0, 0.08);
}

.wt-fs-chat-input {
    flex: 1;
    min-width: 0;
}

.wt-fs-chat-send {
    flex-shrink: 0;
    padding: 8px 10px !important;
}

/* Не сжимать кнопку отправки в оверлее чата (как в основной форме) */
.page-watch-together .wt-fs-chat-send.btn-primary {
    min-width: 46px;
    width: auto;
    min-height: 42px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    overflow: visible;
}

.page-watch-together .wt-fs-chat-input {
    padding: 8px 10px;
    font-size: 11px;
}

.wt-fs-chat-overlay--collapsed .wt-fs-chat-glass {
    width: 52px;
    min-width: 52px;
}

.wt-fs-chat-overlay--collapsed .wt-fs-chat-head-title,
.wt-fs-chat-overlay--collapsed .wt-fs-chat-messages,
.wt-fs-chat-overlay--collapsed .wt-fs-chat-form {
    display: none;
}

.wt-fs-chat-overlay--collapsed .wt-fs-chat-head {
    justify-content: center;
    border-bottom: none;
    padding: 10px 8px;
}

.wt-fs-chat-overlay--collapsed .wt-fs-chat-collapse {
    transform: rotate(180deg);
}

.wt-player-fs-root:fullscreen,
.wt-player-fs-root:-webkit-full-screen,
.wt-player-fs-root:-moz-full-screen {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    background: #000;
    padding: 0;
}

.wt-player-fs-root:fullscreen .wt-fs-inner,
.wt-player-fs-root:-webkit-full-screen .wt-fs-inner,
.wt-player-fs-root:-moz-full-screen .wt-fs-inner {
    flex: 1;
    min-height: 0;
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
}

.wt-player-fs-root:fullscreen .wt-fs-video-slot,
.wt-player-fs-root:-webkit-full-screen .wt-fs-video-slot,
.wt-player-fs-root:-moz-full-screen .wt-fs-video-slot {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.wt-player-fs-root:fullscreen .wt-fs-video-slot .anime-kodik-frame-wrap,
.wt-player-fs-root:-webkit-full-screen .wt-fs-video-slot .anime-kodik-frame-wrap,
.wt-player-fs-root:-moz-full-screen .wt-fs-video-slot .anime-kodik-frame-wrap {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding-bottom: 0 !important;
    height: 100% !important;
    border-radius: 0;
    border: none;
}

.participant-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: rgba(227, 0, 255, 0.06);
    border: 1.5px solid rgba(227, 0, 255, 0.15);
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    gap: 6px;
}

.participant-item:hover {
    border-color: rgba(227, 0, 255, 0.4);
    background: rgba(227, 0, 255, 0.12);
    box-shadow: 0 0 15px rgba(227, 0, 255, 0.1);
    transform: translateX(2px);
}

/* Компактный блок на 4 участников без прокрутки */
.wt-participants-panel {
    padding: 10px 12px 12px;
    overflow: visible;
    max-height: none;
}

.wt-participants-label {
    margin-bottom: 8px;
}

.wt-participants-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wt-participant-row.participant-item {
    padding: 8px 10px;
    min-height: 0;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.page-watch-together .wt-participant-row .wt-host-action-btn svg,
.page-watch-together .wt-participant-row .wt-host-action-btn .lucide {
    width: 17px;
    height: 17px;
    min-width: 17px;
    min-height: 17px;
}

.wt-participant-main {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.wt-p-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.wt-p-monogram {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    flex-shrink: 0;
}

.wt-participant-text {
    flex: 1;
    min-width: 0;
}

.wt-participant-name {
    font-weight: 700;
    font-size: 11px;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wt-participant-meta {
    font-size: 9px;
    color: rgba(232, 224, 236, 0.42);
    line-height: 1.2;
}

.wt-participant-mic-on {
    width: 14px;
    height: 14px;
    color: #22c55e;
    flex-shrink: 0;
}

.wt-host-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    min-width: max-content;
}

.wt-host-action-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid rgba(227, 0, 255, 0.45);
    border-radius: 10px;
    background: rgba(227, 0, 255, 0.12);
    color: #f0e8ff;
    cursor: pointer;
    transition:
        background 0.2s,
        border-color 0.2s,
        transform 0.15s;
}

.wt-host-action-btn:hover {
    background: rgba(227, 0, 255, 0.28);
    border-color: #e300ff;
    transform: scale(1.06);
}

.wt-host-action-btn .lucide,
.wt-host-action-btn svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.25;
}

/* До подстановки SVG Lucide — плейсхолдер, чтобы кнопки не были «пустыми» */
.page-watch-together .wt-host-action-btn > i[data-lucide] {
    display: block;
    width: 16px;
    height: 16px;
}

.wt-host-action-btn--danger {
    border-color: rgba(248, 113, 113, 0.55);
    background: rgba(248, 113, 113, 0.12);
    color: #fecaca;
}

.wt-host-action-btn--danger:hover {
    background: rgba(248, 113, 113, 0.25);
    border-color: #f87171;
}

.wt-catalog-open-btn {
    width: 100%;
    margin-top: 0;
    padding: 10px;
    font-size: 12px;
}

.wt-chat-toolbar {
    background: rgba(227, 0, 255, 0.06);
    padding: 10px 14px;
    border-bottom: 1px solid rgba(227, 0, 255, 0.12);
    font-weight: 700;
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    border-radius: 16px 16px 0 0;
}

.wt-icon-btn {
    box-sizing: border-box;
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid rgba(227, 0, 255, 0.4);
    border-radius: 10px;
    background: rgba(227, 0, 255, 0.1);
    color: #e8e0ec;
    cursor: pointer;
    transition:
        background 0.2s,
        border-color 0.2s;
}

.wt-icon-btn:hover {
    background: rgba(227, 0, 255, 0.22);
    border-color: #e300ff;
}

.wt-lucide-icon {
    width: 18px;
    height: 18px;
    display: block;
}

.wt-lucide-icon--close {
    width: 20px;
    height: 20px;
}

.wt-modal-close {
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1.5px solid rgba(227, 0, 255, 0.35);
    border-radius: 12px;
    background: rgba(227, 0, 255, 0.1);
    color: #e8e0ec;
    cursor: pointer;
    transition:
        background 0.2s,
        border-color 0.2s;
}

.wt-modal-close:hover {
    background: rgba(227, 0, 255, 0.22);
    border-color: #e300ff;
}

.voice-indicator {
    animation: pulse-ring 1.5s ease-out infinite;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #22c55e;
}

/* Выше .top-navbar (1000), чтобы матовые окна перекрывали шапку */
body.page-watch-together .modal {
    z-index: 1150;
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease;
    padding: 1rem;
}
.modal.show {
    display: flex;
}

.modal-content {
    background: linear-gradient(135deg, rgba(19, 18, 29, 0.98) 0%, rgba(26, 13, 46, 0.98) 100%);
    border: 1.5px solid rgba(227, 0, 255, 0.3);
    border-radius: 24px;
    padding: 24px;
    width: 90%;
    max-width: 480px;
    animation: modalSlideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(227, 0, 255, 0.2);
}

.msg-bubble {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 13px;
    line-height: 1.4;
    word-wrap: break-word;
    animation: messageSlide 0.3s ease;
}

.msg-sent {
    background: linear-gradient(135deg, #e300ff, #c800e0);
    color: #fff;
    margin-left: auto;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 12px rgba(227, 0, 255, 0.3);
}
.msg-recv {
    background: rgba(227, 0, 255, 0.12);
    color: #e8e0ec;
    border-bottom-left-radius: 4px;
    border-left: 3px solid #e300ff;
}
.msg-system {
    text-align: center;
    font-size: 11px;
    color: rgba(232, 224, 236, 0.5);
    padding: 8px 0;
    font-style: italic;
}

body.page-watch-together .toast {
    z-index: 1250;
}

.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: linear-gradient(135deg, #e300ff, #c800e0);
    color: #fff;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    z-index: 200;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    box-shadow: 0 8px 30px rgba(227, 0, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 92%;
    text-align: center;
}

.section-label {
    font-size: 11px;
    color: rgba(232, 224, 236, 0.6);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    background: linear-gradient(90deg, #e300ff, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tabs {
    display: flex;
    gap: 4px;
    background: rgba(227, 0, 255, 0.06);
    padding: 6px;
    border-radius: 12px;
    margin-bottom: 12px;
    border: 1px solid rgba(227, 0, 255, 0.15);
}
.tab {
    flex: 1;
    padding: 10px 12px;
    border: none;
    background: transparent;
    color: rgba(232, 224, 236, 0.6);
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    font-size: 12px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}
.tab.active {
    background: linear-gradient(135deg, rgba(227, 0, 255, 0.3), rgba(227, 0, 255, 0.15));
    color: #e300ff;
    box-shadow: 0 0 15px rgba(227, 0, 255, 0.2);
}

.wt-room-header {
    flex-shrink: 0;
    z-index: 25;
    background: linear-gradient(135deg, rgba(227, 0, 255, 0.08), rgba(227, 0, 255, 0.04));
    border-bottom: 1.5px solid rgba(227, 0, 255, 0.2);
    padding: 14px 16px;
    animation: headerSlideDown 0.5s ease;
}

.wt-room-header-inner {
    max-width: 1400px;
    margin: 0 auto;
}

.wt-room-header-meta {
    font-size: 12px;
    color: rgba(232, 224, 236, 0.5);
}

.wt-room-header-anime {
    color: #e300ff;
    font-weight: 700;
}

.wt-room-code-line {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    opacity: 0.7;
    color: rgba(232, 224, 236, 0.45);
}

.wt-room-body-scroll {
    flex: 1;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.wt-poster-actions-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 12px 16px;
    margin-bottom: 16px;
}

.wt-poster-actions-row .wt-anime-strip-inner {
    flex: 1 1 220px;
    min-width: 0;
}

.wt-poster-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-left: auto;
    flex: 0 1 auto;
}

.page-watch-together .wt-poster-actions .wt-header-leave-btn {
    flex-shrink: 0;
}

.page-watch-together #wtRoomShell {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1;
}

.wt-room-title-gradient {
    font-size: 20px;
    font-weight: 900;
    margin: 0;
    margin-bottom: 2px;
    background: linear-gradient(90deg, #e300ff, #ff00ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleGlow 2s ease-in-out infinite;
}

.wt-together-app {
    max-width: 100%;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    max-height: 100%;
}

.wt-main-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 20px;
    min-height: calc(100% - 80px);
}

@media (max-width: 960px) {
    .wt-main-grid {
        grid-template-columns: 1fr;
    }
}

.wt-input {
    flex: 1;
    background: rgba(227, 0, 255, 0.08);
    border: 1.5px solid rgba(227, 0, 255, 0.2);
    color: #e8e0ec;
    font-family: 'Nunito', sans-serif;
    font-size: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    outline: none;
    transition: all 0.3s ease;
}
.wt-input:focus {
    border-color: #e300ff;
}

.wt-host-player-hint {
    margin: 10px 0 0;
    font-size: 11px;
    line-height: 1.45;
    color: rgba(232, 224, 236, 0.48);
    font-weight: 600;
}

.wt-kodik-player-shell {
    width: 100%;
}

.wt-viewer-sync-banner {
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    padding: 8px 10px;
    margin-bottom: 8px;
    border-radius: 10px;
    background: rgba(227, 0, 255, 0.1);
    border: 1px solid rgba(227, 0, 255, 0.28);
    color: rgba(232, 224, 236, 0.75);
}

/* Трансляция: гости не управляют плеером Kodik — только смотрят */
.wt-kodik-player-shell--viewer .wt-kodik-session-iframe {
    pointer-events: none;
}

/* Затемняем нижнюю зону + ловим все клики по области плеера (Kodik рисует UI по всему кадру) */
.wt-kodik-player-shell--viewer .anime-kodik-frame-wrap {
    position: relative;
}

/* Реальный слой поверх iframe (надёжнее ::after в части браузеров с отдельным композиторным слоем iframe) */
.wt-kodik-player-shell--viewer .wt-kodik-pointer-blocker {
    position: absolute;
    inset: 0;
    z-index: 50;
    pointer-events: auto;
    cursor: default;
    background: transparent;
    touch-action: none;
}

.wt-broadcast-chrome-mask {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 26%;
    max-height: 160px;
    pointer-events: none;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.35) 45%, transparent 100%);
    z-index: 2;
}

.wt-viewer-sync-banner.wt-broadcast-banner {
    border-color: rgba(52, 211, 153, 0.35);
    background: rgba(16, 185, 129, 0.1);
    color: rgba(209, 250, 229, 0.88);
}

/* WebRTC: экран ведущего */
.wt-screencast-host-block {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid rgba(227, 0, 255, 0.15);
}
.wt-screencast-host-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}
.wt-player-screencast-guest {
    min-height: 200px;
}
.wt-screencast-guest-shell,
.wt-screencast-guest-inner {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}
.wt-screencast-banner {
    flex-shrink: 0;
}
.wt-screencast-video-wrap {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    background: #000;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.wt-screencast-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}
.wt-screencast-wait {
    font-size: 12px;
    color: rgba(232, 224, 236, 0.55);
    margin: 0;
}
.wt-screencast-unmute {
    align-self: flex-start;
}

.wt-screencast-guest-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.wt-player-guest-wait-screencast {
    min-height: 220px;
}

.wt-guest-wait-screencast-inner {
    text-align: center;
    padding: 24px 16px;
    max-width: 440px;
    margin: 0 auto;
}

.wt-guest-wait-icon {
    width: 56px;
    height: 56px;
    opacity: 0.35;
    margin: 12px 0;
    color: #e300ff;
}

.wt-guest-wait-title {
    font-size: 14px;
    font-weight: 700;
    color: rgba(232, 224, 236, 0.82);
    margin: 0 0 8px;
    line-height: 1.45;
}

.wt-guest-wait-meta {
    font-size: 12px;
    color: rgba(232, 224, 236, 0.52);
    margin: 0;
    line-height: 1.5;
}

.wt-anime-strip-inner {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
}

.wt-anime-poster-sm {
    width: 64px;
    height: 92px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid rgba(227, 0, 255, 0.3);
    background: rgba(227, 0, 255, 0.08);
    flex-shrink: 0;
}

/* Стартовый экран — фиксированный оверлей (без этого блок встаёт в поток и ломает вёрстку) */
.wt-join-modal {
    position: fixed;
    inset: 0;
    z-index: 1150;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.wt-join-modal.hidden {
    display: none !important;
}

.wt-join-modal .wt-join-content {
    position: relative;
    max-width: 440px;
    width: 100%;
    padding: 1.75rem 1.5rem 1.5rem;
    background: linear-gradient(135deg, rgba(19, 18, 29, 0.98), rgba(26, 13, 46, 0.98));
    border: 1.5px solid rgba(227, 0, 255, 0.3);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(227, 0, 255, 0.15);
}

.wt-join-dismiss {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 10px;
    background: rgba(227, 0, 255, 0.12);
    color: #e8e0ec;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s;
}
.wt-join-dismiss:hover {
    background: rgba(227, 0, 255, 0.25);
}

.wt-join-title {
    margin: 0 2rem 0.75rem 0;
    font-size: 1.35rem;
    font-weight: 900;
    background: linear-gradient(90deg, #e300ff, #ff00ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.wt-join-desc {
    margin: 0 0 1rem;
    font-size: 0.9rem;
    line-height: 1.5;
    color: rgba(232, 224, 236, 0.78);
}

.wt-vip-notice {
    font-size: 0.82rem;
    line-height: 1.45;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    border-radius: 12px;
    background: rgba(227, 0, 255, 0.08);
    border-left: 3px solid #e300ff;
    color: rgba(232, 224, 236, 0.85);
}

.wt-join-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.wt-join-btn {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.wt-join-btn.primary {
    background: linear-gradient(135deg, #e300ff, #c800e0);
    color: #fff;
    box-shadow: 0 4px 16px rgba(227, 0, 255, 0.35);
}
.wt-join-btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 22px rgba(227, 0, 255, 0.45);
}

.wt-join-btn.secondary {
    background: rgba(227, 0, 255, 0.08);
    color: #e300ff;
    border: 2px solid rgba(227, 0, 255, 0.35);
}
.wt-join-btn.secondary:hover {
    background: rgba(227, 0, 255, 0.15);
}

/* Каталог аниме: по умолчанию скрыт; без display:none блок показывался в потоке документа */
.wt-anime-modal {
    position: fixed;
    inset: 0;
    z-index: 1150;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.82);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.wt-anime-modal.active {
    display: flex;
}

.wt-invite-modal-legacy {
    z-index: 1150;
}

.wt-invite-modal-legacy.active {
    display: flex;
}

.wt-anime-modal-content {
    width: 100%;
    max-width: 920px;
    height: min(88vh, 720px);
    max-height: min(88vh, 720px);
    min-height: 380px;
    display: flex;
    flex-direction: column;
    /* Не обрезать сетку каталога снизу: только скролл у .wt-anime-grid */
    overflow-x: hidden;
    overflow-y: hidden;
    background: linear-gradient(135deg, rgba(19, 18, 29, 0.98), rgba(26, 13, 46, 0.98)) !important;
    border: 1.5px solid rgba(227, 0, 255, 0.3) !important;
    border-radius: 24px !important;
}

.wt-anime-modal-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(227, 0, 255, 0.15);
    flex-shrink: 0;
}

.wt-anime-modal-heading {
    flex: 1 1 100%;
    min-width: 0;
}

.wt-anime-modal-header h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: #e8e0ec;
}

.wt-anime-modal-sub {
    margin: 0.35rem 0 0;
    font-size: 0.78rem;
    line-height: 1.45;
    color: rgba(232, 224, 236, 0.52);
    font-weight: 600;
    max-width: 42rem;
}

.wt-anime-search {
    flex: 1 1 200px;
    min-width: 160px;
    padding: 0.55rem 0.85rem;
    border-radius: 10px;
    border: 1.5px solid rgba(227, 0, 255, 0.25);
    background: rgba(227, 0, 255, 0.08);
    color: #e8e0ec;
    font-family: 'Nunito', sans-serif;
    font-size: 0.85rem;
}

.wt-anime-search:focus {
    outline: none;
    border-color: #e300ff;
}

.wt-anime-modal-close {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border: none;
    border-radius: 10px;
    background: rgba(227, 0, 255, 0.12);
    color: #e8e0ec;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}
.wt-anime-modal-close:hover {
    background: rgba(227, 0, 255, 0.22);
}

/* Каталог: горизонтальная прокрутка, карточки — квадратные постеры, заполнение по столбцам */
.wt-anime-grid-scroll {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: stretch;
    gap: 6px;
    padding: 0 6px 12px;
    position: relative;
}

.wt-anime-grid-viewport {
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(227, 0, 255, 0.45) rgba(0, 0, 0, 0.2);
}

.wt-anime-grid-viewport::-webkit-scrollbar {
    height: 8px;
}

.wt-anime-grid-viewport::-webkit-scrollbar-thumb {
    background: rgba(227, 0, 255, 0.4);
    border-radius: 4px;
}

.wt-anime-scroll-arrow {
    flex-shrink: 0;
    align-self: center;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(227, 0, 255, 0.18);
    color: #fff;
    font-size: 1.55rem;
    line-height: 1;
    font-weight: 300;
    cursor: pointer;
    transition:
        background 0.2s,
        opacity 0.2s,
        transform 0.2s;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0 2px 0;
}

.wt-anime-scroll-arrow:hover:not(:disabled) {
    background: rgba(227, 0, 255, 0.35);
    transform: scale(1.05);
}

.wt-anime-scroll-arrow:disabled {
    opacity: 0.28;
    cursor: default;
}

.wt-anime-grid-scroll:not(.wt-anime-grid-scroll--overflow) .wt-anime-scroll-arrow {
    visibility: hidden;
    pointer-events: none;
}

.wt-anime-grid {
    padding: 12px 8px 16px;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 112px;
    grid-template-rows: repeat(3, auto);
    gap: 12px 14px;
    width: max-content;
    min-height: 0;
    align-items: start;
    justify-items: stretch;
}

.page-watch-together .wt-anime-modal .wt-anime-grid {
    grid-auto-columns: minmax(100px, 118px);
    grid-template-rows: repeat(3, auto);
}

@media (max-width: 520px) {
    .page-watch-together .wt-anime-modal .wt-anime-grid {
        grid-auto-columns: minmax(92px, 104px);
        grid-template-rows: repeat(2, auto);
        gap: 10px 12px;
    }

    .wt-anime-scroll-arrow {
        width: 34px;
        height: 34px;
        font-size: 1.35rem;
    }
}

.wt-anime-pick {
    cursor: pointer;
    border-radius: 14px;
    overflow: hidden;
    border: 1.5px solid rgba(227, 0, 255, 0.2);
    background: rgba(227, 0, 255, 0.06);
    min-width: 0;
    display: flex;
    flex-direction: column;
    height: auto;
    align-self: start;
    transition:
        border-color 0.2s,
        transform 0.2s,
        box-shadow 0.2s;
}

.wt-anime-pick:hover {
    border-color: rgba(227, 0, 255, 0.55);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(227, 0, 255, 0.18);
}

.wt-anime-pick-poster {
    position: relative;
    width: 100%;
    flex-shrink: 0;
    aspect-ratio: 2 / 3;
    min-height: 156px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.page-watch-together .wt-anime-modal .wt-anime-pick-poster {
    aspect-ratio: 1 / 1;
    min-height: 0;
}

.page-watch-together .wt-anime-pick {
    width: 100%;
    min-width: 0;
    max-width: none;
}

.wt-anime-pick-poster .pick-rating,
.wt-anime-pick-poster .pick-eps {
    position: absolute;
    font-size: 10px;
    font-weight: 800;
    padding: 3px 6px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.72);
    color: #fff;
    line-height: 1.2;
}

.wt-anime-pick-poster .pick-rating {
    top: 6px;
    left: 6px;
}

.wt-anime-pick-poster .pick-eps {
    bottom: 6px;
    right: 6px;
}

.wt-anime-pick-title {
    padding: 8px 8px 10px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.35;
    color: rgba(232, 224, 236, 0.92);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.7em;
}

.page-watch-together .wt-anime-modal .wt-anime-pick-title {
    padding: 6px 6px 8px;
    font-size: 10px;
    min-height: 2.5em;
}

.wt-anime-grid-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: rgba(232, 224, 236, 0.45);
    font-size: 0.9rem;
}

.page-watch-together .wt-anime-modal .wt-anime-grid:has(> .wt-anime-grid-empty:only-child) {
    display: flex;
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    grid-auto-flow: initial;
    grid-auto-columns: unset;
    grid-template-rows: unset;
}

/* Выход из комнаты — используем .modal */
.exit-modal-text {
    color: rgba(232, 224, 236, 0.6);
    margin-bottom: 20px;
    line-height: 1.45;
}

.wt-invite-friend-btn {
    background: linear-gradient(135deg, #e300ff, #c800e0) !important;
    color: #fff !important;
    border: none !important;
    padding: 6px 12px !important;
    border-radius: 10px !important;
    font-weight: 700 !important;
    font-size: 11px !important;
    cursor: pointer;
}
.wt-invite-friend-btn:disabled {
    opacity: 0.45 !important;
    cursor: not-allowed !important;
}
