:root {
    --bg-color: #050505;
    --card-bg: rgba(18, 20, 32, 0.6);
    --card-bg-solid: #11131a;
    --primary: #00d4ff;
    --primary-glow: rgba(0, 212, 255, 0.4);
    --primary-hover: #33ddff;
    --accent: #e2e8f0;
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-border-focus: rgba(0, 212, 255, 0.5);
    --neon-glow: 0 0 30px rgba(0, 212, 255, 0.35);
    --speaking-glow: 0 0 20px rgba(0, 212, 255, 0.6);
    --bg-gradient: radial-gradient(circle at 10% 20%, rgba(226, 232, 240, 0.05) 0%, transparent 45%),
                   radial-gradient(circle at 90% 80%, rgba(0, 212, 255, 0.08) 0%, transparent 45%);
}

[data-theme="light"] {
    --bg-color: #f8fafc;
    --card-bg: rgba(255, 255, 255, 0.7);
    --card-bg-solid: #ffffff;
    --primary: #00a3cc;
    --primary-glow: rgba(0, 163, 204, 0.2);
    --primary-hover: #008aab;
    --accent: #64748b;
    --text: #0f172a;
    --text-muted: #475569;
    --glass-border: rgba(0, 0, 0, 0.1);
    --glass-border-focus: rgba(0, 163, 204, 0.4);
    --neon-glow: 0 0 30px rgba(0, 163, 204, 0.15);
    --bg-gradient: radial-gradient(circle at 10% 20%, rgba(100, 116, 139, 0.06) 0%, transparent 45%),
                   radial-gradient(circle at 90% 80%, rgba(0, 163, 204, 0.06) 0%, transparent 45%);
}

* {
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-color);
    background-image: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Theme Toggle */
.nav-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}
.theme-toggle {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.theme-toggle:hover {
    color: var(--text);
    background: var(--card-bg);
}

/* ==========================================
   LANDING PAGE (SEXY UI)
   ========================================== */
.landing-page {
    width: 100%;
    padding: 0 clamp(10px, 6vw, 100px);
    animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

.hero-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 80vh;
    padding: 40px 0;
    gap: 60px;
}

.hero-content {
    flex: 1.2;
    max-width: 700px;
}

.hero-badge {
    display: inline-block;
    padding: 6px 14px;
    background: var(--primary-glow);
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.hero-title {
    font-size: clamp(3rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin: 0 0 20px 0;
    color: var(--text);
    letter-spacing: -1.5px;
}

.hero-title .highlight {
    background: var(--primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: var(--neon-glow);
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    color: var(--text-muted);
    margin-bottom: 40px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}

.new-meeting-wrapper {
    position: relative;
}

/* Glassmorphic input */
.input-group.glass-input {
    display: flex;
    gap: 12px;
    background: var(--card-bg);
    padding: 12px 16px;
    border-radius: 16px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    align-items: center;
    transition: all 0.3s ease;
}

.input-group.glass-input:focus-within {
    border-color: var(--primary);
    box-shadow: var(--neon-glow);
}

.input-group.glass-input input {
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 1rem;
    width: 220px;
    outline: none;
}

.input-icon {
    color: var(--text-muted);
}

.text-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-weight: 600;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s;
}

.text-btn.active {
    color: var(--primary);
    background: var(--primary-glow);
}

.text-btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.primary-btn {
    padding: 16px 32px;
    border: none;
    border-radius: 14px;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 20px rgba(168, 85, 247, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
}

.primary-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(168, 85, 247, 0.4);
}

.secondary-btn {
    padding: 16px 32px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.2);
}

.danger-btn {
    padding: 16px 32px;
    border: none;
    border-radius: 14px;
    background: #ef4444;
    color: #fff;
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 20px rgba(239, 68, 68, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.danger-btn:hover {
    background: #dc2626;
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(239, 68, 68, 0.4);
}

.pulse-anim {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(168, 85, 247, 0); }
    100% { box-shadow: 0 0 0 0 rgba(168, 85, 247, 0); }
}

/* Glass Cards */
.hero-graphic {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
    position: relative;
}

.hero-graphic::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: var(--primary);
    filter: blur(120px);
    opacity: 0.15;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
}

.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 30px;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 420px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: var(--glass-border-focus);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 15px;
}

.dashboard-header h3 {
    margin: 0;
    font-weight: 600;
}

.dashboard-header span {
    color: var(--primary);
}

.qr-box {
    background: white;
    padding: 15px;
    border-radius: 16px;
    display: inline-block;
    margin: 20px 0;
}

.qr-image {
    width: 150px;
    height: 150px;
    display: block;
}

.qr-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

/* Features Section */
.features-section {
    padding: 80px 0;
    text-align: center;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 50px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    padding: 40px 30px;
    text-align: left;
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-glow);
    color: var(--primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.feature-icon span {
    font-size: 32px;
}

.feature-card h3 {
    font-size: 1.4rem;
    margin: 0 0 15px 0;
}

.feature-card p {
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

/* How It Works */
.how-it-works-section {
    padding: 80px 0;
    text-align: center;
}

.steps-container {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: center;
    margin-top: 50px;
}

.step {
    flex: 1;
    min-width: 250px;
    max-width: 350px;
    position: relative;
}

.step-number {
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    font-size: 1.5rem;
    font-weight: 800;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
    box-shadow: var(--neon-glow);
}

.step h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.step p {
    color: var(--text-muted);
    line-height: 1.5;
}

/* Footer */
.landing-footer {
    padding: 40px 0;
    border-top: 1px solid var(--glass-border);
    margin-top: 60px;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1.2rem;
}

.landing-footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

/* Responsive Overrides */
@media (max-width: 968px) {
    .hero-section {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }
    
    .hero-actions {
        justify-content: center;
    }
}

/* ==========================================
   APP CONTAINER LAYOUT
   ========================================== */
.app-layout {
    display: flex;
    gap: 20px;
    flex: 1;
    height: calc(100vh - 60px);
    position: relative;
    overflow: hidden;
}

.main-column {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
}

.meeting-area {
    display: flex;
    flex: 1;
    height: calc(100vh - 60px); /* Fill the screen minus the navbar */
    position: relative;
    overflow: hidden;
    padding: 20px;
    gap: 20px;
}

.video-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    align-content: center;
    justify-content: center;
    overflow-y: auto;
    padding: 10px;
}

/* Video Frame Wrapper */
.video-wrapper {
    position: relative;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 16/9;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.video-wrapper:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Speaking glow */
.video-wrapper.speaking {
    border: 3px solid var(--accent);
    box-shadow: var(--speaking-glow);
}

video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}

.label {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background: rgba(15, 17, 28, 0.75);
    color: var(--text);
    padding: 6px 14px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 5;
}

.local .label {
    background: var(--primary);
    color: white;
}

/* Floating Local Cam in bottom-right style on mobile */
.video-wrapper.local {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================
   FLOATING MEDIA CONTROLS
   ========================================== */
.media-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    background: rgba(15, 17, 28, 0.7);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
    margin: 0 auto 10px auto;
    width: fit-content;
    z-index: 50;
    transition: all 0.3s;
}

.control-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 18px;
    border: none;
    border-radius: 14px;
    background-color: rgba(255, 255, 255, 0.05);
    color: #e2e8f0;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.75rem;
    min-width: 68px;
}

.control-btn:hover {
    background-color: rgba(255, 255, 255, 0.12);
    color: white;
}

.control-btn.active {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3);
}

