﻿
.lobby-shell {
    position: relative;
    z-index: 1;
}

.lobby-shell {
    width: min(1440px, 92vw);
    margin: 0 auto;
    padding: clamp(2rem, 4vw, 4.5rem) 0;
}

.lobby-hero {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 2rem;
    margin-bottom: 1.4rem;
}

.lobby-hero h1 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    color: #ffe8a0;
    font-size: clamp(2.5rem, 5vw, 5.2rem);
    line-height: 0.95;
    letter-spacing: -0.055em;
    background: linear-gradient(180deg, #fff2b8 0%, #e7bd61 48%, #9f6b24 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.lobby-hero p {
    max-width: 62ch;
    color: rgba(247, 234, 208, 0.65);
    font-size: 1rem;
    line-height: 1.6;
}

.lobby-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.lobby-card {
    border: 1px solid rgba(213, 166, 66, 0.24);
    border-radius: 24px;
    background: radial-gradient(circle at 20% 0%, rgba(213, 166, 66, 0.10), transparent 34%), linear-gradient(180deg, rgba(14, 12, 10, 0.88), rgba(5, 5, 6, 0.88));
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.46), inset 0 0 0 1px rgba(255, 232, 160, 0.04);
    padding: 1.15rem;
}

.card-heading {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 1rem;
    margin-bottom: 1rem;
}

    .card-heading h2,
    .games-header h2 {
        margin: 0;
        color: #ffe8a0;
        font-family: Georgia, "Times New Roman", serif;
        font-size: 1.4rem;
    }

    .card-heading p,
    .games-header p {
        margin: 0.28rem 0 0;
        color: rgba(247, 234, 208, 0.55);
        font-size: 0.9rem;
        line-height: 1.45;
    }

.card-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 50%;
    border: 1px solid rgba(213, 166, 66, 0.38);
    color: #ffe8a0;
    background: rgba(213, 166, 66, 0.08);
    box-shadow: 0 0 18px rgba(213, 166, 66, 0.16);
}

.form-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.9fr);
    gap: 0.85rem;
}

.form-group {
    display: grid;
    gap: 0.42rem;
    margin-bottom: 0.9rem;
}

    .form-group label {
        color: rgba(247, 234, 208, 0.60);
        font-size: 0.72rem;
        font-weight: 900;
        letter-spacing: 0.12em;
        text-transform: uppercase;
    }

    .form-group select,
    .form-group input {
        height: 42px;
        border-radius: 12px;
        border: 1px solid rgba(213, 166, 66, 0.22);
        background: rgba(5, 5, 7, 0.64);
        color: #f7ead0;
        padding: 0 0.75rem;
        outline: none;
    }

        .form-group select:focus,
        .form-group input:focus {
            border-color: rgba(255, 232, 160, 0.56);
            box-shadow: 0 0 0 3px rgba(213, 166, 66, 0.10);
        }

.segmented-control,
.toggle-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem;
    border: 1px solid rgba(213, 166, 66, 0.32);
    border-radius: 999px;
    background: rgba(8, 8, 10, 0.72);
    box-shadow: inset 0 0 0 1px rgba(255, 232, 160, 0.06), 0 12px 28px rgba(0, 0, 0, 0.28);
    width: fit-content;
}

.segmented-control--guided {
    color: rgba(247, 234, 208, 0.6);
    font-family: 'Cinzel', serif;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: background 160ms, color 160ms;
}

.toggle-pill--on {
    background: #d5a642; /* gold when active — matches your 3D/selected pills */
    color: #2a1e08;
}

