:root,
[data-theme='light'] {
    color-scheme: light;
    --bg: #ffffff;
    --bg-mesh: #ffffff;
    --panel: #ffffff;
    --panel-soft: #f4f4f5;
    --panel-elevated: #ffffff;
    --text: #09090b;
    --text-strong: #000000;
    --muted: #71717a;
    --muted-light: #a1a1aa;
    --border: #e4e4e7;
    --border-subtle: #e2e8f0;
    --border-strong: #d4d4d8;
    --primary: #09090b;
    --primary-hover: #27272a;
    --primary-text: #ffffff;
    --primary-gradient: #09090b;
    --success: #16a34a;
    --warning: #ca8a04;
    --danger: #ef4444;
    --danger-soft: #fee2e2;
    --btn-bg: #f4f4f5;
    --btn-border: #e4e4e7;
    --btn-text: #09090b;
    --btn-hover-bg: #e4e4e7;
    --card-shadow: 0 10px 36px rgba(0, 0, 0, 0.06);
    --video-bg: #000000;
    --video-remote-bg: #000000;
    --overlay-bg: rgba(255, 255, 255, 0.95);
    --pill-bg: #ffffff;
    --chat-me-bg: #09090b;
    --chat-me-text: #ffffff;
}

[data-theme='dark'] {
    color-scheme: dark;
    --bg: #000000;
    --bg-mesh: #000000;
    --panel: #000000;
    --panel-soft: #080808;
    --panel-elevated: #080808;
    --text: #ffffff;
    --text-strong: #ffffff;
    --muted: #a1a1aa;
    --muted-light: #71717a;
    --border: #18181b;
    --border-subtle: #18181b;
    --border-strong: #27272a;
    --primary: #ffffff;
    --primary-hover: #f4f4f5;
    --primary-text: #000000;
    --primary-gradient: #ffffff;
    --success: #22c55e;
    --warning: #eab308;
    --danger: #ef4444;
    --danger-soft: rgba(239, 68, 68, 0.2);
    --btn-bg: #000000;
    --btn-border: #18181b;
    --btn-text: #ffffff;
    --btn-hover-bg: #18181b;
    --card-shadow: 0 12px 40px rgba(0, 0, 0, 0.95);
    --video-bg: #000000;
    --video-remote-bg: #000000;
    --overlay-bg: rgba(0, 0, 0, 0.95);
    --pill-bg: #080808;
    --chat-me-bg: #ffffff;
    --chat-me-text: #000000;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

[hidden] {
    display: none !important;
}

html, body {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

body {
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        'Segoe UI',
        Roboto,
        Helvetica,
        Arial,
        sans-serif;
    background-color: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.oto-app-wrapper {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    width: 100vw;
    background-color: var(--bg);
    overflow: hidden;
}

/* ==========================================================================
   Top Navigation Header
   ========================================================================== */
.oto-header {
    height: 68px;
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    background: #ffffff;
    border-bottom: 1px solid #eef2f6;
    position: relative;
    z-index: 50;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

[data-theme='dark'] .oto-header {
    background: #000000;
    border-bottom: 1px solid #18181b;
}

.oto-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.oto-btn-back {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #ffffff !important;
    color: #1e293b !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
    border: 1px solid #e2e8f0 !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    text-decoration: none;
    outline: none;
    padding: 0;
}

.oto-btn-back:hover {
    transform: scale(1.05);
    border-color: #cbd5e1 !important;
}

[data-theme='dark'] .oto-btn-back {
    background: #000000 !important;
    color: #ffffff !important;
    border-color: #18181b !important;
}

.oto-btn-back svg {
    stroke: currentColor;
}

.oto-brand-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    outline: none;
}

.oto-brand-title,
.oto-brand-text {
    font-size: 21px;
    font-weight: 800;
    color: #2563eb;
    letter-spacing: -0.4px;
    font-family: inherit;
    user-select: none;
    text-decoration: none;
}

[data-theme='dark'] .oto-brand-title,
[data-theme='dark'] .oto-brand-text {
    color: #3b82f6;
}

.oto-brand-logo {
    height: 48px;
    max-height: 52px;
    max-width: 240px;
    width: auto;
    object-fit: contain;
    display: block;
    transition: transform 0.2s ease;
}

.oto-brand-logo:hover {
    transform: scale(1.03);
}

:root .oto-brand-logo.dark-mode,
[data-theme='light'] .oto-brand-logo.dark-mode {
    display: none !important;
}

:root .oto-brand-logo.light-mode,
[data-theme='light'] .oto-brand-logo.light-mode {
    display: block !important;
}

[data-theme='dark'] .oto-brand-logo.light-mode {
    display: none !important;
}

[data-theme='dark'] .oto-brand-logo.dark-mode {
    display: block !important;
}

.oto-btn-theme-ghost {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #ffffff !important;
    color: #1e293b !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
    border: 1px solid #e2e8f0 !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    padding: 0;
}

.oto-btn-theme-ghost:hover {
    transform: rotate(15deg) scale(1.05);
    border-color: #cbd5e1 !important;
}

[data-theme='dark'] .oto-btn-theme-ghost {
    background: #000000 !important;
    color: #ffffff !important;
    border-color: #18181b !important;
}

.oto-btn-theme-ghost svg {
    stroke: currentColor;
}

:root .theme-icon-sun,
[data-theme='light'] .theme-icon-sun {
    display: none !important;
}

:root .theme-icon-moon,
[data-theme='light'] .theme-icon-moon {
    display: block !important;
}

[data-theme='dark'] .theme-icon-moon {
    display: none !important;
}

[data-theme='dark'] .theme-icon-sun {
    display: block !important;
}

.oto-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.oto-header-online-text {
    font-size: 13.5px;
    font-weight: 600;
    color: #2563eb;
    letter-spacing: -0.1px;
}

[data-theme='dark'] .oto-header-online-text {
    color: #38bdf8;
}

.oto-settings-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--panel-soft);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.oto-settings-btn:hover {
    background: var(--btn-hover-bg);
}

/* ==========================================================================
   Main Two-Column Layout (With Bidirectional Resizing)
   ========================================================================== */
.oto-main-layout {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: row;
    padding: 12px 14px 0 14px;
    gap: 0;
    background: #ffffff;
    position: relative;
    overflow: hidden;
}

[data-theme='dark'] .oto-main-layout {
    background: #000000;
}

/* ==========================================================================
   Left Column: Video Boxes
   ========================================================================== */
.oto-video-column {
    width: 37%;
    flex: 0 0 37%;
    min-width: 320px;
    max-width: 50%;
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 6px;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
    position: relative;
}

/* Vertical Column Resizer Handle between Video Column & Workspace ("left right") */
.oto-column-resize-handle {
    width: 14px;
    min-width: 14px;
    cursor: col-resize;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    user-select: none;
    touch-action: none;
    z-index: 25;
    padding: 0;
    background: transparent;
}

.oto-column-resize-handle::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    background: #e2e8f0;
}

[data-theme='dark'] .oto-column-resize-handle::before {
    background: #27272a;
}

.oto-column-resize-bar {
    position: relative;
    z-index: 2;
    width: 4px;
    height: 48px;
    background: #1e293b;
    border-radius: 999px;
    transition: transform 0.15s ease, background-color 0.15s ease, width 0.15s ease;
}

[data-theme='dark'] .oto-column-resize-bar {
    background: #94a3b8;
}

.oto-column-resize-handle:hover .oto-column-resize-bar,
.oto-column-resize-handle.is-dragging .oto-column-resize-bar {
    background: #2563eb;
    width: 6px;
    transform: scaleY(1.15);
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.4);
}