.control-btn.active:hover {
    background-color: var(--primary-hover);
}

.control-btn .material-symbols-outlined {
    font-size: 22px;
}

.control-btn .btn-text {
    font-size: 0.72rem;
    font-weight: 500;
}

.leave-btn {
    background-color: #ef4444;
    color: white;
}

.leave-btn:hover {
    background-color: #f87171;
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

.flip-cam-btn {
    display: none;
}

/* ==========================================
   CHAT SIDEBAR / DRAWER
   ========================================== */
.chat-sidebar {
    position: absolute;
    top: 0;
    bottom: 0;
    right: -420px;
    width: 400px;
    opacity: 0;
    pointer-events: none;
    background-color: var(--card-bg);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow: hidden;
    max-height: 100%;
    transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s;
    z-index: 100;
}

.chat-sidebar.show {
    right: 0;
    opacity: 1;
    pointer-events: auto;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.chat-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.close-chat-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border-radius: 50%;
    transition: all 0.2s;
    flex-shrink: 0;
}

.close-chat-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.chat-messages {
    flex: 1 1 0;
    height: 0;
    min-height: 0;
    padding: 20px;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.chat-message {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 14px;
    border-radius: 16px;
    font-size: 0.92rem;
    line-height: 1.4;
    word-break: break-word;
    align-self: flex-start;
    max-width: 85%;
    border: 1px solid rgba(255, 255, 255, 0.03);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.chat-message.self {
    background: rgba(168, 85, 247, 0.15);
    align-self: flex-end;
    border: 1px solid rgba(168, 85, 247, 0.25);
    box-shadow: 0 4px 10px rgba(168, 85, 247, 0.05);
}

.chat-message .sender {
    font-weight: 700;
    font-size: 0.72rem;
    color: var(--accent);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.chat-message.self .sender {
    color: var(--primary-hover);
}

.chat-system {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-style: italic;
    margin: 8px 0;
    padding: 0 10px;
}

.chat-input {
    display: flex;
    padding: 16px;
    background-color: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}

.chat-input input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px 0 0 12px;
    background: rgba(0, 0, 0, 0.4);
    color: white;
    outline: none;
    font-size: 0.92rem;
    transition: border-color 0.2s;
}

.chat-input input:focus {
    border-color: var(--primary);
}

.chat-input button {
    padding: 12px 20px;
    border: none;
    border-radius: 0 12px 12px 0;
    background: var(--primary);
    color: white;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.chat-input button:hover {
    opacity: 0.9;
}

.chat-input button:disabled, .chat-input input:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ==========================================
   QR CONTAINER FOR MOBILE CONNECTION
   ========================================== */
.qr-container {
    margin-top: 35px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 320px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px);
    transition: transform 0.3s, border-color 0.3s;
}

.qr-container:hover {
    transform: translateY(-3px);
    border-color: rgba(168, 85, 247, 0.2);
}

.qr-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #e2e8f0;
    margin: 0 0 14px 0;
}

.qr-image {
    width: 140px;
    height: 140px;
    border-radius: 12px;
    border: 5px solid white;
    background-color: white;
    margin-bottom: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.qr-url-text {
    font-size: 0.8rem;
    color: var(--accent);
    word-break: break-all;
    margin: 0 0 10px 0;
    font-family: 'Courier New', Courier, monospace;
    font-weight: 700;
}

.qr-hint {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.45;
}

/* ==========================================
   RESPONSIVENESS (MOBILE & TABLET RULES)
   ========================================== */

/* Stack Join inputs vertically on mobile */
@media (max-width: 600px) {
    .input-group {
        flex-direction: column;
        width: 100%;
        max-width: 330px;
        padding: 24px 18px;
    }
    .input-group input {
        width: 100%;
    }
    .primary-btn {
        width: 100%;
    }
}

/* Mobile Call Screen Rules */
@media (max-width: 768px) {
    .container {
        padding: 8px;
    }

    .app-layout {
        flex-direction: column;
        height: 100vh;
        padding-bottom: 80px; /* Leave space for floating controls */
        box-sizing: border-box;
    }
    
    /* Dynamic Grid Layout for Mobile */
    .video-grid {
        display: grid;
        gap: 10px;
        padding: 6px;
        flex: 1;
        width: 100%;
        height: 100%;
        box-sizing: border-box;
        align-content: stretch;
    }
    
    .video-wrapper {
        border-radius: 16px;
        aspect-ratio: auto;
        height: 100%;
        width: 100%;
    }

    /* Normal-flow video wrappers for mobile grid */
    .video-wrapper.local {
        position: relative;
        bottom: auto;
        right: auto;
        width: 100%;
        height: 100%;
        z-index: 10;
        border-radius: 16px;
        border: 1px solid rgba(255, 255, 255, 0.05);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
        aspect-ratio: auto;
    }
    
    .video-wrapper.local video {
        object-fit: cover;
    }
    
    /* Grid Count Specifications */
    .video-grid.grid-count-1 {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr;
    }
    
    .video-grid.grid-count-2 {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr 1fr;
    }
    
    .video-grid.grid-count-3 {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1.2fr 1fr;
    }
    .video-grid.grid-count-3 .video-wrapper:first-child {
        grid-column: span 2;
    }
    
    .video-grid.grid-count-4 {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr 1fr;
    }
    
    .video-grid.grid-count-5,
    .video-grid.grid-count-6 {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: repeat(3, 1fr);
    }
    
    .video-grid.grid-count-7,
    .video-grid.grid-count-8,
    .video-grid.grid-count-9 {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(3, 1fr);
    }
    
    /* Dock media controls on mobile */
    .media-controls {
        position: fixed;
        bottom: 16px;
        left: 50%;
        transform: translateX(-50%);
        width: calc(100% - 32px);
        max-width: 420px;
        border-radius: 24px;
        padding: 10px 16px;
        background: rgba(15, 17, 28, 0.75);
        border: 1px solid rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(168, 85, 247, 0.15);
        z-index: 110;
        display: flex;
        justify-content: space-around;
        align-items: center;
        box-sizing: border-box;
    }
    
    .control-btn {
        padding: 10px;
        min-width: 50px;
        height: 50px;
        border-radius: 16px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
    
    .control-btn .btn-text {
        display: none; /* Hide labels for super clean UI */
    }
    
    .flip-cam-btn {
        display: flex;
    }

    /* Floating Popup Chat Card on Mobile */
    .chat-sidebar {
        position: fixed;
        bottom: -100%;
        left: 50%;
        transform: translateX(-50%);
        width: calc(100% - 32px);
        max-width: 450px;
        height: 55vh;
        max-height: 480px;
        z-index: 120;
        border-radius: 28px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(168, 85, 247, 0.15);
        background: rgba(10, 11, 20, 0.9);
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        opacity: 0;
        pointer-events: none;
        transition: bottom 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s;
        margin-left: 0;
    }
    
    .chat-sidebar.show {
        bottom: 82px; /* Floats exactly above bottom navigation controls */
        opacity: 1;
        pointer-events: auto;
    }
    
    .chat-header {
        padding: 14px 18px;
        background: rgba(0, 0, 0, 0.2);
    }
    
    .chat-input {
        padding: 12px 14px;
        padding-bottom: 16px;
    }
}

/* Chat Badge */
.control-btn {
    position: relative;
}

.chat-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    background-color: #ff3b30;
    border-radius: 50%;
    border: 2px solid #222;
    display: none;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* ==========================================
   SPOTLIGHT (PINNED VIDEO) LAYOUT
   ========================================== */
.video-grid.has-pinned {
    grid-template-columns: repeat(auto-fit, minmax(120px, 150px));
    grid-template-rows: 1fr auto;
    align-content: start;
    justify-content: center;
}

.video-grid.has-pinned .video-wrapper.pinned {
    grid-column: 1 / -1;
    width: 100%;
    height: 100%;
    max-height: 70vh;
    border-radius: 12px;
    z-index: 10;
}

.video-grid.has-pinned .video-wrapper:not(.pinned) {
    height: 120px;
    aspect-ratio: 16/9;
    border-radius: 8px;
    opacity: 0.8;
}

.video-grid.has-pinned .video-wrapper:not(.pinned):hover {
    opacity: 1;
}

/* Pin Overlay Button */
.pin-overlay-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(15, 17, 28, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
    z-index: 20;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.video-wrapper:hover .pin-overlay-btn {
    opacity: 1;
}

.pin-overlay-btn:hover {
    background: var(--primary);
    transform: scale(1.1);
}

.video-wrapper.pinned .pin-overlay-btn {
    opacity: 1;
    background: var(--primary);
    color: white;
}
/* ==========================================
   NEW GOOGLE MEET STYLE UI
   ========================================== */

/* Top Navigation */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0 20px 0;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
}

.logo-icon {
    font-size: 2rem;
    color: var(--primary);
}

.auth-section, .user-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-name {
    font-weight: 600;
    color: var(--primary-hover);
}

.nav-btn {
    background: transparent;
    border: none;
    color: var(--text);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: color 0.2s;
}

.nav-btn:hover {
    color: var(--primary-hover);
}

.nav-btn.primary {
    background: var(--primary);
    padding: 8px 16px;
    border-radius: 8px;
}

.nav-btn.primary:hover {
    background: var(--primary-hover);
    color: white;
}

/* Hero Layout */
.hero-layout {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    text-align: left;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

/* Old hero title removed to prevent conflict with light mode */

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    line-height: 1.5;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.new-meeting-wrapper {
    position: relative;
}

.meet-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    padding: 12px 24px;
    text-transform: none;
    letter-spacing: normal;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 10px;
    background: var(--card-bg-solid);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 8px;
    width: 250px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 100;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px;
    background: transparent;
    border: none;
    color: var(--text);
    text-align: left;
    cursor: pointer;
    border-radius: 8px;
    font-size: 0.95rem;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.meet-input-group {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    gap: 0;
    position: relative;
}

.meet-input-group:hover {
    transform: none;
    box-shadow: none;
}

.meet-input-group input {
    padding: 12px 12px 12px 45px;
    width: 260px;
    background: transparent;
    border: 1px solid var(--text-muted);
    border-radius: 8px;
}

.meet-input-group input:focus {
    border-color: var(--primary);
    box-shadow: none;
    background: rgba(255, 255, 255, 0.05);
}

.input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.text-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 1rem;
    margin-left: 15px;
    cursor: not-allowed;
}

.text-btn.active {
    color: var(--primary-hover);
    cursor: pointer;
}

/* Right Column (Dashboard / Graphic) */
.hero-graphic {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.dashboard-section {
    width: 100%;
    max-width: 400px;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.dashboard-section h3 {
    margin: 0 0 15px 0;
    font-size: 1.2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 10px;
}

.meeting-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.meeting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 12px;
    border-radius: 12px;
}

.meeting-item-details strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 4px;
}

.meeting-item-details span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.meeting-item button {
    background: var(--primary);
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--card-bg-solid);
    padding: 30px;
    border-radius: 20px;
    width: 100%;
    max-width: 400px;
    position: relative;
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-input {
    padding: 14px;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    background: rgba(0,0,0,0.3);
    color: white;
    font-size: 1rem;
    width: 100%;
}

.full-width {
    width: 100%;
}

.switch-auth {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.switch-auth a {
    color: var(--primary-hover);
    text-decoration: none;
}

.error-text {
    color: #ef4444;
    font-size: 0.85rem;
    margin: 0;
}

.success-text {
    color: #22c55e;
    font-size: 0.85rem;
    margin: 0;
}

@media (max-width: 768px) {
    .hero-layout {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-actions {
        justify-content: center;
    }
}

/* ==========================================
   UPDATED CALL UI (MOBILE RESPONSIVE)
   ========================================== */
.meeting-info-top {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(15, 17, 28, 0.7);
    padding: 8px 16px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    z-index: 100;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    gap: 8px;
}
.meeting-info-top::before {
    content: 'info';
    font-family: 'Material Symbols Outlined';
    font-size: 1.1rem;
    color: var(--primary-hover);
}

@media (max-width: 768px) {
    .meeting-info-top {
        top: 10px;
        left: 10px;
        font-size: 0.8rem;
        padding: 6px 12px;
    }
    
    .media-controls {
        gap: 8px;
        padding: 8px 16px;
        width: 100%;
        max-width: calc(100% - 20px);
        overflow-x: auto;
        justify-content: flex-start;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none;  /* IE and Edge */
    }
    
    .media-controls::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }
    
    .control-btn {
        min-width: 44px;
        height: 44px;
        border-radius: 12px;
        flex-shrink: 0;
    }
    
    .control-btn .material-symbols-outlined {
        font-size: 20px;
    }
}

/* ==========================================
   PARTICIPANTS SIDEBAR STYLES
   ========================================== */
.participant-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    margin-bottom: 8px;
}
.participant-info {
    display: flex;
    align-items: center;
    gap: 12px;
}
.participant-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 1rem;
}
.participant-name {
    font-size: 0.95rem;
    font-weight: 600;
}
.participant-actions {
    display: flex;
    gap: 6px;
}
.action-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}
.action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}
.action-btn.kick-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}
.participant-badge {
    font-size: 0.7rem;
    background: var(--primary);
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
}

