/* RaeCollab V2 - Mobile-first CSS */

:root {
    --bg-main: #0f171d;
    --bg-surface: #1a272f;
    --bg-elevated: #25343f;
    --bg-subtle: #2e3f4c;
    --accent: #ff9b51;
    --accent-hover: #e87a2e;
    --accent-deep: #d4742e;
    --accent-soft: #ffb87a;
    --accent-rgb: 255, 155, 81;
    --accent-hover-rgb: 232, 122, 46;
    --text-primary: #f5f7f7;
    --text-secondary: #b0bec5;
    --text-muted: #7a8d99;
    --border: #2e3f4c;
    --error: #ef4444;
    --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
}

body.rc-theme {
    background-color: var(--bg-main) !important;
    color: var(--text-primary);
    font-family: 'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    letter-spacing: -0.01em;
    height: 100vh;
    height: 100dvh;
}

/* --- Base components --- */

.rc-surface {
    background-color: var(--bg-surface) !important;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: border-color 0.3s var(--transition-smooth);
}

.rc-surface:hover {
    border-color: rgba(var(--accent-rgb), 0.12);
}

.rc-elevated {
    background-color: var(--bg-elevated) !important;
}

.rc-input {
    background-color: var(--bg-elevated) !important;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: border-color 0.2s var(--transition-smooth), box-shadow 0.2s var(--transition-smooth);
}

.rc-input:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.2) !important;
    outline: none !important;
}

.rc-btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-hover)) !important;
    color: var(--bg-main);
    font-weight: 700;
    transition: transform 0.15s var(--transition-smooth), box-shadow 0.15s var(--transition-smooth);
}

.rc-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.3);
}

.rc-btn-primary:active {
    transform: translateY(0);
}

.rc-btn-secondary {
    background: linear-gradient(135deg, var(--accent), var(--accent-hover)) !important;
    color: var(--bg-main);
    font-weight: 700;
    transition: transform 0.15s var(--transition-smooth), box-shadow 0.15s var(--transition-smooth);
}

.rc-btn-secondary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.3);
}

.rc-btn-secondary:active {
    transform: translateY(0);
}

.rc-accent {
    color: var(--accent) !important;
}

.rc-accent-gradient {
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.rc-text-secondary {
    color: var(--text-secondary) !important;
}

.rc-text-muted {
    color: var(--text-muted) !important;
}

.rc-border {
    border-color: var(--border) !important;
}

/* --- Header --- */

.rc-header {
    background-color: rgba(26, 39, 47, 0.85) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
}

/* --- Video grid (mobile-first: 1 column) --- */

.video-grid {
    display: grid;
    gap: 6px;
    width: 100%;
    height: 100%;
    grid-template-columns: 1fr;
    grid-auto-rows: 1fr;
}

.video-container {
    position: relative;
    background: var(--bg-surface);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: border-color 0.2s var(--transition-smooth), box-shadow 0.2s var(--transition-smooth);
    min-height: 100px;
}

.video-container video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.video-container .peer-label {
    position: absolute;
    bottom: 6px;
    left: 6px;
    background: rgba(0, 0, 0, 0.6);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
}

/* Screen share */
.video-container.screen-share video {
    object-fit: contain;
    background: #000;
}

/* Speaking indicator */
.video-container.speaking {
    box-shadow: 0 0 0 3px var(--accent), 0 0 16px rgba(255, 155, 81, 0.4);
    transition: box-shadow 0.2s ease;
}

/* Reconnecting overlay */
.video-container.reconnecting {
    opacity: 0.5;
}

.video-container.reconnecting::after {
    content: 'Riconnessione...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: var(--accent);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    z-index: 5;
    pointer-events: none;
}

/* Hidden peer */
.video-container.peer-hidden {
    display: none !important;
}

/* Screen audio button */
.rc-screen-audio-btn {
    position: absolute;
    bottom: 6px;
    right: 6px;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.55);
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.2s var(--transition-smooth);
    backdrop-filter: blur(4px);
}

.rc-screen-audio-btn:hover {
    background: rgba(0, 0, 0, 0.75);
}

.rc-screen-audio-btn .rc-sa-off { display: none; }
.rc-screen-audio-btn.muted { color: var(--error); }
.rc-screen-audio-btn.muted .rc-sa-on { display: none; }
.rc-screen-audio-btn.muted .rc-sa-off { display: block; }

/* --- Self video (mobile: small) --- */

