/* ============================================================
   SUY — Giao diện 2026 (bản port từ demo đã duyệt)
   Ngôn ngữ thiết kế: nền tối sâu + quầng aurora xanh ngọc/xanh trời,
   bề mặt kính mờ, bo góc lớn, mobile kiểu webapp (dock nổi + sheet),
   PC bố cục hai cột. Hai màu chức năng: xanh dương = người lắng nghe,
   xanh ngọc = điểm nhấn / người chia sẻ.
   ============================================================ */
:root {
    --bg-color: #070b16;
    --panel: rgba(255, 255, 255, 0.055);
    --panel-2: rgba(255, 255, 255, 0.1);
    --card-solid: #101a2d;
    --line: rgba(255, 255, 255, 0.09);
    --text-color: #eef3fb;
    --muted: #95a5c0;
    --faint: #5f708c;
    --mint: #2dd4bf;
    --sky: #38bdf8;
    --listener: #2f7fe0;
    --listener-2: #2563eb;
    --sharer: #1fae7c;
    --sharer-2: #0ea573;
    --success-color: #34d399;
    --warning-color: #fbbf24;
    --danger-color: #fb4d6d;
    --danger-2: #e11d48;
    --message-sent: #17755e;
    --message-received: rgba(255, 255, 255, 0.08);
    --radius: 24px;
    --radius-lg: 28px;
    --shadow: 0 24px 50px rgba(0, 0, 0, 0.5);
    --shadow-sm: 0 10px 24px rgba(0, 0, 0, 0.35);
    --transition: 0.22s ease;
}
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', system-ui, -apple-system, sans-serif; -webkit-tap-highlight-color: transparent; }
body {
    color: var(--text-color); height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden;
    background:
        radial-gradient(900px 480px at 8% -8%, rgba(45, 212, 191, 0.16), transparent 60%),
        radial-gradient(820px 520px at 100% 0%, rgba(56, 189, 248, 0.12), transparent 58%),
        radial-gradient(1000px 640px at 50% 115%, rgba(59, 130, 246, 0.11), transparent 60%),
        linear-gradient(180deg, #0a1120, #070b16 55%);
    background-color: var(--bg-color);
}
button { font-family: inherit; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.14); border-radius: 99px; }
::-webkit-scrollbar-track { background: transparent; }

.app-container { display: flex; flex-direction: column; width: 100%; max-width: 1400px; margin: 0 auto; padding: 14px 16px 8px; height: 100%; }

