/* ============================================================
   ELIMINATION.CSS - Elimination Mode Styles
   Matches multiplayer.css structure with red/orange color scheme
   ============================================================ */

/* ============================================================
   ELIMINATION HUB PAGE
   ============================================================ */
#elimination-hub-page {
    flex: 1 0 auto;
    width: 100%;
    min-height: calc(100vh - var(--header-h));
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(180deg, #c94a4a 0%, #ffffff 60%);
    text-align: center;
    padding: 20px;
    padding-top: calc(-14px + var(--header-h, 52px));
    padding-bottom: 40px;
    box-sizing: border-box;
    transition: opacity 0.8s ease-in-out;
}

#elimination-hub-page .hub-title {
    margin: 0;
}

body.dark-mode #elimination-hub-page {
    background: linear-gradient(180deg, #5c1a1a 0%, #1e293b 60%);
}

/* Card borders handled by .elim-variant-card in lexilayers.css */

/* ============================================================
   ELIMINATION MODE SELECTION CARDS
   ============================================================ */
.elim-mode-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px 20px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    min-height: 280px;
    position: relative;
}

.elim-mode-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.elim-mode-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.elim-mode-details {
    font-size: 0.9rem;
    color: #a0b0c0;
    margin: 12px 0 8px;
}

.elim-player-counts {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 16px;
    font-weight: 500;
}

.elim-mode-play-btn {
    width: 100%;
    margin-top: auto;
}

/* Test mode card smaller styling */
.elim-test-card {
    opacity: 0.8;
}

/* ============================================================
   ELIMINATION LOBBY
   ============================================================ */
#elim-lobby {
    flex: 1 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    background: linear-gradient(180deg, #c94a4a 0%, #ffffff 60%);
    min-height: calc(100vh - var(--header-h));
    padding: 20px;
    padding-top: calc(-14px + var(--header-h, 52px));
    box-sizing: border-box;
    text-align: center;
}

body.dark-mode #elim-lobby {
    background: linear-gradient(180deg, #5c1a1a 0%, #1e293b 60%);
}

/* ============================================================
   ELIMINATION HUB WRAPPER
   ============================================================ */
.elim-hub {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ============================================================
   ELIMINATION HEADER BAR
   ============================================================ */
.elim-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #fde0e0, #f8b4b4);
    border-radius: 16px;
    border: 2px solid #e57373;
    box-shadow: 0 4px 12px rgba(229, 115, 115, 0.2);
}

.elim-header-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.elim-title-icon {
    font-size: 1.8rem;
}

.elim-title-text {
    font-size: 1.6rem;
    font-weight: 700;
    color: #c62828;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.elim-coin-balance-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 8px 16px;
}

