:root {
    --sat: env(safe-area-inset-top, 0px);
    --sab: env(safe-area-inset-bottom, 0px);
    --sal: env(safe-area-inset-left, 0px);
    --sar: env(safe-area-inset-right, 0px);
    --app-height: 100dvh;

    --bg: #070914;
    --bg-body-gradient: radial-gradient(circle at 20% 0%, #1b1740 0, transparent 35%), radial-gradient(circle at 90% 10%, #101d3a 0, transparent 35%), #070914;
    --bg-elevated: #0d1220;
    --panel: #0d1220;
    --panel2: #11182a;
    --panel-glass: rgba(13, 18, 32, 0.82);
    --line: #242c40;
    --line-subtle: rgba(255, 255, 255, 0.08);
    --text: #f7f8ff;
    --text-heading: #ffffff;
    --muted: #8d97ad;
    --primary: #7c5cff;
    --primary-hover: #9175ff;
    --primary2: #9a82ff;
    --primary-dark: #6548d8;
    --danger: #ff5267;
    --danger-hover: #ff7082;
    --warn: #ffb84d;
    --warn-hover: #ffc770;
    --ok: #35d58a;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.5);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;

    /* Semantic Component Tokens (Dark Mode Default) */
    --nav-bg: rgba(5, 7, 14, 0.88);
    --nav-link: #aeb6c9;
    --nav-link-hover: #ffffff;
    --nav-link-hover-bg: rgba(255, 255, 255, 0.06);
    --brand-text: #ffffff;
    --brand-accent: #9f86ff;
    --brand-accent-glow: 0 0 16px rgba(159, 134, 255, 0.4);
    --hero-gradient: linear-gradient(120deg, #ffffff 20%, #a89aff 65%, #7c5cff 100%);
    --card-bg: linear-gradient(145deg, rgba(19, 25, 43, 0.92), rgba(8, 11, 20, 0.92));
    --feature-bg: rgba(12, 18, 32, 0.75);
    --feature-border: rgba(255, 255, 255, 0.06);
    --feature-hover-bg: rgba(17, 24, 42, 0.9);
    --feature-icon-bg: rgba(124, 92, 255, 0.12);
    --feature-icon-border: rgba(124, 92, 255, 0.25);
    --feature-icon-color: #b3a5ff;
    --btn-bg: #11172a;
    --btn-border: #303952;
    --btn-color: #ffffff;
    --btn-hover-bg: #161e36;
    --btn-hover-border: #505b7a;
    --btn-hover-color: #ffffff;
    --eyebrow-bg: rgba(14, 19, 35, 0.85);
    --eyebrow-border: rgba(124, 92, 255, 0.25);
    --eyebrow-color: #c4ccdf;
    --input-bg: #080d18;
    --input-border: #273047;
    --drawer-bg: rgba(7, 10, 20, 0.98);
    --drawer-link-bg: rgba(255, 255, 255, 0.03);
    --drawer-link-border: rgba(255, 255, 255, 0.05);
    --drawer-link-color: #d1d7e8;
    --footer-bg: #070914;
    --badge-bg: rgba(255, 255, 255, 0.05);
    --badge-border: rgba(255, 255, 255, 0.12);
    --video-bg: #070914;
    --video-bg-gradient: radial-gradient(circle at 50% 0%, #151433 0%, #070914 70%);
    --video-top-bg: rgba(7, 10, 18, 0.94);
    --video-top-border: rgba(255, 255, 255, 0.08);
    --video-card-bg: radial-gradient(circle at 50% 45%, #131b2e 0%, #090e18 60%, #05070e 100%);
    --video-card-border: rgba(255, 255, 255, 0.1);
    --video-card-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    --video-state-bg: radial-gradient(circle at center, rgba(18, 24, 43, 0.95), rgba(7, 10, 19, 0.98));
    --video-state-title: #ffffff;
    --video-state-desc: #94a3b8;
    --video-state-icon-bg: rgba(124, 92, 255, 0.16);
    --video-state-icon-border: rgba(124, 92, 255, 0.35);
    --video-state-icon-color: #c4b8ff;
    --video-tag-bg: rgba(7, 10, 18, 0.82);
    --video-tag-border: rgba(255, 255, 255, 0.14);
    --video-tag-color: #f1f5f9;
    --ctrl-btn-bg: rgba(17, 24, 42, 0.9);
    --ctrl-btn-border: rgba(255, 255, 255, 0.12);
    --ctrl-btn-color: #f1f5f9;
    --ctrl-btn-hover-bg: rgba(27, 36, 62, 0.95);
    --ctrl-btn-hover-border: rgba(255, 255, 255, 0.22);
    --action-next-bg: #2c1f0d;
    --action-next-border: #634515;
    --action-next-color: #fed7aa;
    --action-next-hover-bg: #3d2c14;
    --action-stop-bg: #2d1219;
    --action-stop-border: #5c212d;
    --action-stop-color: #fca5a5;
    --action-stop-hover-bg: #3d1722;
    --user-pill-bg: rgba(255, 255, 255, 0.05);
    --user-pill-border: rgba(255, 255, 255, 0.1);

    /* Feature Suite Tokens - Dark Mode Default */
    --chat-drawer-bg: rgba(13, 18, 34, 0.95);
    --chat-msg-stranger-bg: rgba(255, 255, 255, 0.08);
    --chat-msg-stranger-color: #f7f8ff;
    --chat-msg-stranger-border: var(--line);
    --chat-quick-emojis-bg: rgba(0, 0, 0, 0.25);
    --chat-form-bg: rgba(7, 10, 20, 0.95);
    --icebreaker-card-bg: rgba(18, 24, 43, 0.96);
    --icebreaker-tag-bg: rgba(124, 92, 255, 0.15);
    --icebreaker-tag-color: #9a82ff;
    --game-modal-bg: #0d1220;
    --game-tabs-bg: rgba(0, 0, 0, 0.3);
    --game-tab-color: #8d97ad;
    --game-card-bg: rgba(255, 255, 255, 0.04);
    --safe-overlay-bg: rgba(7, 10, 20, 0.65);
    --safe-card-bg: rgba(18, 24, 43, 0.95);
    --matched-banner-bg: linear-gradient(90deg, rgba(124, 92, 255, 0.25), rgba(53, 213, 138, 0.2));
    --matched-banner-border: rgba(124, 92, 255, 0.4);
    --matched-banner-color: #e2d9ff;
    --matched-banner-strong: #5effb1;
    --rating-toast-bg: rgba(18, 24, 43, 0.95);
    --tag-bar-bg: rgba(13, 18, 32, 0.75);
    --tag-chip-bg: rgba(124, 92, 255, 0.18);
    --tag-chip-border: rgba(124, 92, 255, 0.4);
    --tag-chip-color: #c9bcff;
    --kbd-bg: rgba(255, 255, 255, 0.1);
    --kbd-border: var(--line);
    --kbd-color: #ffffff;
    --kbd-shadow: 0 2px 0 rgba(0, 0, 0, 0.4);
    --karma-badge-bg: linear-gradient(135deg, rgba(255, 184, 77, 0.15), rgba(124, 92, 255, 0.15));
    --karma-badge-border: rgba(255, 184, 77, 0.35);
    --karma-badge-color: #ffca66;
}

/* =========================================================
   LIGHT THEME DESIGN TOKENS
   ========================================================= */

html[data-theme="light"],
[data-theme="light"] {
    color-scheme: light;
    --bg: #f8fafc;
    --bg-body-gradient: radial-gradient(circle at 15% 0%, #ece8ff 0, transparent 40%), radial-gradient(circle at 90% 10%, #e0eaff 0, transparent 40%), #f8fafc;
    --bg-elevated: #ffffff;
    --panel: #ffffff;
    --panel2: #f1f5f9;
    --panel-glass: rgba(255, 255, 255, 0.92);
    --line: #e2e8f0;
    --line-subtle: rgba(0, 0, 0, 0.07);
    --text: #0f172a;
    --text-heading: #0f172a;
    --muted: #64748b;
    --primary: #6343e8;
    --primary-hover: #5231db;
    --primary2: #7251f2;
    --primary-dark: #4f2ee8;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.1);

    /* Semantic Component Tokens for Light Mode */
    --nav-bg: rgba(255, 255, 255, 0.94);
    --nav-link: #475569;
    --nav-link-hover: #0f172a;
    --nav-link-hover-bg: rgba(0, 0, 0, 0.05);
    --brand-text: #0f172a;
    --brand-accent: #6343e8;
    --brand-accent-glow: none;
    --hero-gradient: linear-gradient(135deg, #4f39f6 0%, #7c3aed 50%, #c026d3 100%);
    --card-bg: #ffffff;
    --feature-bg: #f8fafc;
    --feature-border: #e2e8f0;
    --feature-hover-bg: #f1f5f9;
    --feature-icon-bg: rgba(99, 67, 232, 0.08);
    --feature-icon-border: rgba(99, 67, 232, 0.2);
    --feature-icon-color: #6343e8;
    --btn-bg: #ffffff;
    --btn-border: #cbd5e1;
    --btn-color: #0f172a;
    --btn-hover-bg: #f1f5f9;
    --btn-hover-border: #94a3b8;
    --btn-hover-color: #000000;
    --eyebrow-bg: rgba(99, 67, 232, 0.08);
    --eyebrow-border: rgba(99, 67, 232, 0.2);
    --eyebrow-color: #6343e8;
    --input-bg: #ffffff;
    --input-border: #cbd5e1;
    --drawer-bg: rgba(255, 255, 255, 0.98);
    --drawer-link-bg: #f8fafc;
    --drawer-link-border: #e2e8f0;
    --drawer-link-color: #1e293b;
    --footer-bg: #ffffff;
    --badge-bg: rgba(0, 0, 0, 0.05);
    --badge-border: rgba(0, 0, 0, 0.1);
    --video-bg: #f4f6fb;
    --video-bg-gradient: radial-gradient(circle at 50% 0%, #ede8ff 0%, #f4f6fb 70%);
    --video-top-bg: rgba(255, 255, 255, 0.95);
    --video-top-border: rgba(0, 0, 0, 0.08);
    --video-card-bg: radial-gradient(circle at 50% 35%, #ffffff 0%, #f1f5f9 65%, #e2e8f0 100%);
    --video-card-border: rgba(0, 0, 0, 0.09);
    --video-card-shadow: 0 14px 40px rgba(0, 0, 0, 0.07);
    --video-state-bg: radial-gradient(circle at center, rgba(255, 255, 255, 0.95), rgba(241, 245, 249, 0.98));
    --video-state-title: #0f172a;
    --video-state-desc: #64748b;
    --video-state-icon-bg: rgba(99, 67, 232, 0.1);
    --video-state-icon-border: rgba(99, 67, 232, 0.25);
    --video-state-icon-color: #6343e8;
    --video-tag-bg: rgba(255, 255, 255, 0.9);
    --video-tag-border: rgba(0, 0, 0, 0.12);
    --video-tag-color: #0f172a;
    --ctrl-btn-bg: #ffffff;
    --ctrl-btn-border: #cbd5e1;
    --ctrl-btn-color: #1e293b;
    --ctrl-btn-hover-bg: #f8fafc;
    --ctrl-btn-hover-border: #94a3b8;
    --action-next-bg: #fef3c7;
    --action-next-border: #fcd34d;
    --action-next-color: #b45309;
    --action-next-hover-bg: #fde68a;
    --action-stop-bg: #fee2e2;
    --action-stop-border: #fca5a5;
    --action-stop-color: #b91c1c;
    --action-stop-hover-bg: #fecaca;
    --user-pill-bg: rgba(0, 0, 0, 0.04);
    --user-pill-border: rgba(0, 0, 0, 0.08);

    /* Feature Suite Tokens - Light Mode */
    --chat-drawer-bg: rgba(255, 255, 255, 0.98);
    --chat-msg-stranger-bg: #f1f5f9;
    --chat-msg-stranger-color: #0f172a;
    --chat-msg-stranger-border: #e2e8f0;
    --chat-quick-emojis-bg: #f8fafc;
    --chat-form-bg: #ffffff;
    --icebreaker-card-bg: #ffffff;
    --icebreaker-tag-bg: rgba(99, 67, 232, 0.1);
    --icebreaker-tag-color: #6343e8;
    --game-modal-bg: #ffffff;
    --game-tabs-bg: #f1f5f9;
    --game-tab-color: #64748b;
    --game-card-bg: #f8fafc;
    --safe-overlay-bg: rgba(248, 250, 252, 0.7);
    --safe-card-bg: #ffffff;
    --matched-banner-bg: linear-gradient(90deg, rgba(99, 67, 232, 0.1), rgba(16, 185, 129, 0.12));
    --matched-banner-border: rgba(99, 67, 232, 0.3);
    --matched-banner-color: #4338ca;
    --matched-banner-strong: #059669;
    --rating-toast-bg: #ffffff;
    --tag-bar-bg: rgba(255, 255, 255, 0.92);
    --tag-chip-bg: rgba(99, 67, 232, 0.1);
    --tag-chip-border: rgba(99, 67, 232, 0.3);
    --tag-chip-color: #6343e8;
    --kbd-bg: #f1f5f9;
    --kbd-border: #cbd5e1;
    --kbd-color: #0f172a;
    --kbd-shadow: 0 2px 0 #cbd5e1;
    --karma-badge-bg: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(99, 67, 232, 0.1));
    --karma-badge-border: rgba(245, 158, 11, 0.35);
    --karma-badge-color: #d97706;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    min-height: 100%;
    background: var(--bg);
    color-scheme: dark;
    -webkit-text-size-adjust: 100%;
}

html[data-theme="light"] {
    color-scheme: light;
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--bg-body-gradient);
    color: var(--text);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    line-height: 1.5;
    overflow-x: hidden;
    transition: background 0.25s ease, color 0.25s ease;
}

/* =========================================================
   COMPACT DAY / NIGHT MODE TOGGLE SWITCH (NO HOVER BOUNCE)
   ========================================================= */

.theme-toggle {
    background: none !important;
    border: none !important;
    padding: 0 !important;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    display: inline-flex;
    align-items: center;
    line-height: 1;
    flex-shrink: 0;
    transform: none !important;
    transition: none !important;
}

.theme-toggle:hover,
.theme-toggle:active,
.theme-toggle:focus {
    transform: none !important;
    outline: none !important;
    background: none !important;
}

.theme-track {
    position: relative;
    width: 86px;
    height: 26px;
    border-radius: 9999px;
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.28);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
    transition: background 0.25s ease, border-color 0.25s ease;
    overflow: hidden;
    pointer-events: none;
}

.theme-track * {
    pointer-events: none;
}

html[data-theme="light"] .theme-track,
[data-theme="light"] .theme-track {
    background: #e2e6eb;
    border-color: rgba(0, 0, 0, 0.16);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.theme-thumb {
    position: absolute;
    left: 2px;
    top: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 2;
}

html[data-theme="light"] .theme-thumb,
[data-theme="light"] .theme-thumb {
    transform: translateX(60px);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.theme-icon {
    width: 12px;
    height: 12px;
    stroke: #090b14;
    display: block;
}

.theme-thumb .sun-icon {
    display: none;
}

.theme-thumb .moon-icon {
    display: block;
}

html[data-theme="light"] .theme-thumb .sun-icon,
[data-theme="light"] .theme-thumb .sun-icon {
    display: block;
}

html[data-theme="light"] .theme-thumb .moon-icon,
[data-theme="light"] .theme-thumb .moon-icon {
    display: none;
}

.theme-label {
    font-size: 7.5px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    z-index: 1;
    transition: opacity 0.2s ease;
    line-height: 1;
    pointer-events: none;
    font-family: var(--font-sans);
}

.day-label {
    padding-left: 5px;
    color: #000000;
    opacity: 0;
}

.night-label {
    padding-right: 5px;
    color: #ffffff;
    opacity: 1;
}

html[data-theme="light"] .day-label,
[data-theme="light"] .day-label {
    opacity: 1;
}

html[data-theme="light"] .night-label,
[data-theme="light"] .night-label {
    opacity: 0;
}

button,
input,
textarea,
select {
    font: inherit;
    touch-action: manipulation;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    user-select: none;
    -webkit-user-select: none;
}

button:not(.theme-toggle):not(.btn-toggle-password):not(.password-toggle-btn):active:not(:disabled),
.btn:active:not(:disabled),
.control:active:not(:disabled),
.big-btn:active:not(:disabled) {
    transform: scale(0.97);
}

a {
    color: inherit;
    text-decoration: none;
    touch-action: manipulation;
}

.hidden {
    display: none !important;
}

/* =========================================================
   NAVIGATION BAR
   ========================================================= */

.nav {
    height: calc(72px + var(--sat));
    padding-top: var(--sat);
    padding-left: max(20px, var(--sal));
    padding-right: max(20px, var(--sar));
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    will-change: transform;
    transition: background 0.25s ease, border-color 0.25s ease;
}

body:not(.video-page) {
    padding-top: calc(72px + var(--sat));
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-weight: 900;
    letter-spacing: 0.04em;
    font-size: 21px;
    color: var(--brand-text) !important;
    line-height: 1;
    white-space: nowrap;
    user-select: none;
    -webkit-user-select: none;
    text-decoration: none;
}

.brand-text {
    font-weight: 900;
    letter-spacing: 0.04em;
    font-size: 21px;
    color: var(--brand-text) !important;
}

.brand-text span,
.brand > span:not(.brand-text),
.brand span.brand-accent {
    color: var(--brand-accent) !important;
    text-shadow: var(--brand-accent-glow);
}

.brand-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    display: block;
}

.navlinks {
    display: flex;
    gap: 8px;
    align-items: center;
}

.navlinks a,
.navlinks button {
    border: 0;
    background: transparent;
    color: var(--nav-link);
    padding: 10px 14px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.navlinks a:hover,
.navlinks button:hover {
    background: var(--nav-link-hover-bg);
    color: var(--nav-link-hover);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--badge-bg);
    border: 1px solid var(--line);
    color: var(--text);
    font-size: 20px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    touch-action: manipulation;
}

.nav-toggle:hover {
    background: var(--nav-link-hover-bg);
}

.mobile-drawer {
    display: none;
    position: fixed;
    top: calc(72px + var(--sat));
    left: 0;
    right: 0;
    background: var(--drawer-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-bottom: 1px solid var(--line);
    padding: 16px 20px calc(24px + var(--sab));
    flex-direction: column;
    gap: 8px;
    z-index: 49;
    box-shadow: var(--shadow-lg);
    animation: drawerSlide 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-drawer.active {
    display: flex;
}

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

.mobile-drawer a {
    padding: 14px 16px;
    border-radius: 14px;
    color: var(--drawer-link-color);
    font-weight: 700;
    font-size: 15px;
    background: var(--drawer-link-bg);
    border: 1px solid var(--drawer-link-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-drawer a:active {
    background: rgba(124, 92, 255, 0.15);
    border-color: rgba(124, 92, 255, 0.3);
    color: var(--primary);
}

.mobile-drawer .btn.primary {
    justify-content: center;
    margin-top: 6px;
}

.avatar {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: linear-gradient(135deg, #2a1f5d, #1a163a);
    border: 1px solid rgba(159, 134, 255, 0.3);
    display: grid;
    place-items: center;
    color: #d6ccff;
    font-weight: 800;
    font-size: 11px;
    flex-shrink: 0;
    line-height: 1;
}

html[data-theme="light"] .avatar,
[data-theme="light"] .avatar {
    background: linear-gradient(135deg, #ede8ff, #ded5ff);
    border-color: rgba(99, 67, 232, 0.3);
    color: #6343e8;
}

/* =========================================================
   LIVE ONLINE USER BADGE
   ========================================================= */

.online-users,
[data-online-users] {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 13px;
    border: 1px solid var(--badge-border);
    border-radius: var(--radius-full);
    background: var(--badge-bg);
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.online-users::before,
[data-online-users]::before {
    content: '';
    width: 8px;
    height: 8px;
    display: inline-block;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15), 0 0 10px rgba(34, 197, 94, 0.6);
    animation: onlinePulse 2s ease-in-out infinite;
    flex-shrink: 0;
}

.mobile-brand-online {
    display: none !important;
}

.online-dot {
    display: none;
}

@keyframes onlinePulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.65;
        transform: scale(0.85);
    }
}

.header-status-controls-col {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* =========================================================
   LAYOUT CONTAINERS & HERO
   ========================================================= */

.container {
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;
    padding-left: max(20px, var(--sal));
    padding-right: max(20px, var(--sar));
    box-sizing: border-box;
}

.hero {
    min-height: calc(100vh - 74px);
    min-height: calc(100dvh - 74px);
    display: grid;
    place-items: center;
    padding: 40px 0 60px;
    width: 100%;
    box-sizing: border-box;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 48px;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border: 1px solid var(--eyebrow-border);
    border-radius: var(--radius-full);
    background: var(--eyebrow-bg);
    color: var(--eyebrow-color);
    font-size: 13px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    white-space: nowrap;
    max-width: 100%;
}

.dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ok);
    box-shadow: 0 0 12px var(--ok);
    flex-shrink: 0;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-heading);
}

h1 {
    font-size: clamp(34px, 6.5vw, 76px);
    line-height: 1.02;
    margin: 20px 0;
    letter-spacing: -0.04em;
    font-weight: 900;
}

.gradient {
    background: var(--hero-gradient) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: transparent !important;
    display: inline-block;
}

.lead {
    font-size: clamp(16px, 2.2vw, 19px);
    line-height: 1.65;
    color: var(--muted);
    max-width: 650px;
    margin: 0 0 20px;
}

.actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 24px;
}

/* =========================================================
   BUTTONS
   ========================================================= */

.btn {
    border: 1px solid var(--btn-border);
    background: var(--btn-bg);
    color: var(--btn-color);
    border-radius: 14px;
    padding: 13px 20px;
    font-weight: 700;
    font-size: 15px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    text-align: center;
    min-height: 48px;
    user-select: none;
    -webkit-user-select: none;
}

.btn:hover {
    border-color: var(--btn-hover-border);
    background: var(--btn-hover-bg);
    color: var(--btn-hover-color);
    transform: translateY(-1px);
}

.btn.primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important;
    border-color: transparent !important;
    box-shadow: 0 10px 25px rgba(124, 92, 255, 0.35);
    color: #ffffff !important;
}

.btn.primary:hover {
    background: linear-gradient(135deg, var(--primary-hover), var(--primary)) !important;
    box-shadow: 0 12px 30px rgba(124, 92, 255, 0.45);
    color: #ffffff !important;
}

.btn.danger {
    background: #2a1118;
    border-color: #52202b;
    color: #ff9aa8;
}

.btn.danger:hover {
    background: #381520;
    border-color: #702b3a;
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* =========================================================
   FEATURE CARDS
   ========================================================= */

.feature-card {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--card-bg);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.feature-list {
    display: grid;
    gap: 12px;
}

.feature {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 15px;
    border-radius: 16px;
    background: var(--feature-bg);
    border: 1px solid var(--feature-border);
    color: var(--text);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.feature:hover {
    border-color: var(--primary);
    background: var(--feature-hover-bg);
}

.feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: var(--feature-icon-bg);
    border: 1px solid var(--feature-icon-border);
    color: var(--feature-icon-color);
    display: grid;
    place-items: center;
    font-size: 20px;
    flex-shrink: 0;
}

.muted {
    color: var(--muted);
}

.small {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.4;
}

/* =========================================================
   AUTH PAGES (LOGIN & SIGNUP)
   ========================================================= */

.auth-page {
    min-height: calc(100vh - 72px - var(--sat));
    min-height: calc(100dvh - 72px - var(--sat));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px max(16px, var(--sal)) calc(var(--sab) + 20px) max(16px, var(--sar));
}

.auth-card {
    width: min(450px, 100%);
    padding: clamp(22px, 5vw, 36px);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--panel);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

.auth-card .brand {
    margin-bottom: 12px;
}

.auth-card h1 {
    font-size: clamp(26px, 5vw, 34px);
    margin: 8px 0 6px;
    letter-spacing: -0.03em;
}

.field {
    display: grid;
    gap: 8px;
    margin: 16px 0;
}

.field label {
    font-size: 13px;
    color: var(--muted);
    font-weight: 700;
}

.field input,
.field textarea,
.field select {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text);
    border-radius: 12px;
    padding: 13px 15px;
    font-size: 16px; /* Prevents iOS/Android WebView zoom */
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    min-height: 48px;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.2);
}

.password-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.password-wrap input {
    width: 100%;
    padding-right: 48px !important;
}

.btn-toggle-password {
    position: absolute;
    right: 8px;
    top: 0;
    bottom: 0;
    margin: auto 0 !important;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: color 0.15s ease, background-color 0.15s ease;
    padding: 0;
    z-index: 2;
    touch-action: manipulation;
    transform: none !important;
}

.btn-toggle-password:hover {
    color: var(--text-heading);
    background: rgba(124, 92, 255, 0.12);
}

.btn-toggle-password:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 1px;
}

.btn-toggle-password svg {
    width: 20px;
    height: 20px;
    display: block;
    margin: 0;
    pointer-events: none;
    flex-shrink: 0;
}

.error,
.success {
    padding: 12px 16px;
    border-radius: 12px;
    margin: 12px 0;
    font-size: 14px;
    line-height: 1.4;
}

.error {
    background: #29121a;
    border: 1px solid #52202b;
    color: #ffabb6;
}

.success {
    background: #0c271d;
    border: 1px solid #164d37;
    color: #8ff0bf;
}

/* =========================================================
   STANDARD PAGE LAYOUTS
   ========================================================= */

.page {
    padding: 40px 0 80px;
}

.page h1 {
    font-size: clamp(32px, 5vw, 50px);
}

.grid2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.card {
    border: 1px solid var(--line);
    background: var(--panel);
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--shadow);
}

.card h2 {
    margin-top: 0;
}

.list {
    display: grid;
    gap: 10px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.list li {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 13px;
    color: var(--text);
}

.footer {
    padding: 35px 0 calc(35px + var(--sab));
    color: var(--muted);
    background: var(--footer-bg);
    border-top: 1px solid var(--line);
    font-size: 14px;
    transition: background 0.25s ease;
}

.footer a {
    color: var(--muted);
    transition: color 0.2s ease;
}

.footer a:hover {
    color: var(--text);
}

/* =========================================================
   VIDEO CHAT INTERFACE (ANDROID & DESKTOP OPTIMIZED)
   ========================================================= */

.video-page {
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    overscroll-behavior: none;
    background: var(--video-bg);
    background-image: var(--video-bg-gradient);
    color: var(--text);
    transition: background 0.25s ease, color 0.25s ease;
}

.video-top {
    height: calc(60px + var(--sat));
    padding-top: var(--sat);
    padding-left: max(16px, var(--sal));
    padding-right: max(16px, var(--sar));
    padding-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--video-top-border);
    background: var(--video-top-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-shrink: 0;
    z-index: 30;
    transition: background 0.25s ease, border-color 0.25s ease;
}

.video-top-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-chat {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
    line-height: 1;
}

.brand-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
}

.brand-details .brand-text {
    font-size: 17px;
    font-weight: 900;
    letter-spacing: 0.04em;
    line-height: 1;
    color: var(--brand-text) !important;
}

.statusline {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0;
    background: transparent;
    border: none;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    transition: all 0.25s ease;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--warn);
    box-shadow: 0 0 6px rgba(255, 184, 77, 0.6);
    flex-shrink: 0;
}

.status-dot.ok {
    background: var(--ok);
    box-shadow: 0 0 8px rgba(53, 213, 138, 0.8);
}

.status-dot.bad {
    background: var(--danger);
    box-shadow: 0 0 8px rgba(255, 82, 103, 0.8);
}

.video-top-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 8px 0 0;
    height: 28px;
    box-sizing: border-box;
}

.username-top {
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-heading);
    line-height: 1;
}

