* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #1a472a 0%, #2d5a3d 100%);
    min-height: 100vh;
    color: #fff;
}

.page { padding: 20px; }
.hidden { display: none !important; }

h1 {
    text-align: center;
    color: #ffd700;
    font-size: 2.5em;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* 大厅样式 */
.lobby-content {
    max-width: 500px;
    margin: 0 auto;
}

.nickname-input, .room-actions, .join-direct {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

input {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
}

button {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    background: #ffd700;
    color: #000;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

button:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(0,0,0,0.3); }
button:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.room-list {
    background: rgba(0,0,0,0.3);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

.room-list h3 {
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.refresh-btn {
    padding: 5px 15px;
    font-size: 0.9em;
}

.room-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    margin-bottom: 8px;
}

.room-item button {
    padding: 8px 15px;
    font-size: 0.9em;
}

/* 游戏房间样式 */
.room-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0,0,0,0.4);
    padding: 10px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.sound-btn {
    background: #607d8b;
    color: #fff;
}

.leave-btn {
    background: #f44336;
    color: #fff;
}

.game-info {
    text-align: center;
    margin-bottom: 20px;
}

.pot {
    display: inline-block;
    background: rgba(0,0,0,0.5);
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 1.3em;
}

.pot span { color: #ffd700; font-weight: bold; }

.community-cards {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
    min-height: 100px;
    flex-wrap: wrap;
}

.card {
    width: 60px;
    height: 85px;
    background: #fff;
    border: 2px solid #333;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    font-weight: bold;
}

.card.red { color: #d32f2f; }
.card.black { color: #333; }
.card.hidden {
    background: linear-gradient(135deg, #1565c0, #0d47a1);
    color: #fff;
}

.my-cards {
    text-align: center;
    margin: 20px 0;
}

.my-cards h4 { margin-bottom: 10px; color: #ffd700; }

#myCards {
    display: flex;
    justify-content: center;
    gap: 10px;
}

#myCards .card {
    width: 70px;
    height: 100px;
    font-size: 1.4em;
}

.players-area {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin: 20px 0;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.player {
    background: rgba(0,0,0,0.4);
    border-radius: 15px;
    padding: 15px;
    border: 3px solid transparent;
    transition: all 0.3s;
    text-align: center;
}

.player.active {
    border-color: #ffd700;
    box-shadow: 0 0 20px rgba(255,215,0,0.5);
}

.player.folded { opacity: 0.5; }
.player.me { border-color: #4caf50; }

.player-name {
    font-size: 1.1em;
    margin-bottom: 8px;
}

.dealer-mark {
    background: #ffd700;
    color: #000;
    padding: 2px 8px;
    border-radius: 50%;
    font-size: 0.7em;
    margin-left: 5px;
}

.player-chips { color: #4caf50; font-weight: bold; margin-bottom: 5px; }
.player-bet { color: #ff9800; font-size: 0.9em; margin-bottom: 5px; }

.player-status {
    font-size: 0.85em;
    padding: 3px 8px;
    border-radius: 5px;
    display: inline-block;
}

.player-status.ready { background: #4caf50; }
.player-status.waiting { background: #ff9800; }
.player-status.folded { background: #f44336; }
.player-status.allin { background: #9c27b0; }

.player-cards {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 10px;
}

.player-cards .card {
    width: 40px;
    height: 56px;
    font-size: 0.8em;
}

.controls, .game-controls, .settle-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
    align-items: center;
}

.settle-controls {
    flex-direction: column;
}

.settle-info {
    text-align: center;
    margin-bottom: 15px;
}

.winner-info {
    font-size: 1.4em;
    color: #ffd700;
    margin-bottom: 10px;
}

.settle-progress {
    color: #aaa;
}

#settleBtn {
    background: #4caf50;
    color: #fff;
    font-size: 1.2em;
    padding: 15px 40px;
}

#settleBtn:disabled {
    background: #666;
}

#readyBtn { background: #4caf50; color: #fff; font-size: 1.2em; padding: 15px 40px; }
#readyBtn.ready { background: #ff9800; }
#startBtn { background: #2196f3; color: #fff; font-size: 1.2em; padding: 15px 40px; }
#startBtn:disabled { background: #666; }

.owner-mark {
    background: #2196f3;
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7em;
    margin-left: 5px;
}

.game-controls button:nth-child(1) { background: #f44336; color: #fff; }
.game-controls button:nth-child(2) { background: #2196f3; color: #fff; }
.game-controls button:nth-child(3) { background: #4caf50; color: #fff; }
.game-controls button:nth-child(4) { background: #ff9800; color: #fff; }
.game-controls button:nth-child(6) { background: #9c27b0; color: #fff; }

#raiseAmount { width: 80px; text-align: center; }

.message {
    max-width: 600px;
    margin: 20px auto;
    padding: 15px;
    background: rgba(0,0,0,0.5);
    border-radius: 10px;
    color: #ffd700;
    text-align: center;
    min-height: 50px;
}

@media (max-width: 600px) {
    .players-area { grid-template-columns: 1fr 1fr; }
    .room-header { font-size: 0.9em; }
    .card { width: 50px; height: 70px; font-size: 1em; }
    #myCards .card { width: 60px; height: 85px; font-size: 1.2em; }
}
