/* ── Page background ──────────────────────────────────────────────────────── */
body { background: #fafafa; }

/* ── Dark hero header ─────────────────────────────────────────────────────── */
.room-hero {
    background: #1a1a1a;
    padding: 60px 40px;
    text-align: center;
    margin-bottom: 0;
}
.room-hero h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 3rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #f0ece4;
    margin: 0 0 12px;
}
.room-hero p {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 14px;
    color: #888;
    margin: 0;
}

/* ── Controls ─────────────────────────────────────────────────────────────── */
.room-controls-wrap {
    background: #fafafa;
    padding: 28px 40px 0;
    max-width: 1200px;
    margin: 0 auto;
}
#room-search {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid #D4AF37;
    color: #1a1a1a;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 14px;
    padding: 8px 0;
    outline: none;
    margin-bottom: 20px;
    transition: border-color 0.2s;
}
#room-search::placeholder { color: #aaa; font-style: italic; }

.room-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}
.room-pill {
    padding: 5px 16px;
    border-radius: 0;
    border: 1px solid #d0d0d0;
    background: white;
    color: #888;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}
.room-pill:hover { background: #1a1a1a; color: white; border-color: #1a1a1a; }
.room-pill.active { background: #D4AF37; color: white; border-color: #D4AF37; }

.room-sort-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 32px;
}
.room-sort-label {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #aaa;
}
.room-sort-select {
    background: white;
    border: 1px solid #d0d0d0;
    color: #555;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 11px;
    padding: 5px 28px 5px 10px;
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23999' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    min-width: 180px;
}
.room-results-count {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 13px;
    color: #999;
    margin-left: auto;
}
.room-results-count strong { color: #1a1a1a; }

/* ── Member grid ──────────────────────────────────────────────────────────── */
.room-grid-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px 80px;
}
.room-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

/* ── Member card ──────────────────────────────────────────────────────────── */
.room-card {
    display: block;
    text-decoration: none;
    background: white;
    border: 1px solid #e8e8e8;
    overflow: hidden;
    transition: box-shadow 0.2s, border-color 0.2s;
    padding: 20px 16px 0;
}
.room-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    border-color: #D4AF37;
}
.room-card-body {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.room-card-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 2px solid #D4AF37;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
    flex-shrink: 0;
}
.room-card-avatar img { width: 100%; height: 100%; object-fit: cover; }
.room-card-avatar span { font-family: 'Cormorant Garamond', serif; font-size: 1.4rem; color: #D4AF37; }
.room-card-info { min-width: 0; flex: 1; }
.room-card-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.05rem;
    color: #1a1a1a;
    margin: 0 0 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.room-card:hover .room-card-name { color: #D4AF37; }
.room-card-username {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 10px;
    color: #bbb;
    margin: 0 0 4px;
}
.room-card-tribe {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #D4AF37;
    margin: 0 0 3px;
}
.room-card-stat {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 10px;
    color: #ccc;
    margin: 0;
}

/* Poster shelf — Letterboxd style */
.room-card-posters {
    display: flex;
    gap: 2px;
    margin: 0 -16px;
    height: 60px;
    overflow: hidden;
}
.room-card-poster {
    flex: 1;
    height: 60px;
    object-fit: cover;
    display: block;
}

.room-empty {
    font-family: 'Source Sans 3', sans-serif;
    color: #bbb;
    font-size: 13px;
    padding: 48px 0;
    grid-column: 1 / -1;
    text-align: center;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 1024px) { .room-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) {
    .room-grid { grid-template-columns: repeat(2, 1fr); }
    .room-hero h1 { font-size: 2rem; }
    .room-controls-wrap, .room-grid-wrap { padding-left: 20px; padding-right: 20px; }
    .room-hero { padding: 40px 20px; }
}
@media (max-width: 480px) { .room-grid { grid-template-columns: 1fr; } }

/* ── Online presence dot ──────────────────────────────────────────────────── */
.room-card-avatar-wrap {
    position: relative;
    display: inline-block;
    margin: 0 auto 8px;
}
.room-card-avatar-wrap .room-card-avatar {
    margin: 0;
}
.room-card-online-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #2ecc71;
    border: 2px solid white;
}

/* ── Room layout with sidebar ─────────────────────────────────────────────── */
.room-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 32px;
    align-items: start;
}
.room-sidebar-card {
    background: white;
    border: 1px solid #e8e8e8;
    padding: 20px;
    margin-bottom: 16px;
}
.room-sidebar-label {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #D4AF37;
    margin: 0 0 16px;
}
.room-sidebar-member {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none;
    transition: opacity 0.15s;
}
.room-sidebar-member:last-of-type { border-bottom: none; }
.room-sidebar-member:hover { opacity: 0.7; }
.room-sidebar-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #D4AF37;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
    flex-shrink: 0;
}
.room-sidebar-avatar img { width: 100%; height: 100%; object-fit: cover; }
.room-sidebar-avatar span { font-family: 'Cormorant Garamond', serif; font-size: 1rem; color: #D4AF37; }
.room-sidebar-info { min-width: 0; }
.room-sidebar-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.95rem;
    color: #1a1a1a;
    margin: 0 0 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.room-sidebar-meta {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 10px;
    color: #aaa;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.room-sidebar-empty {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 12px;
    color: #bbb;
    font-style: italic;
    margin: 0;
}
.room-sidebar-join {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}
.room-sidebar-join p {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 12px;
    color: #999;
    margin: 0 0 10px;
}
.room-sidebar-join-btn {
    display: inline-block;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #1a1a1a;
    background: #D4AF37;
    padding: 8px 16px;
    text-decoration: none;
    transition: opacity 0.15s;
}
.room-sidebar-join-btn:hover { opacity: 0.85; }

@media (max-width: 900px) {
    .room-layout { grid-template-columns: 1fr; }
    .room-sidebar { display: none; }
}

/* ── Grid columns with sidebar ────────────────────────────────────────────── */
.room-layout .room-grid {
    grid-template-columns: repeat(3, 1fr);
}

/* ── Mobile room card redesign ────────────────────────────────────────────── */
@media (max-width: 600px) {
    .room-grid {
        grid-template-columns: 1fr !important;
        gap: 8px;
    }
    .room-card {
        padding: 12px 12px 0;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 10px;
    }
    .room-card-body {
        flex: 1;
        margin-bottom: 0;
        gap: 8px;
    }
    .room-card-avatar {
        width: 40px;
        height: 40px;
        flex-shrink: 0;
    }
    .room-card-avatar span { font-size: 1.1rem; }
    .room-card-posters {
        width: 80px;
        height: 52px;
        flex-shrink: 0;
        margin: 0;
        gap: 1px;
    }
    .room-card-poster { height: 52px; }
    .room-card-stat { display: none; }
    .room-controls-wrap { padding: 0 16px; }
    .room-filter-pills { flex-wrap: wrap; gap: 6px; }
    .filter-pill { font-size: 9px; padding: 6px 10px; }
    .room-hero h1 { font-size: 2.5rem; }
    .room-featured { display: none; }
}

/* ── Member level badge ───────────────────────────────────────────────────── */
.room-card-level {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #D4AF37;
    margin: 0 0 2px;
}

/* ── Mobile suggestions row ───────────────────────────────────────────────── */
.room-mobile-suggestions {
    display: none;
    padding: 16px 20px 0;
}
.room-mobile-suggestions-label {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #D4AF37;
    margin: 0 0 12px;
}
.room-mobile-suggestions-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.room-mobile-suggestions-scroll::-webkit-scrollbar { display: none; }
.room-mobile-suggestion {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    flex-shrink: 0;
}
.room-mobile-suggestion-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #D4AF37;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
}
.room-mobile-suggestion-avatar img { width: 100%; height: 100%; object-fit: cover; }
.room-mobile-suggestion-avatar span { font-family: 'Cormorant Garamond', serif; font-size: 1.1rem; color: #D4AF37; }
.room-mobile-suggestion-name {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 9px;
    color: #888;
    margin: 0;
    text-align: center;
    white-space: nowrap;
}
@media (max-width: 900px) {
    .room-mobile-suggestions { display: block; }
}
