:root {
    --bg-color: #121212;
    --surface: #1e1e1e;
    --primary: #e53935;
    --text-main: #ffffff;
    --text-sub: #b3b3b3;
    --gold: #ffd700;
}

body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: var(--bg-color); color: var(--text-main); margin: 0; padding: 0; text-align: center; }
.screen { display: none; padding: 20px; }
.active { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

h1 { margin-top: 30vh; font-size: 2.5rem; color: var(--primary); }
.subtitle { color: var(--text-sub); margin-bottom: 40px; font-size: 0.9rem; }
.mt-20 { margin-top: 20px; }
.highlight { color: var(--primary); }
.content-pad { padding: 20px; text-align: left; }
.section-title { margin-bottom: 15px; }

/* Buttons */
.btn { background: var(--primary); color: white; border: none; padding: 15px 30px; font-size: 1.1rem; border-radius: 25px; font-weight: bold; width: 80%; max-width: 300px; cursor: pointer; transition: transform 0.1s; margin-top: 20px;}
.btn:active { transform: scale(0.95); }
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-small { width: auto; padding: 8px 15px; font-size: 0.9rem; margin: 0;}

/* Header */
.header { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; background: var(--surface); border-bottom: 1px solid #333; }
.user-info { text-align: left; }
.user-name { font-weight: bold; font-size: 1.1rem; display: flex; align-items: center; }
.user-balance { color: var(--gold); font-weight: bold; font-size: 0.9rem; margin-top: 4px; }
.edit-icon { margin-left: 8px; font-size: 0.9rem; cursor: pointer; opacity: 0.6; transition: opacity 0.2s; }
.edit-icon:active, .edit-icon:hover { opacity: 1; }

/* Room List */
.room-card { background: var(--surface); padding: 15px; border-radius: 12px; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; border: 1px solid #333; }
.room-card:active { background: #2a2a2a; }
.room-info h4 { margin: 0 0 5px 0; color: var(--primary); }
.room-info p { margin: 0; font-size: 0.85rem; color: var(--text-sub); }

/* Modal (Pop-up đổi tên) */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); align-items: center; justify-content: center; z-index: 100; }
.modal-box { background: var(--surface); padding: 25px; border-radius: 15px; width: 80%; max-width: 300px; text-align: center; border: 1px solid #333; animation: fadeIn 0.2s ease;}
.modal-box input { width: 90%; padding: 12px; border-radius: 8px; border: 1px solid #444; background: #2a2a2a; color: white; margin-bottom: 15px; outline: none;}
.modal-box input:focus { border-color: var(--primary); }

#sys-msg { color: #ff5252; margin-top: 15px; font-size: 0.9rem; }

/* --- UI PHÒNG CHƠI & NGƯỜI CHƠI --- */
.room-header { display: flex; justify-content: space-between; align-items: center; padding: 0 5px; margin-bottom: 15px;}
.room-header h3 { margin: 0; }
.bet-badge { background: rgba(229, 57, 53, 0.2); color: var(--primary); padding: 5px 12px; border-radius: 12px; font-size: 0.85rem; font-weight: bold; border: 1px solid var(--primary); }

.players-container { background: var(--surface); border-radius: 12px; padding: 10px; border: 1px solid #333; margin-bottom: 20px; min-height: 100px;}
.player-item { display: flex; align-items: center; padding: 12px; border-bottom: 1px solid #2a2a2a; transition: background 0.2s;}
.player-item:last-child { border-bottom: none; }

.avatar { width: 45px; height: 45px; background: #333; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; margin-right: 15px; }
.avatar.host { border: 2px solid var(--gold); background: rgba(255, 215, 0, 0.1); }

.player-info { flex: 1; text-align: left; }
.player-info .name { font-weight: bold; margin-bottom: 4px; font-size: 1.05rem; display: flex; align-items: center; gap: 5px;}
.player-info .status { font-size: 0.85rem; color: var(--text-sub); }
.status.ready { color: #4caf50; } /* Màu xanh lá cho trạng thái Sẵn sàng */