/* Video Boxes - Slate Gray #546171 Matching Image 3 */
.oto-box-video {
    width: 100%;
    flex: 1 1 0px;
    min-height: 0;
    background: #546171 !important;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: flex 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme='dark'] .oto-box-video {
    background: #000000 !important;
    border: 1px solid #18181b;
}

.oto-video-view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: inherit;
    z-index: 2;
}

.oto-video-view.mirror {
    transform: scaleX(-1);
}

.oto-video-placeholder-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    opacity: 0.9;
    letter-spacing: 0.3px;
    pointer-events: none;
    z-index: 5;
}

.oto-label-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 700;
    z-index: 10;
    background: rgba(15, 23, 42, 0.85);
    color: #ffffff;
    border: none;
    backdrop-filter: blur(4px);
    letter-spacing: -0.2px;
}

/* Floating Action Toolbar on Video Cards (Report + Fullscreen) */
.oto-video-card-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 25;
    pointer-events: auto;
}

.oto-video-action-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.75);
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    padding: 0;
}

.oto-video-action-btn:hover {
    background: rgba(30, 41, 59, 0.95);
    color: #ffffff;
    transform: scale(1.08);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
}

.oto-video-action-btn:active {
    transform: scale(0.95);
}

/* Specific styling for Report Flag Button matching uploaded image */
.oto-video-action-btn.oto-report-flag-btn {
    color: #94a3b8;
}

.oto-video-action-btn.oto-report-flag-btn:hover {
    background: rgba(220, 38, 38, 0.88);
    border-color: #ef4444;
    color: #ffffff;
}

/* Fullscreen States for Video Cards */
.oto-box-video:fullscreen,
.oto-box-video:-webkit-full-screen,
.oto-box-video.oto-fullscreen-fallback {
    width: 100vw !important;
    height: 100vh !important;
    position: fixed !important;
    inset: 0 !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    z-index: 999999 !important;
    border-radius: 0 !important;
    background: #000000 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

.oto-box-video:fullscreen .oto-video-view,
.oto-box-video:-webkit-full-screen .oto-video-view,
.oto-box-video.oto-fullscreen-fallback .oto-video-view {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    border-radius: 0 !important;
}

/* Bottom Report Button in footer controls */
.oto-ctrl-btn.report {
    background: #181b24;
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.oto-ctrl-btn.report:hover {
    background: rgba(220, 38, 38, 0.18);
    border-color: #ef4444;
    color: #ef4444;
}

/* Send button styling when active/has text */
.oto-ctrl-btn.send.has-text,
.oto-ctrl-btn.send:not([disabled]) {
    background: #2563eb !important;
    color: #ffffff !important;
    border-color: #3b82f6 !important;
    cursor: pointer !important;
}

/* Horizontal Camera Resizer Handle between Top & Bottom videos ("top bottom") */
.oto-resize-handle.horizontal {
    height: 14px;
    min-height: 14px;
    width: 100%;
    cursor: row-resize;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    user-select: none;
    touch-action: none;
    z-index: 25;
    padding: 0;
    margin: -3px 0;
    background: transparent;
    flex-shrink: 0;
}

.oto-resize-handle.horizontal::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 1px;
    background: #e2e8f0;
}

[data-theme='dark'] .oto-resize-handle.horizontal::before {
    background: #27272a;
}

.oto-resize-handle.horizontal .oto-resize-line.hor {
    position: relative;
    z-index: 2;
    width: 48px;
    height: 4px;
    background: #1e293b;
    border-radius: 999px;
    transition: transform 0.15s ease, background-color 0.15s ease, height 0.15s ease;
}

[data-theme='dark'] .oto-resize-handle.horizontal .oto-resize-line.hor {
    background: #94a3b8;
}

.oto-resize-handle.horizontal:hover .oto-resize-line.hor,
.oto-resize-handle.horizontal.is-dragging .oto-resize-line.hor {
    background: #2563eb !important;
    height: 6px;
    transform: scaleX(1.15);
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.4);
}

/* Picture-in-Picture (PIP) Mode */
.oto-video-column.is-pip-mode {
    position: relative;
}