.btn-logout {
    height: 28px !important;
    min-height: 28px !important;
    max-height: 28px !important;
    padding: 0 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px;
    border-radius: 8px;
    background: var(--btn-bg);
    border: 1px solid var(--btn-border);
    color: var(--btn-color);
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    white-space: nowrap;
    touch-action: manipulation;
    box-sizing: border-box;
    margin: 0;
}

.btn-logout svg {
    width: 13px;
    height: 13px;
    display: block;
    flex-shrink: 0;
}

.btn-logout:hover {
    background: rgba(255, 82, 103, 0.15);
    border-color: rgba(255, 82, 103, 0.35);
    color: var(--danger);
    transform: translateY(-1px);
}

html[data-theme="light"] .btn-logout:hover,
[data-theme="light"] .btn-logout:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #dc2626;
}

.video-shell {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 10px max(12px, var(--sal)) calc(10px + var(--sab)) max(12px, var(--sar));
    gap: 10px;
    justify-content: space-between;
    overflow: hidden;
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
}

.video-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    flex: 1;
    min-height: 0;
}

.video-card {
    height: 100%;
    min-height: 0;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--video-card-border);
    border-radius: 20px;
    background: var(--video-card-bg);
    box-shadow: var(--video-card-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.video-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #030408;
    display: block;
    transform: translateZ(0);
}

