/* ==========================================================================
   CLUBHOUSE ROOMS LOBBY (LIST OF ALL AUDIO ROOMS) - FULLY RESPONSIVE
   ========================================================================== */

:root {
    --bg-clubhouse: #fbf9f5;
    --bg-card: #ffffff;
    --bg-card-hover: #ffffff;
    --bg-pill: #ede5d8;
    
    --primary: #27272a;
    --accent-green: #22c55e;
    --accent-amber: #f59e0b;
    --accent-indigo: #6366f1;
    
    --text-main: #18181b;
    --text-muted: #71717a;
    --text-dim: #a1a1aa;
    
    --border-color: #ede5d8;
    --border-card: #e7dfd3;
    
    --font-ui: 'Cairo', 'Tajawal', sans-serif;
    
    --radius-avatar: 22px;
    --radius-md: 20px;
    --radius-lg: 26px;
    --radius-full: 9999px;
    
    --shadow-room: 0 4px 18px rgba(0, 0, 0, 0.035);
    --shadow-hover: 0 10px 30px rgba(0, 0, 0, 0.08);
    --container-max: 960px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: var(--font-ui);
    background-color: var(--bg-clubhouse);
    color: var(--text-main);
    direction: rtl;
    text-align: right;
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Header */
.ch-lobby-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(251, 249, 245, 0.94);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 20px;
}

.ch-lobby-header-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.ch-header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-main);
}

.ch-brand-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    background: #ffffff;
    border: 1.5px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    flex-shrink: 0;
}

.ch-brand-title {
    font-size: 1.15rem;
    font-weight: 900;
    color: var(--text-main);
}

.ch-header-nav {
    display: flex;
    align-items: center;
    gap: 18px;
}

.ch-nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 700;
    transition: color 0.2s;
}

.ch-nav-link:hover, .ch-nav-link.active {
    color: #18181b;
    font-weight: 900;
}

.btn-start-room {
    background: #22c55e;
    color: #ffffff;
    border: none;
    padding: 9px 20px;
    border-radius: var(--radius-full);
    font-family: var(--font-ui);
    font-size: 0.88rem;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.3);
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-start-room:hover {
    background: #16a34a;
    transform: translateY(-1px);
}