.oto-video-column.is-pip-mode .oto-resize-handle {
    display: none !important;
}

.oto-video-column.is-pip-mode #remoteVideoCard {
    flex: 1 1 100% !important;
    height: 100% !important;
    max-height: none !important;
}

.oto-video-column.is-pip-mode #localVideoCard {
    position: absolute !important;
    bottom: 16px !important;
    right: 16px !important;
    width: 200px !important;
    height: 145px !important;
    max-width: 48% !important;
    max-height: 42% !important;
    flex: none !important;
    z-index: 30 !important;
    border-radius: 14px !important;
    border: 2.5px solid #3b82f6 !important;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6) !important;
    cursor: grab;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.oto-video-column.is-pip-mode #localVideoCard:active {
    cursor: grabbing;
}

.oto-exit-pip-btn {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(15, 23, 42, 0.85);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 10.5px;
    font-weight: 700;
    cursor: pointer;
    z-index: 20;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    backdrop-filter: blur(8px);
    transition: all 0.2s ease;
}

.oto-exit-pip-btn:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: #ffffff;
}

.remote-avatar-overlay,
.local-avatar-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #000000;
    color: #94a3b8;
    z-index: 6;
}

.video-avatar {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #18181b;
    border: 1px solid #27272a;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a1a1aa;
}

.video-avatar-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--danger);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================================================
   Right Column: Welcome Lobby Card & Chat Area
   ========================================================================== */
.oto-workspace-column {
    flex: 1 1 0px;
    min-width: 300px;
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding-left: 10px;
    padding-bottom: 12px;
    background: #ffffff;
    position: relative;
    overflow: hidden;
}

[data-theme='dark'] .oto-workspace-column {
    background: #000000;
}

.htg-mobile-backdrop {
    display: none;
}

/* Lobby Card - Matching Image 3 */
.oto-lobby-card {
    margin: auto;
    max-width: 480px;
    width: 95%;
    padding: 28px 24px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    text-align: left;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.03);
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

[data-theme='dark'] .oto-lobby-card {
    background: #000000;
    border-color: #18181b;
}

.oto-welcome-text {
    font-size: 13.5px;
    font-weight: 500;
    color: #1e293b;
    margin-bottom: 8px;
    line-height: 1.5;
    text-align: left;
}

[data-theme='dark'] .oto-welcome-text {
    color: #ffffff;
}

.oto-rules-highlight {
    font-size: 13.5px;
    font-weight: 700;
    color: #ef4444 !important;
    margin-bottom: 12px;
    text-align: left;
}

.oto-rules-bullets {
    list-style: none;
    padding: 0;
    margin: 0 0 18px 0;
    text-align: left;
}

.oto-rules-bullets li {
    font-size: 12.5px;
    font-weight: 500;
    color: #334155;
    margin-bottom: 6px;
    text-align: left;
    line-height: 1.5;
    position: relative;
    padding-left: 14px;
}

[data-theme='dark'] .oto-rules-bullets li {
    color: #94a3b8;
}

.oto-rules-bullets li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #64748b;
    font-weight: bold;
}

.oto-interests-panel {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 18px;
    text-align: left;
}

[data-theme='dark'] .oto-interests-panel {
    background: #050505;
    border-color: #18181b;
}

.oto-interests-title {
    display: block;
    font-size: 12.5px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 6px;
    text-align: left;
}

[data-theme='dark'] .oto-interests-title {
    color: #ffffff;
}

.oto-interests-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
}

.oto-interest-chip {
    background: #2563eb;
    color: #ffffff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    animation: pop-in 0.15s ease-out;
}

.oto-interest-chip .chip-remove {
    cursor: pointer;
    opacity: 0.8;
    background: none;
    border: none;
    color: inherit;
    font-size: 13px;
    line-height: 1;
    padding: 0;
}

.oto-interest-chip .chip-remove:hover {
    opacity: 1;
}

@keyframes pop-in {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.oto-interest-ghost {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font-size: 13.5px;
    font-weight: 500;
    text-align: left;
    width: 100%;
}

.oto-interest-ghost::placeholder {
    color: #94a3b8;
}

/* ==========================================================================
   More Settings: Country & Gender Preferences Card
   ========================================================================== */
.oto-more-settings-card {
    margin-bottom: 12px;
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    background: var(--panel-soft);
    overflow: hidden;
    transition: all 0.2s ease;
}

.oto-more-settings-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    transition: background 0.15s ease;
}

.oto-more-settings-btn:hover {
    background: rgba(37, 99, 235, 0.05);
}

.oto-more-settings-btn-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #2563eb;
}

[data-theme='dark'] .oto-more-settings-btn-inner {
    color: #60a5fa;
}

.oto-more-settings-title {
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
}

.oto-settings-chevron {
    stroke: var(--muted);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.oto-more-settings-btn[aria-expanded='true'] .oto-settings-chevron {
    transform: rotate(180deg);
}

.oto-more-settings-content {
    padding: 12px 12px 14px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--panel);
}

.oto-setting-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.oto-setting-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.oto-select-wrap {
    position: relative;
    width: 100%;
}

.oto-country-select {
    width: 100%;
    height: 38px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--panel-soft);
    color: var(--text);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.oto-country-select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.oto-setting-hint {
    font-size: 11px;
    color: var(--muted);
    margin: 2px 0 0 0;
    line-height: 1.3;
}

.oto-pill-group {
    display: flex;
    gap: 8px;
    width: 100%;
}

.oto-pill-btn {
    flex: 1;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--panel-soft);
    color: var(--muted);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.oto-pill-btn:hover {
    border-color: #cbd5e1;
    color: var(--text);
}

.oto-pill-btn.active {
    background: #2563eb !important;
    border-color: #2563eb !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

[data-theme='dark'] .oto-pill-btn.active {
    background: #3b82f6 !important;
    border-color: #3b82f6 !important;
}

.oto-lobby-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.oto-lobby-actions-row {
    display: flex;
    gap: 10px;
}

.oto-action-btn {
    height: 46px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: none;
}

.oto-action-btn svg {
    width: 17px;
    height: 17px;
}

.oto-action-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
}

