        :root {
            --bg: #0b0f1a;
            --bg-panel: #131a2b;
            --bg-card: #1a2340;
            --accent: #6c5ce7;
            --accent-glow: rgba(108, 92, 231, 0.3);
            --accent-hover: #5a4bd1;
            --danger: #ff4757;
            --success: #2ed573;
            --warning: #ffa502;
            --text: #f1f2f6;
            --text-muted: #7f8fa6;
            --border: #2d3748;
            --radius: 16px;
        }

        * { margin: 0; padding: 0; box-sizing: border-box; }
        html { scroll-behavior: smooth; }
        body { font-family: 'Inter', -apple-system, sans-serif; background: var(--bg); color: var(--text); }

        .app-shell { height: 100vh; display: flex; flex-direction: column; overflow: hidden; }

        /* ─── HEADER ─── */
        header {
            height: 60px; background: var(--bg-panel); border-bottom: 1px solid var(--border);
            display: flex; align-items: center; justify-content: space-between; padding: 0 20px; flex-shrink: 0; z-index: 100;
        }
        .logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; }
        .logo-icon {
            width: 34px; height: 34px; background: linear-gradient(135deg, var(--accent), #a29bfe);
            border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 0.9rem;
        }
        .header-stats { display: flex; align-items: center; gap: 16px; }
        .stat-badge {
            display: flex; align-items: center; gap: 6px; font-size: 0.82rem; color: var(--text-muted);
            background: var(--bg-card); padding: 5px 12px; border-radius: 20px;
        }
        .stat-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); animation: blink 2s infinite; }
        @keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

        /* ─── MAIN ─── */
        main { flex: 1; display: grid; grid-template-columns: 1fr 360px; overflow: hidden; }

        /* ─── VIDEO ─── */
        .video-section { position: relative; background: #000; overflow: hidden; }
        #remote-video { width: 100%; height: 100%; object-fit: cover; display: none; }
        #partner-placeholder {
            position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; background: var(--bg-card);
        }
        .placeholder-icon {
            width: 90px; height: 90px; border-radius: 50%; background: var(--bg-panel);
            display: flex; align-items: center; justify-content: center; font-size: 2.2rem; color: var(--text-muted);
        }
        .placeholder-icon.searching { animation: pulse-ring 1.5s infinite; }
        @keyframes pulse-ring { 0% { box-shadow: 0 0 0 0 var(--accent-glow); } 70% { box-shadow: 0 0 0 25px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
        #partner-placeholder span { color: var(--text-muted); font-size: 0.95rem; }

        /* ─── PiP ─── */
        .local-video-pip {
            position: absolute; bottom: 90px; right: 16px; width: 180px; height: 135px; border-radius: 12px; overflow: hidden;
            border: 2px solid var(--border); background: var(--bg-card); z-index: 20; box-shadow: 0 4px 20px rgba(0,0,0,0.5);
            display: flex; align-items: center; justify-content: center;
        }
        .local-video-pip video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); display: none; }
        .local-video-pip .pip-placeholder { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--text-muted); font-size: 0.7rem; }
        .local-video-pip .pip-placeholder i { font-size: 1.4rem; }
        .pip-label { position: absolute; bottom: 6px; left: 6px; background: rgba(0,0,0,0.7); padding: 3px 8px; border-radius: 6px; font-size: 0.65rem; z-index: 5; }

        /* ─── ФИЛЬТР РЕГИОНА (Скрыт по умолчанию, готов к использованию) ─── */
        .filter-bar {
            position: absolute; top: 16px; left: 16px; z-index: 30; display: none; /* СКРЫТ */ align-items: center; gap: 8px;
            background: rgba(19, 26, 43, 0.9); backdrop-filter: blur(12px); border: 1px solid var(--border); border-radius: 30px; padding: 8px 14px; font-size: 0.8rem; color: var(--text-muted);
        }
        .filter-bar select {
            background: var(--bg-card); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 6px 8px; font-size: 0.8rem; outline: none; font-family: inherit; cursor: pointer;
        }
        .filter-bar .my-geo { color: var(--success); font-size: 0.75rem; }

        /* ─── CONTROLS ─── */
        .controls {
            position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 12px;
            background: rgba(19, 26, 43, 0.92); backdrop-filter: blur(16px); padding: 12px 22px; border-radius: 60px; border: 1px solid var(--border); z-index: 50;
        }
        .ctrl-btn {
            width: 48px; height: 48px; border-radius: 50%; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center;
            font-size: 1.1rem; color: white; background: var(--bg-card); transition: all 0.2s;
        }
        .ctrl-btn:hover { transform: scale(1.1); background: var(--border); }
        .ctrl-btn.off { background: var(--danger); }
        .ctrl-btn.off:hover { background: #e84040; }
        .ctrl-btn.start { width: 56px; height: 56px; background: linear-gradient(135deg, var(--success), #7bed9f); font-size: 1.3rem; }
        .ctrl-btn.next { width: 56px; height: 56px; background: linear-gradient(135deg, var(--accent), #a29bfe); font-size: 1.3rem; box-shadow: 0 4px 20px var(--accent-glow); }
        .ctrl-btn.stop { background: var(--danger); }
        .ctrl-btn.report { background: transparent; color: var(--warning); font-size: 1rem; }
        .ctrl-btn.report:hover { background: rgba(255,165,2,0.15); }

        /* ─── SIDEBAR ─── */
        .sidebar { background: var(--bg-panel); border-left: 1px solid var(--border); display: flex; flex-direction: column; }
        .chat-header { padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
        .chat-header h3 { font-size: 0.92rem; font-weight: 600; display: flex; align-items: center; gap: 8px; }
        .chat-header h3 i { color: var(--accent); }
        .partner-info { font-size: 0.75rem; color: var(--text-muted); }
        .chat-messages { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
        .msg { max-width: 82%; padding: 10px 14px; border-radius: 14px; font-size: 0.86rem; line-height: 1.5; word-break: break-word; animation: msgIn 0.2s ease; }
        @keyframes msgIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
        .msg.partner { align-self: flex-start; background: var(--bg-card); border-bottom-left-radius: 4px; }
        .msg.me { align-self: flex-end; background: var(--accent); border-bottom-right-radius: 4px; }
        .msg.system { align-self: center; background: none; color: var(--text-muted); font-size: 0.76rem; font-style: italic; padding: 4px 0; }
        .typing-indicator { padding: 4px 16px; font-size: 0.76rem; color: var(--text-muted); font-style: italic; min-height: 22px; }
        .chat-input { padding: 12px 14px; border-top: 1px solid var(--border); display: flex; gap: 8px; }
        .chat-input input { flex: 1; background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 11px 14px; color: var(--text); font-size: 0.88rem; outline: none; transition: border-color 0.2s; }
        .chat-input input:focus { border-color: var(--accent); }
        .chat-input button { width: 44px; height: 44px; border-radius: 12px; border: none; background: var(--accent); color: white; font-size: 1rem; cursor: pointer; transition: background 0.2s; }
        .chat-input button:hover { background: var(--accent-hover); }

        /* ─── FOOTER ─── */
        footer {
            height: 44px; background: var(--bg-panel); border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: center; gap: 8px;
            font-size: 0.72rem; color: var(--text-muted); flex-shrink: 0; flex-wrap: wrap; padding: 0 16px;
        }
        footer a { color: var(--text-muted); text-decoration: none; transition: color 0.2s; }
        footer a:hover { color: var(--accent); }
        footer .sep { color: var(--border); }

        /* ─── SEO-СЕКЦИЯ ─── */
        .seo-section { background: var(--bg); padding: 60px 20px; border-top: 1px solid var(--border); }
        .seo-container { max-width: 860px; margin: 0 auto; }
        .seo-container h1 { font-size: 1.8rem; font-weight: 800; margin-bottom: 16px; line-height: 1.3; }
        .seo-container h2 { font-size: 1.25rem; font-weight: 700; margin: 32px 0 12px; }
        .seo-container p, .seo-container li { color: var(--text-muted); font-size: 0.95rem; line-height: 1.7; margin-bottom: 10px; }
        .seo-container strong { color: var(--text); }
        .seo-container ul { padding-left: 22px; margin-bottom: 12px; }
        .seo-faq details { background: var(--bg-panel); border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px; margin-bottom: 10px; }
        .seo-faq summary { cursor: pointer; font-weight: 600; font-size: 0.95rem; }
        .seo-faq details p { margin: 10px 0 0; }

        /* ─── ОВЕРЛЕИ ─── */
        .overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.85); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; z-index: 5000; }
        .overlay.hidden { display: none; }
        .overlay-card { background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 36px; text-align: center; max-width: 420px; width: 92%; }
        .overlay-card h2 { margin-bottom: 10px; font-size: 1.3rem; }
        .overlay-card p { color: var(--text-muted); margin-bottom: 20px; font-size: 0.88rem; line-height: 1.6; }
        .overlay-card .legal-links { margin-bottom: 20px; font-size: 0.82rem; line-height: 1.8; }
        .overlay-card .legal-links a { color: var(--accent); text-decoration: none; }
        .overlay-card .legal-links a:hover { text-decoration: underline; }
        .btn-row { display: flex; gap: 12px; justify-content: center; }
        .btn-primary { background: linear-gradient(135deg, var(--accent), #a29bfe); color: white; border: none; padding: 13px 28px; border-radius: 12px; font-size: 0.95rem; font-weight: 600; cursor: pointer; transition: all 0.2s; }
        .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px var(--accent-glow); }
        .btn-secondary { background: var(--bg-card); color: var(--text-muted); border: 1px solid var(--border); padding: 13px 28px; border-radius: 12px; font-size: 0.95rem; font-weight: 500; cursor: pointer; transition: all 0.2s; }
        .btn-secondary:hover { background: var(--border); }
        .ban-card { border-color: var(--danger); }
        .ban-card h2 { color: var(--danger); }

        /* ─── TOAST ─── */
        .toast { position: fixed; top: 74px; right: 20px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 12px 18px; font-size: 0.83rem; z-index: 6000; animation: slideIn 0.3s ease; max-width: 300px; }
        .toast.error { border-color: var(--danger); }
        .toast.success { border-color: var(--success); }
        @keyframes slideIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

        ::-webkit-scrollbar { width: 5px; }
        ::-webkit-scrollbar-track { background: transparent; }
        ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

        @media (max-width: 900px) {
            main { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
            .sidebar { border-left: none; border-top: 1px solid var(--border); }
            .local-video-pip { width: 120px; height: 90px; bottom: 80px; right: 10px; }
            .controls { bottom: 14px; padding: 10px 16px; gap: 8px; }
            .ctrl-btn { width: 42px; height: 42px; font-size: 1rem; }
            .ctrl-btn.start, .ctrl-btn.next { width: 50px; height: 50px; }
            .seo-container h1 { font-size: 1.4rem; }
        }