/* ===== 大厅布局 ===== */
#lobbyPage {
    display: none;
    width: 100vw;
    height: 100vh;
    background: #f0f2f5;
    overflow: hidden;
    flex-direction: column;
}

/* ===== 顶部栏 ===== */
#topBar {
    height: 60px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border-bottom: 1px solid #e0e0e0;
    flex-shrink: 0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

#logo {
    font-size: 20px;
    font-weight: 700;
    color: #ff2e7d;
}

#onlineInfo {
    font-size: 14px;
    color: #666;
}

#onlineInfo #onlineCount {
    font-weight: 600;
    color: #ff2e7d;
    font-size: 16px;
}

/* ===== 主体 ===== */
#mainArea {
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* ===== 左侧玩家面板 ===== */
#playerPanel {
    width: 320px;
    background: white;
    border-right: 1px solid #e8e8e8;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.panelTitle {
    padding: 16px 20px;
    font-weight: 600;
    font-size: 16px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    color: #222;
}

.panelTitle .count {
    font-weight: 400;
    font-size: 13px;
    color: #999;
}

/* ===== 玩家列表（滚动） ===== */
#playerList {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

#playerList::-webkit-scrollbar {
    width: 4px;
}
#playerList::-webkit-scrollbar-track {
    background: #f5f5f5;
}
#playerList::-webkit-scrollbar-thumb {
    background: #d0d0d0;
    border-radius: 4px;
}

/* ===== 玩家卡片 ===== */
.playerCard {
    margin: 8px 16px;
    padding: 14px 18px;
    background: #fafafa;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: background 0.2s, box-shadow 0.2s;
    border: 1px solid #f0f0f0;
}

.playerCard:hover {
    background: #f5f5f5;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.playerName {
    font-size: 17px;
    font-weight: 600;
    color: #1a1a1a;
}

.playerGender {
    color: #888;
    font-size: 13px;
    margin-top: 2px;
}

.playerBottom {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.playerState {
    font-size: 12px;
    padding: 2px 12px;
    border-radius: 20px;
    background: #e8f5e9;
    color: #2e7d32;
}

.playerState.sharing {
    background: #fff3e0;
    color: #e65100;
}

.playerState.offline {
    background: #f5f5f5;
    color: #999;
}

.playerCard button {
    padding: 6px 18px;
    border: none;
    border-radius: 20px;
    background: #ff2e7d;
    color: white;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.playerCard button:hover {
    background: #e01a6b;
}

.playerCard button:active {
    transform: scale(0.95);
}

.playerCard button:disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* ===== 右侧 Unity 面板 ===== */
#unityPanel {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #1a1a2e;
    position: relative;
    overflow: hidden;
}

#unityContainer {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: rgba(255, 255, 255, 0.3);
    font-size: 16px;
    position: relative;
}

#unityLoading {
    text-align: center;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.5);
}

#unityLoading span {
    font-size: 40px;
    display: block;
    margin-bottom: 12px;
}

#unityContainer canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
    background: #1a1a2e;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    #playerPanel {
        width: 240px;
    }
    .panelTitle {
        padding: 12px 14px;
        font-size: 14px;
    }
    .playerCard {
        margin: 6px 10px;
        padding: 10px 14px;
    }
    .playerName {
        font-size: 15px;
    }
    #logo {
        font-size: 17px;
    }
    #topBar {
        padding: 0 16px;
        height: 52px;
    }
}

@media (max-width: 480px) {
    #playerPanel {
        width: 180px;
    }
    .playerCard {
        margin: 4px 6px;
        padding: 8px 10px;
    }
    .playerName {
        font-size: 13px;
    }
    .playerGender {
        font-size: 11px;
    }
    .playerCard button {
        font-size: 11px;
        padding: 4px 12px;
    }
    .playerState {
        font-size: 10px;
        padding: 1px 8px;
    }
    #logo {
        font-size: 14px;
    }
    #onlineInfo {
        font-size: 12px;
    }
}