.video-card.local video {
    transform: scaleX(-1) translateZ(0);
}

.video-label {
    position: absolute;
    left: 12px;
    top: 12px;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    background: var(--video-tag-bg);
    border: 1px solid var(--video-tag-border);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--video-tag-color);
    z-index: 4;
    user-select: none;
    -webkit-user-select: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.badge {
    position: absolute;
    right: 12px;
    top: 12px;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    background: var(--video-tag-bg);
    border: 1px solid var(--video-tag-border);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: var(--video-tag-color);
    z-index: 4;
    user-select: none;
    -webkit-user-select: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.badge.timer {
    font-variant-numeric: tabular-nums;
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.35);
}

html[data-theme="dark"] .badge.timer,
:root .badge.timer {
    color: #8ff0bf;
    border-color: rgba(53, 213, 138, 0.35);
}

.video-state {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 24px 20px;
    background: var(--video-state-bg);
    z-index: 2;
    pointer-events: none;
    transition: background 0.25s ease;
}

.state-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: var(--video-state-icon-bg);
    border: 1px solid var(--video-state-icon-border);
    color: var(--video-state-icon-color);
    display: grid;
    place-items: center;
    font-size: 24px;
    margin: 0 auto 14px;
    box-shadow: 0 10px 30px rgba(124, 92, 255, 0.15);
    transition: all 0.25s ease;
}

