/* =============================================================
   Lounge — Premium 3-layer hub  (redesign 2026)
   VIEW 1: Hub (large category cards)
   VIEW 2: Room list (group chats)
   VIEW 3: Single room chat

   Design language aligned with stitch-export/DESIGN.md:
   - dark base #0D0A0F, soulmate pink #E91E63
   - gradient hero title (white → pink)
   - rounded 22–24px cards, 999px pills
   - pink ambient halos, soft inset highlights
   ============================================================= */

/* ---------- screen shell ---------- */

#groupChatScreen {
    display: none;
    background: #0D0A0F;
    color: #e7e9ee;
    position: relative;
}

#groupChatScreen.active {
    display: flex !important;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    padding-bottom: var(--nav-height, 65px);
    box-sizing: border-box;
    overflow: hidden;
}

.gc-hub-view,
.gc-rooms-view,
.gc-chat-view {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    position: relative;
}
.gc-hub-view[hidden],
.gc-chat-view[hidden],
.gc-rooms-view[hidden] { display: none !important; }

/* Ambient pink halo behind the hub — premium dating-app glow.
   Sits BEHIND header + scroll content. Pointer-events disabled so it
   never blocks taps on cards. Constrained by the view's own bounds. */
.gc-hub-view::before {
    content: '';
    position: absolute;
    top: -60px;
    left: 50%;
    width: 640px;
    max-width: 130%;
    height: 420px;
    transform: translateX(-50%);
    background:
        radial-gradient(ellipse 55% 55% at 50% 38%, rgba(233, 30, 99, 0.20) 0%, transparent 62%),
        radial-gradient(ellipse 70% 35% at 50% 0%, rgba(124, 77, 255, 0.10) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    filter: blur(2px);
}
.gc-hub-view > * { position: relative; z-index: 1; }

/* ============================================================
   SHARED — Header + Back + Scroll
   ============================================================ */

.gc-lounge-header {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: calc(20px + env(safe-area-inset-top, 0px)) 20px 12px 20px;
    background: transparent;
    border-bottom: none;
}

/* In rooms view we still want a subtle glass background under the
   header so the title has separation from the scrolling list. */
.gc-rooms-view .gc-lounge-header {
    background: linear-gradient(180deg, rgba(13, 10, 15, 0.96), rgba(13, 10, 15, 0.78) 80%, transparent);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.gc-lounge-title {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.gc-lounge-name {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.6px;
    line-height: 1.1;
    background: linear-gradient(135deg, #FFFFFF 0%, #FFCAD9 55%, #FF80AB 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.gc-lounge-sub {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.48);
    margin-top: 5px;
    letter-spacing: 0.15px;
}

.gc-back {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.045);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform .18s cubic-bezier(.2,.9,.3,1.25),
                background .15s ease,
                border-color .15s ease;
    padding: 0;
    flex-shrink: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.gc-back:hover  {
    background: rgba(255, 255, 255, 0.085);
    border-color: rgba(255, 255, 255, 0.14);
    transform: translateX(-2px);
}
.gc-back:active { background: rgba(255, 255, 255, 0.14); transform: scale(0.95); }

.gc-hub-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    padding: 8px 18px 36px 18px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-sizing: border-box;
}

.gc-hub-scroll::-webkit-scrollbar { width: 5px; }
.gc-hub-scroll::-webkit-scrollbar-track { background: transparent; }
.gc-hub-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
}
.gc-hub-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.14);
}