/* Main Lobby Layout */
.ch-lobby-layout {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 24px 16px 100px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Upcoming Schedule Ticker */
.upcoming-events-ticker {
    background: #f4efe6;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ticker-heading {
    font-size: 0.84rem;
    font-weight: 800;
    color: #854d0e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ticker-events-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ticker-event-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border-radius: var(--radius-md);
    padding: 12px 16px;
    text-decoration: none;
    color: var(--text-main);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid rgba(0,0,0,0.03);
    gap: 10px;
}

.ticker-event-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.event-time-badge {
    font-size: 0.78rem;
    font-weight: 900;
    color: #b45309;
    background: #fef3c7;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    white-space: nowrap;
    flex-shrink: 0;
}

.event-details-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.event-club-name {
    font-size: 0.74rem;
    font-weight: 800;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-title-text {
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-bell-reminder {
    background: #f4efe6;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s;
}

.btn-bell-reminder:hover {
    background: #ede5d8;
}

/* Category Filter Tabs Bar */
.ch-topics-filter-bar {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}

.ch-topics-filter-bar::-webkit-scrollbar { display: none; }

.ch-topic-pill {
    background: #f4efe6;
    border: 1px solid var(--border-color);
    padding: 7px 16px;
    border-radius: var(--radius-full);
    font-family: var(--font-ui);
    font-size: 0.84rem;
    font-weight: 800;
    color: var(--text-muted);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.ch-topic-pill:hover {
    background: #ede5d8;
    color: var(--text-main);
}

.ch-topic-pill.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

/* Active Rooms Feed List */
.active-rooms-feed {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Single Clubhouse Room Card */
.ch-room-lobby-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    box-shadow: var(--shadow-room);
    text-decoration: none;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
}

.ch-room-lobby-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: #ded6c8;
}

.room-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.room-club-badge {
    font-size: 0.74rem;
    font-weight: 800;
    color: #854d0e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.room-title-heading {
    font-size: 1.15rem;
    font-weight: 900;
    color: var(--text-main);
    line-height: 1.3;
}

.room-live-pill {
    background: #fef2f2;
    color: #ef4444;
    border: 1px solid #fecaca;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

/* Card Body with Stacked Squircle Avatars & Speakers List */
.room-card-body {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.room-stacked-avatars {
    position: relative;
    width: 72px;
    height: 72px;
    flex-shrink: 0;
}

.room-stack-squircle {
    position: absolute;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    object-fit: cover;
    border: 2px solid #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.room-stack-squircle.avatar-top {
    top: 0;
    right: 0;
    z-index: 2;
}

.room-stack-squircle.avatar-bottom {
    bottom: 0;
    left: 0;
    z-index: 1;
}

.room-speakers-names-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.speaker-row-item {
    font-size: 0.88rem;
    font-weight: 700;
    color: #3f3f46;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.speaker-row-item .speaking-bubble-icon {
    font-size: 0.85rem;
}

/* Room Meta Stats Footer */
.room-card-footer {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
    margin-top: 2px;
}

.meta-stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Floating Bottom Start Room Bar */
.ch-floating-start-bar {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 8px 12px 8px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.09);
    z-index: 999;
    white-space: nowrap;
}

.floating-btn-green {
    background: #22c55e;
    color: #ffffff;
    border: none;
    padding: 10px 22px;
    border-radius: var(--radius-full);
    font-family: var(--font-ui);
    font-size: 0.92rem;
    font-weight: 900;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.35);
}

/* Modal for Starting a Room */
.ch-start-room-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(6px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.ch-start-room-modal.active {
    display: flex;
}

.modal-dialog-box {
    background: #ffffff;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    padding: 26px 22px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.modal-title {
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--text-main);
}

.btn-close-modal {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-muted);
}

.modal-room-input {
    width: 100%;
    padding: 12px 14px;
    background: #fbf9f5;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: var(--font-ui);
    font-size: 0.92rem;
    color: var(--text-main);
    outline: none;
}

.modal-room-input:focus {
    background: #ffffff;
    border-color: #22c55e;
}

.room-type-options-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.room-type-option-card {
    background: #fbf9f5;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 6px;
    text-align: center;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.room-type-option-card.active {
    background: #f0fdf4;
    border-color: #22c55e;
    color: #16a34a;
}

.room-type-option-card .type-icon { font-size: 1.3rem; }
.room-type-option-card .type-title { font-size: 0.78rem; font-weight: 800; }

/* ========================================================
   COMPREHENSIVE RESPONSIVE DESIGN (ALL SCREENS)
   ======================================================== */

/* Tablets (max-width: 768px) */
@media (max-width: 768px) {
    .ch-header-nav {
        display: none;
    }
}

/* Mobile Screens (max-width: 600px) */
@media (max-width: 600px) {
    .ch-lobby-header {
        padding: 10px 14px;
    }
    .btn-start-room {
        padding: 7px 14px;
        font-size: 0.8rem;
    }
    .ch-lobby-layout {
        padding: 16px 12px 90px;
        gap: 18px;
    }
    .ch-room-lobby-card {
        padding: 16px;
        gap: 12px;
    }
    .room-title-heading {
        font-size: 1.05rem;
    }
    .room-card-body {
        gap: 14px;
    }
    .room-stacked-avatars {
        width: 60px;
        height: 60px;
    }
    .room-stack-squircle {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }
    .ch-floating-start-bar {
        bottom: 14px;
        padding: 6px 10px 6px 16px;
        gap: 10px;
        font-size: 0.82rem;
    }
    .floating-btn-green {
        padding: 8px 16px;
        font-size: 0.84rem;
    }
}

/* Extra Small Screens (max-width: 380px) */
@media (max-width: 380px) {
    .ch-floating-start-bar span:first-child {
        display: none;
    }
    .room-type-options-grid {
        grid-template-columns: 1fr;
    }
}