.video-state h2 {
    margin: 0 0 8px;
    font-size: clamp(18px, 3.5vw, 22px);
    font-weight: 800;
    color: var(--video-state-title);
    letter-spacing: -0.01em;
}

.video-state p {
    margin: 0;
    color: var(--video-state-desc);
    font-size: clamp(13px, 2.5vw, 14.5px);
    max-width: 300px;
    line-height: 1.5;
}

.video-state.live,
.video-card.has-video .video-state {
    display: none !important;
}

/* =========================================================
   CONTROLS & ACTION BUTTONS
   ========================================================= */

.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    margin: 4px 0;
}

.control {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    border: 1px solid var(--ctrl-btn-border);
    background: var(--ctrl-btn-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--ctrl-btn-color);
    font-size: 19px;
    display: grid;
    place-items: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    touch-action: manipulation;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.control:hover:not(:disabled) {
    border-color: var(--ctrl-btn-hover-border);
    background: var(--ctrl-btn-hover-bg);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.control:active:not(:disabled) {
    transform: scale(0.95);
}

.control.active {
    background: rgba(124, 92, 255, 0.25);
    border-color: var(--primary);
    box-shadow: 0 0 18px rgba(124, 92, 255, 0.4);
    color: var(--primary);
}

.control.danger {
    background: rgba(255, 82, 103, 0.2);
    border-color: var(--danger);
    color: var(--danger);
}

.control:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.main-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    width: 100%;
    max-width: 620px;
    margin: 0 auto;
}

.big-btn {
    flex: 1;
    min-width: 0;
    min-height: 48px;
    padding: 12px 16px;
    border-radius: 14px;
    border: 1px solid var(--btn-border);
    background: var(--btn-bg);
    color: var(--btn-color);
    font-weight: 800;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    touch-action: manipulation;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.big-btn:hover:not(:disabled) {
    background: var(--btn-hover-bg);
    border-color: var(--btn-hover-border);
    color: var(--btn-hover-color);
    transform: translateY(-2px);
}

.big-btn:active:not(:disabled) {
    transform: scale(0.97);
}

.big-btn.primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important;
    border-color: transparent !important;
    box-shadow: 0 8px 24px rgba(124, 92, 255, 0.35);
    color: #ffffff !important;
}

.big-btn.primary:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--primary-hover), var(--primary)) !important;
    box-shadow: 0 10px 28px rgba(124, 92, 255, 0.5);
    color: #ffffff !important;
}

.big-btn.warn {
    background: var(--action-next-bg);
    border-color: var(--action-next-border);
    color: var(--action-next-color);
}

.big-btn.warn:hover:not(:disabled) {
    background: var(--action-next-hover-bg);
}

.big-btn.stop {
    background: var(--action-stop-bg);
    border-color: var(--action-stop-border);
    color: var(--action-stop-color);
}

.big-btn.stop:hover:not(:disabled) {
    background: var(--action-stop-hover-bg);
}

.big-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.video-footer {
    text-align: center;
    color: var(--muted);
    font-size: 11.5px;
    line-height: 1.35;
    flex-shrink: 0;
}

/* =========================================================
   TOAST & MODALS
   ========================================================= */

.toast {
    position: fixed;
    right: max(16px, var(--sar));
    bottom: max(16px, var(--sab));
    padding: 13px 18px;
    background: var(--panel);
    border: 1px solid var(--line);
    color: var(--text);
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    z-index: 100;
    font-size: 14px;
    max-width: calc(100vw - 32px);
    backdrop-filter: blur(20px);
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: grid;
    place-items: center;
    z-index: 90;
    padding: 20px;
}

.modal-card {
    width: min(460px, 100%);
    background: var(--panel);
    border: 1px solid var(--line);
    color: var(--text);
    border-radius: var(--radius-lg);
    padding: clamp(20px, 4vw, 28px);
    box-shadow: var(--shadow-lg);
}

.modal-card h2 {
    margin-top: 0;
    font-size: 22px;
    color: var(--text-heading);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* =========================================================
   ADMIN STYLES
   ========================================================= */

.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    min-width: 500px;
}

.table th,
.table td {
    padding: 13px 15px;
    text-align: left;
    border-bottom: 1px solid #20283a;
    font-size: 13px;
}

.table th {
    color: #8994aa;
    font-weight: 700;
}