/* Room list title can use gradient for extra polish */
.gc-lounge-name--gradient {
    background: linear-gradient(135deg, #FFFFFF 0%, #FFCAD9 55%, #FF80AB 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================================
   VIEW 1 — Hub Cards (premium, scrollable, NEVER clipping)
   ============================================================ */

.gc-hub-card {
    /* CRITICAL FIX: never let the card shrink inside the flex column
       scroll container. Without this, when total card height exceeds
       the visible area, flexbox shrinks each card and overflow:hidden
       clips the wrapped pills / game rows / flags row. */
    flex-shrink: 0;

    position: relative;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 22px 22px 22px 22px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    overflow: hidden; /* clips the radial glow to the rounded card */
    cursor: default;
    text-align: left;
    color: inherit;
    font: inherit;
    background:
        linear-gradient(145deg,
            rgba(255, 255, 255, 0.045) 0%,
            rgba(255, 255, 255, 0.012) 60%,
            rgba(233, 30, 99, 0.018) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 10px 32px rgba(0, 0, 0, 0.34);
    transition: transform .22s cubic-bezier(.2,.9,.3,1.25),
                box-shadow .22s ease,
                border-color .22s ease;
    width: 100%;
    box-sizing: border-box;
}

/* Clickable hub cards */
button.gc-hub-card { cursor: pointer; }
button.gc-hub-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.13);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 14px 38px rgba(0, 0, 0, 0.44),
        0 0 0 1px rgba(233, 30, 99, 0.12);
}
button.gc-hub-card:active {
    transform: translateY(0) scale(0.99);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 6px 20px rgba(0, 0, 0, 0.32);
}

/* Per-card colored glow layer (sits behind everything inside the card) */
.gc-hub-card__glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 1;
}
.gc-hub-card--chats .gc-hub-card__glow {
    background:
        radial-gradient(ellipse 60% 80% at 0% 0%, rgba(233, 30, 99, 0.22) 0%, transparent 55%),
        radial-gradient(ellipse 50% 60% at 100% 100%, rgba(194, 24, 91, 0.10) 0%, transparent 60%);
}
.gc-hub-card--games .gc-hub-card__glow {
    background:
        radial-gradient(ellipse 60% 80% at 100% 0%, rgba(124, 77, 255, 0.22) 0%, transparent 55%),
        radial-gradient(ellipse 50% 60% at 0% 100%, rgba(156, 39, 176, 0.10) 0%, transparent 60%);
}
.gc-hub-card--dating .gc-hub-card__glow {
    background:
        radial-gradient(ellipse 70% 70% at 50% 0%, rgba(255, 64, 129, 0.20) 0%, transparent 55%),
        radial-gradient(ellipse 50% 60% at 50% 100%, rgba(233, 30, 99, 0.10) 0%, transparent 60%);
}

/* Header row of each card: icon + title + desc */
.gc-hub-card__content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    width: 100%;
}

.gc-hub-card__icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: linear-gradient(145deg, rgba(233, 30, 99, 0.26), rgba(233, 30, 99, 0.06));
    border: 1px solid rgba(233, 30, 99, 0.32);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.10),
        0 8px 22px rgba(233, 30, 99, 0.22);
    color: #ff6b95;
}
.gc-hub-card__icon--purple {
    background: linear-gradient(145deg, rgba(124, 77, 255, 0.26), rgba(124, 77, 255, 0.06));
    border-color: rgba(124, 77, 255, 0.32);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.10),
        0 8px 22px rgba(124, 77, 255, 0.22);
    color: #b39bff;
}
.gc-hub-card__icon--rose {
    background: linear-gradient(145deg, rgba(255, 64, 129, 0.26), rgba(255, 64, 129, 0.06));
    border-color: rgba(255, 64, 129, 0.34);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.10),
        0 8px 22px rgba(255, 64, 129, 0.22);
    color: #ff80ab;
}

.gc-hub-card__text {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 2px;
}

.gc-hub-card__title {
    font-size: 19px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.3px;
    line-height: 1.2;
    /* allow wrapping for long titles like "International Speed Dating" */
    overflow-wrap: anywhere;
    word-break: break-word;
}