/* ---------- HEADER ---------- */
.app-header { margin-bottom: 10px; }
.header-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.brand-group { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; }
.logo-mark { width: 42px; height: 42px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 19px; color: #fff; background: linear-gradient(135deg, var(--mint), var(--sky)); box-shadow: 0 8px 22px rgba(45, 212, 191, 0.35); flex: none; }
.brand-text { display: flex; flex-direction: column; }
.app-logo { font-size: 21px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; color: #fff; text-decoration: line-through; text-decoration-color: var(--danger-color); text-decoration-thickness: 3px; text-decoration-skip-ink: none; }
.brand-tagline { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.karma-badge { background: rgba(251, 191, 36, 0.1); border: 1px solid rgba(251, 191, 36, 0.38); color: #ffd98a; padding: 5px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 600; display: flex; align-items: center; gap: 5px; }
.verified-badge { background: rgba(56, 189, 248, 0.12); border: 1px solid rgba(56, 189, 248, 0.5); color: #bfe3ff; padding: 5px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }

.header-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.help-trigger-btn { background: rgba(251, 77, 109, 0.08); border: 1px solid rgba(251, 77, 109, 0.4); color: #fda4af; padding: 9px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 7px; transition: var(--transition); }
.help-trigger-btn:hover { background: rgba(251, 77, 109, 0.16); }
.filter-trigger-btn { background: var(--panel); border: 1px solid var(--line); color: var(--text-color); padding: 9px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 8px; transition: var(--transition); backdrop-filter: blur(8px); }
.filter-trigger-btn:hover { background: var(--panel-2); }
.filter-count-badge { background: rgba(56, 189, 248, 0.14); border: 1px solid rgba(56, 189, 248, 0.4); color: #9fd8ff; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; }

.mode-tabs { margin-top: 12px; display: flex; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); border-radius: 999px; padding: 4px; gap: 2px; max-width: 560px; }
.mode-tab { flex: 1; background: transparent; border: none; color: var(--muted); padding: 9px 6px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 13px; transition: var(--transition); display: flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap; }
.mode-tab:hover { color: var(--text-color); }
.mode-tab.active { background: rgba(255, 255, 255, 0.13); color: #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3); }
.mode-tab.active i { color: var(--mint); }
.header-note { font-size: 11.5px; color: var(--faint); margin-top: 9px; line-height: 1.5; }

/* ---------- KHUNG CHÍNH / SÂN KHẤU ---------- */
.main-content { display: flex; flex: 1; gap: 14px; min-height: 0; position: relative; }
.media-area { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.media-view { flex: 1; position: relative; border-radius: var(--radius-lg); overflow: hidden; isolation: isolate; min-height: 0;
    background: linear-gradient(160deg, #101c33, #0a1322 60%, #081020); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }

/* HUD trong cuộc gọi */
.call-top-hud { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 8px; z-index: 45; pointer-events: none; }
.call-timer-pill { pointer-events: auto; background: rgba(5, 9, 18, 0.55); backdrop-filter: blur(10px); border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700; display: flex; align-items: center; gap: 7px; font-variant-numeric: tabular-nums; }
.rec-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--danger-color); animation: pulseDot 1.6s infinite; }
@keyframes pulseDot { 0% { box-shadow: 0 0 0 0 rgba(251, 77, 109, 0.45); } 70% { box-shadow: 0 0 0 7px rgba(251, 77, 109, 0); } 100% { box-shadow: 0 0 0 0 rgba(251, 77, 109, 0); } }
.hud-actions { display: flex; flex-wrap: wrap; gap: 6px; pointer-events: auto; justify-content: flex-end; }
.hud-btn { border: 1px solid var(--line); background: rgba(5, 9, 18, 0.55); backdrop-filter: blur(10px); padding: 7px 12px; border-radius: 999px; font-size: 11.5px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 6px; color: #dbe7f7; transition: 0.2s; }
.hud-btn:hover { background: rgba(255, 255, 255, 0.14); }
.hud-btn:disabled { opacity: 0.55; cursor: default; }
.hud-btn.karma-btn { color: #ffb3c2; }
.hud-btn.report-btn { color: #fda4af; }

/* Vẽ chung */
.draw-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 32; pointer-events: none; touch-action: none; }
.draw-canvas.active { pointer-events: auto; cursor: crosshair; }
.draw-toolbar { position: absolute; top: 56px; left: 50%; transform: translateX(-50%); background: rgba(5, 9, 18, 0.92); border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px; display: flex; align-items: center; gap: 10px; z-index: 50; box-shadow: var(--shadow); }
.draw-title { font-size: 12.5px; font-weight: 600; color: #b7f4e4; }
#draw-color { width: 26px; height: 26px; border: none; border-radius: 50%; cursor: pointer; background: transparent; }
.draw-tool-btn { background: rgba(255, 255, 255, 0.08); border: none; color: white; padding: 4px 10px; border-radius: 999px; font-size: 12px; cursor: pointer; }
.draw-tool-btn:hover { background: rgba(255, 255, 255, 0.18); }

/* Oẳn tù tì */
.rps-widget { position: absolute; top: 56px; left: 50%; transform: translateX(-50%); background: rgba(5, 9, 18, 0.95); border: 1px solid var(--line); border-radius: 20px; padding: 14px 16px; width: 272px; z-index: 50; text-align: center; box-shadow: var(--shadow); }
.rps-header { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 700; color: var(--sky); margin-bottom: 6px; }
.rps-header button { background: transparent; border: none; color: var(--muted); cursor: pointer; font-size: 15px; }
.rps-status { font-size: 13px; color: var(--text-color); margin-bottom: 10px; font-weight: 500; }
.rps-choices { display: flex; justify-content: center; gap: 14px; }
.rps-move-btn { width: 50px; height: 50px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.05); font-size: 24px; cursor: pointer; transition: 0.2s; }
.rps-move-btn:hover { background: var(--panel-2); transform: translateY(-3px); }

/* ---------- PANEL HOẠT ĐỘNG (sheet trong sân khấu) ---------- */
.activities-panel { position: absolute; left: 50%; transform: translateX(-50%); bottom: 92px; z-index: 65; width: min(94%, 560px); max-height: 58%; overflow-y: auto; background: rgba(7, 12, 22, 0.96); backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: 24px; padding: 15px 16px; box-shadow: var(--shadow); }
.activities-header { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; font-weight: 700; color: var(--text-color); margin-bottom: 10px; }
.activities-header button { background: transparent; border: none; color: var(--muted); font-size: 15px; cursor: pointer; }
.activities-menu { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.act-menu-btn { background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); color: var(--text-color); padding: 7px 13px; border-radius: 999px; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: 0.18s; }
.act-menu-btn:hover, .act-menu-btn.active { border-color: rgba(45, 212, 191, 0.55); color: #b7f4e4; background: rgba(45, 212, 191, 0.08); }
.act-body { border-top: 1px solid var(--line); padding-top: 12px; }
.act-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.act-small-btn { background: rgba(255, 255, 255, 0.07); border: 1px solid var(--line); color: #fff; padding: 8px 15px; border-radius: 999px; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: 0.18s; }
.act-small-btn:hover { background: rgba(255, 255, 255, 0.13); }
.act-small-btn.primary { background: linear-gradient(135deg, var(--mint), var(--sharer-2)); border-color: transparent; color: #06281e; }
.act-small-btn.primary:hover { filter: brightness(1.08); }
.act-hint { font-size: 12px; color: var(--muted); line-height: 1.5; flex: 1; min-width: 160px; }
.truth-question { background: rgba(45, 212, 191, 0.08); border: 1px solid rgba(45, 212, 191, 0.35); border-radius: 14px; padding: 12px 14px; font-size: 14.5px; font-weight: 600; line-height: 1.5; margin-bottom: 12px; }
.truth-answers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.truth-col label { display: block; font-size: 12px; font-weight: 700; color: var(--sky); margin-bottom: 5px; }
.truth-col textarea { width: 100%; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); border-radius: 12px; color: #fff; padding: 8px 10px; font-size: 13px; resize: vertical; outline: none; font-family: inherit; }
.truth-col textarea:focus { border-color: rgba(45, 212, 191, 0.55); }
.truth-col .act-small-btn { margin-top: 6px; }
.truth-partner-answer { background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); border-radius: 12px; padding: 9px 11px; font-size: 13px; min-height: 58px; line-height: 1.5; }
.dice-row { display: flex; justify-content: center; gap: 46px; margin: 6px 0 2px; }
.dice-side { text-align: center; }
.dice-side span { font-size: 12px; color: var(--muted); font-weight: 600; }
.dice-face { font-size: 66px; line-height: 1.1; color: #fff; }
.caro-board { display: grid; grid-template-columns: repeat(15, 1fr); gap: 2px; margin-top: 10px; background: rgba(255, 255, 255, 0.05); padding: 6px; border-radius: 12px; }
.caro-cell { aspect-ratio: 1; border: 1px solid rgba(255, 255, 255, 0.08); background: rgba(10, 17, 31, 0.9); color: #fff; font-size: clamp(8px, 1.6vw, 13px); font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; border-radius: 4px; }
.caro-cell:hover { background: rgba(45, 212, 191, 0.3); }
.caro-cell.x { color: var(--sky); }
.caro-cell.o { color: #f0a6c0; }
.activities-panel.yt-open { max-height: 88%; }
.yt-frame-wrap { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 14px; overflow: hidden; margin-bottom: 10px; }
.yt-frame-wrap iframe, #yt-player { position: absolute; inset: 0; width: 100% !important; height: 100% !important; border: 0; }
.yt-placeholder { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 14px; font-size: 12.5px; color: var(--muted); line-height: 1.55; background: rgba(255, 255, 255, 0.03); }
.yt-controls { display: flex; gap: 8px; }
.yt-controls input { flex: 1; min-width: 0; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); border-radius: 999px; padding: 9px 14px; color: #fff; font-size: 13px; outline: none; }
.yt-controls input:focus { border-color: rgba(45, 212, 191, 0.55); }
.breath-wrap { display: flex; justify-content: center; padding: 24px 0 8px; }
.breath-circle { width: 148px; height: 148px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, rgba(45, 212, 191, 0.55), rgba(14, 165, 115, 0.3) 65%, rgba(14, 165, 115, 0.16)); border: 1px solid rgba(45, 212, 191, 0.4); display: flex; align-items: center; justify-content: center; box-shadow: 0 0 42px rgba(45, 212, 191, 0.25); }
.breath-circle span { font-size: 14px; font-weight: 700; color: #eafff7; text-align: center; padding: 0 12px; }

/* ---------- VIDEO ---------- */
.video-wrapper { width: 100%; height: 100%; position: absolute; inset: 0; overflow: hidden; }
.video-element { width: 100%; height: 100%; object-fit: cover; transition: filter 0.6s ease; }
.video-element.blurred-video { filter: blur(26px) brightness(0.85); transform: scale(1.06); }
.video-status-pill { position: absolute; left: 50%; transform: translateX(-50%); bottom: 148px; z-index: 40; background: rgba(5, 9, 18, 0.6); backdrop-filter: blur(8px); border: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 600; padding: 5px 12px; border-radius: 999px; pointer-events: none; white-space: nowrap; max-width: 44%; overflow: hidden; text-overflow: ellipsis; }
.video-request-modal { position: absolute; top: 60px; left: 50%; transform: translateX(-50%); z-index: 70; background: rgba(7, 12, 22, 0.97); border: 1px solid rgba(56, 189, 248, 0.45); border-radius: 20px; padding: 15px 18px; width: min(92%, 380px); box-shadow: var(--shadow); text-align: center; }
.video-request-modal p { font-size: 13.5px; line-height: 1.55; margin-bottom: 10px; }
.video-request-modal small { color: var(--muted); }
.video-request-modal .act-row { justify-content: center; }

.blur-overlay-badge { position: absolute; left: 50%; bottom: 104px; transform: translateX(-50%); z-index: 35; }
.unblur-btn { background: linear-gradient(135deg, #7dd3fc, var(--sky)); border: none; color: #0a1120; padding: 9px 17px; border-radius: 999px; font-size: 12.5px; font-weight: 700; cursor: pointer; display: flex; align-items: center; gap: 7px; box-shadow: 0 10px 24px rgba(56, 189, 248, 0.35); transition: 0.2s; white-space: nowrap; }
.unblur-btn:hover { filter: brightness(1.07); }
.unblur-btn.waiting-partner { background: rgba(5, 9, 18, 0.65); backdrop-filter: blur(8px); border: 1px solid rgba(251, 191, 36, 0.55); color: #ffd98a; box-shadow: none; }

.local-video-wrapper { position: absolute; width: 96px; height: 128px; bottom: 92px; right: 12px; border-radius: 18px; overflow: hidden; border: 1.5px solid rgba(255, 255, 255, 0.35); z-index: 42; box-shadow: var(--shadow); background: #000; cursor: grab; touch-action: none; user-select: none; }
.local-video-wrapper:active { cursor: grabbing; }
.local-video-wrapper video { pointer-events: none; }
.local-blur-badge { position: absolute; left: 6px; bottom: 6px; background: rgba(47, 127, 224, 0.88); color: #fff; font-size: 9.5px; font-weight: 700; padding: 3px 7px; border-radius: 999px; pointer-events: none; }
.drag-hint { position: absolute; top: 5px; right: 5px; background: rgba(0, 0, 0, 0.55); color: #fff; font-size: 10px; padding: 3px 5px; border-radius: 6px; opacity: 0.7; pointer-events: none; }
.username-badge { position: absolute; top: 54px; left: 12px; background: rgba(5, 9, 18, 0.6); color: white; padding: 7px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; backdrop-filter: blur(8px); display: flex; align-items: center; gap: 6px; z-index: 15; border: 1px solid var(--line); max-width: 46%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.username-badge i { color: var(--mint); }

/* Phản ứng nhanh */
.chat-toggle { position: absolute; right: 14px; bottom: 92px; width: 48px; height: 48px; border-radius: 50%; background: rgba(255, 255, 255, 0.1); border: 1px solid var(--line); backdrop-filter: blur(10px); color: white; cursor: grab; display: flex; align-items: center; justify-content: center; z-index: 60; font-size: 18px; box-shadow: var(--shadow); touch-action: none; }
.unread-badge { position: absolute; top: -5px; right: -5px; background: var(--danger-color); color: white; font-size: 11px; font-weight: 800; padding: 3px 7px; border-radius: 999px; display: none; border: 2px solid #0a1120; }
.unread-badge.show { display: block; }
.reaction-bar { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 5px; z-index: 35; background: rgba(5, 9, 18, 0.5); padding: 7px 5px; border-radius: 999px; backdrop-filter: blur(8px); border: 1px solid var(--line); }
.reaction-btn { background: transparent; border: none; font-size: 17px; width: 30px; height: 30px; cursor: pointer; transition: transform 0.15s; }
.reaction-btn:hover { transform: scale(1.25); }
.floating-reactions-container { position: absolute; bottom: 232px; right: 14px; width: 130px; height: 260px; pointer-events: none; z-index: 38; overflow: hidden; }
.floating-emoji { position: absolute; bottom: 0; font-size: 28px; animation: floatUp 2.2s ease-out forwards; }
@keyframes floatUp {
    0% { transform: translateY(0) scale(0.6); opacity: 1; }
    50% { transform: translateY(-120px) scale(1.2) translateX(12px); opacity: 0.9; }
    100% { transform: translateY(-240px) scale(0.9) translateX(-10px); opacity: 0; }
}

/* ---------- THOẠI / CHAT-ONLY ---------- */
.audio-wrapper { width: 100%; height: 100%; position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 40px; }
.audio-participants { display: flex; align-items: center; justify-content: center; gap: 44px; width: 100%; flex-wrap: wrap; }
.audio-vis { width: 138px; height: 138px; border-radius: 50%; display: flex; align-items: center; justify-content: center; position: relative; transition: all var(--transition); }
.audio-vis.remote { background: linear-gradient(150deg, rgba(125, 211, 252, 0.28), rgba(255, 255, 255, 0.05)); border: 1px solid rgba(255, 255, 255, 0.22); }
.audio-vis.local { background: linear-gradient(150deg, rgba(52, 211, 153, 0.25), rgba(255, 255, 255, 0.04)); border: 1px solid rgba(255, 255, 255, 0.18); width: 94px; height: 94px; }
.audio-vis.active { transform: scale(1.06); box-shadow: 0 0 0 5px rgba(45, 212, 191, 0.22), 0 0 34px rgba(45, 212, 191, 0.35); }
.audio-vis .avatar { font-size: 46px; color: rgba(255, 255, 255, 0.92); }
.audio-vis.local .avatar { font-size: 32px; color: #b7f4e4; }
.audio-label { position: absolute; bottom: -30px; font-size: 12px; font-weight: 600; background: rgba(5, 9, 18, 0.6); border: 1px solid var(--line); padding: 4px 11px; border-radius: 999px; white-space: nowrap; }
.chat-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; position: absolute; inset: 0; width: 100%; height: 100%; z-index: 5; }

/* ---------- CUỘC GỌI ĐẾN ---------- */
.incoming-call-overlay { position: absolute; inset: 0; background: rgba(4, 8, 16, 0.74); backdrop-filter: blur(10px); z-index: 80; display: flex; align-items: center; justify-content: center; padding: 16px; }
.incoming-call-card { background: linear-gradient(170deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.045)); border: 1px solid var(--line); border-radius: 26px; padding: 24px 20px; width: 100%; max-width: 360px; text-align: center; box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; gap: 9px; }
.match-score-pill { background: rgba(251, 191, 36, 0.13); border: 1px solid rgba(251, 191, 36, 0.4); color: #ffd98a; font-size: 11.5px; font-weight: 700; padding: 4px 12px; border-radius: 999px; }
.caller-avatar-ring { width: 76px; height: 76px; border-radius: 50%; background: rgba(45, 212, 191, 0.1); border: 1px solid rgba(45, 212, 191, 0.4); display: flex; align-items: center; justify-content: center; font-size: 30px; color: var(--mint); animation: ringPulse 1.6s infinite; margin: 4px 0; }
@keyframes ringPulse { 0% { box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.4); } 100% { box-shadow: 0 0 0 19px rgba(45, 212, 191, 0); } }
.call-status-label { font-size: 11px; color: var(--sky); font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; }
.caller-name { font-size: 19px; font-weight: 700; color: #fff; }
.caller-meta { font-size: 13px; color: #ffd98a; font-weight: 600; }
.caller-tags-list { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 4px 0 10px; max-height: 95px; overflow-y: auto; }
.caller-tag { background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); color: #cbd5e1; padding: 4px 10px; border-radius: 999px; font-size: 12px; }
.caller-tag.shared { background: rgba(45, 212, 191, 0.12); border-color: rgba(45, 212, 191, 0.5); color: #b7f4e4; font-weight: 600; }
.call-actions { display: flex; gap: 36px; width: 100%; justify-content: center; }
.call-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; background: transparent; border: none; color: var(--muted); cursor: pointer; font-size: 12px; font-weight: 600; }
.call-btn i { width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 21px; color: #fff; transition: 0.2s; }
.call-btn.decline i { background: linear-gradient(150deg, var(--danger-color), var(--danger-2)); }
.call-btn.accept i { background: linear-gradient(150deg, var(--success-color), var(--sharer-2)); }
.call-btn:hover i { transform: scale(1.08); }

/* ---------- ĐIỀU KHIỂN DƯỚI: NÚT CHÍNH + HÀNG PHỤ + DOCK ---------- */
.unified-controls { position: absolute; left: 50%; transform: translateX(-50%); bottom: 12px; width: fit-content; max-width: 94%; display: flex; flex-direction: column; gap: 8px; z-index: 55; pointer-events: none; }
.unified-controls > * { pointer-events: auto; }
.action-btn { width: 48px; height: 48px; flex: none; padding: 0; border-radius: 50%; border: none; font-weight: 700; font-size: 17px; cursor: pointer; color: white; display: flex; align-items: center; justify-content: center; transition: all 0.22s; background: #33507c; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35); }
.call-hint { position: absolute; bottom: calc(100% + 10px); left: 4px; display: flex; flex-direction: column; align-items: center; gap: 1px; z-index: 56; pointer-events: none; animation: hintBounce 1.15s ease-in-out infinite; }
.call-hint span { background: linear-gradient(135deg, var(--mint), var(--sharer-2)); color: #06281e; font-size: 12.5px; font-weight: 700; padding: 7px 13px; border-radius: 999px; box-shadow: 0 10px 22px rgba(45, 212, 191, 0.35); white-space: nowrap; }
.call-hint-arrow { color: var(--mint); font-size: 15px; }
@keyframes hintBounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }
#video-consent-bar { display: none !important; }
.control-capsule { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: nowrap; background: rgba(8, 13, 24, 0.55); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; box-shadow: var(--shadow-sm); }
.control-capsule > * { flex: none; }
.brand-group .info-pill { background: var(--panel); border: 1px solid var(--line); padding: 5px 11px; border-radius: 999px; font-size: 12px; }
.capsule-divider { width: 1px; height: 22px; background: var(--line); flex: none; }
.switch-ico { color: var(--muted); font-size: 13px; }
.action-btn:active { transform: scale(0.985); }
.action-btn.start.listener { background: linear-gradient(135deg, var(--listener), var(--listener-2)); box-shadow: 0 14px 30px rgba(37, 99, 235, 0.32); }
.action-btn.start.sharer { background: linear-gradient(135deg, var(--sharer), var(--sharer-2)); box-shadow: 0 14px 30px rgba(14, 165, 115, 0.3); }
.action-btn.start:hover { filter: brightness(1.07); }
.action-btn.searching { background: rgba(251, 191, 36, 0.13); color: #ffd98a; border: 1px solid rgba(251, 191, 36, 0.5); box-shadow: none; animation: pulseSoft 1.5s infinite; }
.action-btn.end { background: linear-gradient(135deg, var(--danger-color), var(--danger-2)); box-shadow: 0 14px 30px rgba(225, 29, 72, 0.28); }
.action-btn.end:hover { filter: brightness(1.07); }
@keyframes pulseSoft { 0%, 100% { opacity: 0.85; } 50% { opacity: 1; } }

.info-pill { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; color: #dbe7f7; background: transparent; border: none; padding: 2px 2px; font-variant-numeric: tabular-nums; }
.pulse-dot { width: 8px; height: 8px; background-color: var(--success-color); border-radius: 50%; animation: pulseDot 2s infinite; }
.switch-container { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.switch { position: relative; display: inline-block; width: 40px; height: 22px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; inset: 0; background-color: #33415c; transition: 0.25s; border-radius: 999px; }
.slider:before { position: absolute; content: ""; height: 16px; width: 16px; left: 3px; bottom: 3px; background-color: white; transition: 0.25s; border-radius: 50%; }
input:checked + .slider { background: var(--mint); }
input:checked + .slider:before { transform: translateX(18px); }
.report-last-btn { background: rgba(251, 77, 109, 0.12); border: 1px solid rgba(251, 77, 109, 0.45); color: #fda4af; width: 40px; height: 40px; padding: 0; border-radius: 50%; font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; flex: none; }

.media-toggles { display: flex; justify-content: center; gap: 8px; padding: 0; margin: 0; background: transparent; border: none; }
.control-btn { position: relative; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.08); color: white; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 15px; transition: 0.2s; }
.control-btn:hover { background: rgba(255, 255, 255, 0.14); }
.control-btn.mute { background: linear-gradient(150deg, var(--danger-color), var(--danger-2)); border-color: transparent; }
.control-btn.blur-on { background: linear-gradient(150deg, var(--listener), var(--listener-2)); border-color: transparent; box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.22); }

/* ---------- CHAT ---------- */
.chat-box { flex: none; width: 360px; background: linear-gradient(180deg, #101a2d, #0b1322); border-radius: var(--radius); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; position: relative; z-index: 100; border: 1px solid var(--line); overflow: hidden; }
.chat-header { padding: 13px 16px; background: rgba(0, 0, 0, 0.22); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.chat-header h3 { font-size: 14.5px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.chat-header h3 i { color: var(--mint); }
.close-chat-btn { background: transparent; border: none; color: var(--text-color); cursor: pointer; font-size: 17px; opacity: 0.7; }
.chat-messages { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 9px; }
.message { padding: 9px 13px; border-radius: 18px; max-width: 85%; word-break: break-word; font-size: 13.5px; line-height: 1.5; }
.message.received { background: var(--message-received); align-self: flex-start; border-bottom-left-radius: 6px; }
.message.sent { background: linear-gradient(150deg, #1f8a70, var(--message-sent)); color: white; align-self: flex-end; border-bottom-right-radius: 6px; }
.message.system-info { align-self: center; max-width: 95%; background: rgba(45, 212, 191, 0.08); border: 1px dashed rgba(45, 212, 191, 0.35); color: #cdeee2; text-align: center; font-size: 12px; border-radius: 14px; }
.message-input { display: flex; padding: 10px 12px; background: rgba(0, 0, 0, 0.22); align-items: center; gap: 8px; position: relative; border-top: 1px solid var(--line); }
.message-input input[type="text"] { flex: 1; min-width: 0; padding: 11px 15px; border: 1px solid var(--line); border-radius: 999px; outline: none; background: rgba(255, 255, 255, 0.05); color: var(--text-color); font-size: 13.5px; }
.message-input input[type="text"]:focus { border-color: rgba(45, 212, 191, 0.55); }
.message-input button { flex-shrink: 0; width: 38px; height: 38px; border: none; border-radius: 50%; background: transparent; color: var(--text-color); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.message-input button#send-message { background: linear-gradient(150deg, var(--mint), var(--sharer-2)); color: #06281e; }
.emoji-picker { position: absolute; bottom: 62px; right: 10px; display: none; z-index: 9999; }
.emoji-picker.active { display: block; }
.quick-phrases { display: none; gap: 6px; padding: 9px 10px 1px; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
.quick-phrases::-webkit-scrollbar { display: none; }
.quick-phrases.show { display: flex; }
.qp-chip { flex: none; max-width: 235px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; font-weight: 500; padding: 6px 11px; border-radius: 999px; background: rgba(45, 212, 191, 0.08); border: 1px solid rgba(45, 212, 191, 0.35); color: #b7f4e4; cursor: pointer; transition: 0.18s; }
.qp-chip:hover { background: rgba(45, 212, 191, 0.16); }

/* ---------- FOOTER ---------- */
.app-footer { display: flex; align-items: center; flex-wrap: wrap; gap: 3px 13px; padding: 7px 4px 4px; justify-content: center; }
.footer-link { background: none; border: none; color: #8fb8dd; font-size: 11.5px; font-weight: 600; cursor: pointer; padding: 2px 0; }
.footer-link:hover { text-decoration: underline; }
.footer-note { font-size: 11px; color: var(--faint); text-align: center; }

/* ---------- MODALS ---------- */
.prefs-modal-overlay { position: fixed; inset: 0; background: rgba(3, 6, 12, 0.78); backdrop-filter: blur(10px); z-index: 300; display: flex; align-items: center; justify-content: center; padding: 14px; }
.prefs-modal-card { background: linear-gradient(180deg, #111b2f, #0b1322); border: 1px solid var(--line); border-radius: 26px; width: 100%; max-width: 720px; max-height: 92dvh; display: flex; flex-direction: column; box-shadow: var(--shadow); overflow: hidden; }
.prefs-header { padding: 17px 20px; background: rgba(0, 0, 0, 0.25); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.prefs-header h2 { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 8px; color: #fff; }
.prefs-header h2 i { color: var(--mint); }
.prefs-subtitle { font-size: 12.5px; color: var(--muted); margin-top: 4px; line-height: 1.55; }
.close-prefs-btn { background: transparent; border: none; color: var(--muted); font-size: 19px; cursor: pointer; }
.prefs-body { padding: 18px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; }
.prefs-section { display: flex; flex-direction: column; gap: 8px; }
.prefs-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.prefs-title { font-size: 13px; font-weight: 700; color: #dbe6f3; display: block; margin-bottom: 4px; }
.req-star { color: #f0a6c0; }
.sub-hint { font-weight: 400; color: var(--muted); font-size: 12px; line-height: 1.55; }
.prefs-footer { padding: 14px 20px; background: rgba(0, 0, 0, 0.25); border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.prefs-error { color: #fda4af; font-size: 12.5px; font-weight: 600; }
.save-prefs-btn { margin-left: auto; background: linear-gradient(135deg, var(--mint), var(--sharer-2)); color: #06281e; border: none; padding: 12px 24px; border-radius: 999px; font-size: 14px; font-weight: 700; cursor: pointer; display: flex; align-items: center; gap: 8px; transition: 0.2s; }
.save-prefs-btn:hover { filter: brightness(1.08); }
.save-prefs-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.save-prefs-btn.danger { background: linear-gradient(135deg, var(--danger-color), var(--danger-2)); color: #fff; }

.age-gate-box { background: rgba(251, 191, 36, 0.07); border: 1px solid rgba(251, 191, 36, 0.4); border-radius: 16px; padding: 12px 14px; }
.age-gate-label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: 13.5px; line-height: 1.5; color: #dbe6f3; }
.age-gate-label input[type="checkbox"] { width: 19px; height: 19px; margin-top: 2px; accent-color: var(--mint); flex-shrink: 0; }
.age-gate-label small { color: var(--muted); }

.role-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.role-card { background: rgba(255, 255, 255, 0.03); border: 1.5px solid var(--line); border-radius: 18px; padding: 15px 14px; cursor: pointer; color: var(--text-color); display: flex; flex-direction: column; gap: 5px; align-items: flex-start; text-align: left; transition: 0.2s; }
.role-card:hover { background: rgba(255, 255, 255, 0.06); }
.role-card .role-emoji { font-size: 27px; }
.role-card b { font-size: 14.5px; }
.role-card small { color: var(--muted); font-size: 12px; line-height: 1.45; }
.role-card[data-role="listener"].active { border-color: var(--sky); background: rgba(56, 189, 248, 0.11); }
.role-card[data-role="sharer"].active { border-color: var(--mint); background: rgba(45, 212, 191, 0.09); }

.age-select { width: 100%; background: rgba(7, 12, 22, 0.92); border: 1px solid var(--line); color: #fff; padding: 10px 12px; border-radius: 12px; font-size: 13.5px; outline: none; }
.age-select:focus { border-color: var(--mint); }
.age-range-row { display: flex; align-items: center; gap: 8px; }
.age-range-row span { color: var(--muted); font-size: 13px; }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 7px; }
.tag-btn { background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); color: var(--muted); padding: 7px 12px; border-radius: 999px; font-size: 12px; font-weight: 500; cursor: pointer; transition: 0.18s; }
.tag-btn:hover { background: rgba(255, 255, 255, 0.09); color: #fff; }
.tag-btn.active { background: rgba(45, 212, 191, 0.14); border-color: rgba(45, 212, 191, 0.6); color: #b7f4e4; font-weight: 600; }

.google-box { background: rgba(56, 189, 248, 0.06); border: 1px dashed rgba(56, 189, 248, 0.4); border-radius: 16px; padding: 13px 14px; }
#google-btn-container { margin-top: 8px; min-height: 42px; }

.disclaimer-card { max-width: 680px; }
.disclaimer-body h4, .legal-body h4 { color: #b7f4e4; font-size: 14px; margin: 10px 0 4px; }
.disclaimer-body ul { padding-left: 18px; display: flex; flex-direction: column; gap: 5px; }
.disclaimer-body li, .legal-body p { font-size: 13px; line-height: 1.6; color: #c3d2e4; }
.disclaimer-body .age-gate-label { margin-top: 12px; background: rgba(45, 212, 191, 0.07); border: 1px solid rgba(45, 212, 191, 0.35); border-radius: 14px; padding: 11px 12px; }

.report-card { max-width: 560px; }
.confirm-card { max-width: 440px; }
.report-options { display: flex; flex-direction: column; gap: 9px; }
.report-options label { display: flex; gap: 9px; align-items: center; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); padding: 11px 12px; border-radius: 14px; font-size: 13.5px; cursor: pointer; }
.report-options input { accent-color: var(--danger-color); width: 17px; height: 17px; }
.report-footer { justify-content: flex-end; }

.hotline-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.hotline-item { display: flex; gap: 14px; align-items: center; background: rgba(45, 212, 191, 0.07); border: 1px solid rgba(45, 212, 191, 0.35); border-radius: 16px; padding: 12px 16px; }
.hotline-item b { font-size: 24px; color: var(--mint); min-width: 52px; text-align: center; }
.hotline-item span { font-size: 13px; line-height: 1.55; color: #d9f7ec; }
.help-card p { font-size: 13px; line-height: 1.65; color: #c3d2e4; }
.legal-card { max-width: 700px; }
.legal-body p { margin-bottom: 8px; }

.hidden { display: none !important; }

@media (min-width: 1024px) {
    .chat-toggle { display: none !important; }
    #chat-toggle { display: none !important; }
    #flip-camera { display: none !important; }
}

/* Chế độ chỉ chat chữ */
body.chat-only-mode .main-content { flex-direction: column; align-items: center; }
body.chat-only-mode .media-view { flex: none; width: 100%; max-width: 820px; height: auto; background: transparent; overflow: visible; border: none; box-shadow: none; }
body.chat-only-mode .video-wrapper, body.chat-only-mode .audio-wrapper, body.chat-only-mode .chat-placeholder, body.chat-only-mode .reaction-bar, body.chat-only-mode .call-top-hud, body.chat-only-mode .draw-canvas, body.chat-only-mode .video-status-pill, body.chat-only-mode .activities-panel { display: none !important; }
body.chat-only-mode .incoming-call-overlay { position: fixed; inset: 0; z-index: 200; }
body.chat-only-mode .media-area { flex: none; width: 100%; max-width: 820px; order: 2; }
body.chat-only-mode .unified-controls { position: static; transform: none; width: 100%; max-width: 820px; margin: 10px auto 0; }
body.chat-only-mode .chat-box { position: relative; display: flex !important; flex: 1; order: 1; width: 100%; max-width: 820px; margin-bottom: 10px; z-index: 10; min-height: 0; }
body.chat-only-mode .chat-toggle, body.chat-only-mode .close-chat-btn, body.chat-only-mode #chat-toggle { display: none !important; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 767px) {
    .app-container { padding: 10px 10px 6px; }
    .app-logo { font-size: 19px; }
    .brand-tagline { display: none; }
    .logo-mark { width: 38px; height: 38px; border-radius: 12px; font-size: 16px; }
    .header-note { display: none; }
    .mode-tabs { max-width: none; }
    .mode-tab { padding: 8px 4px; font-size: 12.5px; }
    .help-trigger-btn, .filter-trigger-btn { padding: 8px 11px; font-size: 11.5px; }
    .prefs-grid-2 { grid-template-columns: 1fr; }
    .role-cards { grid-template-columns: 1fr; }
    .truth-answers { grid-template-columns: 1fr; }
    .main-content { flex-direction: column; }
    .media-view { border-radius: 24px; }
    .unified-controls { max-width: calc(100% - 16px); bottom: 8px; }
    .action-btn { width: 46px; height: 46px; font-size: 16px; }
    .control-capsule { gap: 8px; padding: 6px 10px; }
    .info-pill { font-size: 12.5px; }
    .switch-container { font-size: 11.5px; }
    .local-video-wrapper { width: 76px; height: 102px; border-radius: 15px; }
    .username-badge { font-size: 11px; max-width: 44%; }
    .video-status-pill { max-width: 40%; font-size: 10px; }
    .hud-btn span { display: none; }
    .hud-btn { padding: 7px 10px; }
    .hud-btn.vibe-sound-btn span { display: inline; font-size: 10.5px; max-width: 86px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .activities-panel { width: calc(100% - 16px); bottom: 88px; }
    .prefs-modal-overlay { padding: 0; align-items: flex-end; }
    .prefs-modal-card { border-radius: 26px 26px 0 0; max-height: 94dvh; }
    .chat-box { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 150; max-width: none; display: none; border-radius: 0; }
    .chat-box.active { display: flex; }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .chat-box { position: absolute; top: 0; right: 0; width: 350px; height: 100%; z-index: 150; display: none; border-radius: 0; }
    .chat-box.active { display: flex; }
}

/* Capsule trên màn hẹp: giữ NGUYÊN một hàng, các nút tự co nhỏ thay vì xuống dòng */
@media (max-width: 560px) {
    .control-capsule { gap: 6px; padding: 6px 10px; }
    .control-capsule .control-btn { width: 35px; height: 35px; font-size: 13.5px; }
    .control-capsule .action-btn { width: 42px; height: 42px; font-size: 15px; }
    .control-capsule .report-last-btn { width: 35px; height: 35px; font-size: 12.5px; }
    .control-capsule .switch { width: 34px; height: 19px; }
    .control-capsule .slider:before { width: 13px; height: 13px; }
    .control-capsule input:checked + .slider:before { transform: translateX(15px); }
    .control-capsule .switch-ico { display: none; }
    .control-capsule .media-toggles { gap: 6px; }
}
@media (max-width: 380px) {
    .control-capsule { gap: 5px; padding: 5px 8px; }
    .control-capsule .control-btn { width: 32px; height: 32px; font-size: 12.5px; }
    .control-capsule .action-btn { width: 38px; height: 38px; font-size: 14px; }
    .control-capsule .report-last-btn { width: 32px; height: 32px; }
    .control-capsule .media-toggles { gap: 5px; }
}