.admin-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.pill {
    padding: 8px 14px;
    border-radius: var(--radius-full);
    background: #131a2b;
    border: 1px solid #252f45;
    color: #aeb7ca;
    font-size: 13px;
    font-weight: 600;
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.stat {
    padding: 18px;
    border: 1px solid var(--line);
    background: #0c1220;
    border-radius: 17px;
}

.stat strong {
    font-size: 28px;
    display: block;
    margin-top: 6px;
}

/* =========================================================
   RESPONSIVE BREAKPOINTS (MOBILE & TABLET)
   ========================================================= */

@media (max-width: 900px) {
    .hero-grid,
    .grid2 {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 30px 0 50px;
    }

    .stats {
        grid-template-columns: 1fr 1fr;
    }

    .nav {
        padding-left: max(16px, var(--sal));
        padding-right: max(16px, var(--sar));
    }
}

/* Mobile Portrait Mode for Landing Page & Navigation */
@media (max-width: 860px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 32px;
        width: 100%;
    }

    .hero {
        min-height: unset;
        padding: 24px 0 36px;
    }

    .hero h1 {
        font-size: clamp(30px, 7.5vw, 44px);
        margin: 14px 0;
        line-height: 1.1;
    }

    .lead {
        font-size: 15px;
        line-height: 1.6;
    }

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

    .actions .btn {
        flex: 1 1 calc(50% - 10px);
        min-width: 125px;
        justify-content: center;
        text-align: center;
        font-size: 13.5px;
        padding: 12px 14px;
    }

    .actions .btn.primary {
        flex: 1 1 100%;
        font-size: 15px;
        padding: 14px 18px;
    }

    .home-interests-picker {
        width: 100%;
        margin-top: 18px;
    }

    .home-tags-row {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .home-tag-btn {
        padding: 6px 12px;
        font-size: 12.5px;
    }

    .feature-card {
        padding: 22px 18px;
        border-radius: 20px;
        width: 100%;
    }

    .feature-list {
        display: grid;
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .faq-section {
        padding: 40px 0 60px;
    }

    .faq-main-title {
        font-size: clamp(22px, 5.5vw, 32px);
    }

    .faq-item {
        border-radius: 14px;
    }

    .faq-question {
        padding: 14px 16px;
        font-size: 14.5px;
        gap: 10px;
    }

    .faq-answer {
        padding: 0 16px 14px;
        font-size: 13.5px;
        line-height: 1.55;
    }
}

/* Mobile Portrait Mode for Video Chat & Navigation (Standard Android view) */
@media (max-width: 768px) {
    .navlinks a,
    .navlinks .btn,
    .navlinks a.btn,
    .navlinks .btn.primary {
        display: none !important;
    }

    .nav-toggle {
        display: flex;
    }

    .navlinks .theme-toggle {
        display: inline-flex;
    }

    .desktop-nav-online {
        display: none !important;
    }

    .brand-nav {
        display: inline-flex;
        align-items: center;
        gap: 8px;
    }

    .brand-nav .brand-details {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 2px;
    }

    .brand-nav .brand-text {
        font-size: 16px;
        line-height: 1.1;
    }

    .mobile-brand-online {
        display: inline-flex !important;
        align-items: center;
        gap: 4px;
        padding: 0;
        background: transparent;
        border: none;
        color: var(--muted);
        font-size: 10px;
        font-weight: 600;
        line-height: 1;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        box-shadow: none;
    }

    .mobile-brand-online::before {
        width: 5px;
        height: 5px;
        box-shadow: 0 0 6px rgba(53, 213, 138, 0.8);
    }

    .video-grid {
        display: flex;
        flex-direction: column;
        gap: 8px;
        flex: 1;
        min-height: 0;
    }

    .video-card {
        flex: 1;
        min-height: 0;
        height: auto;
        border-radius: 16px;
    }

    .video-card:first-child {
        order: 0;
    }

    .video-card.local {
        order: 1;
    }

    .video-shell {
        padding: 6px max(8px, var(--sal)) calc(6px + var(--sab)) max(8px, var(--sar));
        gap: 6px;
    }

    .video-top {
        height: calc(52px + var(--sat));
        padding-left: max(10px, var(--sal));
        padding-right: max(10px, var(--sar));
        padding-bottom: 2px;
        gap: 6px;
    }

    .video-top-left {
        gap: 6px;
        flex-shrink: 1;
        min-width: 0;
    }

    .brand-chat {
        gap: 8px;
    }

    .brand-logo {
        width: 28px;
        height: 28px;
    }

    .brand-details .brand-text {
        font-size: 15px;
    }

    .statusline {
        font-size: 9.5px;
        gap: 4px;
    }

    .statusline #statusText {
        display: inline !important;
        max-width: 100px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .video-top-right {
        display: flex;
        align-items: center;
        gap: 6px;
        flex-shrink: 0;
    }

    .header-status-controls-col {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        justify-content: center;
        gap: 2.5px;
    }

    .header-status-controls-col .theme-toggle {
        margin: 0;
        padding: 0;
        border: none;
        background: transparent;
    }

    .header-status-controls-col .theme-track {
        width: 68px;
        height: 20px;
    }

    .header-status-controls-col .theme-thumb {
        width: 14px;
        height: 14px;
        top: 2px;
        left: 2px;
    }

    html[data-theme="light"] .header-status-controls-col .theme-thumb,
    [data-theme="light"] .header-status-controls-col .theme-thumb {
        transform: translateX(48px);
    }

    .header-status-controls-col .theme-label {
        font-size: 6px;
    }

    .header-status-controls-col .online-users,
    .header-status-controls-col [data-online-users],
    .video-top .online-users,
    .video-top [data-online-users] {
        display: inline-flex !important;
        align-items: center;
        gap: 4px;
        padding: 2px 6px;
        font-size: 10px;
        font-weight: 700;
        line-height: 1;
        border-radius: var(--radius-full);
        background: var(--badge-bg);
        border: 1px solid var(--badge-border);
        color: var(--text);
        flex-shrink: 0;
        white-space: nowrap;
    }

    .header-status-controls-col .online-users::before,
    .header-status-controls-col [data-online-users]::before,
    .video-top .online-users::before,
    .video-top [data-online-users]::before {
        width: 5px;
        height: 5px;
    }

    .ping-badge,
    .karma-badge,
    .user-pill {
        display: none !important;
    }

    .btn-logout {
        width: 28px !important;
        height: 28px !important;
        min-height: 28px !important;
        max-height: 28px !important;
        padding: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 8px !important;
        box-sizing: border-box !important;
        margin: 0 !important;
    }

    .btn-logout svg {
        width: 14px;
        height: 14px;
        display: block;
        margin: 0;
    }

    .btn-logout span {
        display: none !important;
    }

    .theme-track {
        width: 76px;
        height: 22px;
    }

    .theme-thumb {
        width: 16px;
        height: 16px;
        top: 2px;
        left: 2px;
    }

    html[data-theme="light"] .theme-thumb,
    [data-theme="light"] .theme-thumb {
        transform: translateX(54px);
    }

    .theme-label {
        font-size: 6.5px;
    }

    .brand {
        font-size: 17px;
        gap: 6px;
    }

    .brand-logo {
        width: 26px;
        height: 26px;
    }

    .brand-text {
        font-size: 17px;
    }

    .controls {
        margin: 2px 0;
        gap: 8px;
    }

    .control {
        width: 42px;
        height: 42px;
        border-radius: 13px;
        font-size: 16px;
    }

    .main-actions {
        gap: 6px;
    }

    .big-btn {
        padding: 10px 8px;
        font-size: 13px;
        border-radius: 12px;
        min-height: 42px;
    }

    .ping-badge,
    .karma-badge,
    .user-pill {
        display: none !important;
    }

    .navlinks .header-status-controls-col,
    .video-top-right .header-status-controls-col {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        justify-content: center;
        gap: 2.5px;
    }

    .navlinks .header-status-controls-col .theme-toggle,
    .video-top-right .header-status-controls-col .theme-toggle {
        margin: 0;
        padding: 0;
        border: none;
        background: transparent;
    }

    .navlinks .header-status-controls-col .theme-track,
    .video-top-right .header-status-controls-col .theme-track {
        width: 68px;
        height: 20px;
    }

    .navlinks .header-status-controls-col .theme-thumb,
    .video-top-right .header-status-controls-col .theme-thumb {
        width: 14px;
        height: 14px;
        top: 2px;
        left: 2px;
    }

    html[data-theme="light"] .navlinks .header-status-controls-col .theme-thumb,
    [data-theme="light"] .navlinks .header-status-controls-col .theme-thumb,
    html[data-theme="light"] .video-top-right .header-status-controls-col .theme-thumb,
    [data-theme="light"] .video-top-right .header-status-controls-col .theme-thumb {
        transform: translateX(48px);
    }

    .navlinks .header-status-controls-col .theme-label,
    .video-top-right .header-status-controls-col .theme-label {
        font-size: 6px;
    }

    .navlinks .header-status-controls-col .online-users,
    .navlinks .header-status-controls-col [data-online-users],
    .video-top-right .header-status-controls-col .online-users,
    .video-top-right .header-status-controls-col [data-online-users],
    .online-users,
    [data-online-users] {
        display: inline-flex !important;
        align-items: center;
        gap: 4px;
        font-size: 10px;
        padding: 2px 6px;
        font-weight: 700;
        line-height: 1;
        border-radius: var(--radius-full);
        background: var(--badge-bg);
        border: 1px solid var(--badge-border);
        color: var(--text);
        flex-shrink: 0;
        white-space: nowrap;
    }

    .btn-logout {
        display: inline-flex !important;
        padding: 5px 8px;
        min-width: unset;
    }

    .btn-logout span {
        display: none;
    }

    .tag-input-wrapper input {
        width: 100px;
    }
}

/* Small Android phones (< 480px width) */
@media (max-width: 480px) {
    body:not(.video-page) {
        padding-top: calc(58px + var(--sat));
    }

    .nav {
        height: calc(58px + var(--sat));
        padding-left: max(16px, var(--sal));
        padding-right: max(16px, var(--sar));
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .navlinks {
        gap: 8px;
        display: flex;
        align-items: center;
    }

    .brand-nav {
        gap: 8px;
        font-size: 18px;
    }

    .brand-nav .brand-logo {
        width: 32px;
        height: 32px;
    }

    .brand-nav .brand-text {
        font-size: 18px;
        font-weight: 900;
    }

    .navlinks a,
    .navlinks .btn,
    .navlinks a.btn,
    .navlinks .btn.primary {
        display: none !important;
    }

    .nav-toggle {
        display: flex !important;
    }

    .navlinks .theme-toggle {
        display: inline-flex !important;
    }

    .navlinks .theme-track {
        width: 68px;
        height: 20px;
    }

    .navlinks .theme-thumb {
        width: 14px;
        height: 14px;
        top: 2px;
        left: 2px;
    }

    html[data-theme="light"] .navlinks .theme-thumb,
    [data-theme="light"] .navlinks .theme-thumb {
        transform: translateX(48px);
    }

    .navlinks .theme-label {
        font-size: 6px;
    }

    .ping-badge {
        display: none !important;
    }

    .container {
        padding-left: max(16px, var(--sal)) !important;
        padding-right: max(16px, var(--sar)) !important;
        box-sizing: border-box;
        width: 100%;
    }

    .hero {
        padding: 20px 0 24px;
        min-height: unset;
        width: 100%;
        box-sizing: border-box;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        width: 100%;
        box-sizing: border-box;
    }

    .hero h1 {
        font-size: clamp(26px, 7vw, 34px);
        margin: 12px 0 8px;
        line-height: 1.12;
    }

    .lead {
        font-size: 14px;
        line-height: 1.55;
    }

    .eyebrow {
        padding: 5px 10px;
        font-size: 11.5px;
        max-width: 100%;
        box-sizing: border-box;
    }

    .actions {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        width: 100%;
        box-sizing: border-box;
    }

    .actions .btn {
        flex: 1 1 calc(50% - 6px);
        min-width: 120px;
        box-sizing: border-box;
        padding: 11px 14px;
        font-size: 13.5px;
    }

    .actions .btn.primary {
        flex: 1 1 100%;
        width: 100%;
    }

    .feature-card {
        padding: 16px;
        border-radius: 16px;
        margin-top: 6px;
        width: 100%;
        box-sizing: border-box;
    }

    .btn {
        padding: 11px 16px;
        font-size: 13.5px;
    }

    .big-btn {
        font-size: 12px;
        padding: 10px 6px;
    }

    .controls {
        gap: 5px;
    }

    .control {
        width: 38px;
        height: 38px;
        font-size: 15px;
        border-radius: 11px;
    }
}

/* Landscape Mode on Android phones (height constrained) */
@media (max-height: 500px) and (orientation: landscape) {
    .video-top {
        height: calc(44px + var(--sat));
        padding-bottom: 2px;
    }

    .video-shell {
        padding: 4px max(8px, var(--sal)) calc(4px + var(--sab)) max(8px, var(--sar));
        gap: 4px;
    }

    .video-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .control {
        width: 38px;
        height: 38px;
        font-size: 15px;
        border-radius: 10px;
    }

    .big-btn {
        min-height: 38px;
        padding: 8px 12px;
        font-size: 12px;
        border-radius: 10px;
    }

    .video-footer {
        display: none;
    }
}

/* =========================================================
   PUNGU TV - NEW FEATURE SUITE STYLING (LIGHT & DARK MATCHED)
   ========================================================= */

/* --- Top Header Badges & Action Buttons --- */
.ping-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    font-family: monospace;
    border-radius: var(--radius-full);
    background: var(--badge-bg);
    border: 1px solid var(--badge-border);
    color: var(--muted);
    transition: all 0.3s ease;
}

.ping-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ok);
    box-shadow: 0 0 8px var(--ok);
}

.ping-badge.ok .ping-dot { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.ping-badge.fair .ping-dot { background: var(--warn); box-shadow: 0 0 8px var(--warn); }
.ping-badge.poor .ping-dot { background: var(--danger); box-shadow: 0 0 8px var(--danger); }

.karma-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    border-radius: var(--radius-full);
    background: var(--karma-badge-bg);
    border: 1px solid var(--karma-badge-border);
    color: var(--karma-badge-color);
    letter-spacing: 0.3px;
}

.top-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--badge-bg);
    border: 1px solid var(--line);
    color: var(--text);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.top-icon-btn:hover {
    background: var(--btn-hover-bg);
    border-color: var(--primary);
    transform: translateY(-1px);
}

.top-icon-btn.active {
    border-color: var(--primary);
    background: rgba(124, 92, 255, 0.2);
    box-shadow: 0 0 10px rgba(124, 92, 255, 0.3);
}

/* --- Interest Tags Section --- */
.tags-bar-section {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto 10px auto;
    padding: 8px 14px;
    background: var(--tag-bar-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 8px;
    animation: fadeIn 0.3s ease;
}

.tags-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.tags-label-group {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
}

.tags-chips-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 600;
    background: var(--tag-chip-bg);
    border: 1px solid var(--tag-chip-border);
    color: var(--tag-chip-color);
    border-radius: var(--radius-full);
    animation: popIn 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.tag-chip-remove {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 12px;
    padding: 0 2px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.tag-chip-remove:hover { opacity: 1; color: var(--danger); }

.tag-input-wrapper {
    display: flex;
    align-items: center;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-full);
    padding: 2px 4px 2px 10px;
    margin-left: auto;
}

.tag-input-wrapper input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font-size: 12px;
    width: 140px;
}