/* ==========================================
   RECORDING STYLES
   ========================================== */
.control-btn.recording {
    background-color: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    animation: recordingPulse 2s infinite;
}
.control-btn.recording .material-symbols-outlined {
    color: #ef4444;
}

@keyframes recordingPulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* ==========================================
   INTERACTIVE FEATURES (REACTIONS, PIP, HANDS)
   ========================================== */

.emoji-popover {
    position: absolute;
    bottom: calc(100% + 15px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--card-bg-solid);
    border: 1px solid var(--glass-border);
    padding: 8px;
    border-radius: 16px;
    display: flex;
    gap: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    z-index: 100;
}

.emoji-btn {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.2s;
    padding: 4px;
    border-radius: 50%;
}

.emoji-btn:hover {
    transform: scale(1.2);
    background: rgba(255, 255, 255, 0.1);
}

.floating-emoji {
    position: absolute;
    bottom: 20px;
    left: 50%;
    font-size: 2.5rem;
    pointer-events: none;
    z-index: 50;
    animation: floatUpAndFade 2.5s ease-out forwards;
}

@keyframes floatUpAndFade {
    0% { transform: translate(-50%, 0) scale(0.5); opacity: 0; }
    20% { transform: translate(-50%, -20px) scale(1.2); opacity: 1; }
    80% { transform: translate(-50%, -80px) scale(1); opacity: 0.8; }
    100% { transform: translate(-50%, -120px) scale(0.8); opacity: 0; }
}

