.center-frame {
    width: 100%;
    border-radius: 6px;
    background: rgba(7, 8, 9, 0.55);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);

    padding: 14px 14px 12px 14px;

    display: flex;
    flex-direction: column;
    align-items: center;
}

.center-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 14px;
}

.center-title {
    text-align: center;
    font-size: 18px;
    font-weight: 800;
    margin-top: 2px;
    margin-bottom: 4px;
    color: var(--text);
}

.controls {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.side-waiting {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-secondary-alt);
    padding: 10px 0 6px;
    min-height: 22px;
    transition: opacity 0.15s ease;
}

.side-waiting.is-empty {
    visibility: hidden;
    opacity: 0;
}

.side-section {
    width: 100%;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.center-stack {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}


/* === Rail slots: distinct cards, no overlap, clear border === */
.rail-slot {
    height: 104px;
    border-radius: 6px;
    background: var(--accent);
    position: relative;
    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;

    box-shadow: var(--shadow);

    /* key: always show a clear border like the design */
    border: 1px solid rgba(255,255,255,0.08);
}

.rail-slot::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.55), rgba(0,0,0,0.15));
    pointer-events: none;
}

/* remove the extra shadow layers that make it look "stacked" */
.rail-slot.filled {
    background-size: cover;
    background-position: center;
}

.rail-slot.filled::before {
    background: linear-gradient(to top, rgba(0,0,0,0.6), rgba(0,0,0,0.18));
}

/* Remove the top-left tooltip entirely */
.rail-badge {
    display: none !important;
}

/* Stronger BANNED banner, plus red border highlight on the card */
.rail-slot.banned {
    border: 2px solid rgba(255,70,85,0.85);
}

.rail-slot.banned::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
            to top,
            rgba(255,70,85,0.55),
            rgba(255,70,85,0.12)
    );
    z-index: 3;
    pointer-events: none;
}

.rail-slot.stolen {
    border: 2px solid rgba(255, 70, 85, 0.9);
}

.rail-stolen {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 70, 85, 0.9);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    z-index: 4;
}

.rail-empty-label {
    position: relative;
    z-index: 2;

    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;

    color: rgba(255,255,255,0.28);
    text-align: center;
    padding: 0 10px;
}

/* Side banner (bigger + more prevalent like design) */
.rail-side {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 10px;

    padding: 8px 10px;
    border-radius: 4px;

    background: rgba(0,0,0,0.60);
    color: white;

    text-align: center;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    z-index: 4;
}

/* Map label inside the rail card (always visible) */
.rail-map-name {
    position: absolute;
    left: 10px;
    top: 10px;
    z-index: 4;

    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.95);

    padding: 4px 8px;
    border-radius: 4px;
    background: rgba(0,0,0,0.55);
    text-shadow: 0 2px 6px rgba(0,0,0,0.8);
}

.side-map-chip {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 8px;
    border-radius: 4px;
    background: rgba(0,0,0,0.6);
    color: rgba(255,255,255,0.95);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Team-colored outline when picked (like design) */
.rail-slot.picked-a {
    border: 2px solid rgba(0,149,255,0.75);
}
.rail-slot.picked-b {
    border: 2px solid rgba(0,255,149,0.75);
}

.draft-sequence {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* keep your existing current/next animations without changing them */
.team-a .current-phase {
    border: 2px solid var(--team-a);
    position: relative;
    animation: fadeBlink 1.5s infinite alternate;
}
.team-b .current-phase {
    border: 2px solid var(--team-b);
    position: relative;
    animation: fadeBlink 1.5s infinite alternate;
}

.next-phase {
    position: relative;
    border: 2px solid var(--team-both);
    opacity: 0.75;
}

@keyframes fadeBlink {
    0%   { opacity: 1; }
    100% { opacity: 0.4; }
}

/* Summary screen (matches screenshot layout; uses your tokens) */
.summary-screen {
    background: rgba(7, 8, 9, 0.55);
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 22px;
}

.summary-header {
    font-size: 28px;
    font-weight: 900;
    margin-bottom: 18px;
}

.summary-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.summary-row {
    display: grid;
    grid-template-columns: 140px 1fr 360px;
    gap: 18px;
    align-items: center;
    background: rgba(5, 6, 7, 0.55);
    border-radius: 10px;
    padding: 14px;
}

.summary-thumb {
    width: 140px;
    height: 78px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.summary-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.55), rgba(0,0,0,0.05));
}