.oto-action-btn.primary {
    background: #1d70e2 !important;
    color: #ffffff !important;
}

.oto-action-btn.primary:hover {
    background: #1860c4 !important;
}

.oto-action-btn.audio-green {
    flex: 1;
    background: #22c55e !important;
    color: #ffffff !important;
}

.oto-action-btn.audio-green:hover {
    background: #16a34a !important;
}

.oto-action-btn.secondary {
    flex: 1;
    background: #e2e8f0 !important;
    border: none !important;
    color: #334155 !important;
}

.oto-action-btn.secondary:hover {
    background: #cbd5e1 !important;
}

[data-theme='dark'] .oto-action-btn.secondary {
    background: #111113 !important;
    color: #ffffff !important;
    border: 1px solid #18181b !important;
}

.oto-terms-notice {
    font-size: 11.5px;
    font-weight: 500;
    color: var(--muted);
    margin-top: 6px;
    text-align: center;
}

.oto-terms-notice a {
    color: #2563eb;
    text-decoration: underline;
    font-weight: 600;
}

/* ==========================================================================
   Chat View (When active)
   ========================================================================== */
.oto-chat-scroller-wrap {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    background: var(--panel);
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

.oto-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-subtle);
}

.chat-title h2 {
    font-size: 16px;
    font-weight: 800;
    margin: 0;
}

.chat-status {
    font-size: 12px;
    color: var(--muted);
    margin: 2px 0 0 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.chat-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #16a34a;
}

.oto-chat-scroller {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-notice {
    font-size: 12px;
    color: var(--muted);
    text-align: center;
    margin-bottom: 10px;
}

.chat-messages {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-message {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.45;
}

.chat-message.me {
    align-self: flex-end;
    background: var(--chat-me-bg);
    color: var(--chat-me-text);
    border-bottom-right-radius: 4px;
}

.chat-message.partner {
    align-self: flex-start;
    background: var(--panel-soft);
    border: 1px solid var(--border);
    color: var(--text);
    border-bottom-left-radius: 4px;
}

.oto-chat-bubble.system,
.chat-message.system {
    font-style: italic;
    color: #94a3b8;
    text-align: center;
    margin: 8px auto;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 14px;
    border-radius: 999px;
    display: table;
}

.chat-typing {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    align-self: flex-start;
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--panel-soft);
    border: 1px solid var(--border);
}

.chat-typing-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--muted);
    animation: typing-dot 1.2s infinite ease-in-out;
}

.chat-typing-dot:nth-child(2) { animation-delay: 0.15s; }
.chat-typing-dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes typing-dot {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-3px); opacity: 1; }
}

/* ==========================================================================
   Bottom Controls Bar - Precision Aligned
   ========================================================================== */
.oto-bottom-controls {
    height: 60px;
    min-height: 60px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 10px;
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
    z-index: 50;
    box-shadow: none;
}

[data-theme='dark'] .oto-bottom-controls {
    background: #000000;
    border-top: 1px solid #18181b;
}

/* Left spacer matching the left video container on desktop so buttons start after it */
.oto-bottom-left-spacer {
    width: 37%;
    flex: 0 0 37%;
    min-width: 320px;
    height: 100%;
    pointer-events: none;
    flex-shrink: 0;
}

.oto-ctrl-btn {
    height: 42px;
    width: 76px;
    min-width: 76px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    text-align: center;
    padding: 0 8px;
    flex-shrink: 0;
}

.oto-ctrl-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    filter: brightness(1.05);
}

.oto-ctrl-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-label {
    font-size: 13.5px;
    font-weight: 800;
    line-height: 1.1;
}

.btn-sub {
    font-size: 9.5px;
    opacity: 0.85;
    font-weight: 700;
    margin-top: 1px;
    text-transform: capitalize;
    letter-spacing: 0.3px;
}

/* Stop Button: Red */
.oto-ctrl-btn.stop {
    width: 76px;
    background: #ef4444 !important;
    color: #ffffff !important;
    box-shadow: none;
}

.oto-ctrl-btn.stop:hover:not(:disabled) {
    background: #dc2626 !important;
}

/* Skip Button: Sky Blue */
.oto-ctrl-btn.skip {
    width: 76px;
    background: #38bdf8 !important;
    color: #0f172a !important;
    box-shadow: none;
}

.oto-ctrl-btn.skip:hover:not(:disabled) {
    background: #0ea5e9 !important;
}

/* Start Button: Hidden (Not used, red Stop button is shown instead) */
#startBtn,
.oto-ctrl-btn.start {
    display: none !important;
}

/* Input Wrapper & Main Chat Input */
.oto-input-wrap {
    flex: 1 1 0;
    min-width: 0;
    height: 42px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    transition: all 0.2s ease;
}

[data-theme='dark'] .oto-input-wrap {
    background: #050505;
    border-color: #18181b;
}

.oto-input-wrap:focus-within {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.oto-main-input {
    flex: 1;
    min-width: 0;
    height: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 500;
}

.oto-main-input::placeholder {
    color: #94a3b8;
}

/* Send Button: Light Gray (Disabled) / Blue (Active) */
.oto-ctrl-btn.send {
    width: 76px;
    height: 42px;
    background: #f1f5f9 !important;
    color: #94a3b8 !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px;
    box-shadow: none;
}

.oto-ctrl-btn.send:not(:disabled) {
    background: #2563eb !important;
    color: #ffffff !important;
    border: none !important;
}

[data-theme='dark'] .oto-ctrl-btn.send {
    background: #27272a !important;
    color: #94a3b8 !important;
    border: 1px solid #3f3f46 !important;
}

[data-theme='dark'] .oto-ctrl-btn.send:not(:disabled) {
    background: #2563eb !important;
    color: #ffffff !important;
    border: none !important;
}

/* Aux Control Buttons (Mic, Cam, etc.) - Completely hidden per request */
.oto-aux-controls,
#muteBtn,
#cameraBtn {
    display: none !important;
}