.gc-hub-card__desc {
    font-size: 13.5px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.45;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Live count chip — premium green pill with glow */
.gc-hub-card__stats {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
    align-self: flex-start;
    padding: 7px 13px 7px 11px;
    border-radius: 999px;
    background: rgba(74, 222, 128, 0.10);
    border: 1px solid rgba(74, 222, 128, 0.24);
    box-shadow: 0 0 18px rgba(74, 222, 128, 0.10);
}

.gc-hub-card__live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 32%, #86f4a6 0%, #4ade80 45%, #16a34a 100%);
    box-shadow: 0 0 10px rgba(74, 222, 128, 0.7);
    animation: gcLivePulse 2.4s ease-in-out infinite;
    flex-shrink: 0;
}

.gc-hub-card__stat {
    font-size: 12px;
    font-weight: 800;
    color: #4ade80;
    letter-spacing: 0.2px;
    line-height: 1;
}

/* Rooms preview pills — wrap cleanly, never overflow */
.gc-hub-card__rooms-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    position: relative;
    z-index: 1;
    box-sizing: border-box;
}

.gc-hub-card__rooms-preview span {
    font-size: 12px;
    font-weight: 600;
    padding: 8px 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.09);
    color: rgba(255, 255, 255, 0.78);
    white-space: nowrap;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
button.gc-hub-card:hover .gc-hub-card__rooms-preview span {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.13);
}

.gc-hub-card__more {
    color: #ff6b95 !important;
    border-color: rgba(233, 30, 99, 0.32) !important;
    background: rgba(233, 30, 99, 0.10) !important;
}

/* "Coming soon" / "Available soon" badges — premium pill */
.gc-hub-card__badge {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.85px;
    color: #c4b1ff;
    padding: 7px 13px;
    border-radius: 999px;
    background: rgba(124, 77, 255, 0.13);
    border: 1px solid rgba(124, 77, 255, 0.30);
    box-shadow: 0 0 16px rgba(124, 77, 255, 0.10);
    position: relative;
    z-index: 1;
    line-height: 1;
}

.gc-hub-card__badge--rose {
    color: #ffb0ce;
    background: rgba(255, 64, 129, 0.13);
    border-color: rgba(255, 64, 129, 0.32);
    box-shadow: 0 0 16px rgba(255, 64, 129, 0.10);
}

/* Mini game grid — 2x2, always fits, hover-friendly */
.gc-hub-card__game-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
    position: relative;
    z-index: 1;
    box-sizing: border-box;
}

.gc-mini-game {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    background:
        linear-gradient(135deg, rgba(124, 77, 255, 0.08), rgba(124, 77, 255, 0.02));
    border: 1px solid rgba(124, 77, 255, 0.16);
    font-size: 12.5px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.78);
    transition: background .15s ease, border-color .15s ease, transform .15s ease;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.gc-mini-game > span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
.gc-mini-game:hover {
    background:
        linear-gradient(135deg, rgba(124, 77, 255, 0.12), rgba(124, 77, 255, 0.04));
    border-color: rgba(124, 77, 255, 0.28);
}

.gc-mini-game__ico {
    font-size: 17px;
    line-height: 1;
    flex-shrink: 0;
}

/* Flags row inside Speed Dating card — premium framed band */
.gc-hub-card__flags {
    margin-top: 0;
    font-size: 22px;
    letter-spacing: 6px;
    text-align: center;
    line-height: 1.4;
    position: relative;
    z-index: 1;
    padding: 14px 12px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255, 64, 129, 0.07), rgba(255, 64, 129, 0.015));
    border: 1px solid rgba(255, 64, 129, 0.16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    overflow-wrap: break-word;
    word-break: break-word;
}

@keyframes gcLivePulse {
    0%, 100% { opacity: 1;    transform: scale(1);    }
    50%      { opacity: 0.55; transform: scale(0.82); }
}

/* ============================================================
   SHARED — Section badges
   ============================================================ */

