/* ==============================================
   ROOM LIST & HALL DISCOVERY
   ============================================== */

.connection-badge {
    position: absolute;
    top: 24px;
    right: 32px;
    font-size: 0.8rem;
    color: #ff4444;
}

.room-list-container {
    display: none;
    flex-direction: column;
    width: 100%;
    height: 100%;
    gap: 12px;
    padding: 12px 24px 24px;
    max-width: 1920px;
    margin: 0 auto;
}

.room-list-container.active {
    display: flex;
}

.row-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 8px;
}

/* Room Grid */
.room-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px 16px;
    padding: 10px 0 60px;
}

.room-card-wrapper {
    padding: 20px 24px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    margin-bottom: 24px;
}

/* ============ Room Card ============ */
.room-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.room-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* ---- Cover / Thumbnail ---- */
.room-card-cover {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 12px;
    background: #1a1a1a;
}

.room-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.room-card:hover .room-card-cover img {
    transform: scale(1.04);
}

/* Gradient placeholder for sessions without a poster */
.cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg,
            hsl(30, 60%, 12%) 0%,
            hsl(25, 50%, 18%) 40%,
            hsl(20, 40%, 10%) 100%);
}

.cover-placeholder span {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.2rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Duration badge (bottom-right of cover) */
.cover-duration {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.03em;
    font-feature-settings: 'tnum';
    line-height: 1.3;
}

/* LIVE badge (top-left of cover) */
.cover-live-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #e53e3e;
    color: white;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    letter-spacing: 0.06em;
    box-shadow: 0 2px 8px rgba(229, 62, 62, 0.5);
}

.cover-live-badge .pulse-dot {
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    animation: pulse-live 1.5s ease-in-out infinite;
}

@keyframes pulse-live {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

/* Video badge (top-right of cover) */
.cover-video-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    font-size: 0.6rem;
    padding: 4px 6px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 3px;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.5);
}

/* ---- Card Body (below cover) ---- */
.room-card-body {
    padding: 10px 4px 4px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.room-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #f0f0f0;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

/* Meta row: avatars · plays · date */
.room-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 2px;
}

.room-avatars-stack {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.stacked-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1.5px solid #1a1a1a;
    margin-left: -6px;
    overflow: hidden;
    background: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    color: white;
}

.stacked-avatar:first-child {
    margin-left: 0;
}

.stacked-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.meta-item {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.45);
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.meta-item i {
    font-size: 0.65rem;
}

/* More button — inline in meta row */
.room-card-more-btn {
    margin-left: auto;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.25);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    opacity: 0;
    flex-shrink: 0;
    font-size: 0.8rem;
}

.room-card:hover .room-card-more-btn {
    opacity: 1;
}

.room-card-more-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Legacy compat — keep for management page */
.room-category-badge {
    display: none;
}

.room-summary {
    display: none;
}

.room-stats {
    display: none;
}

.room-footer {
    display: none;
}

.room-status-badge {
    display: none;
}

.room-card-poster {
    display: none;
}

/* ============ Dropdown Menu ============ */
.glass-dropdown {
    background: rgba(30, 30, 30, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 6px;
    backdrop-filter: blur(20px);
    min-width: 160px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.dropdown-item {
    padding: 10px 14px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.75);
    cursor: pointer;
    transition: background 0.15s;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.dropdown-item.danger {
    color: #f87171;
}

.dropdown-item.danger:hover {
    background: rgba(248, 113, 113, 0.12);
}

/* Social btn (for share) */
.social-btn img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* Floating reaction */
.floating-reaction {
    position: fixed;
    pointer-events: none;
    font-size: 1.4rem;
    animation: float-up 2s ease-out forwards;
    z-index: 9999;
}

@keyframes float-up {
    0% {
        opacity: 1;
        transform: translateY(0) translateX(0);
    }

    100% {
        opacity: 0;
        transform: translateY(-80px) translateX(var(--tx, 0));
    }
}