.self-video {
    position: absolute;
    bottom: 80px;
    right: 8px;
    width: 100px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid var(--accent);
    z-index: 10;
}

.self-video video {
    width: 100%;
    transform: scaleX(-1);
}

.self-video.screen-share video {
    object-fit: contain;
    background: #000;
    transform: none;
}

.self-video .peer-label {
    position: absolute;
    bottom: 2px;
    left: 4px;
    background: rgba(0, 0, 0, 0.6);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.65rem;
}

/* --- Layout: Spotlight --- */

.video-grid.layout-spotlight {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
}

.video-grid.layout-spotlight .video-container {
    display: none;
}

.video-grid.layout-spotlight .video-container.pinned {
    display: block;
    grid-row: 1;
    border: 2px solid var(--accent);
}

.video-grid.layout-spotlight .focus-strip {
    display: flex;
}

/* --- Layout: Presentation --- */

.video-grid.layout-presentation {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
}

.video-grid.layout-presentation .video-container {
    display: none;
}

.video-grid.layout-presentation .video-container.pinned {
    display: block;
    border: 2px solid var(--accent);
}

.video-grid.layout-presentation .focus-strip {
    display: none;
}

/* --- Focus strip --- */

.focus-strip {
    display: none;
    gap: 4px;
    padding: 4px;
    overflow-x: auto;
    height: 80px;
}

.focus-strip .focus-thumb {
    width: 120px;
    height: 100%;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    background: var(--bg-surface);
    cursor: pointer;
    border: 2px solid transparent;
    position: relative;
}

.focus-strip .focus-thumb:hover {
    border-color: var(--accent);
}

.focus-strip .focus-thumb video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.focus-strip .focus-thumb.screen-share video {
    object-fit: contain;
    background: #000;
}

.focus-strip .focus-thumb .thumb-label {
    position: absolute;
    bottom: 2px;
    left: 4px;
    font-size: 0.6rem;
    background: rgba(0, 0, 0, 0.6);
    padding: 1px 4px;
    border-radius: 3px;
    color: var(--text-primary);
}

/* --- Control bar (mobile-first: compact) --- */

.control-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(26, 39, 47, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.control-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s var(--transition-smooth);
    color: white;
    font-size: 1.1rem;
}

.control-btn:hover {
    transform: translateY(-1px);
}

.control-btn.active {
    background: var(--bg-elevated);
}

.control-btn.active:hover {
    background: var(--bg-subtle);
}

.control-btn.off {
    background: var(--error);
}

.control-btn.off:hover {
    background: #f87171;
}

.control-btn.end-call {
    background: var(--error);
    width: 48px;
    height: 48px;
}

.control-btn.end-call:hover {
    background: #f87171;
}

/* --- Layout selector --- */