.gc-section-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #4ade80;
    padding: 6px 11px 6px 10px;
    border-radius: 999px;
    background: rgba(74, 222, 128, 0.10);
    border: 1px solid rgba(74, 222, 128, 0.24);
    box-shadow: 0 0 14px rgba(74, 222, 128, 0.10);
    flex-shrink: 0;
    line-height: 1;
}

.gc-live-dot-sm {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 32%, #86f4a6 0%, #4ade80 45%, #16a34a 100%);
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.7);
    animation: gcLivePulse 2.4s ease-in-out infinite;
}

/* ============================================================
   VIEW 2 — Room List
   ============================================================ */

.gc-rooms-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gc-rooms-list li {
    /* same flex-shrink fix as hub cards: never compress in scroll column */
    flex-shrink: 0;
}

.gc-room-card {
    /* see comment above — never let cards collapse in flex-column scroll */
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 15px 16px;
    background:
        linear-gradient(135deg,
            rgba(255, 255, 255, 0.045) 0%,
            rgba(255, 255, 255, 0.012) 60%,
            rgba(233, 30, 99, 0.022) 100%);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 18px;
    color: inherit;
    text-align: left;
    cursor: pointer;
    transition: transform .18s cubic-bezier(.2,.9,.3,1.25),
                background .18s ease,
                border-color .18s ease,
                box-shadow .18s ease;
    font: inherit;
    position: relative;
    overflow: hidden;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 4px 14px rgba(0, 0, 0, 0.22);
    box-sizing: border-box;
}

.gc-room-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 18px;
    background: radial-gradient(ellipse 60% 80% at 0% 50%, rgba(233, 30, 99, 0.10), transparent 60%);
    opacity: 0;
    transition: opacity .18s ease;
    pointer-events: none;
}

.gc-room-card:hover {
    background:
        linear-gradient(135deg,
            rgba(255, 255, 255, 0.06) 0%,
            rgba(255, 255, 255, 0.02) 60%,
            rgba(233, 30, 99, 0.04) 100%);
    border-color: rgba(255, 255, 255, 0.13);
    transform: translateY(-2px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 8px 24px rgba(0, 0, 0, 0.34),
        0 0 0 1px rgba(233, 30, 99, 0.10);
}
.gc-room-card:hover::before { opacity: 1; }
.gc-room-card:active { transform: translateY(0) scale(0.99); }

.gc-room-icon {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 23px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.025));
    border: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
    position: relative;
    z-index: 1;
}

.gc-room-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
    position: relative;
    z-index: 1;
}

.gc-room-name {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.1px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gc-room-topic {
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.45);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gc-room-meta {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
    z-index: 1;
}

.gc-room-online {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 700;
    color: #4ade80;
    font-variant-numeric: tabular-nums;
    padding: 5px 10px 5px 9px;
    border-radius: 999px;
    background: rgba(74, 222, 128, 0.10);
    border: 1px solid rgba(74, 222, 128, 0.22);
}

.gc-room-online-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 32%, #86f4a6 0%, #4ade80 45%, #16a34a 100%);
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.7);
    animation: gcLivePulse 2.4s ease-in-out infinite;
}

/* ============================================================
   VIEW 3 — Single room chat
   ============================================================ */

.gc-header {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: calc(14px + env(safe-area-inset-top, 0px)) 16px 12px 16px;
    background: linear-gradient(180deg, rgba(13, 10, 15, 0.98), rgba(13, 10, 15, 0.92));
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.gc-header-room-info {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.gc-header-emoji {
    font-size: 22px;
    line-height: 1;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}

.gc-header-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 1px;
}

.gc-header-name {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}

.gc-header-topic {
    font-size: 11.5px;
    font-weight: 500;
    color: rgba(231, 233, 238, 0.38);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gc-header-live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 600;
    color: rgba(231, 233, 238, 0.50);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    flex-shrink: 0;
}

.gc-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 32%, #86f4a6 0%, #4ade80 45%, #16a34a 100%);
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.7);
    animation: gcLivePulse 2.4s ease-in-out infinite;
}