.hand-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 20;
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.control-btn.hand-raised {
    background-color: var(--primary);
    color: white;
}

.control-btn.hand-raised .material-symbols-outlined {
    color: white;
}

.pip-overlay-btn {
    position: absolute;
    top: 10px;
    right: 50px;
    background: rgba(0,0,0,0.6);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s, background 0.2s;
    z-index: 20;
}

.video-wrapper:hover .pip-overlay-btn {
    opacity: 1;
}

.pip-overlay-btn:hover {
    background: var(--primary);
}

/* ==========================================
   EFFECTS MODAL (VIDEO/AUDIO EFFECTS)
   ========================================== */
.effects-content {
    max-width: 450px;
}

.effects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.effect-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    border-radius: 12px;
    padding: 8px;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.effect-option:hover {
    background: rgba(255, 255, 255, 0.05);
}

.effect-option.active {
    border-color: var(--primary);
    background: rgba(168, 85, 247, 0.1);
}

.effect-preview {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--glass-border);
    overflow: hidden;
}

.effect-option img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
}

.effect-preview.none-preview {
    background: rgba(255, 255, 255, 0.05);
}

.effect-preview.blur-preview {
    background: repeating-linear-gradient(45deg, rgba(255,255,255,0.05), rgba(255,255,255,0.05) 10px, transparent 10px, transparent 20px);
    backdrop-filter: blur(10px);
}

