:root {
    --bg-color: #121212;
    --card-bg: #161616;
    --muted: #888;
    --text-color: #ffffff;
    --accent-color: #2aa1ff;
    --dice-color: #2b2b2b;
    --gap: 12px;
    text-align: center;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    padding: 12px;
}
.app {
    max-width: 1100px;
    margin: 24px auto;
    padding: 20px;
}
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--gap);
    margin-bottom: 18px;
}
h1 { margin: 0; font-size: 1.4rem; }
.card {
    background: var(--card-bg);
    padding: 12px;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.45);
}
.controls {
    display: flex;
    gap: 8px;
    align-items: center;
}
label { color: var(--muted); margin-right: 6px; }
input[type="text"] {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-color);
    padding: 6px 8px;
    border-radius: 6px;
    min-width: 120px;
}
button {
    background-color: transparent;
    color: var(--text-color);
    border: 1px solid rgba(255,255,255,0.12);
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
}
button.primary {
    background: linear-gradient(90deg,var(--accent-color), #0077d9);
    border: none;
    color: #012;
    font-weight: 600;
}
button:disabled { opacity: 0.5; cursor: not-allowed; }

.layout {
    display: grid;
    grid-template-columns: 320px 1fr 360px;
    gap: 16px;
}


/* Dice */
#dice-container {
    margin: 12px 0;
    display: flex;
    justify-content: center;
    gap: 12px;
}
.dice {
    background-color: var(--dice-color);
    color: var(--text-color);
    font-size: 1.5rem;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6);
    user-select: none;
}
.dice.locked { background-color: #9aa; color: #031; }

/* Roll animation helpers */
.fade-out { opacity: 0; transform: translateY(-8px); transition: opacity 140ms ease, transform 140ms ease; }
.fade-in { opacity: 1; transform: translateY(0); transition: opacity 220ms ease, transform 220ms ease; }

.score-grid {
    margin: 0 auto;
    border-collapse: collapse;
    width: 100%;
}
.score-grid th, .score-grid td { border: 1px solid rgba(255,255,255,0.06); padding: 8px; }

.room-info-top-left {
  position: fixed;
  top: 10px;
  left: 10px;
  padding: 10px;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  z-index: 1000;
}

#yahtzeeBonusRow, #upperBonusRow, #upperTotalRow, #lowerTotalRow, #totalScoreRow {
  background-color: #181818; 
  font-weight: bold;
  color: #666;
}

.player-info { margin: 6px 0; }

select, button, input { font: inherit; }

.hidden { display: none !important; }

#rollDiceBtn { margin-top: 12px; margin-bottom: 12px; }

#room-id { margin-top: 20px;}

#players-container{ margin-top: 12px; }

#category-selection{margin-bottom: 12px;}

#startGameBtn { margin-top: 12px; margin-bottom: 12px; }

/* Eviter que le contenu des cartes colle aux bords internes */
.card { padding: 16px; }

@media (max-width: 920px) {
    .layout { grid-template-columns: 1fr; }
}