.toggle-pill i {
    font-size: 0.85rem;
}

    .segmented-control__button,
    .toggle-pill button,
    .games-tab {
        border: 0;
        border-radius: 999px;
        padding: 0.52rem 0.86rem;
        background: transparent;
        color: rgba(247, 234, 208, 0.70);
        cursor: pointer;
        font-weight: 900;
        font-size: 0.76rem;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        transition: all 140ms ease;
    }

        .segmented-control__button:hover,
        .toggle-pill button:hover,
        .games-tab:hover {
            color: #ffe8a0;
            background: rgba(213, 166, 66, 0.12);
        }

        .segmented-control__button--active,
        .toggle-pill button.active,
        .games-tab.games-tab--active:focus,
        .games-tab.games-tab--active {
            color: #130e08;
            background: radial-gradient(circle at 40% 0%, rgba(255, 255, 255, 0.55), transparent 42%), linear-gradient(135deg, #ffe8a0 0%, #d6a745 45%, #8f5f1d 100%);
            box-shadow: 0 0 14px rgba(213, 166, 66, 0.36);
        }

.toggle-pill--three button {
    padding-inline: 0.7rem;
}

.primary-action,
.secondary-action {
    width: 100%;
    min-height: 48px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 950;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    transition: all 150ms ease;
}

.primary-action {
    color: #130e08;
    background: radial-gradient(circle at 40% 0%, rgba(255, 255, 255, 0.58), transparent 42%), linear-gradient(135deg, #ffe8a0 0%, #d6a745 45%, #8f5f1d 100%);
    box-shadow: 0 0 26px rgba(213, 166, 66, 0.34);
}

.secondary-action {
    color: #ffe8a0;
    border: 1px solid rgba(213, 166, 66, 0.48);
    background: rgba(5, 5, 6, 0.45);
}

    .primary-action:hover,
    .secondary-action:hover {
        transform: translateY(-1px);
        box-shadow: 0 0 34px rgba(213, 166, 66, 0.32);
    }

.games-card {
    padding: 0;
    overflow: hidden;
}

.games-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 1rem;
    padding: 1.15rem;
    border-bottom: 1px solid rgba(213, 166, 66, 0.16);
}

.games-tabs {
    display: inline-flex;
    padding: 0.35rem;
    border: 1px solid rgba(213, 166, 66, 0.32);
    border-radius: 999px;
    background: rgba(8, 8, 10, 0.72);
}

.filters-panel {
    display: grid;
    grid-template-columns: minmax(0, 0.6fr) minmax(0, 0.4fr) minmax(0, 0.6fr) repeat(3, minmax(0, 0.25fr));
    gap: 0.85rem;
    padding: 1rem 1.15rem 0.35rem;
}

.form-group {
    min-width: 0;
}

    .form-group input:not([type="checkbox"]),
    .form-group select {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }
.multi-select__option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    flex: 0 0 18px;
    margin: 0;
    cursor: pointer;
}

.multi-select {
    position: relative;
    width: 100%;
}

.multi-select__summary {
    box-sizing: border-box;
    min-height: 44px;
    width: 100%;
    padding: 5px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: #090806;
    border: 1px solid #3b2d0c;
    border-radius: 14px;
    cursor: pointer;
    list-style: none;
}

    .multi-select__summary::-webkit-details-marker {
        display: none;
    }

.multi-select__pills {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
}

.multi-select__pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    background: #3a3428;
    border: 1px solid #64583f;
    font-size: 0.85rem;
    line-height: 1.2;
    white-space: nowrap;
}

.multi-select__summary > i {
    flex-shrink: 0;
    transition: transform 0.15s ease;
}

.multi-select[open] .multi-select__summary > i {
    transform: rotate(180deg);
}

.multi-select__menu {
    position: absolute;
    z-index: 100;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    padding: 5px;
    background: #100e09;
    border: 1px solid #3b2d0c;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.multi-select__option {
    display: flex;
    min-height: 44px;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border-radius: 7px;
    cursor: pointer;
}

    .multi-select__option:hover {
        background: rgba(255, 255, 255, 0.07);
    }

    .multi-select__option input {
        margin: 0;
        cursor: pointer;
    }