.summary-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.summary-meta .map-tag {
    color: var(--primary);
    font-weight: 800;
}

.summary-meta .map-sub {
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 13px;
}

.summary-sides {
    display: flex;
    justify-content: flex-start;
}

.summary-side {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.summary-side .team {
    color: var(--text-secondary-alt);
    font-weight: 800;
    font-size: 13px;
}

.summary-side .row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.summary-side .icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}

.summary-side .icon img {
    width: 18px;
    height: 18px;
}

.summary-side .side {
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 0.06em;
}

/* keep confirm overlay behavior */
.game-confirmation-overlay.active {
    display: flex;
}

/* ---------------- Lobby UI (Create/Join + Invite) ---------------- */

.lobby-card {
    width: 420px;
    max-width: calc(100vw - 40px);
    background: var(--surface);
    border-radius: 10px;
    padding: 28px;
    box-shadow: var(--shadow);
}

.lobby-title h1 {
    font-size: 26px;
    font-weight: 800;
    margin: 0;
}

.lobby-title h2 {
    font-size: 22px;
    font-weight: 800;
    margin: 6px 0 0 0;
}

.lobby-subtitle {
    margin-top: 10px;
    color: rgba(255,255,255,0.75);
    font-weight: 700;
}

.lobby-tabs {
    margin-top: 18px;
    display: flex;
    gap: 2px;
    background: var(--accent);
    padding: 4px;
    border-radius: 8px;
}

.tab-btn {
    flex: 1;
    padding: 12px 10px;
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.55);
    font-weight: 800;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.tab-btn.active {
    background: var(--primary);
    color: #fff;
}

.tab-panel {
    display: none;
    margin-top: 18px;
}
.tab-panel.active {
    display: block;
}

.lobby-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lobby-input {
    padding: 14px;
    border-radius: 8px;
    border: none;
    background: var(--accent);
    color: var(--text);
    font-weight: 700;
    outline: none;
}

.lobby-input:focus {
    box-shadow: 0 0 0 2px rgba(0,149,255,0.55);
    background: rgba(17,21,24,0.9);
}

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

.lobby-check {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,0.7);
    font-weight: 700;
}

.lobby-btn {
    padding: 14px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: var(--accent);
    color: var(--text);
    transition: all 0.2s ease;
}

.lobby-btn.primary {
    background: var(--primary);
    color: var(--background);
}
.lobby-btn.primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.invite-panel {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.invite-header {
    font-size: 18px;
    font-weight: 900;
}

.invite-subtext {
    margin-top: 8px;
    color: rgba(255,255,255,0.65);
    font-weight: 700;
}

.invite-block {
    margin-top: 14px;
    background: rgba(17,21,24,0.6);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    padding: 12px;
}

.invite-label {
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.6);
}

.invite-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 8px;
}

.invite-value {
    font-weight: 900;
    color: rgba(255,255,255,0.92);
    letter-spacing: 0.08em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.invite-value.small {
    letter-spacing: 0.02em;
    font-weight: 800;
}

.invite-copy {
    padding: 10px 14px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    background: var(--accent);
    color: rgba(255,255,255,0.9);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.invite-copy:hover {
    background: rgba(7,8,9,0.95);
    transform: translateY(-1px);
}

.hidden { display: none !important; }

.toast-container{
    position: fixed;
    top: 18px;
    right: 18px;
    display:flex;
    flex-direction:column;
    gap:10px;
    z-index: 99999;
}
.toast{
    background: var(--surface);
    border-left: 4px solid var(--primary);
    color: var(--text);
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    font-weight: 700;
    max-width: 320px;
}
.toast.error{ border-left-color: var(--danger); }