/* ---------- message stream ---------- */

.gc-messages {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px 14px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 1px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
        'Helvetica Neue', Arial, sans-serif;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.gc-messages::-webkit-scrollbar       { width: 5px; }
.gc-messages::-webkit-scrollbar-track { background: transparent; }
.gc-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
}

.gc-msg {
    display: block;
    padding: 3px 6px 3px 8px;
    border-radius: 6px;
    font-size: 13.5px;
    line-height: 1.42;
    color: rgba(231, 233, 238, 0.90);
    word-wrap: break-word;
    overflow-wrap: anywhere;
    transition: background 0.12s ease;
}
.gc-msg:hover { background: rgba(255, 255, 255, 0.025); }
.gc-msg.gc-msg-cluster-start { margin-top: 10px; padding-top: 4px; }

.gc-msg-name {
    display: inline;
    font-weight: 700;
    font-size: 13.5px;
    margin-right: 6px;
    cursor: default;
}
.gc-msg-time {
    display: inline-block;
    font-size: 10.5px;
    font-weight: 500;
    color: rgba(231, 233, 238, 0.28);
    margin-right: 8px;
    font-variant-numeric: tabular-nums;
    user-select: none;
}
.gc-msg-text { display: inline; }

.gc-msg.gc-msg-continuation .gc-msg-name,
.gc-msg.gc-msg-continuation .gc-msg-time { display: none; }
.gc-msg.gc-msg-continuation { padding-left: 8px; }