.btn.icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--panel-soft);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.btn.icon-btn:hover:not(:disabled) {
    background: var(--btn-hover-bg);
}

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

.btn.icon-btn.off {
    background: var(--danger-soft);
    border-color: rgba(239, 68, 68, 0.4);
    color: var(--danger);
}

/* Settings Dropdown Panel */
.settings-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 20px;
    width: 320px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--card-shadow);
    z-index: 100;
}

.device-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
}

.input-group select {
    height: 38px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--panel-soft);
    color: var(--text);
    font: inherit;
    outline: none;
}

.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
}

.switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-track {
    position: absolute;
    inset: 0;
    background: var(--border);
    border-radius: 24px;
    cursor: pointer;
    transition: 0.2s ease;
}

.switch-track::before {
    position: absolute;
    content: '';
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: 0.2s ease;
}

input:checked + .switch-track {
    background: var(--primary);
}

input:checked + .switch-track::before {
    transform: translateX(18px);
    background: var(--primary-text);
}

/* Capacity & Banned Modals */
.capacity-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.capacity-modal-card {
    max-width: 440px;
    width: 100%;
    padding: 28px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--card-shadow);
}

.capacity-modal-card h2 {
    font-size: 18px;
    margin: 12px 0 8px;
}

.capacity-modal-card p {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.5;
    margin-bottom: 20px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.pill-btn {
    height: 42px;
    padding: 0 20px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pill-btn.primary-btn {
    background: var(--primary);
    color: var(--primary-text);
}

.pill-btn.end-btn {
    background: var(--danger);
    color: #fff;
}

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

/* ==========================================================================
   Audio & Text Chat Mode Styles (Say 'Audio Call' / 'Chat', No Camera-Off)
   ========================================================================== */
.oto-box-video.mode-audio,
.oto-box-video.mode-text {
    background: #5d6977 !important;
}

[data-theme='dark'] .oto-box-video.mode-audio,
[data-theme='dark'] .oto-box-video.mode-text {
    background: #000000 !important;
    border: 1px solid #18181b;
}

.oto-box-video.mode-audio .oto-video-view,
.oto-box-video.mode-text .oto-video-view {
    display: none !important;
}

.oto-box-video.mode-audio .local-avatar-overlay,
.oto-box-video.mode-audio .remote-avatar-overlay,
.oto-box-video.mode-text .local-avatar-overlay,
.oto-box-video.mode-text .remote-avatar-overlay {
    display: none !important;
}

.oto-box-video.mode-audio .oto-video-card-actions,
.oto-box-video.mode-text .oto-video-card-actions {
    display: none !important;
}

.oto-mobile-accent-indicator {
    display: none !important;
}

.oto-chat-watermark {
    display: none !important;
}

/* Audio Call Indicator Banner */
.oto-audio-call-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 8px 16px;
    margin: 10px auto 12px;
    border-radius: 20px;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #16a34a;
    font-size: 13px;
    font-weight: 700;
    width: fit-content;
}

[data-theme='dark'] .oto-audio-call-indicator {
    background: rgba(34, 197, 94, 0.18);
    border-color: rgba(34, 197, 94, 0.35);
    color: #4ade80;
}

.oto-audio-pulse {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    height: 14px;
}

.oto-audio-pulse .pulse-bar {
    width: 3px;
    height: 10px;
    background: currentColor;
    border-radius: 2px;
    animation: audioPulseAnim 1.2s ease-in-out infinite;
}

.oto-audio-pulse .pulse-bar:nth-child(2) {
    animation-delay: 0.2s;
    height: 14px;
}

.oto-audio-pulse .pulse-bar:nth-child(3) {
    animation-delay: 0.4s;
    height: 8px;
}

@keyframes audioPulseAnim {
    0%, 100% {
        transform: scaleY(0.5);
    }
    50% {
        transform: scaleY(1.3);
    }
}

/* ==========================================================================
   Mobile UI/UX Optimization (Matching User Reference Images 4 & 5)
   ========================================================================== */
@media (max-width: 900px) {
    /* App Wrapper: Fixed full-viewport flex column */
    .oto-app-wrapper {
        height: 100dvh;
        max-height: 100dvh;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    /* Top Navigation Header: Clean, matching Images 4 & 5 */
    .oto-header {
        height: 56px;
        min-height: 56px;
        padding: 0 12px;
        border-bottom: 1px solid var(--border-subtle);
        background: var(--panel);
        z-index: 60;
    }

    .oto-header-left {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .oto-btn-back {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: #ffffff !important;
        border: 1px solid var(--border) !important;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
        display: flex;
        align-items: center;
        justify-content: center;
    }

    [data-theme='dark'] .oto-btn-back {
        background: var(--panel-soft) !important;
    }

    .oto-btn-back svg {
        width: 18px;
        height: 18px;
        stroke: var(--text);
    }

    .oto-brand-logo {
        height: 42px;
        max-height: 44px;
        max-width: 200px;
    }

    .oto-btn-theme-ghost {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: #ffffff !important;
        border: 1px solid var(--border) !important;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
        display: flex;
        align-items: center;
        justify-content: center;
    }

    [data-theme='dark'] .oto-btn-theme-ghost {
        background: var(--panel-soft) !important;
    }

    .oto-btn-theme-ghost svg {
        width: 17px;
        height: 17px;
    }

    /* On mobile header, show the Games button */
    .oto-header-right {
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
    }

    .oto-header-right #onlineCountText,
    .oto-header-right #connectionBadge,
    .oto-header-right #settingsBtn {
        display: none !important;
    }

    .oto-header-right #headerGamesBtn {
        display: inline-flex !important;
        align-items: center !important;
        gap: 5px !important;
        padding: 5px 12px !important;
        font-size: 12.5px !important;
        border-radius: 999px !important;
        height: 34px !important;
        margin: 0 !important;
    }

    /* Main Layout: Single column flex */
    .oto-main-layout {
        display: flex !important;
        flex-direction: column !important;
        flex: 1 1 0 !important;
        min-height: 0 !important;
        padding: 0 !important;
        gap: 0 !important;
        overflow: hidden !important;
        position: relative !important;
    }

    /* Video Column: Prominent, properly proportioned stacked cameras on mobile */
    .oto-video-column {
        flex: 0 0 auto !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        box-sizing: border-box !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 6px !important;
        padding: 8px 10px !important;
        border-bottom: 1px solid var(--border-subtle) !important;
        background: var(--panel) !important;
        overflow: hidden !important;
    }

    /* Video Chat Mode: Give cameras 52-55% of screen height so user can see clearly */
    .oto-video-column.mode-video,
    [data-chat-mode='video'] .oto-video-column,
    .oto-main-layout.mode-video .oto-video-column {
        height: clamp(370px, 52dvh, 480px) !important;
        min-height: 350px !important;
        max-height: 55dvh !important;
    }

    .oto-column-resize-handle {
        display: none !important;
    }

    .oto-resize-handle.horizontal {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: -1px 0 !important;
        height: 14px !important;
        min-height: 14px !important;
        cursor: row-resize !important;
        position: relative !important;
        z-index: 20 !important;
        touch-action: none !important;
    }

    .oto-resize-handle.horizontal .oto-resize-line.hor {
        width: 44px !important;
        height: 4px !important;
        border-radius: 999px !important;
        background: rgba(255, 255, 255, 0.35) !important;
        transition: background 0.2s, transform 0.2s !important;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4) !important;
    }

    .oto-resize-handle.horizontal:hover .oto-resize-line.hor,
    .oto-resize-handle.horizontal.is-dragging .oto-resize-line.hor {
        background: #38bdf8 !important;
        transform: scaleY(1.3) !important;
    }

    .oto-box-video {
        width: 100% !important;
        max-width: 100% !important;
        flex: 1 1 0px !important;
        height: auto !important;
        min-height: 150px !important;
        max-height: none !important;
        border-radius: 14px !important;
        background: #000000 !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        position: relative !important;
        overflow: hidden !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3) !important;
    }

    /* In Video Chat on Mobile: Both cards share the column dynamically via flex */
    .oto-video-column.mode-video .oto-box-video,
    .oto-box-video.mode-video,
    [data-chat-mode='video'] .oto-box-video {
        flex: 1 1 0px !important;
        min-height: 150px !important;
        max-height: none !important;
        height: auto !important;
    }

    /* Active Video Chat on mobile: Full immersive card styling */
    [data-lobby-open='false'] .oto-video-column.mode-video .oto-box-video,
    [data-lobby-open='false'] .oto-box-video.mode-video,
    [data-lobby-open='false'][data-chat-mode='video'] .oto-box-video,
    .in-matching .oto-video-column.mode-video .oto-box-video {
        flex: 1 1 0px !important;
        min-height: 150px !important;
        max-height: none !important;
        height: auto !important;
    }

    /* In Audio Call and Text Chat on Mobile: Camera container is NOT needed */
    .oto-video-column.mode-audio,
    .oto-video-column.mode-text,
    [data-chat-mode='audio'] .oto-video-column,
    [data-chat-mode='text'] .oto-video-column {
        position: absolute !important;
        width: 0 !important;
        height: 0 !important;
        min-width: 0 !important;
        max-width: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        border: none !important;
        overflow: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        visibility: hidden !important;
    }

    [data-theme='dark'] .oto-box-video {
        background: #000000 !important;
        border-color: #18181b !important;
    }

    /* Both cards clean matching border */
    .oto-box-video.oto-stranger,
    .oto-box-video.oto-self {
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
    }

    [data-theme='light'] .oto-box-video.oto-stranger,
    [data-theme='light'] .oto-box-video.oto-self {
        background: #1e293b !important;
        border: 1px solid rgba(0, 0, 0, 0.08) !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
    }

    .oto-video-placeholder-text {
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        font-size: 15px !important;
        font-weight: 700 !important;
        color: rgba(255, 255, 255, 0.8) !important;
        letter-spacing: 0.4px !important;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5) !important;
        pointer-events: none !important;
        z-index: 5 !important;
    }

    /* On mobile, local camera video is active so hide redundant center "You" text that blocks the user's face */
    #localVideoCard #youPlaceholderLabel {
        display: none !important;
    }

    .oto-label-badge {
        position: absolute !important;
        bottom: 10px !important;
        left: 10px !important;
        padding: 4px 10px !important;
        font-size: 11px !important;
        font-weight: 700 !important;
        letter-spacing: 0.3px !important;
        border-radius: 8px !important;
        background: rgba(15, 23, 42, 0.75) !important;
        color: #ffffff !important;
        backdrop-filter: blur(8px) !important;
        -webkit-backdrop-filter: blur(8px) !important;
        border: 1px solid rgba(255, 255, 255, 0.12) !important;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3) !important;
        z-index: 10 !important;
        line-height: 1.2 !important;
    }

    .oto-video-action-btn {
        width: 32px !important;
        height: 32px !important;
    }
    .oto-video-action-btn svg {
        width: 15px !important;
        height: 15px !important;
    }

    .oto-exit-pip-btn {
        display: none !important;
    }

    /* Workspace / Bottom Half Column (Normal layout below video feeds) */
    .oto-workspace-column {
        flex: 1 1 0 !important;
        min-height: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        overflow-y: auto !important;
        padding: 0 !important;
        position: relative !important;
        background: var(--bg) !important;
        transform: none !important;
        visibility: visible !important;
        pointer-events: auto !important;
        box-shadow: none !important;
        border: none !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
    }

    /* Welcome Lobby Card on Mobile */
    .oto-lobby-card {
        max-width: 100% !important;
        width: 100% !important;
        margin: auto !important;
        padding: 16px 14px 12px !important;
        border-radius: 16px !important;
        border: 1px solid var(--border) !important;
        background: var(--panel) !important;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04) !important;
    }

    /* ==========================================================================
       Mobile Slide-out Right Sidebar for GAMES (.oto-games-sidebar-wrap)
       ========================================================================== */
    .oto-games-sidebar-wrap {
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: min(92vw, 440px) !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        z-index: 260 !important;
        background: var(--htg-bg, #0c101a) !important;
        box-shadow: -10px 0 45px rgba(0, 0, 0, 0.8) !important;
        display: flex !important;
        flex-direction: column !important;
        transform: translateX(105%) !important;
        visibility: hidden !important;
        pointer-events: none !important;
        transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.32s ease !important;
    }

    .oto-games-sidebar-wrap.open,
    [data-games-open='true'] .oto-games-sidebar-wrap {
        transform: translateX(0%) !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }

    .oto-games-sidebar-wrap .htg-resize-handle {
        display: none !important;
    }

    .oto-games-sidebar-wrap #htgMaximizeBtn {
        display: none !important;
    }

    /* Backdrop Overlay for Mobile Games Right Sidebar */
    .htg-mobile-backdrop {
        position: fixed !important;
        inset: 0 !important;
        width: 100vw !important;
        height: 100dvh !important;
        background: rgba(0, 0, 0, 0.65) !important;
        backdrop-filter: blur(4px) !important;
        -webkit-backdrop-filter: blur(4px) !important;
        z-index: 250 !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        transition: opacity 0.3s ease, visibility 0.3s ease !important;
    }

    .htg-mobile-backdrop.is-active,
    [data-games-open='true'] .htg-mobile-backdrop {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }

    .oto-welcome-text {
        font-size: 13px;
        font-weight: 600;
        margin-bottom: 6px;
        color: var(--text);
        line-height: 1.4;
    }

    .oto-rules-highlight {
        font-size: 14px;
        font-weight: 800;
        color: #ef4444 !important;
        margin-bottom: 6px;
    }

    .oto-rules-bullets {
        margin: 0 0 10px 0;
    }

    .oto-rules-bullets li {
        font-size: 12px;
        font-weight: 500;
        color: var(--muted);
        margin-bottom: 3px;
        line-height: 1.4;
    }

    .oto-interests-panel {
        padding: 10px 12px;
        border-radius: 12px;
        margin-bottom: 12px;
        background: var(--panel-soft);
        border: 1px solid var(--border-subtle);
    }

    .oto-interests-title {
        font-size: 12px;
        font-weight: 700;
        margin-bottom: 4px;
        color: var(--text);
    }

    .oto-interest-ghost {
        font-size: 13px;
    }

    .oto-lobby-actions {
        gap: 8px;
    }

    .oto-action-btn.primary {
        height: 44px;
        border-radius: 10px;
        font-size: 14px;
        font-weight: 700;
        background: #2563eb !important;
        color: #ffffff !important;
        box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
    }

    .oto-lobby-actions-row {
        gap: 8px;
    }

    .oto-action-btn.audio-green {
        height: 40px;
        border-radius: 10px;
        font-size: 13px;
        font-weight: 700;
        background: #22c55e !important;
        color: #ffffff !important;
        box-shadow: 0 4px 12px rgba(34, 197, 94, 0.25);
    }

    .oto-action-btn.secondary {
        height: 40px;
        border-radius: 10px;
        font-size: 13px;
        font-weight: 700;
        background: var(--panel-soft) !important;
        border: 1px solid var(--border) !important;
        color: var(--text) !important;
    }

    .oto-terms-notice {
        font-size: 11px;
        color: var(--muted);
        margin-top: 8px;
    }

    .oto-terms-notice a {
        color: #2563eb;
        text-decoration: underline;
        font-weight: 600;
    }

    /* Active Chat View on Mobile (Clean whitespace as in Images 4 & 5) */
    .oto-chat-scroller-wrap {
        height: 100%;
        display: flex;
        flex-direction: column;
        border: none;
        background: var(--bg);
        border-radius: 0;
        box-shadow: none;
        position: relative;
    }

    .oto-chat-header {
        display: none !important;
    }

    .oto-chat-scroller {
        flex: 1 1 0 !important;
        padding: 10px 12px;
        position: relative;
        overflow-y: auto;
    }

    .oto-chat-bubble.system,
    .chat-message.system {
        font-style: normal !important;
        font-size: 12.5px !important;
        font-weight: 500 !important;
        color: #94a3b8 !important;
        text-align: center !important;
        margin: 12px auto !important;
        padding: 6px 16px !important;
        border-radius: 999px !important;
        background: rgba(255, 255, 255, 0.08) !important;
        backdrop-filter: blur(8px) !important;
        -webkit-backdrop-filter: blur(8px) !important;
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
        width: fit-content !important;
        max-width: 90% !important;
        display: block !important;
        position: relative !important;
        z-index: 2 !important;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2) !important;
    }

    [data-theme='light'] .oto-chat-bubble.system,
    [data-theme='light'] .chat-message.system {
        color: #64748b !important;
        background: rgba(0, 0, 0, 0.05) !important;
        border: 1px solid rgba(0, 0, 0, 0.06) !important;
    }

    .chat-notice {
        display: none !important;
    }

    /* Bottom Control Bar on Mobile:
       [ Stop ] [ Skip ] [   Waiting... input   ] [ Send ] */
    .oto-bottom-controls {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        height: auto !important;
        min-height: calc(52px + env(safe-area-inset-bottom, 0px)) !important;
        padding: 8px 10px max(8px, env(safe-area-inset-bottom, 0px)) !important;
        gap: 6px !important;
        background: var(--panel) !important;
        border-top: 1px solid var(--border-subtle) !important;
        box-shadow: none !important;
        box-sizing: border-box !important;
        flex-shrink: 0 !important;
    }

    .oto-bottom-left-spacer {
        display: none !important;
    }

    #startBtn,
    .oto-ctrl-btn.start {
        display: none !important;
    }

    #endSessionBtn {
        order: 1 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-shrink: 0 !important;
        width: auto !important;
        min-width: 64px !important;
        height: 42px !important;
        padding: 0 14px !important;
        border-radius: 10px !important;
        background: #ef4444 !important;
        color: #ffffff !important;
        font-weight: 700 !important;
        font-size: 14px !important;
        border: none !important;
        box-shadow: 0 2px 6px rgba(239, 68, 68, 0.25) !important;
        cursor: pointer !important;
        transition: opacity 0.15s, transform 0.1s !important;
    }

    #endSessionBtn:active {
        transform: scale(0.97) !important;
    }

    #nextBtn {
        order: 2 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-shrink: 0 !important;
        width: auto !important;
        min-width: 64px !important;
        height: 42px !important;
        padding: 0 14px !important;
        border-radius: 10px !important;
        background: #38bdf8 !important;
        color: #0f172a !important;
        font-weight: 700 !important;
        font-size: 14px !important;
        border: none !important;
        box-shadow: 0 2px 6px rgba(56, 189, 248, 0.25) !important;
        cursor: pointer !important;
        transition: opacity 0.15s, transform 0.1s !important;
    }

    #nextBtn:active {
        transform: scale(0.97) !important;
    }

    #nextBtn:disabled {
        background: #334155 !important;
        color: #64748b !important;
        opacity: 0.6 !important;
        cursor: not-allowed !important;
        box-shadow: none !important;
        transform: none !important;
    }

    [data-theme='light'] #nextBtn:disabled {
        background: #e2e8f0 !important;
        color: #94a3b8 !important;
    }

    #chatForm {
        order: 3 !important;
        flex: 1 1 0 !important;
        min-width: 0 !important;
        height: 42px !important;
        margin: 0 !important;
    }

    .oto-input-wrap {
        height: 42px !important;
        border-radius: 10px !important;
        padding: 0 12px !important;
        background: #ffffff !important;
        border: 1px solid #d1d5db !important;
        box-shadow: none !important;
        box-sizing: border-box !important;
        display: flex !important;
        align-items: center !important;
    }

    [data-theme='dark'] .oto-input-wrap {
        background: #111827 !important;
        border: 1px solid #1f2937 !important;
    }

    .oto-main-input {
        font-size: 16px !important;
        color: #0f172a !important;
        width: 100% !important;
        background: transparent !important;
        border: none !important;
        outline: none !important;
    }

    [data-theme='dark'] .oto-main-input {
        color: #f8fafc !important;
    }

    .oto-main-input::placeholder {
        color: #94a3b8 !important;
        font-size: 14px !important;
    }

    #chatSendBtn {
        order: 4 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-shrink: 0 !important;
        width: auto !important;
        min-width: 64px !important;
        height: 42px !important;
        padding: 0 16px !important;
        border-radius: 10px !important;
        font-weight: 700 !important;
        font-size: 14px !important;
        box-shadow: none !important;
        transition: opacity 0.15s, transform 0.1s !important;
    }

    .oto-ctrl-btn.send:disabled {
        background: #1e293b !important;
        color: #64748b !important;
        border: 1px solid #334155 !important;
        cursor: not-allowed !important;
        box-shadow: none !important;
    }

    [data-theme='light'] .oto-ctrl-btn.send:disabled {
        background: #f1f5f9 !important;
        color: #94a3b8 !important;
        border: 1px solid #e2e8f0 !important;
    }

    .oto-ctrl-btn.send:not(:disabled) {
        background: #2563eb !important;
        color: #ffffff !important;
        border: none !important;
        box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3) !important;
        cursor: pointer !important;
    }

    .oto-ctrl-btn.send:not(:disabled):active {
        transform: scale(0.97) !important;
    }

    .oto-ctrl-btn .btn-sub {
        display: none !important;
    }

    .oto-ctrl-btn .btn-label {
        font-size: 13.5px !important;
        font-weight: 700 !important;
        line-height: 1 !important;
    }
}