.tag-input-wrapper input::placeholder { color: var(--muted); }

.btn-tag-add {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    border: none;
    color: white;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.btn-tag-add:hover { transform: scale(1.1); background: var(--primary-hover); }

.preset-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    border-top: 1px solid var(--line-subtle);
    padding-top: 6px;
}

.preset-tag-chip, .home-tag-btn {
    background: var(--badge-bg);
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.2s ease;
}

.preset-tag-chip:hover, .home-tag-btn:hover {
    background: var(--btn-hover-bg);
    color: var(--text);
    border-color: var(--primary);
}

.preset-tag-chip.active, .home-tag-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 0 10px rgba(124, 92, 255, 0.35);
}

/* Home hero interest picker */
.home-interests-picker {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.home-interests-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--brand-accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.home-tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Matched Banner */
.matched-banner {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto 10px auto;
    padding: 8px 16px;
    background: var(--matched-banner-bg);
    border: 1px solid var(--matched-banner-border);
    border-radius: var(--radius-md);
    color: var(--matched-banner-color);
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    animation: bannerDrop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.matched-banner strong { color: var(--matched-banner-strong); }

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

/* --- In-App Live Update Notification Banner --- */
.update-banner {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, rgba(20, 24, 45, 0.95), rgba(35, 20, 65, 0.95));
    border: 1px solid rgba(124, 92, 255, 0.6);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.6), 0 0 20px rgba(124, 92, 255, 0.35);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 8px 16px;
    border-radius: 9999px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
    animation: slideDownUpdate 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    max-width: 92vw;
}

.update-banner.hidden {
    display: none !important;
}

.update-banner-icon {
    font-size: 16px;
    animation: pulseGlow 1.8s infinite;
}

.update-btn-action {
    background: linear-gradient(135deg, #7c5cff, #9b72cf);
    color: #ffffff;
    border: none;
    padding: 5px 14px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(124, 92, 255, 0.4);
    transition: transform 0.15s ease, filter 0.15s ease;
}

.update-btn-action:hover {
    transform: scale(1.05);
    filter: brightness(1.15);
}

.update-btn-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 15px;
    cursor: pointer;
    padding: 2px 6px;
    line-height: 1;
}

.update-btn-close:hover {
    color: #ffffff;
}

@keyframes slideDownUpdate {
    from { opacity: 0; transform: translate(-50%, -20px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes pulseGlow {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 2px #7c5cff); }
    50% { transform: scale(1.15); filter: drop-shadow(0 0 8px #00f2fe); }
}

.pip-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 9;
    background: var(--ctrl-btn-bg);
    border: 1px solid var(--ctrl-btn-border);
    color: var(--ctrl-btn-color);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.2s, background 0.2s;
}

.video-card:hover .pip-btn { opacity: 1; }
.pip-btn:hover { background: var(--primary); border-color: var(--primary); color: #ffffff; }

/* --- Audio Speaking Aura Indicator --- */
.video-card.speaking {
    border-color: var(--primary) !important;
    box-shadow: 0 0 25px rgba(124, 92, 255, 0.65), inset 0 0 20px rgba(124, 92, 255, 0.2) !important;
    animation: speakingGlow 1.2s infinite alternate ease-in-out;
}

@keyframes speakingGlow {
    from { box-shadow: 0 0 15px rgba(124, 92, 255, 0.45); }
    to { box-shadow: 0 0 30px rgba(124, 92, 255, 0.85), 0 0 8px #ffffff; }
}

/* =========================================================
   TWO-COLUMN CHAT WORKSPACE (2-COLUMN VIDEO + LIVE CHAT PANEL)
   ========================================================= */

.chat-workspace {
    display: grid;
    grid-template-columns: minmax(320px, 420px) 1fr;
    gap: 16px;
    flex: 1;
    min-height: 0;
    padding: 12px max(16px, var(--sal)) calc(12px + var(--sab)) max(16px, var(--sar));
    max-width: 1560px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* --- Left Column: Video Cards --- */
.chat-left-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
    min-height: 0;
    min-width: 0;
}

.video-card.remote-card,
.video-card.local-card {
    flex: 1;
    min-height: 0;
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    background: var(--video-card-bg);
    border: 1px solid var(--video-card-border);
    box-shadow: var(--video-card-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.video-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #030408;
    display: block;
    transform: translateZ(0);
}

.video-card.local-card video {
    transform: scaleX(-1) translateZ(0);
}

.video-header-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 6;
}

.video-role-tag {
    padding: 4px 10px;
    border-radius: var(--radius-full);
    background: var(--video-tag-bg);
    border: 1px solid var(--video-tag-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--video-tag-color);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.video-status-tag {
    padding: 4px 10px;
    border-radius: var(--radius-full);
    background: var(--video-tag-bg);
    border: 1px solid var(--video-tag-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transition: all 0.2s ease;
}

.video-status-tag.live {
    color: #22c55e;
    border-color: rgba(34, 197, 94, 0.4);
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.25);
}

.video-status-tag.connecting,
.video-status-tag.searching {
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.4);
}

.video-card-overlay-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 14px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.3) 60%, transparent 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 5;
}

.overlay-brand {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
    font-family: inherit;
    letter-spacing: 0.2px;
}

.overlay-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 8px #22c55e;
}

.overlay-report-btn {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.overlay-report-btn:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.8);
    border-color: #ef4444;
    transform: scale(1.1);
}

.overlay-report-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.local-card-controls-overlay {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    z-index: 6;
}

.mini-control {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.mini-control:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

.mini-control.active {
    background: rgba(99, 67, 232, 0.85);
    border-color: rgba(124, 92, 255, 1);
    box-shadow: 0 0 10px rgba(124, 92, 255, 0.4);
}

.mini-control.off {
    background: rgba(239, 68, 68, 0.6);
    border-color: rgba(239, 68, 68, 0.9);
}

.mini-control:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* --- Right Column: Conversation Transcript & Tools --- */
.chat-right-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
    min-height: 0;
    min-width: 0;
}

.conversation-transcript-card {
    flex: 1;
    min-height: 0;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    position: relative;
    padding: 24px 28px;
    scroll-behavior: smooth;
}

.welcome-guidelines {
    margin-bottom: auto;
    animation: fadeIn 0.3s ease;
}

.welcome-heading {
    font-size: 24px;
    font-weight: 900;
    margin: 0 0 14px 0;
    color: var(--text-heading);
    letter-spacing: -0.02em;
}

.guideline-age-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.badge-18 {
    background: #dc2626;
    color: #ffffff;
    font-weight: 900;
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 6px;
    letter-spacing: 0.5px;
    display: inline-block;
}

.age-text {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
}

.guidelines-list {
    margin: 0 0 16px 0;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
}

.guidelines-list li {
    list-style: disc;
}

.guidelines-list .rule-violators {
    font-size: 14.5px;
    color: var(--danger);
    font-weight: 800;
    margin-top: 2px;
}

.guidelines-status-msg {
    font-size: 13px;
    color: var(--muted);
    font-weight: 500;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--badge-bg);
    border: 1px solid var(--line-subtle);
    display: inline-block;
}

/* Chat Messages Stream */
.chat-stream {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 8px;
}

.chat-msg {
    display: flex;
    flex-direction: column;
    max-width: 82%;
    animation: popIn 0.2s ease;
}

.chat-msg.you {
    align-self: flex-end;
}

.chat-msg.stranger {
    align-self: flex-start;
}

.chat-msg-sender {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--muted);
    margin-bottom: 2px;
}

.chat-msg.you .chat-msg-sender {
    text-align: right;
    color: var(--primary2);
}

.chat-msg-bubble {
    padding: 9px 14px;
    font-size: 14px;
    line-height: 1.45;
    border-radius: 14px;
    word-break: break-word;
}

.chat-msg.you .chat-msg-bubble {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #ffffff;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 12px rgba(124, 92, 255, 0.25);
}

.chat-msg.stranger .chat-msg-bubble {
    background: var(--chat-msg-stranger-bg);
    border: 1px solid var(--chat-msg-stranger-border);
    color: var(--chat-msg-stranger-color);
    border-bottom-left-radius: 4px;
}

.chat-msg.system .chat-msg-bubble {
    background: var(--badge-bg);
    border: 1px dashed var(--primary);
    color: var(--primary);
    font-size: 12.5px;
    text-align: center;
    border-radius: var(--radius-sm);
    padding: 6px 12px;
}

.chat-msg-time {
    font-size: 9.5px;
    color: var(--muted);
    margin-top: 2px;
    align-self: flex-end;
}

/* Typing Indicator */
.typing-indicator {
    padding: 6px 4px;
    font-size: 11.5px;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 5px;
}

.typing-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--primary);
    animation: typingBounce 1s infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

/* Features Toolbar */
.chat-features-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 2px 0;
}

.toolbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    background: var(--badge-bg);
    border: 1px solid var(--line);
    color: var(--text);
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.toolbar-btn:hover:not(:disabled) {
    background: var(--btn-hover-bg);
    border-color: var(--primary);
    transform: translateY(-1px);
}

.toolbar-btn.active {
    background: rgba(124, 92, 255, 0.15);
    border-color: var(--primary);
    color: var(--primary);
}

.toolbar-btn.danger-text:hover:not(:disabled) {
    border-color: var(--danger);
    color: var(--danger);
    background: rgba(255, 82, 103, 0.1);
}

.toolbar-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.toolbar-tag-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.active-tags-summary {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Bottom Action & Chat Input Bar */
.chat-bottom-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.main-action-group {
    display: flex;
    flex-shrink: 0;
}

.big-action-btn {
    min-width: 96px;
    height: 52px;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
    user-select: none;
    -webkit-user-select: none;
}

.big-action-btn .action-text {
    font-size: 16px;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.01em;
}

.big-action-btn .action-sub {
    font-size: 10px;
    font-weight: 600;
    opacity: 0.8;
    font-family: monospace;
    margin-top: 2px;
}

.big-action-btn.start-state {
    background: linear-gradient(135deg, #6343e8, #4f32c9);
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(99, 67, 232, 0.35);
}

.big-action-btn.start-state:hover {
    background: linear-gradient(135deg, #7454f7, #6343e8);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(99, 67, 232, 0.45);
}

.big-action-btn.next-state {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}

.big-action-btn.next-state:hover {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.45);
}

.big-action-btn.stop-state {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.35);
}

.big-action-btn.stop-state:hover {
    background: linear-gradient(135deg, #f87171, #ef4444);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(220, 38, 38, 0.45);
}

.chat-input-form {
    flex: 1;
    min-width: 0;
    margin: 0;
}

.chat-input-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    height: 52px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 4px 8px 4px 16px;
    box-shadow: var(--shadow);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.chat-input-pill:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.18);
}

