/* =========================================================
   Compteur Skyjo — styles spécifiques au jeu
   Le design system commun est dans /theme.css.
   Ici : accent améthyste, ornement ♣, tableau d'historique
   propre à Skyjo.
   ========================================================= */

:root {
	--accent: #6e4cc4;
	--accent-strong: #4f33a0;
	--accent-soft: rgba(110, 76, 196, 0.08);
	--accent-ring: rgba(110, 76, 196, 0.22);
	--suit: "♣";
}

@media (prefers-color-scheme: dark) {
	:root {
		--accent: #9b7fe0;
		--accent-strong: #b9a8e8;
		--accent-soft: rgba(155, 127, 224, 0.12);
		--accent-ring: rgba(155, 127, 224, 0.26);
	}
}

/* =========================================================
   Liste des noms de joueurs
   ========================================================= */
#playerNames {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

#playerNames .input-group {
	gap: 6px;
}

/* =========================================================
   Historique des manches (tableau)
   ========================================================= */
.history-container {
	overflow-x: auto;
	padding: 4px;
	border-radius: var(--radius-md);
	scrollbar-width: thin;
	scrollbar-color: var(--border-strong) transparent;
}

.history-container::-webkit-scrollbar {
	height: 8px;
}

.history-container::-webkit-scrollbar-thumb {
	background: var(--border-strong);
	border-radius: 999px;
}

.history-table {
	width: 100%;
	min-width: 560px;
	border-collapse: separate;
	border-spacing: 0;
	font-size: 0.82rem;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	overflow: hidden;
}

.history-table thead th {
	position: sticky;
	top: 0;
	background: var(--surface-soft);
	color: var(--text-muted);
	font-size: 0.66rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 10px 12px;
	text-align: left;
	border-bottom: 1px solid var(--divider);
}

.history-table tbody td {
	padding: 10px 12px;
	font-size: .8rem;
	font-family: var(--mono);
	font-variant-numeric: tabular-nums;
	color: var(--text);
	border-bottom: 1px solid var(--divider);
}

.history-table tbody tr:last-child td {
	border-bottom: none;
}

.history-table tbody tr:hover td {
	background: var(--accent-soft);
}

.round-col {
	font-family: 'Inter', sans-serif !important;
	font-weight: 700;
	color: var(--accent);
	white-space: nowrap;
	letter-spacing: 0.02em;
}

.ender-marker {
	margin-left: 6px;
	font-size: 0.85rem;
}

.doubled-score {
	color: var(--danger);
	font-weight: 700;
}

.total-col {
	font-weight: 700;
	color: var(--accent);
	background: var(--accent-soft);
}

.empty-history {
	text-align: center;
	padding: 32px;
	color: var(--text-muted);
	font-style: italic;
	background: var(--surface);
	border-radius: var(--radius-md);
	border: 1px dashed var(--border-strong);
}

.action-col {
	width: 50px;
	text-align: center;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 640px) {
	.history-table {
		min-width: 560px;
	}
}

.history-total-row {
	background: var(--surface-inset);
	font-weight: 600;
}

.history-total-row .total-label {
	font-style: italic;
}