/* ==========================================================================
   HappyTalk Games Right Sidebar Integration (1-to-1 Call)
   ========================================================================== */
.oto-header-games-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(59, 130, 246, 0.2));
    border: 1px solid rgba(139, 92, 246, 0.35);
    border-radius: 10px;
    color: #a855f7;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s ease;
    user-select: none;
    margin-right: 6px;
}

[data-theme='light'] .oto-header-games-btn {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(59, 130, 246, 0.12));
    border-color: rgba(139, 92, 246, 0.3);
    color: #7c3aed;
}

.oto-header-games-btn:hover {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.28), rgba(59, 130, 246, 0.35));
    border-color: rgba(139, 92, 246, 0.6);
    color: #ffffff;
    box-shadow: 0 0 14px rgba(139, 92, 246, 0.4);
    transform: translateY(-1px);
}

.oto-header-games-btn.active {
    background: linear-gradient(135deg, #7c3aed, #2563eb);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 0 16px rgba(124, 58, 237, 0.5);
}

.oto-header-games-btn .games-icon {
    font-size: 15px;
    line-height: 1;
}

.oto-header-games-btn .games-pill {
    font-size: 9.5px;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 999px;
    background: #ef4444;
    color: #ffffff;
    letter-spacing: 0.3px;
}

.oto-games-sidebar-wrap {
    height: 100%;
    min-height: 0;
    min-width: 320px;
    max-width: 75%;
    position: relative;
    display: flex;
    flex-direction: column;
    z-index: 30;
    flex-shrink: 0;
}