.rc-layout-selector {
    position: absolute;
    top: 6px;
    left: 6px;
    z-index: 15;
    display: none; /* nascosto su mobile, visibile da tablet in su */
    align-items: center;
    gap: 2px;
    background: rgba(26, 39, 47, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 3px;
    opacity: 0.5;
    transition: opacity 0.2s var(--transition-smooth);
}

.rc-layout-selector:hover {
    opacity: 1;
}

.rc-layout-btn {
    width: 30px;
    height: 26px;
    border: none;
    border-radius: 5px;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.rc-layout-btn:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.rc-layout-btn.active {
    background: var(--accent-hover);
    color: white;
}

/* --- Sidebar (mobile: overlay, desktop: inline) --- */

.rc-sidebar {
    background-color: var(--bg-surface) !important;
    display: flex;
    flex-direction: column;
    /* Mobile: full-screen overlay */
    position: fixed;
    inset: 0;
    z-index: 40;
    width: 100%;
    height: 100%;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.rc-sidebar.open {
    transform: translateX(0);
}

.rc-sidebar.hidden {
    display: flex;
    transform: translateX(100%);
}

.rc-sidebar-close {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 5;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    font-size: 1.5rem;
    line-height: 1;
    transition: color 0.15s var(--transition-smooth);
}

.rc-sidebar-close:hover {
    color: var(--text-primary);
}

/* --- Sidebar sections (unified) --- */

.participants-section {
    max-height: 35%;
    overflow-y: auto;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.participants-section .participants-list {
    flex: 1;
    overflow-y: auto;
}

.chat-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.sidebar-section-header {
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.sidebar-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

/* --- Chat --- */

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.chat-message {
    margin-bottom: 8px;
    padding: 8px 12px;
    border-radius: 10px;
    background: var(--bg-elevated);
    border: 1px solid rgba(255, 255, 255, 0.04);
    max-width: 85%;
    word-break: break-word;
}

.chat-message.self {
    background: var(--accent-hover);
    margin-left: auto;
}

.chat-message .sender {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

/* --- Participants list --- */

.participants-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.participant-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    transition: background 0.15s var(--transition-smooth), box-shadow 0.15s var(--transition-smooth);
}

.participant-item:hover {
    background: var(--bg-elevated);
}

.participant-item.speaking {
    background: rgba(255, 155, 81, 0.1);
    box-shadow: inset 0 0 0 1px rgba(255, 155, 81, 0.4);
}

.participant-info {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.participant-name {
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.participant-badge {
    font-size: 0.65rem;
    background: var(--accent-hover);
    color: white;
    padding: 1px 6px;
    border-radius: 4px;
    flex-shrink: 0;
}

.participant-indicators {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.participant-indicators > * {
    min-width: 18px;
    min-height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.participant-speaking-icon {
    color: var(--accent);
    visibility: hidden;
    display: inline-flex;
}

.participant-item.speaking .participant-speaking-icon {
    visibility: visible;
    animation: pulse-speak 1s ease-in-out infinite;
}

.participant-screen-icon,
.participant-mic-icon,
.participant-cam-icon {
    color: var(--text-secondary);
}

.participant-screen-icon:not(.off) {
    color: var(--accent);
}

.participant-screen-icon.off,
.participant-mic-icon.off,
.participant-cam-icon.off {
    color: var(--error);
    opacity: 0.6;
}

/* Eye toggle */
.rc-eye-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color 0.15s;
}

.rc-eye-btn:hover { color: var(--accent); }
.rc-eye-btn .rc-eye-open { display: inline-flex; }
.rc-eye-btn .rc-eye-closed { display: none; }
.rc-eye-btn.rc-eye-hidden .rc-eye-open { display: none; }
.rc-eye-btn.rc-eye-hidden .rc-eye-closed { display: inline-flex; }

/* Participant thumbnail */
.rc-participant-thumb-wrap {
    width: 44px;
    height: 34px;
    border-radius: 5px;
    overflow: hidden;
    background: var(--bg-elevated);
    flex-shrink: 0;
    position: relative;
}

.rc-participant-thumb {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    display: none;
}

.rc-participant-thumb.has-stream { display: block; }

.rc-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.rc-participant-thumb.has-stream + .rc-thumb-placeholder { display: none; }

/* --- Modals --- */

.rc-modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

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

/* --- Context menu --- */

.rc-context-menu {
    position: fixed;
    z-index: 60;
    background: rgba(26, 39, 47, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    min-width: 180px;
    padding: 4px 0;
    overflow: hidden;
}

.rc-context-menu.hidden {
    display: none;
}

.rc-context-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 12px;
    border: none;
    background: none;
    color: var(--text-primary);
    font-size: 0.85rem;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s;
}

.rc-context-item:hover {
    background: var(--bg-elevated);
}

.rc-context-item svg {
    flex-shrink: 0;
    color: var(--text-secondary);
}

/* --- Toast --- */

.rc-toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(37, 52, 63, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: var(--text-primary);
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.85rem;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.3s var(--transition-smooth), transform 0.3s var(--transition-smooth);
    pointer-events: none;
}

.rc-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* --- Quality preset buttons --- */

.rc-quality-btn {
    flex: 1;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s;
}

.rc-quality-btn:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

.rc-quality-btn.active {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: white;
}

/* --- Range slider --- */

.rc-slider {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 3px;
    background: var(--bg-elevated);
    outline: none;
}

.rc-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    border: 2px solid var(--bg-main);
}

.rc-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    border: 2px solid var(--bg-main);
}

/* --- Scrollbar --- */

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

/* --- Keyframes --- */

@keyframes pulse-speak {
    0%, 100% { opacity: 0.6; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.1); }
}

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

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

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

@keyframes stepExit {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(-40px); }
}

@keyframes stepEnter {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes stepExitBack {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(40px); }
}

@keyframes stepEnterBack {
    from { opacity: 0; transform: translateX(-40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes inputShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

/* --- Step transitions (login flow) --- */

.rc-step {
    animation: fadeIn 0.4s ease-out;
}

.rc-step-hidden {
    display: none !important;
}

.rc-step-exit {
    animation: stepExit 0.3s var(--transition-smooth) forwards;
}

.rc-step-enter {
    animation: stepEnter 0.35s var(--transition-smooth) both;
}

.rc-step-exit-back {
    animation: stepExitBack 0.3s var(--transition-smooth) forwards;
}

.rc-step-enter-back {
    animation: stepEnterBack 0.35s var(--transition-smooth) both;
}

.rc-input-shake {
    animation: inputShake 0.4s ease-out;
    border-color: var(--error) !important;
}

/* --- Animations --- */

/* Chat messages */
.chat-message {
    animation: fadeInUp 0.25s ease-out;
}

/* Participant items */
.participant-item {
    animation: fadeInUp 0.25s ease-out;
}

/* Control buttons */
.control-btn:active {
    transform: scale(0.93);
}

/* Video containers */
.video-container {
    animation: fadeIn 0.3s ease-out;
}

/* Video grid layout transitions */
.video-grid {
    transition: all 0.3s var(--transition-smooth);
}

/* --- Page entrance animations (login) --- */

.rc-step .rc-accent-gradient {
    animation: fadeIn 0.5s ease-out both;
}

.rc-step .rc-surface {
    animation: slideInUp 0.4s ease-out both;
}

/* --- Page entrance animations (room) --- */

.rc-header {
    animation: fadeIn 0.3s ease-out;
}

#video-area {
    animation: fadeIn 0.4s ease-out 0.1s both;
}

.control-bar {
    animation: slideInUp 0.4s ease-out 0.15s both;
}

.self-video {
    animation: fadeIn 0.5s ease-out 0.2s both;
}

/* Sidebar section hover */
.participant-item,
.chat-message {
    transition: background 0.15s var(--transition-smooth);
}

/* Modal entrance */
.rc-modal > div {
    animation: slideInUp 0.25s ease-out;
}

/* ========================================
   TABLET (641px+)
   ======================================== */

@media (min-width: 641px) {
    .video-grid {
        gap: 8px;
    }

    /* Grid layout: auto-columns by peer count (set by JS via data attribute) */
    .video-grid.peers-2 { grid-template-columns: 1fr 1fr; }
    .video-grid.peers-3,
    .video-grid.peers-4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }

    .video-container {
        border-radius: 12px;
        min-height: 0;
    }

    .self-video {
        width: 150px;
        bottom: 80px;
        right: 12px;
    }

    .control-btn {
        width: 44px;
        height: 44px;
    }

    .control-btn.end-call {
        width: 52px;
        height: 52px;
    }

    .control-bar {
        gap: 10px;
        padding: 10px 16px;
    }

    /* Layout selector visible */
    .rc-layout-selector {
        display: flex;
    }

    /* Sidebar: inline on right, not overlay */
    .rc-sidebar {
        position: relative;
        inset: auto;
        width: 280px;
        height: auto;
        z-index: auto;
        transform: none;
        flex-shrink: 0;
        transition: none;
    }

    .rc-sidebar.hidden {
        display: none;
    }

    .rc-sidebar.open {
        transform: none;
    }

    .rc-sidebar-close {
        display: none !important;
    }

    .focus-strip {
        height: 100px;
    }

    .focus-strip .focus-thumb {
        width: 140px;
    }
}

/* ========================================
   DESKTOP (1025px+)
   ======================================== */

@media (min-width: 1025px) {
    .self-video {
        width: 180px;
        bottom: 80px;
        right: 16px;
    }

    .control-btn {
        width: 48px;
        height: 48px;
    }

    .control-btn.end-call {
        width: 56px;
        height: 56px;
    }

    .control-bar {
        gap: 12px;
        padding: 12px;
    }

    .rc-sidebar {
        width: 300px;
    }

    .focus-strip {
        height: 120px;
    }

    .focus-strip .focus-thumb {
        width: 160px;
    }
}

/* Landscape mobile */
@media (max-width: 640px) and (orientation: landscape) {
    .video-grid.peers-2,
    .video-grid.peers-3,
    .video-grid.peers-4 {
        grid-template-columns: 1fr 1fr;
    }

    .control-btn {
        width: 36px;
        height: 36px;
    }

    .control-btn.end-call {
        width: 42px;
        height: 42px;
    }

    .control-bar {
        padding: 6px 10px;
    }

    .self-video {
        width: 80px;
        bottom: 60px;
    }
}