.effect-option p {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 500;
}

/* ==========================================
   WHITEBOARD INTEGRATION
   ========================================== */
.main-column {
    transition: all 0.3s ease;
}

.main-column.with-whiteboard {
    flex-direction: row;
    gap: 12px;
}

.main-column.with-whiteboard .video-grid {
    flex: 0 0 180px;
    display: flex;
    flex-direction: column;
    align-content: flex-start;
    justify-content: flex-start;
    gap: 10px;
    padding: 4px;
    overflow-y: auto;
}

.main-column.with-whiteboard .video-wrapper {
    width: 100%;
    aspect-ratio: 16/9;
    flex-shrink: 0;
}

.whiteboard-container {
    flex: 1;
    border-radius: 20px;
    overflow: hidden;
    background: white;
    border: 1px solid var(--glass-border);
    display: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    height: 100%;
    min-height: 0;
    position: relative;
}

.mobile-whiteboard-close {
    display: none;
}

.whiteboard-container.active {
    display: block;
}

.whiteboard-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
}

/* ==========================================
   LIVE POLLS & Q&A SIDEBAR
   ========================================== */
.poll-qa-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 320px;
    height: 100%;
    background: var(--card-bg-solid);
    border-left: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    z-index: 200;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.4);
}

.poll-qa-sidebar.open {
    right: 0;
}