.gc-msg.gc-msg-own {
    background: linear-gradient(90deg, rgba(233,30,99,0.07), rgba(233,30,99,0.015) 70%, transparent);
    border-left: 2px solid rgba(233, 30, 99, 0.55);
    padding-left: 8px;
}
.gc-msg.gc-msg-own .gc-msg-name { color: #f06292 !important; }
.gc-msg.gc-msg-own:hover {
    background: linear-gradient(90deg, rgba(233,30,99,0.10), rgba(233,30,99,0.02) 70%, transparent);
}

.gc-msg.gc-msg-new { animation: gcMsgIn 280ms ease-out; }

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

/* Failed-to-send own message: visibly dim + red badge so the user knows
   the message never reached the shared chat (i.e. not a local-only fake). */
.gc-msg.gc-msg-failed {
    opacity: 0.55;
    border-left-color: rgba(244, 67, 54, 0.75) !important;
}
.gc-msg-failed-badge {
    color: #ef5350;
    font-size: 11px;
    font-style: italic;
    margin-left: 6px;
}

/* Brief red shake of the composer input when the user tries to send
   without a Firestore connection or without being signed in. */
.gc-input-error {
    animation: gcInputShake 220ms ease-in-out 0s 2;
    box-shadow: 0 0 0 1px rgba(244, 67, 54, 0.6) inset !important;
}
@keyframes gcInputShake {
    0%, 100% { transform: translateX(0); }
    25%      { transform: translateX(-3px); }
    75%      { transform: translateX(3px); }
}

/* typing row */
.gc-typing {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 6px 4px 8px;
    font-size: 12.5px;
    color: rgba(231, 233, 238, 0.45);
    font-style: italic;
}
.gc-typing-name { font-weight: 600; font-style: normal; }
.gc-typing-dots { display: inline-flex; gap: 3px; padding-top: 2px; }
.gc-typing-dots span {
    width: 5px; height: 5px; border-radius: 50%;
    background: rgba(231, 233, 238, 0.45);
    animation: gcTypingPulse 1.1s infinite ease-in-out;
}
.gc-typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.gc-typing-dots span:nth-child(3) { animation-delay: 0.30s; }

@keyframes gcTypingPulse {
    0%, 60%, 100% { opacity: 0.25; transform: translateY(0); }
    30%           { opacity: 1;    transform: translateY(-2px); }
}

/* ---------- composer ---------- */

.gc-composer {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px 10px 14px;
    background: transparent;
    border: none;
    margin: 0;
}

.gc-composer .gc-input {
    flex: 1 1 auto;
    min-width: 0;
    height: 40px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 20px;
    outline: none;
    color: #fff;
    font-size: 13.5px;
    padding: 0 16px;
    font-family: inherit;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.gc-composer .gc-input:focus {
    border-color: rgba(233, 30, 99, 0.40);
    background: rgba(255, 255, 255, 0.06);
}
.gc-composer .gc-input::placeholder { color: rgba(255, 255, 255, 0.28); }

.gc-composer .gc-send-btn {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #e91e63, #ad1457);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.1s ease, filter 0.15s ease;
    box-shadow: 0 3px 12px rgba(233, 30, 99, 0.25);
    padding: 0;
}
.gc-composer .gc-send-btn:hover  { filter: brightness(1.1); }
.gc-composer .gc-send-btn:active { transform: scale(0.92); }
.gc-composer .gc-send-btn svg    { transform: translateX(-1px); }

/* ---------- responsive ---------- */

/* Phones in the 360-420 range */
@media (max-width: 420px) {
    .gc-hub-scroll { padding: 6px 14px 32px 14px; gap: 14px; }
    .gc-hub-card { padding: 20px 18px 20px 18px; border-radius: 22px; gap: 16px; }
    .gc-hub-card__icon { width: 52px; height: 52px; border-radius: 16px; }
    .gc-hub-card__icon svg { width: 26px; height: 26px; }
    .gc-hub-card__title { font-size: 18px; }
    .gc-hub-card__desc { font-size: 13px; }
    .gc-hub-card__flags { font-size: 20px; letter-spacing: 5px; padding: 12px 8px; }
    .gc-mini-game { padding: 11px 12px; font-size: 12px; gap: 8px; }
    .gc-lounge-header { padding-left: 18px; padding-right: 18px; }
    .gc-lounge-name { font-size: 26px; }
}

/* Tight phones — Pixel 4a, iPhone SE, Galaxy S8 */
@media (max-width: 360px) {
    .gc-hub-scroll { padding: 4px 12px 30px 12px; gap: 12px; }
    .gc-hub-card { padding: 18px 16px 18px 16px; border-radius: 20px; gap: 14px; }
    .gc-hub-card__icon { width: 48px; height: 48px; border-radius: 14px; }
    .gc-hub-card__icon svg { width: 24px; height: 24px; }
    .gc-hub-card__title { font-size: 17px; }
    .gc-hub-card__desc { font-size: 12.5px; }
    .gc-hub-card__content { gap: 13px; }
    .gc-hub-card__rooms-preview span { font-size: 11.5px; padding: 7px 11px; }
    .gc-hub-card__flags { font-size: 18px; letter-spacing: 4px; padding: 11px 6px; }
    .gc-mini-game { padding: 10px 11px; font-size: 11.5px; }
    .gc-msg, .gc-msg-name { font-size: 13px; }
    .gc-msg-time { font-size: 10px; }
    .gc-header-name { font-size: 15px; }
    .gc-lounge-name { font-size: 24px; }
    .gc-lounge-sub { font-size: 12px; }
    .gc-room-icon { width: 44px; height: 44px; font-size: 21px; }
    .gc-room-card { padding: 13px 14px; gap: 12px; }
}

/* Reduced motion: keep the layout, kill the spring */
@media (prefers-reduced-motion: reduce) {
    .gc-hub-card,
    .gc-room-card,
    .gc-back,
    .gc-mini-game,
    .gc-composer .gc-send-btn {
        transition: none !important;
    }
    .gc-hub-card__live-dot,
    .gc-live-dot,
    .gc-live-dot-sm,
    .gc-room-online-dot {
        animation: none !important;
    }
    button.gc-hub-card:hover,
    .gc-room-card:hover,
    .gc-back:hover {
        transform: none !important;
    }
}
