.online-lobby {
    width: 100%;
}

.lobby-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 12px;
    width: 100%;
    min-height: 350px;
}

.lobby-rooms, .lobby-chat {
    background: #ffffff;
    border: 1px solid #ececec;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #ececec;
    font-size: 0.9rem;
    font-weight: 600;
    color: #2d3748;
    background: #fafafa;
}

.panel-head-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.room-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 6px;
    scrollbar-width: thin;
}

.room-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 14px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
    margin-bottom: 6px;
    background: #fafafa;
}

.room-item:hover {
    background: #ffffff;
    border-color: #4a9;
}

.room-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
}

.room-info {
    font-size: 0.72rem;
    color: #999;
}

.room-status {
    font-size: 0.72rem;
    padding: 3px 10px;
    border-radius: 50px;
    background: #e8f8f0;
    color: #2ecc71;
    font-weight: 600;
}

.room-status.playing {
    background: #fdecea;
    color: #e74c3c;
}

.chat-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 8px 10px;
    scrollbar-width: thin;
    min-height: 120px;
    max-height: 300px;
}

.chat-user { color: #4a9; font-weight: 600; }
.chat-text { color: #555; }

.player-status { font-size: 0.72rem; color: #999; }
.room-player-item.ready .player-status { color: #2ecc71; }

.chat-bar {
    display: flex;
    gap: 6px;
    padding: 8px 10px;
    border-top: 1px solid #ececec;
}

.chat-field {
    flex: 1;
    padding: 8px 14px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 50px;
    color: #333;
    font-size: 0.82rem;
    outline: none;
    transition: all 0.2s;
}

.chat-field:focus { border-color: #4a9; box-shadow: 0 0 0 3px rgba(74,153,153,0.1); }
.chat-field::placeholder { color: #bbb; }

.room-panel {
    width: 100%;
    background: #ffffff;
    border: 1px solid #ececec;
    border-radius: 12px;
    overflow: hidden;
}

.room-bar {
    padding: 12px 16px;
    border-bottom: 1px solid #ececec;
    font-size: 0.85rem;
    color: #555;
    line-height: 1.7;
    background: #fafafa;
}

.room-bar strong { color: #4a9; font-weight: 700; }

.room-split {
    display: grid;
    grid-template-columns: 0.4fr 0.6fr;
    min-height: 250px;
}

.room-member-list {
    padding: 10px;
    border-right: 1px solid #ececec;
    overflow-y: auto;
}

.room-player-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 10px;
    border-radius: 50px;
    margin-bottom: 3px;
    font-size: 0.82rem;
    transition: background 0.15s;
}

.room-player-item:hover { background: #f5f5f5; }
.room-player-item.ready { background: #e8f8f0; }

.player-name {
    color: #333;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.player-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #4a9;
    background: #f5f5f5;
}

.chat-avatar {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
    vertical-align: middle;
    margin-right: 4px;
    border: 1px solid #4a9;
}

.chat-msg {
    padding: 3px 0;
    font-size: 0.8rem;
    line-height: 1.5;
    word-break: break-word;
    display: flex;
    align-items: center;
    gap: 4px;
}

.host-badge {
    font-size: 0.65rem;
    padding: 1px 6px;
    border-radius: 50px;
    background: #fff8e1;
    color: #b8860b;
    font-weight: 600;
}

.room-chat-col {
    display: flex;
    flex-direction: column;
}

.room-foot {
    display: flex;
    gap: 8px;
    padding: 10px 14px;
    border-top: 1px solid #ececec;
    justify-content: center;
}

.arena {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #f5f5f5;
    z-index: 600;
    overflow: hidden;
}

.arena #onlineCanvas {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #f5f5f5;
}

.minimap-wrap {
    position: fixed;
    bottom: 14px;
    right: 14px;
    border: 1px solid #ececec;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    background: #ffffff;
    z-index: 620;
}

.minimap-wrap #minimapCanvas {
    display: block;
    width: 180px !important;
    height: 180px !important;
}

.arena-scores {
    position: fixed;
    top: 14px;
    left: 14px;
    background: #ffffff;
    border: 1px solid #ececec;
    border-radius: 12px;
    padding: 10px 14px;
    min-width: 160px;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    z-index: 620;
}

.sb-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px 0;
    font-size: 0.78rem;
    color: #555;
}

.sb-color {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.arena-end {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ffffff;
    border: 1px solid #ececec;
    padding: 24px 30px;
    border-radius: 16px;
    text-align: center;
    z-index: 630;
    min-width: 260px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}

.arena-end h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 12px;
    font-size: 0.82rem;
    color: #555;
    border-radius: 50px;
    margin-bottom: 3px;
}

.result-item:nth-child(odd) { background: #fafafa; }
.result-item:nth-child(1) { color: #b8860b; font-weight: 700; background: #fff8e1; }
.result-item:nth-child(2) { color: #6c7a89; font-weight: 600; background: #f5f5f5; }
.result-item:nth-child(3) { color: #a0522d; font-weight: 600; background: #fdf2e9; }