.poll-qa-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
}

.poll-qa-tabs {
    display: flex;
    gap: 4px;
    background: rgba(255,255,255,0.06);
    border-radius: 10px;
    padding: 4px;
}

.pq-tab {
    border: none;
    background: transparent;
    color: var(--text-muted);
    padding: 7px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.pq-tab.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px var(--primary-glow);
}

.pq-tab-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 16px;
    gap: 12px;
}

/* Empty State */
.pq-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
    flex: 1;
}

.pq-empty-state p {
    margin: 0;
    font-weight: 600;
    font-size: 0.95rem;
}

.pq-empty-state small {
    font-size: 0.8rem;
    opacity: 0.7;
}

/* Poll Create Section */
.poll-create-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(168, 85, 247, 0.05);
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 12px;
    padding: 16px;
}

.poll-section-title {
    margin: 0 0 4px 0;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-hover);
}

.poll-option-input {
    margin-bottom: 0 !important;
}

#pollOptionsContainer {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Buttons */
.pq-primary-btn {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 10px 16px;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    width: 100%;
}

.pq-primary-btn:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 15px var(--primary-glow);
    transform: translateY(-1px);
}

.pq-secondary-btn {
    background: transparent;
    color: var(--primary);
    border: 1px solid rgba(168, 85, 247, 0.4);
    border-radius: 10px;
    padding: 8px 16px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    text-align: left;
}

.pq-secondary-btn:hover {
    background: rgba(168, 85, 247, 0.1);
}

.pq-danger-btn {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 10px;
    padding: 8px 16px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.pq-danger-btn:hover {
    background: rgba(239, 68, 68, 0.25);
}

/* Active Poll Section */
.poll-active-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.poll-question-display {
    font-weight: 700;
    font-size: 1rem;
    margin: 0;
    line-height: 1.4;
    color: var(--text);
}

/* Poll Vote Options */
.poll-vote-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 12px 16px;
    width: 100%;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 8px;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.poll-vote-btn::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    background: rgba(168, 85, 247, 0.2);
    width: var(--pct, 0%);
    transition: width 0.5s ease;
    border-radius: 10px 0 0 10px;
    z-index: 0;
}

.poll-vote-btn.voted-for {
    border-color: var(--primary);
    color: var(--primary-hover);
}

.poll-vote-btn span,
.poll-vote-btn strong {
    position: relative;
    z-index: 1;
}

.poll-vote-btn.disabled {
    cursor: default;
    pointer-events: none;
}

.poll-votes-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: 4px;
}

/* Results section */
.poll-total-votes {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Q&A */
.qa-questions-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 4px;
}

.qa-question-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: border-color 0.2s ease;
}

.qa-question-card:hover {
    border-color: rgba(168, 85, 247, 0.3);
}

.qa-question-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.qa-question-author {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--primary);
}

.qa-question-time {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.qa-question-text {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text);
    margin: 0;
}

.qa-question-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}

.qa-upvote-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 4px 10px;
    font-size: 0.78rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.qa-upvote-btn:hover, .qa-upvote-btn.voted {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(6, 182, 212, 0.1);
}

.qa-answered-badge {
    font-size: 0.72rem;
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 20px;
    padding: 3px 8px;
    font-weight: 600;
}

.qa-answer-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.78rem;
    cursor: pointer;
    font-family: inherit;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    margin-left: auto;
}

.qa-answer-btn:hover {
    background: rgba(255,255,255,0.08);
    color: var(--text);
}