.elim-coin-amount {
    font-size: 2.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #f9a825, #e65100);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.elim-coin-icon-large {
    width: 48px;
    height: 48px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

body.dark-mode .elim-header-bar {
    background: linear-gradient(135deg, #5c1a1a, #7a2929) !important;
    border-color: #ef5350 !important;
}

body.dark-mode .elim-title-text {
    color: #ef9a9a !important;
}

body.dark-mode .elim-coin-amount {
    background: linear-gradient(135deg, #ffd54f, #ffab40) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

/* ============================================================
   MODE PILLS (inside games header)
   Uses standard .pill classes from lexilayers.css
   ============================================================ */
.elim-lobby-mode-pills {
    margin-bottom: 8px;
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 6px;
}

/* Override the default 2-column grid for pill-wrap - show in single row */
.elim-lobby-mode-pills .pill-wrap {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 4px;
    grid-template-columns: none;
    margin-bottom: 0;
}

/* Style pills smaller in the games header */
.elim-lobby-mode-pills .pill {
    font-size: 0.7rem;
    padding: 3px 8px;
}

/* ============================================================
   ELIMINATION LOBBY LAYOUT (3-column)
   ============================================================ */
.elim-lobby-layout {
    display: grid;
    grid-template-columns: .9fr 1.1fr 220px;
    gap: 16px;
    width: 100%;
    align-items: stretch;
    position: relative;
}

/* ============================================================
   GAMES SECTION
   ============================================================ */
.elim-lobby-games {
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, rgba(201, 74, 74, 0.25), rgba(239, 154, 154, 0.2));
    backdrop-filter: blur(5px);
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(201, 74, 74, 0.5);
    overflow: hidden;
}

.elim-lobby-games-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-bottom: 2px solid #e57373;
    margin-bottom: 10px;
}

.elim-lobby-games-header h3 {
    margin: 0;
    font-size: 1.1rem;
    text-align: center;
    color: var(--ink);
    padding-bottom: 8px;
}

.elim-lobby-games-note {
    font-size: 0.7rem;
    color: var(--text-secondary, #888);
    text-align: center;
    margin: 0;
    font-style: italic;
}

body.dark-mode .elim-lobby-games-note {
    color: #e8b4b4;
}

.elim-lobby-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
}

body.dark-mode .elim-lobby-games {
    background: linear-gradient(135deg, rgba(201, 74, 74, 0.15), rgba(239, 154, 154, 0.1)) !important;
    border-color: rgba(239, 154, 154, 0.4) !important;
}

body.dark-mode .elim-lobby-games h3 {
    color: #ffffff !important;
}

body.dark-mode .elim-lobby-games-header {
    border-color: rgba(239, 154, 154, 0.4) !important;
}

/* ============================================================
   PLAYER COUNT GROUPS
   ============================================================ */
.elim-player-count-group {
    margin-bottom: 8px;
}

.elim-player-count-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    background: linear-gradient(135deg, rgba(201, 74, 74, 0.3), rgba(239, 154, 154, 0.2));
    border-radius: 8px;
    margin-bottom: 6px;
    border-left: 3px solid #c94a4a;
}

.elim-count-badge {
    font-size: 0.85rem;
    font-weight: 700;
    color: #c94a4a;
}

.elim-count-info {
    font-size: 0.75rem;
    color: #888;
}

.elim-group-games {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

body.dark-mode .elim-player-count-header {
    background: linear-gradient(135deg, rgba(201, 74, 74, 0.25), rgba(239, 154, 154, 0.15)) !important;
    border-left-color: #ef5350 !important;
}

body.dark-mode .elim-count-badge {
    color: #ef9a9a !important;
}

/* ============================================================
   GAME CARDS (Compact Style)
   ============================================================ */
.elim-card.compact {
    background: #f5c4c4;
    border-radius: 10px;
    padding: 8px 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid #e57373;
}

.elim-card.compact:hover {
    background: #efaaaa;
    border-color: #c94a4a;
    box-shadow: 0 4px 12px rgba(201, 74, 74, 0.3);
}

.elim-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.elim-card-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.elim-card-room-count {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--ink);
}

.elim-room-status {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
    background: #e8f5e9;
    color: #2e7d32;
}

.elim-room-status.countdown {
    background: #fff3e0;
    color: #e65100;
    animation: pulse-status 1s ease-in-out infinite;
}

.elim-room-status.playing {
    background: #e3f2fd;
    color: #1565c0;
}

.elim-room-status.finished {
    background: #f3e5f5;
    color: #7b1fa2;
}

@keyframes pulse-status {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.elim-card-body {
    display: flex;
    align-items: center;
    gap: 12px;
}

.elim-card-players {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    min-height: 24px;
}

.elim-card-player {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    font-size: 0.75rem;
}

.elim-card-player-avatar {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    overflow: hidden;
    background: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
}

.elim-card-player-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.elim-card-player-avatar-placeholder {
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #c94a4a, #a33a3a);
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.elim-card-player-name {
    font-weight: 600;
    color: var(--ink);
}

.elim-card-player-rating {
    color: #888;
    font-size: 0.7rem;
}

.elim-card-player-tier-icon {
    display: inline-flex;
    align-items: center;
}

.elim-card-player-tier-icon svg {
    width: 12px;
    height: 12px;
}

.elim-no-players {
    font-size: 0.75rem;
    color: #999;
    font-style: italic;
}

.elim-join-btn {
    padding: 6px 14px;
    background: linear-gradient(135deg, #40c455 0%, #2e9a3d 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.elim-join-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(64, 196, 85, 0.4);
}

.elim-join-btn:disabled {
    background: #bbb;
    cursor: not-allowed;
}

/* Dark mode cards */
body.dark-mode .elim-card.compact {
    background: linear-gradient(135deg, #5c1a1a 0%, #7a2929 100%) !important;
    border-color: rgba(239, 154, 154, 0.4) !important;
}

body.dark-mode .elim-card.compact:hover {
    background: linear-gradient(135deg, #6b2020 0%, #8a3030 100%) !important;
    border-color: #ef5350 !important;
}

body.dark-mode .elim-card-room-count {
    color: #ffffff !important;
}

body.dark-mode .elim-card-player {
    background: rgba(255, 255, 255, 0.1) !important;
}

body.dark-mode .elim-card-player-name {
    color: #fff !important;
}

/* ============================================================
   EXPANDABLE GAME CARDS (Like Party Mode)
   ============================================================ */
.elim-card-compact {
    background: #f5c4c4;
    border-radius: 10px;
    padding: 4px 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid #e57373;
}

.elim-card-compact:hover {
    background: #efaaaa;
    border-color: #c94a4a;
    box-shadow: 0 4px 12px rgba(201, 74, 74, 0.3);
}

.elim-card-compact.expanded {
    background: #efaaaa;
    border-color: #c94a4a;
}

.elim-card-compact-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.elim-card-compact-info {
    flex: 1;
    display: flex;
    align-items: center;
}

.elim-card-compact-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.elim-card-compact-players {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--ink);
}

.elim-card-compact-join {
    padding: 6px 14px;
    background: linear-gradient(135deg, #40c455 0%, #2e9a3d 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.elim-card-compact-join:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(64, 196, 85, 0.4);
}

.elim-card-compact-join:disabled {
    background: #bbb;
    cursor: not-allowed;
}

/* Details section - hidden by default, shown on expand */
.elim-card-compact-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.elim-card-compact.expanded .elim-card-compact-details {
    max-height: 200px;
    padding-top: 12px;
    margin-top: 12px;
    border-top: 1px dashed rgba(201, 74, 74, 0.3);
}

.elim-card-compact-player-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Dark mode for expandable cards */
body.dark-mode .elim-card-compact {
    background: linear-gradient(135deg, #5c1a1a 0%, #7a2929 100%) !important;
    border-color: rgba(239, 154, 154, 0.4) !important;
}

body.dark-mode .elim-card-compact:hover,
body.dark-mode .elim-card-compact.expanded {
    background: linear-gradient(135deg, #6b2020 0%, #8a3030 100%) !important;
    border-color: #ef5350 !important;
}

body.dark-mode .elim-card-compact-players {
    color: #ffffff !important;
}

body.dark-mode .elim-card-compact-details {
    border-color: rgba(239, 154, 154, 0.3) !important;
}

/* ============================================================
   CHAT AND STATS COLUMN
   ============================================================ */
.elim-lobby-chat-stats-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

/* ============================================================
   LOBBY CHAT SECTION
   ============================================================ */
.elim-lobby-chat {
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, rgba(239, 154, 154, 0.2), rgba(229, 115, 115, 0.15));
    backdrop-filter: blur(5px);
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(229, 115, 115, 0.4);
    height: 320px;
}

.elim-lobby-chat h3 {
    margin: 0 0 10px;
    font-size: 1.1rem;
    text-align: center;
    color: var(--ink);
    border-bottom: 2px solid #e57373;
    padding-bottom: 10px;
}

body.dark-mode .elim-lobby-chat {
    background: linear-gradient(135deg, rgba(239, 154, 154, 0.12), rgba(229, 115, 115, 0.08)) !important;
    border-color: rgba(239, 154, 154, 0.3) !important;
}

body.dark-mode .elim-lobby-chat h3 {
    color: #ffffff !important;
    border-color: rgba(239, 154, 154, 0.3) !important;
}

.elim-lobby-chat-container {
    display: flex;
    gap: 12px;
    flex: 1;
    min-height: 0;
}

.elim-lobby-chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.elim-lobby-chat-messages {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 8px;
    background: #d97a7ae0;
    border-radius: 8px;
    margin-bottom: 12px;
}

.elim-lobby-chat-msg {
    padding: 0;
    background: none;
    text-align: left;
    font-size: 0.8rem;
}

.elim-lobby-chat-user {
    font-weight: 600;
}

.elim-lobby-chat-system {
    font-style: italic;
}

.elim-lobby-chat-input-wrap {
    display: flex;
    max-width: 85%;
}

.elim-lobby-chat-input-wrap input {
    flex: 1;
    padding: 4px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.elim-lobby-chat-input-wrap input:focus {
    outline: none;
    border-color: #c94a4a;
}


/* Player sidebar */
.elim-lobby-chat-players {
    width: 120px;
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(239, 154, 154, 0.2);
    overflow: hidden;
}

.elim-lobby-chat-players-header {
    padding: 2px;
    font-size: 0.75rem;
    font-weight: 700;
    text-align: center;
    color: #36ff88;
    background: rgba(239, 154, 154, 0.15);
    border-bottom: 1px solid rgba(239, 154, 154, 0.2);
}

.elim-lobby-chat-players-list {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
}

.elim-lobby-chat-player {
    font-size: 0.8rem;
    padding: 2px 6px;
    background: none;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 4px;
}

.elim-lobby-chat-player .player-status-dot {
    font-size: 0.5rem;
    line-height: 1;
}

/* Fade players who are currently in a game */
.elim-lobby-chat-player.in-game {
    opacity: 0.5;
}

.elim-lobby-chat-no-players {
    font-size: 0.75rem;
    color: #999;
    padding: 8px;
    text-align: center;
}

/* Empty chat placeholder */
.lobby-chat-empty {
    text-align: center;
    color: #e9e1e1;
    font-size: 0.9rem;
    padding: 40px 20px;
}

/* Dark mode chat */
body.dark-mode .elim-lobby-chat-messages {
    background: none;
}

body.dark-mode .elim-lobby-chat-input-wrap input {
    background: linear-gradient(135deg, #5c1a1a 0%, #7a2929 100%);
    border-color: rgba(239, 154, 154, 0.4);
    color: #ffffff;
}

body.dark-mode .elim-lobby-chat-input-wrap input::placeholder {
    color: #e8b4b4;
}

body.dark-mode .elim-lobby-chat-players {
    background: rgba(201, 74, 74, 0.1);
    border-color: rgba(239, 154, 154, 0.2);
}

body.dark-mode .elim-lobby-chat-players-header {
    color: #66bb6a;
    background: rgba(239, 154, 154, 0.2);
    border-color: rgba(239, 154, 154, 0.2);
}

body.dark-mode .elim-lobby-chat-player {
    background: none;
    color: #e0e0e0;
}

/* ============================================================
   YOUR STATS SECTION
   ============================================================ */
.elim-lobby-stats {
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, rgba(201, 74, 74, 0.12), rgba(229, 115, 115, 0.08));
    backdrop-filter: blur(5px);
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(201, 74, 74, 0.3);
    min-height: 210px;
}

.elim-lobby-stats h3 {
    margin: 0 0 12px;
    font-size: 1.1rem;
    text-align: center;
    color: var(--ink);
    border-bottom: 2px solid #e57373;
    padding-bottom: 10px;
}

body.dark-mode .elim-lobby-stats {
    background: linear-gradient(135deg, rgba(201, 74, 74, 0.15), rgba(229, 115, 115, 0.1)) !important;
    border-color: rgba(239, 154, 154, 0.3) !important;
}

body.dark-mode .elim-lobby-stats h3 {
    color: #ffffff !important;
    border-color: rgba(239, 154, 154, 0.4) !important;
}

.elim-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.elim-stat-box {
    background: linear-gradient(180deg, #fafafa 0%, #e9edf3 100%);
    border-radius: 8px;
    padding: 10px 6px;
    text-align: center;
    border: 1px solid #d0d5dd;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

body.dark-mode .elim-stat-box {
    background: linear-gradient(180deg, #5c1a1a 0%, #7a2929 100%);
    border-color: rgba(239, 154, 154, 0.3);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.elim-stat-box .stat-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.elim-stat-box .stat-label {
    font-size: 0.6rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 2px;
}

.elim-stat-box .tier-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.elim-lobby-stats-note {
    font-size: 0.65rem;
    color: var(--text-secondary, #888);
    text-align: center;
    margin: 20px 0 0;
    font-style: italic;
}

body.dark-mode .elim-lobby-stats-note {
    color: #e8b4b4;
}

/* ============================================================
   LEADERBOARD SECTION
   ============================================================ */
.elim-lobby-leaderboard {
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, rgba(201, 74, 74, 0.15), rgba(239, 154, 154, 0.2));
    backdrop-filter: blur(5px);
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(201, 74, 74, 0.4);
    overflow: hidden;
}

.elim-lobby-leaderboard h3 {
    margin: 0 0 12px;
    font-size: 1.1rem;
    text-align: center;
    color: var(--ink);
    border-bottom: 2px solid #e57373;
    padding-bottom: 10px;
}

body.dark-mode .elim-lobby-leaderboard {
    background: linear-gradient(135deg, rgba(201, 74, 74, 0.15), rgba(239, 154, 154, 0.1)) !important;
    border-color: rgba(239, 154, 154, 0.4) !important;
}

body.dark-mode .elim-lobby-leaderboard h3 {
    color: #ffffff !important;
    border-color: rgba(239, 154, 154, 0.4) !important;
}

/* Leaderboard player items */
.elim-lb-player {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s ease;
}

.elim-lb-player:hover {
    background: #f9f9f9;
}

.elim-lb-player:last-child {
    border-bottom: none;
}

.elim-lb-rank {
    font-size: 0.9rem;
    font-weight: 700;
    color: #666;
    min-width: 20px;
    text-align: center;
}

.elim-lb-avatar {
    width: 26px;
    height: 26px;
    border-radius: 12%;
    overflow: hidden;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

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

.elim-lb-avatar-placeholder {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #c94a4a, #a33a3a);
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.elim-lb-info {
    flex: 1;
    min-width: 0;
}

.elim-lb-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.elim-lb-stats {
    font-size: 0.75rem;
    color: #888;
    margin-top: 2px;
}

.elim-lb-stats svg {
    width: 11px;
    height: 11px;
    display: inline-block;
    vertical-align: middle;
}

body.dark-mode .elim-lb-player {
    border-color: rgba(239, 154, 154, 0.2);
}

body.dark-mode .elim-lb-player:hover {
    background: rgba(239, 154, 154, 0.1);
}

body.dark-mode .elim-lb-rank {
    color: #e8b4b4;
}

body.dark-mode .elim-lb-name {
    color: #ffffff;
}

body.dark-mode .elim-lb-stats {
    color: #e8b4b4;
}

/* Empty states */
.elim-empty-state,
.elim-loading-state {
    text-align: center;
    padding: 20px;
    opacity: 0.6;
}

.elim-empty-hint {
    font-size: 0.85rem;
    margin-top: 4px;
}

.elim-no-games {
    text-align: center;
    padding: 40px;
    color: #666;
}

.elim-no-games-hint {
    font-size: 0.9rem;
    margin-top: 10px;
}

.elim-loading-msg {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* Back button container */
.elim-back-btn-container {
    display: flex;
    justify-content: center;
    margin-top: 24px;
    padding-bottom: 24px;
}

/* ============================================================
   RESPONSIVE STYLES
   ============================================================ */
@media (max-width: 1200px) {
    .elim-lobby-leaderboard {
        display: none;
    }

    .elim-hub {
        max-width: 900px;
    }
}

@media (max-width: 1024px) {
    .elim-lobby-layout {
        grid-template-columns: 1fr;
    }

    .elim-lobby-games {
        max-width: none;
    }

    .elim-lobby-chat-stats-column {
        max-width: none;
    }

    .elim-lobby-chat {
        max-width: none;
        height: 280px;
    }

    .elim-lobby-stats {
        max-width: none;
        min-height: 166px;
    }

    .elim-lobby-leaderboard {
        max-width: none;
        position: static;
        max-height: none;
        display: none;
    }

    .elim-header-bar {
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 12px;
    }

    .elim-title-text {
        font-size: 1.4rem;
    }

    .elim-coin-amount {
        font-size: 1.8rem;
    }

    .elim-coin-icon-large {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 768px) {
    .elim-lobby-layout {
        grid-template-columns: 1fr;
    }

    .elim-lobby-chat-main {
        overflow: hidden;
    }

    .elim-lobby-chat-input-wrap {
        max-width: calc(100% - 140px) !important;
        width: calc(100% - 140px);
    }

    .elim-lobby-games {
        overflow: visible;
        min-height: 200px;
    }

    .elim-lobby-list {
        min-height: 150px;
    }

    .elim-lobby-leaderboard {
        display: none;
    }

    .elim-card.compact {
        padding: 10px 12px;
    }

    .elim-header-bar {
        padding: 10px 12px;
        border-radius: 12px;
    }

    .elim-header-title {
        flex: 1;
    }

    .elim-title-icon {
        font-size: 1.5rem;
    }

    .elim-title-text {
        font-size: 1.2rem;
    }

    .elim-coin-balance-display {
        padding: 6px 10px;
        gap: 8px;
    }

    .elim-coin-amount {
        font-size: 1.4rem;
    }

    .elim-coin-icon-large {
        width: 32px;
        height: 32px;
    }
}

/* Mobile bottom padding and touch device fixes */
@media (pointer: coarse), (max-width: 768px) {
    #elim-lobby,
    #elimination-hub-page {
        padding-bottom: 110px !important;
    }

    .elim-lobby-chat-main {
        overflow: hidden;
    }

    .elim-lobby-chat-input-wrap {
        max-width: calc(100% - 140px) !important;
        width: calc(100% - 140px) !important;
    }
}

/* ============================================================
   ELIMINATION MODE STYLES (moved from lexilayers.css)
   ============================================================ */

#elimination-hub-page {
    background: linear-gradient(135deg, #fff5e6 0%, #ffe4cc 100%);
    min-height: calc(100vh - var(--header-h));
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

body.dark-mode #elimination-hub-page {
    background: linear-gradient(135deg, #2d2416 0%, #3d2e1a 100%);
}

.elim-mode-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px 20px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
}

body.dark-mode .elim-mode-card {
    background: #2a2a3e;
}

.elim-mode-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.elim-mode-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.elim-mode-details {
    font-size: 0.9rem;
    color: #a0b0c0;
    margin: 12px 0 8px;
}

.elim-schedule-info {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 16px;
    padding: 6px 10px;
    background: rgba(255, 140, 0, 0.1);
    border-radius: 6px;
}

.elim-mode-play-btn {
    width: 100%;
    margin-top: auto;
}

/* ===================================================
   Elimination Game Over Results
   =================================================== */
.elim-results-container {
    text-align: center;
    padding: 12px;
    max-width: 400px;
    margin: 0 auto;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.elim-results-header {
    margin-bottom: 8px;
}

.elim-crown-container {
    margin-bottom: 2px;
}

.elim-crown {
    font-size: 2rem;
    animation: crownBounce 1s ease-out;
}

@keyframes crownBounce {
    0% { transform: scale(0) rotate(-20deg); opacity: 0; }
    50% { transform: scale(1.2) rotate(10deg); }
    100% { transform: scale(1) rotate(0); opacity: 1; }
}

.elim-winner-name {
    font-size: 1.3rem;
    font-weight: 800;
    color: #2d2d2d;
    margin-bottom: 0;
    animation: fadeSlideIn 0.5s ease-out 0.3s both;
}

.elim-winner-score {
    font-size: 0.9rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 2px;
}

.elim-winner-label {
    display: inline-block;
    padding: 4px 16px;
    background: linear-gradient(135deg, #ffd700, #ffb700);
    color: #5a4000;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 2px;
    border-radius: 20px;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(255, 183, 0, 0.4);
}

.elim-your-result {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #e8f4ff, #d0e8ff);
    border-radius: 10px;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    color: #2563eb;
}

.elim-your-result .your-place {
    font-size: 1.2rem;
    font-weight: 800;
}

.elim-standings-list {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 8px;
    margin-bottom: 10px;
}

/* Compact coins section for elimination */
.elim-coins-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 8px 10px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.elim-coins-header {
    font-size: 0.65rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 4px;
    text-align: center;
}

.elim-coins-breakdown {
    display: flex;
    flex-direction: column;
    gap: 1px;
    margin-bottom: 4px;
}

.elim-coins-row {
    display: flex;
    justify-content: space-between;
    padding: 0 6px;
    font-size: 0.75rem;
    color: white;
}

.elim-coins-total {
    border-top: 1px solid rgba(255,255,255,0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 6px 0;
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
}

.elim-coins-total .total-amount {
    font-size: 1.1rem;
    font-weight: 800;
}

/* Dark mode - Elimination standings list */
body.dark-mode .elim-standings-list {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Dark mode - Winner name */
body.dark-mode .elim-winner-name {
    color: #ffffff !important;
}

.elim-standings-header {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #888;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.elim-result-row {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    background: white;
    border-radius: 5px;
    margin-bottom: 3px;
    animation: fadeSlideIn 0.4s ease-out both;
    transition: transform 0.2s;
    font-size: 0.85rem;
}

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

.elim-result-row:hover {
    transform: scale(1.02);
}

.elim-result-row.is-me {
    background: linear-gradient(135deg, #e0f2fe, #bae6fd);
    border: 2px solid #0ea5e9;
}

.elim-result-row.top-three {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
}

.elim-result-row.top-three.is-me {
    background: linear-gradient(135deg, #d4f7e0, #a7f3d0);
    border: 2px solid #10b981;
}

.elim-result-rank {
    min-width: 28px;
    font-size: 1.1rem;
    text-align: center;
}

.elim-result-rank .rank-num {
    display: inline-block;
    width: 22px;
    height: 22px;
    line-height: 22px;
    background: #e5e7eb;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    color: #6b7280;
}

.elim-result-name {
    flex: 1;
    text-align: left;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.elim-tag {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    background: #fee2e2;
    color: #b91c1c;
}

.elim-tag.survivor {
    background: #d1fae5;
    color: #047857;
}

.elim-result-score {
    font-weight: 700;
    color: #111;
    min-width: 45px;
    text-align: right;
}

.elim-lobby-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.elim-lobby-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

.elim-lobby-btn .btn-countdown {
    opacity: 0.8;
    font-weight: 500;
}

/* ===================================================
   Elimination Waiting Room
   =================================================== */
.elim-waiting-room {
    max-width: 600px;
    margin: 40px auto;
    padding: 30px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

body.dark-mode .elim-waiting-room {
    background: #2a2a3e;
}

.waiting-room-header {
    text-align: center;
    margin-bottom: 24px;
}

.waiting-room-header h2 {
    font-size: 1.8rem;
    margin: 16px 0 8px;
    color: var(--ink);
}

.waiting-status {
    font-size: 1.1rem;
    color: #ff8c00;
    font-weight: 600;
}

.waiting-room-info {
    background: rgba(255, 140, 0, 0.08);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 20px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
}

.info-label {
    color: #888;
}

.info-value {
    font-weight: 600;
    color: var(--ink);
}

body.dark-mode .info-value {
    color: #fff;
}

.waiting-room-players {
    margin-bottom: 24px;
}

.waiting-room-players h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: var(--ink);
}

.player-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.player-pill {
    padding: 8px 14px;
    border-radius: 20px;
    color: white;
    font-weight: 500;
    font-size: 0.9rem;
    border: 2px solid;
}

.player-pill.empty {
    background: rgba(0, 0, 0, 0.05);
    color: #aaa;
    border: 2px dashed #ccc;
}

.player-pill.is-me {
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.5);
}

.you-badge {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-left: 4px;
}

.game-starting-message {
    text-align: center;
    padding: 16px;
    background: linear-gradient(135deg, #ff8c00, #ff6600);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    animation: pulse 1.5s infinite;
}

.waiting-message {
    text-align: center;
    color: #888;
    font-style: italic;
}

/* ===================================================
   Eliminated Player Overlay
   =================================================== */
.eliminated-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    pointer-events: none;
}

.eliminated-sticker {
    transform: rotate(-15deg);
    background: linear-gradient(135deg, #ff4444, #cc0000);
    padding: 20px 40px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    border: 4px solid #fff;
}

.sticker-text {
    display: block;
    font-size: 2.5rem;
    font-weight: 900;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 2px;
}

.sticker-round {
    display: block;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 4px;
}

/* ===================================================
   Elimination Announcement
   =================================================== */
.elimination-announcement {
    text-align: center;
    padding: 40px;
}

.eliminated-player-name {
    font-size: 3rem;
    font-weight: 900;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 10px;
}

.eliminated-text {
    font-size: 2rem;
    color: #ff4444;
    font-weight: 700;
    animation: shake 0.5s ease;
}

.eliminated-round {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 8px;
}

.remaining-players {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 16px;
}

.countdown-text {
    font-size: 1.5rem;
    color: white;
    margin-top: 24px;
    font-weight: 600;
}

/* Scoreboard eliminated badge */
.sb-elim-badge {
    background: #ff4444;
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
    font-weight: 700;
}

.sb-pill.eliminated {
    opacity: 0.5;
    text-decoration: line-through;
}
