
body { font-family: Arial, sans-serif; background-color: #18202b; color: white; text-align: center; margin: 0; padding: 10px; box-sizing: border-box; }
.container { background-color: #2c3e50; padding: 25px; border-radius: 8px; display: inline-block; margin-top: 20px; width: 100%; max-width: 400px; box-sizing: border-box; }
.lobby-container { max-width: 900px; }
.form-group { display: flex; flex-direction: column; gap: 15px; margin-bottom: 20px; text-align: left;}
input, select { padding: 12px; border-radius: 4px; border: 1px solid #34495e; background-color: #ecf0f1; color: #2c3e50; font-size: 16px; width: 100%; box-sizing: border-box;}
.checkbox-label { font-size: 16px; display: flex; align-items: center; gap: 10px; cursor: pointer;}
.checkbox-label input { width: auto; transform: scale(1.3); }

.actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;}
.btn { padding: 12px 20px; border: none; border-radius: 4px; cursor: pointer; font-size: 16px; font-weight: bold; transition: 0.2s; }
.btn-primary { background-color: #3498db; color: white; }
.btn-secondary { background-color: #95a5a6; color: white; }
.btn-success { background-color: #2ecc71; color: white; }
.btn-danger { background-color: #e74c3c; color: white; }
.btn-large { width: 100%; padding: 15px; font-size: 18px; margin: 15px 0; }

.lobby-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #34495e; padding-bottom: 15px; margin-bottom: 15px; flex-wrap: wrap; gap: 10px;}
.lobby-header h1 { margin: 0; font-size: 20px; }
.header-buttons { display: flex; gap: 10px; }

.split-rooms { display: flex; gap: 20px; flex-wrap: wrap; }
.rooms-column { flex: 1; min-width: 300px; text-align: left; background: #233140; padding: 15px; border-radius: 6px; }
.room-card { background: #34495e; padding: 12px; border-radius: 6px; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; border-left: 4px solid #3498db;}
.room-card.finished { border-left-color: #95a5a6; opacity: 0.8;}
.room-info h3 { margin: 0 0 5px 0; font-size: 16px;}
.room-info p { margin: 0; font-size: 13px; color: #bdc3c7; }
.msg { margin-top: 15px; color: #e74c3c; font-weight: bold; }

.user-list { max-height: 150px; overflow-y: auto; background: #1a252f; padding: 10px; border-radius: 4px; border: 1px solid #34495e;}
.user-list label { display: block; margin-bottom: 8px; font-size: 15px; cursor: pointer; }
.chips-container { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.chip { background: #f39c12; color: #fff; padding: 5px 10px; border-radius: 15px; font-size: 13px; font-weight: bold; }

/* GAME UI */
.game-header { display: flex; justify-content: space-between; align-items: center; max-width: 800px; margin: 0 auto 15px; border-bottom: 1px solid #34495e; padding-bottom: 10px;}
.scoreboard { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 15px; }
.player-card { background-color: #4CAF50; padding: 10px; border-radius: 8px; width: 180px; border: 3px solid transparent; transition: all 0.2s; box-sizing: border-box; }
.player-card.active { border-color: #FFEB3B; box-shadow: 0 0 10px #FFEB3B; transform: scale(1.02); }
.player-card.finished-bg { background-color: #7f8c8d; border-color: #bdc3c7; }
.player-card h2 { margin: 0 0 5px 0; font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
.score { font-size: 40px; font-weight: bold; background: white; color: black; border-radius: 8px; margin: 5px 0; padding: 5px 0; }
.turns { min-height: 25px; }
.turn-box { display: inline-block; background: rgba(255,255,255,0.8); color: black; padding: 2px 5px; margin: 2px; border-radius: 4px; font-weight: bold; font-size: 12px;}

/* KEYPAD */
.keypad-container { background: #2c3e50; padding: 15px; border-radius: 8px; max-width: 600px; margin: 0 auto; }
.keypad { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-bottom: 8px; }
.keypad button { background: #ecf0f1; border: none; padding: 12px 0; font-size: 18px; font-weight: bold; border-radius: 4px; cursor: pointer; color: #2c3e50; }
.keypad button:active { background: #bdc3c7; transform: scale(0.95); }

.keypad-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.keypad-actions button { padding: 12px; font-size: 15px; font-weight: bold; border: none; border-radius: 4px; cursor: pointer; color: white; opacity: 0.5; transition: 0.2s; }
.btn-double { background: #e67e22; }
.btn-triple { background: #c0392b; }
.btn-miss { background: #7f8c8d; opacity: 1 !important; }
.btn-bull { background: #e67e22; color: #fff; opacity: 1 !important; }

.keypad-undo { margin-top: 8px; }
.btn-undo { background: #95a5a6; width: 100%; padding: 15px; font-weight: bold; font-size: 16px; border: none; border-radius: 4px; cursor: pointer; color: white;}
.btn-undo:active { background: #7f8c8d; }

.audit-log { background: #2c3e50; padding: 10px; border-radius: 8px; text-align: left; max-width: 600px; margin: 15px auto; height: 120px; overflow-y: auto; }
.audit-log p { margin: 4px 0; font-size: 13px; border-bottom: 1px solid #34495e; padding-bottom: 4px; }

/* MOBILE RESPONSIVENESS */
@media (max-width: 600px) {
    .container { padding: 15px; margin-top: 10px; }
    .lobby-header { flex-direction: column; align-items: stretch; gap: 10px;}
    .header-buttons { display: flex; justify-content: space-between; }
    .header-buttons button { flex: 1; margin: 0 5px; font-size: 14px; padding: 10px;}
    .room-card { flex-direction: column; align-items: flex-start; gap: 10px; }
    .room-card .btn { width: 100%; }

    .game-header h2 { font-size: 16px; margin: 0; }
    .game-header .btn { padding: 8px 12px; font-size: 14px; }
    
    .scoreboard { gap: 6px; }
    .player-card { width: 48%; padding: 8px; } 
    .player-card h2 { font-size: 15px; margin-bottom: 4px; }
    .score { font-size: 32px; padding: 2px 0; }
    
    .keypad-container { padding: 10px; max-width: 100%; }
    .keypad { grid-template-columns: repeat(4, 1fr); gap: 6px; } 
    .keypad button { padding: 15px 0; font-size: 22px; } 
    
    .keypad-actions { grid-template-columns: repeat(2, 1fr); gap: 6px; }
    .keypad-actions button { padding: 15px 0; font-size: 15px; }
}