.qa-input-area {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--glass-border);
    flex-shrink: 0;
}

/* Mobile Responsive Fixes */
@media (max-width: 768px) {
    .top-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    
    .logo-text {
        font-size: 1.2rem;
    }

    .hero-section {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }
    
    .hero-content {
        align-items: center;
        display: flex;
        flex-direction: column;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }

    .main-column.with-whiteboard {
        /* layout unchanged, whiteboard is overlay */
    }
    
    .main-column.with-whiteboard .whiteboard-container.active {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        z-index: 2000;
        border-radius: 0;
        margin: 0;
        border: none;
    }
    
    .mobile-whiteboard-close {
        display: flex;
        align-items: center;
        gap: 6px;
        position: absolute;
        top: 20px;
        right: 20px;
        background: rgba(0,0,0,0.7);
        color: white;
        padding: 10px 16px;
        border-radius: 24px;
        border: 1px solid rgba(255,255,255,0.2);
        z-index: 2001;
        font-weight: 600;
        cursor: pointer;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    /* Hide features not optimized for mobile */
    #toggleScreenBtn,
    #toggleEffectsBtn,
    #toggleNoiseBtn {
        display: none !important;
    }
}

/* ==========================================
   NATIVE ANDROID APP UI OVERRIDES
   ========================================== */
body.is-native-app {
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}
body.is-native-app .top-nav {
    position: fixed !important;
    bottom: 30px !important;
    right: 50% !important;
    transform: translateX(50%) !important;
    top: auto !important;
    width: auto !important;
    background: var(--card-bg) !important;
    padding: 10px 20px !important;
    border-radius: 30px !important;
    backdrop-filter: blur(10px) !important;
    box-shadow: var(--neon-glow) !important;
    border: 1px solid var(--glass-border) !important;
    z-index: 1000 !important;
    display: flex !important;
    justify-content: center !important;
}
body.is-native-app .top-nav .logo {
    display: none !important;
}
body.is-native-app .landing-page {
    padding-bottom: 100px !important; 
}
body.is-native-app .hero-section h1 {
    font-size: clamp(2rem, 10vw, 4rem) !important;
}

/* ==========================================
   REACTIONS & HAND RAISE
   ========================================== */
.floating-emoji {
    position: absolute;
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 3rem;
    pointer-events: none;
    z-index: 100;
    animation: floatUp 2.5s ease-in-out forwards;
}

@keyframes floatUp {
    0% {
        opacity: 0;
        transform: translate(-50%, 0) scale(0.5);
    }
    10% {
        opacity: 1;
        transform: translate(-50%, -20px) scale(1.2);
    }
    20% {
        transform: translate(-50%, -30px) scale(1);
    }
    80% {
        opacity: 0.8;
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -150px) scale(1);
    }
}

.hand-raise-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #eab308;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    z-index: 10;
    font-size: 18px;
    animation: pulseHand 2s infinite;
}

@keyframes pulseHand {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(234, 179, 8, 0.7); }
    50% { transform: scale(1.1); box-shadow: 0 0 0 10px rgba(234, 179, 8, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(234, 179, 8, 0); }
}

/* Ensure emoji popover shows properly */
.react-wrapper {
    position: relative;
}

.emoji-popover {
    position: absolute;
    bottom: calc(100% + 15px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--card-bg-solid);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 8px 12px;
    display: none;
    gap: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    z-index: 100;
}

.emoji-popover.show {
    display: flex !important;
}

.emoji-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.2s;
    padding: 4px;
    border-radius: 50%;
}
.emoji-btn:hover {
    transform: scale(1.3);
    background: rgba(255, 255, 255, 0.1);
}

/* Data Saver Mode */
.video-grid.data-saver .video-wrapper:not(.local) video {
    display: none !important;
}
.video-grid.data-saver .video-wrapper:not(.local) {
    background-color: #1a1b26;
    display: flex;
    justify-content: center;
    align-items: center;
}
.video-grid.data-saver .video-wrapper:not(.local)::after {
    content: "Audio Only";
    color: #fff;
    font-size: 1.2rem;
    font-weight: 600;
}
.control-btn.saver-active {
    background-color: #f59e0b !important;
    color: white !important;
}

/* Connection Quality Indicators */
.quality-indicator {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(15, 17, 28, 0.6);
    border-radius: 50%;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    backdrop-filter: blur(4px);
    transition: color 0.3s ease;
}
.quality-excellent {
    color: #10b981; /* Green */
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}
.quality-good {
    color: #f59e0b; /* Yellow/Orange */
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}
.quality-poor {
    color: #ef4444; /* Red */
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}
.quality-lost {
    color: #6b7280; /* Gray */
}