.chat-input-pill.disabled,
.chat-input-pill:has(input:disabled) {
    opacity: 0.65;
    background: var(--badge-bg);
    border-color: var(--line-subtle);
    cursor: not-allowed;
}

.chat-input-pill input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 15px;
    outline: none;
    height: 100%;
}

.chat-input-pill input:disabled {
    cursor: not-allowed;
    color: var(--muted);
}

.quick-emoji-row {
    display: flex;
    align-items: center;
    gap: 3px;
}

.quick-emoji-btn {
    background: none;
    border: none;
    font-size: 17px;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: transform 0.15s ease, opacity 0.2s ease;
    line-height: 1;
}

.quick-emoji-btn:hover:not(:disabled) {
    transform: scale(1.25);
}

.chat-input-pill:has(input:disabled) .quick-emoji-btn,
.quick-emoji-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-send-arrow {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: transparent;
    border: none;
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.btn-send-arrow:hover:not(:disabled) {
    background: rgba(124, 92, 255, 0.12);
    transform: scale(1.08);
}

.btn-send-arrow:disabled,
.chat-input-pill:has(input:disabled) .btn-send-arrow {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* Responsive Mobile Layout (Chat & Video) */
@media (max-width: 860px) {
    .chat-workspace {
        grid-template-columns: 1fr;
        height: calc(100dvh - 56px);
        display: flex;
        flex-direction: column;
        padding: 6px 8px;
        gap: 6px;
        overflow: hidden;
    }

    /* Video area with main stranger feed and floating selfie camera */
    .chat-left-col {
        position: relative;
        display: block;
        width: 100%;
        height: 38vh;
        min-height: 220px;
        max-height: 290px;
        flex-shrink: 0;
        border-radius: 18px;
        overflow: hidden;
    }

    .video-card.remote-card {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        border-radius: 18px;
        z-index: 1;
        background: var(--video-card-bg);
        border: 1px solid var(--video-card-border);
        box-shadow: var(--video-card-shadow);
    }

    .video-card.remote-card .video-header-badge {
        top: 10px;
        left: 10px;
        z-index: 6;
    }

    .video-card.remote-card .pip-btn {
        display: none !important;
    }

    .video-card.remote-card .video-state {
        z-index: 2;
    }

    /* Fixed POV Camera (Floating Selfie PiP in top-right - Landscape 4:3) */
    .video-card.local-card {
        position: absolute;
        top: 10px;
        right: 10px;
        width: 115px;
        height: 86px;
        border-radius: 14px;
        z-index: 8;
        overflow: hidden;
        background: var(--video-card-bg);
        border: 2px solid var(--video-card-border);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
        transition: background 0.25s ease, border-color 0.25s ease;
    }

    html[data-theme="light"] .video-card.local-card,
    [data-theme="light"] .video-card.local-card {
        background: #ffffff !important;
        border: 2px solid rgba(0, 0, 0, 0.12) !important;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12) !important;
    }

    html[data-theme="dark"] .video-card.local-card,
    [data-theme="dark"] .video-card.local-card {
        background: #0b0f19 !important;
        border: 2px solid rgba(255, 255, 255, 0.35) !important;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.55) !important;
    }

    .video-card.local-card video {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transform: scaleX(-1);
    }

    .video-card.local-card .video-state {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
        padding: 0;
        background: transparent !important;
    }

    .video-card.local-card .video-state .state-icon {
        width: 42px;
        height: 42px;
        border-radius: 12px;
        font-size: 20px;
        margin: 0;
        box-shadow: none;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    html[data-theme="light"] .video-card.local-card .video-state .state-icon,
    [data-theme="light"] .video-card.local-card .video-state .state-icon {
        background: rgba(99, 67, 232, 0.08);
        border: 1px solid rgba(99, 67, 232, 0.2);
    }

    .video-card-overlay-bar {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 10px 14px;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.25) 60%, transparent 100%);
        display: flex;
        align-items: center;
        justify-content: space-between;
        z-index: 5;
    }

    .overlay-brand {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-size: 13px;
        font-weight: 700;
        color: rgba(255, 255, 255, 0.9);
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
        letter-spacing: 0.2px;
    }

    .overlay-dot {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: #22c55e;
        box-shadow: 0 0 8px #22c55e;
    }

    .overlay-report-btn {
        background: rgba(255, 255, 255, 0.15);
        border: 1px solid rgba(255, 255, 255, 0.25);
        color: #ffffff;
        width: 30px;
        height: 30px;
        border-radius: 8px;
        font-size: 14px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .overlay-report-btn:hover:not(:disabled) {
        background: rgba(239, 68, 68, 0.8);
        border-color: #ef4444;
        transform: scale(1.1);
    }

    .overlay-report-btn:disabled {
        opacity: 0.35;
        cursor: not-allowed;
    }

    /* Right column holds transcript card, toolbar, and bottom chat bar */
    .chat-right-col {
        flex: 1;
        min-height: 0;
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .conversation-transcript-card {
        flex: 1;
        min-height: 0;
        max-height: none;
        padding: 10px 14px;
        border-radius: 16px;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .welcome-guidelines {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }

    .welcome-heading {
        font-size: 16px;
        font-weight: 800;
        margin: 0;
    }

    .guideline-age-row {
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .badge-18 {
        background: #ef4444;
        color: #ffffff;
        font-size: 10px;
        font-weight: 900;
        padding: 2px 6px;
        border-radius: 5px;
    }

    .age-text {
        font-size: 12.5px;
        color: #ef4444;
        font-weight: 700;
    }

    .guidelines-list {
        list-style: disc;
        padding-left: 18px;
        margin: 2px 0;
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

    .guidelines-list li {
        font-size: 11.5px;
        line-height: 1.35;
        color: var(--text);
    }

    .guidelines-status-msg {
        padding: 6px 10px;
        font-size: 11.5px;
        border-radius: 10px;
        background: var(--badge-bg);
        color: var(--muted);
        margin-top: 2px;
    }

    .toolbar-tag-group {
        display: flex;
        align-items: center;
    }

    .active-tags-summary {
        display: none !important;
    }

    .chat-features-toolbar {
        display: flex;
        align-items: center;
        gap: 6px;
        overflow-x: auto;
        padding: 2px 2px;
        scrollbar-width: none;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        flex-shrink: 0;
    }

    .chat-features-toolbar::-webkit-scrollbar {
        display: none;
    }

    .toolbar-btn {
        padding: 6px 12px;
        font-size: 12px;
        font-weight: 700;
        white-space: nowrap;
        border-radius: var(--radius-full);
        flex-shrink: 0;
        display: inline-flex;
        align-items: center;
        gap: 4px;
    }

    .chat-bottom-bar {
        display: flex;
        align-items: center;
        gap: 6px;
        padding-bottom: max(2px, env(safe-area-inset-bottom, 0px));
        flex-shrink: 0;
    }

    .main-action-group {
        display: flex;
        align-items: center;
        gap: 4px;
        flex-shrink: 0;
    }

    .big-action-btn {
        height: 46px;
        border-radius: 12px;
        padding: 0 10px;
    }

    .big-action-btn.start-state {
        min-width: 76px;
        width: 76px;
    }

    .big-action-btn.next-state {
        min-width: 66px;
        width: 66px;
    }

    .big-action-btn.stop-state {
        min-width: 52px;
        width: 52px;
    }

    .big-action-btn .action-text {
        font-size: 14px;
        font-weight: 800;
    }

    .big-action-btn .action-sub {
        display: none;
    }

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

    .chat-input-pill {
        height: 46px;
        border-radius: 12px;
        padding: 4px 6px 4px 10px;
        gap: 4px;
    }

    .chat-input-pill input {
        font-size: 13.5px;
        min-width: 0;
    }

    .quick-emoji-row {
        display: none;
    }

    .btn-send-arrow {
        width: 34px;
        height: 34px;
        flex-shrink: 0;
    }
}

/* --- Icebreaker Popover --- */
.icebreaker-popover {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 90;
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    width: 90%;
    max-width: 480px;
}

.icebreaker-card {
    background: var(--icebreaker-card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    color: var(--text);
}

.icebreaker-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.icebreaker-tag {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--icebreaker-tag-color);
    background: var(--icebreaker-tag-bg);
    padding: 3px 8px;
    border-radius: var(--radius-full);
}

.icebreaker-close-btn {
    background: none;
    border: none;
    color: var(--muted);
    font-size: 14px;
    cursor: pointer;
}

.icebreaker-prompt {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-heading);
    margin: 0;
    line-height: 1.4;
}

.icebreaker-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.btn-sm {
    padding: 6px 12px !important;
    font-size: 12px !important;
}

/* --- Mini-Games Modal --- */
.games-modal-card {
    max-width: 440px !important;
}

.modal-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.modal-close-icon {
    background: none;
    border: none;
    color: var(--muted);
    font-size: 18px;
    cursor: pointer;
}

.game-tabs {
    display: flex;
    gap: 6px;
    background: var(--game-tabs-bg);
    padding: 4px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.game-tab-btn {
    flex: 1;
    background: none;
    border: none;
    color: var(--game-tab-color);
    font-size: 11px;
    font-weight: 700;
    padding: 8px 4px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.game-tab-btn.active {
    background: var(--primary);
    color: #ffffff;
}

/* RPS Arena */
.game-scoreboard {
    display: flex;
    align-items: center;
    justify-content: space-around;
    background: var(--game-card-bg);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 12px;
    margin-bottom: 16px;
}

.score-box {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.score-user { font-size: 11px; color: var(--muted); font-weight: 700; }
.score-num { font-size: 24px; color: var(--text-heading); }
.score-vs { font-size: 12px; font-weight: 800; color: var(--primary); }

.rps-status-msg {
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 16px;
    min-height: 22px;
}

.rps-buttons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

.rps-choice-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 8px;
    background: var(--game-card-bg);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.rps-choice-btn:hover {
    background: var(--btn-hover-bg);
    border-color: var(--primary);
    transform: translateY(-3px);
}

.rps-choice-btn.selected {
    background: rgba(124, 92, 255, 0.2);
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(124, 92, 255, 0.3);
}

.rps-emoji { font-size: 32px; }
.rps-name { font-size: 12px; font-weight: 700; color: var(--text); }

/* Tic-Tac-Toe Arena */
.ttt-status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-heading);
}

.ttt-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    max-width: 260px;
    margin: 0 auto;
}

.ttt-cell {
    aspect-ratio: 1;
    background: var(--game-card-bg);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-size: 32px;
    font-weight: 800;
    color: var(--text-heading);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.ttt-cell:hover { background: var(--btn-hover-bg); }
.ttt-cell.x { color: var(--primary); }
.ttt-cell.o { color: var(--ok); }
.ttt-cell.win { background: rgba(53, 213, 138, 0.2); border-color: var(--ok); }

/* Would You Rather Arena */
.wyr-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.wyr-title {
    font-size: 16px;
    font-weight: 800;
    text-align: center;
    margin: 0;
    color: var(--text-heading);
}

.wyr-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wyr-option-btn {
    position: relative;
    padding: 14px 16px;
    background: var(--game-card-bg);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    cursor: pointer;
    text-align: left;
    overflow: hidden;
    transition: all 0.2s;
}

.wyr-option-btn:hover {
    border-color: var(--primary);
    background: var(--btn-hover-bg);
}

.wyr-option-btn.voted {
    border-color: var(--primary);
    background: rgba(124, 92, 255, 0.15);
}

.wyr-opt-tag {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--primary);
    display: block;
    margin-bottom: 4px;
}

.wyr-option-btn p {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-heading);
    margin: 0;
    position: relative;
    z-index: 2;
}

.wyr-pct-bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0%;
    background: rgba(124, 92, 255, 0.2);
    z-index: 1;
    transition: width 0.4s ease;
}

.wyr-divider {
    text-align: center;
    font-size: 12px;
    font-weight: 800;
    color: var(--muted);
}

.wyr-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--muted);
}