@media (max-width: 768px) {
    .multi-select__menu {
        left: 0;
        right: 0;
        width: 100%;
        max-height: 260px;
        overflow-y: auto;
    }

    .multi-select__pills {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
    }

        .multi-select__pills::-webkit-scrollbar {
            display: none;
        }
}

.games-table-wrap {
    overflow-x: auto;
}

.games-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}

    .games-table th {
        text-align: left;
        padding: 0.8rem 1rem;
        color: rgba(255, 232, 160, 0.78);
        font-size: 0.72rem;
        font-weight: 950;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        border-bottom: 1px solid rgba(213, 166, 66, 0.24);
    }

    .games-table td {
        padding: 0.82rem 1rem;
        color: rgba(247, 234, 208, 0.72);
        border-bottom: 1px solid rgba(213, 166, 66, 0.12);
    }

    .games-table tbody tr {
        background: rgba(5, 5, 7, 0.18);
    }

        .games-table tbody tr:hover {
            background: rgba(213, 166, 66, 0.07);
        }

.variant-badge,
.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 0.22rem 0.58rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 950;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.variant-badge {
    border: 1px solid rgba(213, 166, 66, 0.28);
    background: rgba(213, 166, 66, 0.08);
    color: #ffe8a0;
}

/* STANDARD — classic restrained gold */
.variant-badge--standard {
    border-color: rgba(213, 166, 66, 0.38);
    background: rgba(213, 166, 66, 0.08);
    color: #f3d77f;
}

/* BLINDSIDE — luminous / mysterious gold */
.variant-badge--blindside {
    border-color: rgba(255, 199, 74, 0.62);
    background: rgba(213, 166, 66, 0.14);
    color: #fff0ad;
    box-shadow: 0 0 5px rgba(213, 166, 66, 0.55), 0 0 14px rgba(213, 166, 66, 0.32);
}

/* SHADOW — cool violet / hidden-information feel */
.variant-badge--shadow {
    border-color: rgba(142, 113, 211, 0.52);
    background: rgba(95, 68, 160, 0.16);
    color: #d8c6ff;
    box-shadow: inset 0 0 8px rgba(111, 76, 180, 0.12), 0 0 8px rgba(111, 76, 180, 0.16);
}

/* ESCALATION — aggressive ember/red */
.variant-badge--escalation {
    border-color: rgba(223, 99, 61, 0.52);
    background: rgba(177, 57, 32, 0.14);
    color: #ffb19b;
    box-shadow: inset 0 0 8px rgba(207, 65, 37, 0.10), 0 0 8px rgba(207, 65, 37, 0.14);
}

/* CHESS960 — cool technical / alternative ruleset */
.variant-badge--chess960 {
    border-color: rgba(69, 180, 184, 0.48);
    background: rgba(35, 133, 139, 0.13);
    color: #9cebed;
    box-shadow: inset 0 0 8px rgba(54, 163, 168, 0.08);
}

.status-pill--waiting {
    border: 1px solid rgba(65, 255, 180, 0.28);
    background: rgba(65, 255, 180, 0.08);
    color: rgba(146, 255, 213, 0.92);
}

.status-pill--live {
    border: 1px solid rgba(255, 105, 105, 0.30);
    background: rgba(255, 105, 105, 0.08);
    color: rgba(255, 178, 178, 0.96);
}

.row-action-cell {
    text-align: right;
}