/* ==========================================
   DESKTOP WEB VIEW REDESIGN: LEFT SIDEBAR & RIGHT PANEL
   ========================================== */

.left-sidebar {
    width: 220px;
    background-color: var(--card-bg-solid);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s ease;
    z-index: 100;
    padding: 20px 10px;
    overflow-y: auto;
    overflow-x: hidden;
}

.left-sidebar.icon-only {
    width: 80px;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
    padding: 0 10px;
}

.logo-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--bg-color), var(--card-bg));
    border: 1px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.logo-text-short {
    font-weight: 800;
    color: var(--text);
    font-size: 1.1rem;
}

.sidebar-title {
    font-weight: 700;
    font-size: 1.4rem;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

.left-sidebar.icon-only .sidebar-title {
    opacity: 0;
    pointer-events: none;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.sidebar-nav-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    background: transparent;
    border: none;
    border-radius: 12px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
    font-family: inherit;
    position: relative;
}

.sidebar-nav-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
}

.sidebar-nav-btn.active {
    background: var(--primary-glow);
    color: var(--primary);
    font-weight: 600;
}

.sidebar-nav-btn .material-symbols-outlined {
    font-size: 24px;
}

.sidebar-nav-text {
    font-size: 0.85rem;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.left-sidebar.icon-only .sidebar-nav-text {
    opacity: 0;
    display: none;
}

.left-sidebar.icon-only .sidebar-nav-btn {
    justify-content: center;
    padding: 14px;
}

.sidebar-badge {
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: auto;
}

.left-sidebar.icon-only .sidebar-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    margin: 0;
}

/* Right Panel Container */
.right-panel-container {
    width: 0;
    opacity: 0;
    display: flex;
    flex-direction: column;
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s;
    pointer-events: none;
    overflow: hidden;
}

.right-panel-container.show {
    width: 380px;
    opacity: 1;
    pointer-events: auto;
}

.right-panel-container .chat-sidebar {
    position: relative;
    right: 0;
    width: 100%;
    height: 100%;
    border-radius: 20px;
    box-shadow: none;
    opacity: 1;
    pointer-events: auto;
    display: none;
}

.right-panel-container .chat-sidebar.active {
    display: flex;
}

/* Media Controls Updates */
.media-controls {
    border-radius: 30px;
    padding: 10px 20px;
    background: var(--card-bg-solid);
    border: 1px solid var(--glass-border);
}

.control-btn {
    border-radius: 50%;
    width: 50px;
    height: 50px;
    min-width: 0;
    padding: 0;
}

.control-btn .btn-text {
    display: none;
}

/* Hamburger menu for mobile */
@media (max-width: 1024px) {
    .left-sidebar {
        width: 80px;
    }
    .left-sidebar .sidebar-title, .left-sidebar .sidebar-nav-text {
        display: none;
    }
    .left-sidebar .sidebar-nav-btn {
        justify-content: center;
        padding: 14px;
    }
}

@media (max-width: 768px) {
    .left-sidebar {
        position: absolute;
        left: -100%;
        height: 100%;
        width: 260px;
        z-index: 1000;
    }
    .left-sidebar.mobile-open {
        left: 0;
    }
    .left-sidebar .sidebar-title, .left-sidebar .sidebar-nav-text {
        display: block;
    }
    .left-sidebar .sidebar-nav-btn {
        justify-content: flex-start;
        padding: 14px 16px;
    }
    .right-panel-container.show {
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        z-index: 999;
        width: 100%;
        max-width: 400px;
    }
}



@media (max-width: 768px) {
    #mobileMenuBtn {
        display: flex !important;
    }
}

/* Camera Switcher Dropdown & Options */
.camera-list-sub-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 6px;
    margin: 4px 0 8px 0;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    max-height: 160px;
    overflow-y: auto;
}

.camera-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.825rem;
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
    width: 100%;
}

.camera-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
}

.camera-item.active {
    background: rgba(0, 212, 255, 0.15);
    color: var(--primary);
    font-weight: 600;
}

.camera-item .material-symbols-outlined {
    font-size: 1.1rem;
}

/* Features Showcase & Badges */
.badge-new {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.2), rgba(92, 0, 255, 0.3));
    border: 1px solid rgba(0, 229, 255, 0.4);
    color: #00e5ff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 0 12px rgba(0, 229, 255, 0.2);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 30px;
}

.feature-card {
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    padding: 24px;
    border-radius: 20px;
    text-align: left;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 229, 255, 0.5);
    box-shadow: 0 10px 30px rgba(0, 229, 255, 0.15);
}

.feature-card .feature-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: rgba(0, 229, 255, 0.1);
    border: 1px solid rgba(0, 229, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00e5ff;
    margin-bottom: 16px;
}

.feature-card .feature-icon .material-symbols-outlined {
    font-size: 28px;
}