/* --- Block Button & Danger Outline --- */
.big-btn.danger-outline {
    background: rgba(255, 82, 103, 0.1);
    border: 1px solid rgba(255, 82, 103, 0.35);
    color: var(--danger);
}

.big-btn.danger-outline:hover:not(:disabled) {
    background: var(--danger);
    color: #ffffff;
}

/* --- Post-Call Karma Rating Toast --- */
.rating-toast {
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index: 120;
    background: var(--rating-toast-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--text);
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.rating-toast-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rating-icon { font-size: 22px; }
.rating-text { display: flex; flex-direction: column; }
.rating-text strong { font-size: 13px; color: var(--text-heading); }
.rating-text span { font-size: 11px; color: var(--muted); }

.rating-buttons {
    display: flex;
    align-items: center;
    gap: 6px;
}

.rating-btn {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    border-radius: var(--radius-full);
    border: 1px solid var(--line);
    cursor: pointer;
    transition: all 0.2s;
}

.rating-btn.thumbs-up { background: rgba(53, 213, 138, 0.15); border-color: var(--ok); color: var(--ok); }
.rating-btn.thumbs-up:hover { background: var(--ok); color: #000000; }
.rating-btn.thumbs-down { background: rgba(255, 82, 103, 0.15); border-color: var(--danger); color: var(--danger); }
.rating-btn.thumbs-down:hover { background: var(--danger); color: #ffffff; }

.rating-btn-skip {
    background: none;
    border: none;
    color: var(--muted);
    font-size: 14px;
    cursor: pointer;
    padding: 4px;
}

/* --- Keyboard Shortcuts Table --- */
.shortcuts-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.shortcuts-table td {
    padding: 8px 6px;
    font-size: 13px;
    border-bottom: 1px solid var(--line-subtle);
    color: var(--text);
}

.shortcuts-table kbd {
    display: inline-block;
    padding: 3px 6px;
    font-size: 11px;
    font-weight: 700;
    font-family: monospace;
    background: var(--kbd-bg);
    border: 1px solid var(--kbd-border);
    border-radius: 4px;
    box-shadow: var(--kbd-shadow);
    color: var(--kbd-color);
}

.kbd-hint {
    font-size: 10px;
    opacity: 0.7;
    margin-left: 2px;
}

/* Form Fields styling for Modals & Pages */
.field {
    display: flex;
    flex-direction: column;
    margin-bottom: 14px;
    text-align: left;
}

.field label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 6px;
}

.field select,
.field textarea,
.field input {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text);
    border-radius: var(--radius-sm);
    padding: 9px 12px;
    font-family: var(--font-sans);
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
}

.field select:focus,
.field textarea:focus,
.field input:focus {
    border-color: var(--primary);
}

/* Mobile Responsiveness for Drawer & Modals */
@media (max-width: 768px) {
    .chat-drawer {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: 60vh;
        border-radius: 20px 20px 0 0;
        animation: drawerSheetUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }

    @keyframes drawerSheetUp {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
    }

    .rating-toast {
        left: 10px;
        right: 10px;
        bottom: 75px;
        flex-direction: column;
        align-items: stretch;
    }

    .rating-buttons { justify-content: flex-end; }
}

/* =========================================================
   18+ BADGES & COMPLIANCE ADVISORY
   ========================================================= */
.badge-18plus {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #f87171;
    font-size: 11.5px;
    font-weight: 800;
    border-radius: var(--radius-full);
    letter-spacing: 0.03em;
    vertical-align: middle;
}

html[data-theme="light"] .badge-18plus {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #dc2626;
}

.hero-compliance-note {
    margin-top: 14px;
    font-size: 12.5px;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.4;
}

/* =========================================================
   FAQ SECTION ACCORDION
   ========================================================= */
.faq-section {
    padding: 70px 0 90px;
}

.faq-main-title {
    font-size: clamp(26px, 4.5vw, 40px);
    font-weight: 900;
    text-align: center;
    margin: 0 0 14px;
    letter-spacing: -0.02em;
}

.faq-grid {
    max-width: 840px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.faq-item {
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: all 0.25s ease;
}

.faq-item:hover {
    border-color: var(--primary2);
    box-shadow: var(--shadow-md);
}

.faq-item[open] {
    border-color: rgba(124, 92, 255, 0.45);
    box-shadow: 0 8px 24px rgba(124, 92, 255, 0.12);
}

.faq-question {
    padding: 18px 22px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    list-style: none;
    user-select: none;
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-icon {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary2);
    transition: transform 0.25s ease;
    line-height: 1;
}

.faq-item[open] .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 22px 18px;
    color: var(--muted);
    font-size: 14.5px;
    line-height: 1.65;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 14px;
}

html[data-theme="light"] .faq-answer {
    border-top-color: rgba(0, 0, 0, 0.06);
}

/* ========================================================
   CONNECT WITH DEVELOPER COMPONENT
   ======================================================== */
.footer-social-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.85rem;
    padding: 1.25rem 0 0.5rem;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

.footer-dev-credit {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted, var(--muted, #64748b));
    letter-spacing: 0.01em;
}

.footer-social-links {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* Pill-style button base */
.footer-social-links .social-link,
.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 1rem;
    border-radius: 9999px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    background: var(--bg-surface-elevated, #f1f5f9);
    border: 1px solid var(--border-medium, rgba(15, 23, 42, 0.14));
    color: var(--text-main, #0f172a);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: transform 160ms cubic-bezier(0.16, 1, 0.3, 1),
                background 160ms cubic-bezier(0.16, 1, 0.3, 1),
                border-color 160ms cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 160ms cubic-bezier(0.16, 1, 0.3, 1),
                color 160ms cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
}

.social-link i {
    font-size: 1rem;
    transition: transform 160ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Hover Lift & Scale */
.footer-social-links .social-link:hover,
.social-link:hover {
    transform: translateY(-2px);
    color: #ffffff !important;
}

.social-link:hover i {
    transform: scale(1.15);
}

/* Branded Brand States */
.footer-social-links .social-link.social-instagram:hover,
.social-link.social-instagram:hover {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%) !important;
    border-color: #dc2743 !important;
    box-shadow: 0 6px 18px -2px rgba(220, 39, 67, 0.45);
    color: #ffffff !important;
}

.footer-social-links .social-link.social-linkedin:hover,
.social-link.social-linkedin:hover {
    background: #0a66c2 !important;
    border-color: #0a66c2 !important;
    box-shadow: 0 6px 18px -2px rgba(10, 102, 194, 0.45);
    color: #ffffff !important;
}

.footer-social-links .social-link.social-github:hover,
.social-link.social-github:hover {
    background: #24292f !important;
    border-color: #24292f !important;
    box-shadow: 0 6px 18px -2px rgba(36, 41, 47, 0.45);
    color: #ffffff !important;
}

/* Optional Dark Theme Support (via class or data-theme="dark") */
html:not([data-theme="light"]) .social-link,
[data-theme="dark"] .social-link,
body.dark-mode .social-link {
    background: #1a2336;
    border-color: rgba(255, 255, 255, 0.16);
    color: #f1f5f9;
}

html:not([data-theme="light"]) .social-link.social-github:hover,
[data-theme="dark"] .social-link.social-github:hover,
body.dark-mode .social-link.social-github:hover {
    background: #1f242c !important;
    border-color: #4b5262 !important;
    box-shadow: 0 6px 18px -2px rgba(255, 255, 255, 0.15);
    color: #ffffff !important;
}

/* Responsive Stacking for Small Mobile Screens */
@media (max-width: 580px) {
    .footer-social-wrapper {
        flex-direction: column;
        gap: 0.65rem;
    }
    .footer-social-links {
        width: 100%;
        justify-content: center;
    }
}