.row-action {
    border: 1px solid rgba(213, 166, 66, 0.45);
    border-radius: 999px;
    padding: 0.45rem 0.85rem;
    cursor: pointer;
    color: #ffe8a0;
    background: rgba(5, 5, 6, 0.45);
    font-size: 0.72rem;
    font-weight: 950;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

    .row-action:hover {
        background: rgba(213, 166, 66, 0.16);
        box-shadow: 0 0 18px rgba(213, 166, 66, 0.22);
    }

.row-action--join {
    color: #130e08;
    background: radial-gradient(circle at 40% 0%, rgba(255, 255, 255, 0.45), transparent 42%), linear-gradient(135deg, #ffe8a0 0%, #d6a745 55%, #8f5f1d 100%);
}

.empty-state {
    text-align: center;
    color: rgba(247, 234, 208, 0.48) !important;
    padding: 2rem !important;
}

@keyframes lobbyFogDrift {
    0% {
        transform: translate3d(-6%, -3%, 0) scale(1.05);
    }

    100% {
        transform: translate3d(6%, 3%, 0) scale(1.05);
    }
}

@media (max-width: 1100px) {
    .lobby-actions-grid,
    .filters-panel {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .lobby-hero {
        align-items: start;
    }
}

@media (max-width: 700px) {
    .lobby-nav {
        height: auto;
        padding: 1rem 5vw;
        gap: 1rem;
        align-items: flex-start;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 0.75rem;
    }

        .nav-links a {
            font-size: 0.74rem;
        }

    .lobby-hero h1 {
        font-size: 2.7rem;
    }

    .segmented-control,
    .toggle-pill {
        flex-wrap: wrap;
        border-radius: 18px;
    }
}

@media (max-width: 480px) {

    /* ── Shell: tighter padding ── */
    .lobby-shell {
        width: 96vw;
        padding: 1rem 0;
    }

    /* ── Hero: stack vertically ── */
    .lobby-hero {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        margin-bottom: 1rem;
    }

        .lobby-hero h1 {
            font-size: 1.8rem;
            letter-spacing: -0.03em;
        }

        .lobby-hero p {
            font-size: 0.82rem;
            line-height: 1.5;
        }

    /* ── Action cards: single column ── */
    .lobby-actions-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-bottom: 1.2rem;
    }

    .lobby-card {
        border-radius: 16px;
        padding: 0.85rem;
    }

    /* ── Card headings ── */
    .card-heading h2,
    .games-header h2 {
        font-size: 1rem;
    }

    .card-heading p,
    .games-header p {
        font-size: 0.75rem;
    }

    .card-icon {
        width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }

    /* ── Form elements: stack ── */
    .form-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .form-group {
        margin-bottom: 0.6rem;
    }

        .form-group label {
            font-size: 0.6rem;
        }

        .form-group select,
        .form-group input {
            height: 38px;
            border-radius: 10px;
            font-size: 0.82rem;
        }

    /* ── Buttons: full width, compact ── */
    .primary-action,
    .secondary-action {
        min-height: 42px;
        font-size: 0.7rem;
        letter-spacing: 0.08em;
    }

    /* ── Segmented controls: compact ── */
    .segmented-control,
    .toggle-pill {
        padding: 0.25rem;
        border-radius: 14px;
    }

        .segmented-control__button,
        .toggle-pill button,
        .games-tab {
            padding: 0.4rem 0.6rem;
            font-size: 0.6rem;
            letter-spacing: 0.06em;
        }

    .toggle-pill--three button {
        padding-inline: 0.5rem;
    }

    /* ── Games card ── */
    .games-header {
        flex-direction: column;
        gap: 0.6rem;
        padding: 0.85rem;
    }

    .games-tabs {
        width: 100%;
        justify-content: center;
    }

    /* ── Filters: single column ── */
    .filters-panel {
        grid-template-columns: 1fr;
        gap: 0.6rem;
        padding: 0.75rem 0.85rem 0.25rem;
    }

    /* ── Games table: card layout for mobile ── */
    .games-table {
        min-width: unset;
    }

        .games-table thead {
            display: none;
        }

        .games-table tbody tr {
            display: flex;
            flex-wrap: wrap;
            gap: 0.35rem 0.75rem;
            align-items: center;
            padding: 0.75rem 0.85rem;
            border-bottom: 1px solid rgba(213, 166, 66, 0.1);
        }

        .games-table td {
            padding: 0;
            border-bottom: none;
            font-size: 0.78rem;
        }

            .games-table td:empty {
                display: none;
            }

    .row-action-cell {
        text-align: left;
        width: 100%;
        margin-top: 0.35rem;
    }

    .row-action {
        width: 100%;
        display: block;
        text-align: center;
        padding: 0.5rem;
        font-size: 0.65rem;
    }

    /* ── Badges: slightly smaller ── */
    .variant-badge,
    .status-pill {
        min-height: 22px;
        padding: 0.15rem 0.45rem;
        font-size: 0.58rem;
    }

    /* ── Empty state ── */
    .empty-state {
        padding: 1.2rem !important;
        font-size: 0.8rem;
    }

    .brand__mark {
        width: 32px !important;
        height: 32px !important;
        font-size: 1rem !important;
    }

    .brand__name {
        font-size: 0.8rem !important;
    }

    .brand__tagline {
        display: none !important;
    }

    .nav-links a {
        font-size: 0.65rem !important;
        letter-spacing: 0.04em !important;
    }

    .mobile-lobby-setup {
        width: 100%;
    }

    .mobile-game-setup-card {
        display: flex;
        flex-direction: column;
        gap: 1.1rem;
    }

        .mobile-game-setup-card .form-group {
            width: 100%;
        }

        .mobile-game-setup-card .segmented-control,
        .mobile-game-setup-card .toggle-pill,
        .mobile-game-setup-card select {
            width: 100%;
        }

    .mobile-opponent-toggle {
        max-width: 18rem;
    }

    .mobile-ai-difficulty {
        width: 100%;
    }

    .mobile-game-setup-card .primary-action,
    .mobile-game-setup-card .secondary-action {
        width: 100%;
        margin-top: 0.25rem;
    }

    .lobby-tabs {
        display: flex;
        gap: 0.3rem;
        padding: 0.3rem;
        margin-bottom: 1rem;
        border-radius: 14px;
        background: rgba(10, 9, 8, 0.6);
        border: 1px solid rgba(213, 166, 66, 0.2);
    }

        .lobby-tabs button {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.4rem;
            padding: 0.6rem 0.5rem;
            border: none;
            border-radius: 11px;
            background: transparent;
            color: rgba(247, 234, 208, 0.6);
            font-size: 0.72rem;
            font-weight: 700;
            letter-spacing: 0.06em;
            text-transform: uppercase;
            cursor: pointer;
            transition: background 160ms ease, color 160ms ease;
        }

            .lobby-tabs button.active {
                background: linear-gradient(180deg, #ffe8a0 0%, #d6a745 55%, #b9892f 100%);
                color: #2a1d08;
                box-shadow: 0 0 12px rgba(213, 166, 66, 0.25);
            }

    .lobby-tab__icon {
        font-size: 0.9rem;
        line-height: 1;
    }
}

.modifier-toggles {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.modifier-chip {
    padding: 6px 12px;
    background: transparent;
    border: 1px solid #4a3d1c;
    border-radius: 999px;
    color: #cbb98a;
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.16s ease;
}

    .modifier-chip:hover:not(:disabled) {
        border-color: #d4a94a;
        color: #f0c95f;
    }

.modifier-chip--on {
    background: rgba(240,201,95,0.16);
    border-color: #f0c95f;
    color: #f0c95f;
    font-weight: 700;
}

.modifier-chip--disabled {
    opacity: 0.32;
    cursor: not-allowed;
}

.form-row.three-equal-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.game-summary {
    text-align: center;
    margin: 4px 0 10px;
    padding: 0 8px;
    font-family: Georgia, serif;
    font-size: 12.5px;
    letter-spacing: 0.03em;
    color: #b8985a; /* muted gold — secondary, not a heading */
    line-height: 1.4;
}

/* Emphasize the modifiers portion slightly, if you split them into a span */
.game-summary__modifiers {
    color: #d4a94a; /* a touch brighter so "+ Decay" reads as active */
}

/* The separator dots between segments */
.game-summary__sep {
    color: #6a5a30; /* dimmer than the text — quiet punctuation */
    margin: 0 6px;
}