/* ==========================================================
   Yahtzee Pro — Teal & Navy Theme
   ========================================================== */

.yzp-container {
	--yzp-navy-deep: #071a2c;
	--yzp-navy: #0f2a44;
	--yzp-navy-light: #1e3a5f;
	--yzp-teal: #14b8a6;
	--yzp-teal-bright: #2dd4bf;
	--yzp-teal-deep: #0d9488;
	--yzp-text: #e6f6f4;
	--yzp-text-muted: #9fb8c9;
	--yzp-gold: #ffd166;
	--yzp-pip-ink: #071a2c;
	/* Surfaces: panels/inputs/rows layered on the main background. Dark
	   theme lightens with white overlays; light theme darkens with navy
	   overlays — swapped per-theme below rather than reused verbatim. */
	--yzp-surface-1: rgba(255, 255, 255, 0.03);
	--yzp-surface-2: rgba(255, 255, 255, 0.05);
	--yzp-surface-input: rgba(7, 26, 44, 0.6);
	--yzp-surface-row: rgba(7, 26, 44, 0.45);
	--yzp-overlay-scrim: rgba(4, 14, 24, 0.82);

	max-width: 980px;
	margin: 24px auto;
	padding: 28px;
	border-radius: 20px;
	background: linear-gradient(160deg, var(--yzp-navy-deep) 0%, var(--yzp-navy) 55%, var(--yzp-navy-light) 100%);
	color: var(--yzp-text);
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.04);
	position: relative;
	overflow: hidden;
	isolation: isolate;
}

.yzp-container::before {
	content: "";
	position: absolute;
	inset: -40% -20% auto auto;
	width: 420px;
	height: 420px;
	background: radial-gradient(circle, rgba(20, 184, 166, 0.25) 0%, transparent 70%);
	z-index: 0;
	pointer-events: none;
}

.yzp-container * {
	box-sizing: border-box;
	position: relative;
	z-index: 1;
}

/* ---------- Header ---------- */
.yzp-header {
	text-align: center;
	margin-bottom: 18px;
	position: relative;
}
.yzp-options-btn {
	position: absolute;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	background: var(--yzp-surface-2);
	border: 1px solid rgba(159, 184, 201, 0.25);
	color: var(--yzp-text-muted);
	width: 34px;
	height: 34px;
	border-radius: 10px;
	font-size: 16px;
	cursor: pointer;
	transition: background 0.15s, color 0.15s;
}
.yzp-options-btn:hover {
	background: rgba(45, 212, 191, 0.15);
	color: var(--yzp-teal-bright);
}
.yzp-title {
	margin: 0;
	font-size: 26px;
	font-weight: 800;
	letter-spacing: 0.5px;
	background: linear-gradient(90deg, var(--yzp-teal-bright), #7fe3d8);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}
.yzp-dice-emoji {
	display: inline-block;
	animation: yzp-emoji-spin 4s ease-in-out infinite;
}
@keyframes yzp-emoji-spin {
	0%, 80%, 100% { transform: rotate(0deg); }
	85% { transform: rotate(-15deg); }
	90% { transform: rotate(15deg); }
	95% { transform: rotate(-10deg); }
}

/* ---------- Players bar ---------- */
.yzp-players-bar {
	background: var(--yzp-surface-1);
	border: 1px solid rgba(45, 212, 191, 0.15);
	border-radius: 14px;
	padding: 14px;
	margin-bottom: 16px;
}
.yzp-input-row {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
}
.yzp-cpu-toggle-wrap {
	margin-left: auto;
}

/* ---------- Summary banner (shown after a game ends) ---------- */
.yzp-summary-banner {
	display: none;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 12px;
	background: linear-gradient(90deg, rgba(255, 209, 102, 0.16), rgba(45, 212, 191, 0.1));
	border: 1px solid rgba(255, 209, 102, 0.4);
	border-radius: 14px;
	padding: 14px 18px;
	margin-bottom: 16px;
	text-align: center;
}
.yzp-summary-banner.yzp-visible {
	display: flex;
}
.yzp-summary-text {
	font-size: 14px;
	font-weight: 700;
	color: var(--yzp-gold);
	flex: 1 1 100%;
}
.yzp-summary-export-row {
	display: flex;
	gap: 10px;
}
.yzp-player-name-input {
	flex: 1;
	padding: 10px 14px;
	border-radius: 10px;
	border: 1px solid rgba(159, 184, 201, 0.25);
	background: var(--yzp-surface-input);
	color: var(--yzp-text);
	font-size: 14px;
	outline: none;
	transition: border-color 0.2s, box-shadow 0.2s;
}
.yzp-player-name-input:focus {
	border-color: var(--yzp-teal-bright);
	box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.2);
}
.yzp-player-list {
	list-style: none;
	margin: 12px 0 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}
.yzp-player-chip {
	display: flex;
	align-items: center;
	gap: 8px;
	background: linear-gradient(135deg, var(--yzp-teal-deep), var(--yzp-teal));
	color: #06231e;
	font-weight: 600;
	font-size: 13px;
	padding: 6px 6px 6px 14px;
	border-radius: 999px;
	transition: transform 0.15s, box-shadow 0.15s;
}
.yzp-player-chip.yzp-active-turn {
	box-shadow: 0 0 0 2px var(--yzp-navy-deep), 0 0 0 4px var(--yzp-teal-bright), 0 0 14px rgba(45, 212, 191, 0.6);
	transform: translateY(-2px);
}
.yzp-player-chip .yzp-chip-name {
	white-space: nowrap;
}
.yzp-player-chip .yzp-remove-player {
	cursor: pointer;
	background: rgba(6, 35, 30, 0.12);
	border: none;
	border-radius: 50%;
	width: 22px;
	height: 22px;
	line-height: 22px;
	text-align: center;
	color: rgba(6, 35, 30, 0.7);
	font-size: 12px;
	font-weight: 700;
	flex-shrink: 0;
	transition: background 0.15s, color 0.15s;
}
.yzp-player-chip .yzp-remove-player:hover {
	background: rgba(6, 35, 30, 0.28);
	color: #06231e;
}
/* ---------- Controls ---------- */
.yzp-controls {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	align-items: center;
	margin-bottom: 18px;
	justify-content: center;
}
.yzp-toggle {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: var(--yzp-text-muted);
	cursor: pointer;
}
.yzp-toggle input {
	accent-color: var(--yzp-teal-bright);
	width: 16px;
	height: 16px;
}

/* ---------- Turn indicator ---------- */
.yzp-turn-indicator {
	text-align: center;
	background: rgba(20, 184, 166, 0.1);
	border: 1px solid rgba(45, 212, 191, 0.3);
	border-radius: 12px;
	padding: 10px;
	margin-bottom: 18px;
	font-size: 15px;
	display: flex;
	flex-wrap: wrap;
	gap: 6px 12px;
	justify-content: center;
	align-items: center;
}
.yzp-turn-label {
	color: var(--yzp-text-muted);
	text-transform: uppercase;
	font-size: 11px;
	letter-spacing: 1px;
}
.yzp-turn-name {
	font-weight: 700;
	color: var(--yzp-teal-bright);
}
.yzp-rolls-left {
	font-size: 12px;
	color: var(--yzp-text-muted);
	background: var(--yzp-surface-row);
	padding: 3px 10px;
	border-radius: 999px;
}
.yzp-turn-indicator.yzp-pulse {
	animation: yzp-turn-pulse 1.4s ease-in-out infinite;
}
@keyframes yzp-turn-pulse {
	0%, 100% { box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.35); }
	50% { box-shadow: 0 0 0 8px rgba(45, 212, 191, 0); }
}

/* ---------- Side-by-side play grid (dice/controls left, scorecard right) ---------- */
.yzp-play-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 20px;
	align-items: start;
	margin-bottom: 16px;
}
@media (min-width: 720px) {
	.yzp-play-grid {
		grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
	}
	.yzp-play-grid .yzp-scorecard-wrap {
		margin-bottom: 0;
	}
	.yzp-play-grid .yzp-die {
		width: 58px;
		height: 58px;
	}
	.yzp-play-grid .yzp-die-cube {
		transform: translateZ(-29px);
	}
	.yzp-play-grid .yzp-die-cube .yzp-cube-face {
		width: 58px;
		height: 58px;
		padding: 8px;
	}
	.yzp-play-grid .yzp-cube-face.yzp-face-front  { transform: rotateY(0deg) translateZ(29px); }
	.yzp-play-grid .yzp-cube-face.yzp-face-back   { transform: rotateY(180deg) translateZ(29px); }
	.yzp-play-grid .yzp-cube-face.yzp-face-right  { transform: rotateY(90deg) translateZ(29px); }
	.yzp-play-grid .yzp-cube-face.yzp-face-left   { transform: rotateY(-90deg) translateZ(29px); }
	.yzp-play-grid .yzp-cube-face.yzp-face-top    { transform: rotateX(90deg) translateZ(29px); }
	.yzp-play-grid .yzp-cube-face.yzp-face-bottom { transform: rotateX(-90deg) translateZ(29px); }
	.yzp-play-grid .yzp-dice-stage {
		gap: 12px;
		min-height: auto;
		margin-bottom: 0;
	}

	/* Tighten the vertical rhythm above/around the grid so the full
	   scorecard fits on screen without an inner scrollbar. */
	.yzp-container {
		padding: 20px 24px;
	}
	.yzp-header {
		margin-bottom: 10px;
	}
	.yzp-players-bar {
		padding: 8px 14px;
		margin-bottom: 10px;
	}
	.yzp-summary-banner {
		padding: 10px 18px;
		margin-bottom: 10px;
	}
	.yzp-turn-indicator {
		padding: 6px 10px;
		margin-bottom: 10px;
	}
	.yzp-running-total {
		margin-top: 2px;
	}
	.yzp-dice-hint {
		margin-bottom: 6px;
	}
	.yzp-action-row {
		margin-bottom: 0;
	}
	.yzp-scorecard th,
	.yzp-scorecard td {
		padding: 5px 10px;
	}
	.yzp-scorecard thead th {
		padding-top: 7px;
		padding-bottom: 7px;
	}
	.yzp-section-row th {
		padding: 3px 10px;
	}
}

/* ---------- Dice stage & 3D dice ---------- */
.yzp-dice-stage {
	min-height: 130px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 22px;
	perspective: 700px;
	margin-bottom: 4px;
}

.yzp-running-total {
	text-align: center;
	font-size: 13px;
	font-weight: 700;
	color: var(--yzp-gold);
	min-height: 18px;
	margin-top: 6px;
}

.yzp-dice-hint {
	text-align: center;
	font-size: 11px;
	color: var(--yzp-text-muted);
	margin-bottom: 12px;
	letter-spacing: 0.3px;
}

.yzp-die {
	width: 74px;
	height: 74px;
	position: relative;
	transform-style: preserve-3d;
	cursor: pointer;
}
.yzp-die:hover {
	box-shadow: 0 0 16px 4px rgba(45, 212, 191, 0.45);
}
.yzp-die:active {
	box-shadow: 0 0 6px 1px rgba(45, 212, 191, 0.3);
}

.yzp-die.yzp-rolling {
	animation: yzp-roll 0.9s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}
@keyframes yzp-roll {
	0%   { transform: rotateX(0) rotateY(0) rotateZ(0); }
	20%  { transform: rotateX(160deg) rotateY(80deg) rotateZ(40deg); }
	40%  { transform: rotateX(320deg) rotateY(220deg) rotateZ(120deg); }
	60%  { transform: rotateX(480deg) rotateY(380deg) rotateZ(220deg); }
	80%  { transform: rotateX(620deg) rotateY(520deg) rotateZ(300deg); }
	100% { transform: rotateX(720deg) rotateY(720deg) rotateZ(360deg); }
}

.yzp-die.yzp-die-cube {
	transform: translateZ(-37px);
}
.yzp-die-cube .yzp-cube-face {
	position: absolute;
	width: 74px;
	height: 74px;
	background: linear-gradient(145deg, #f4fbfa, #d7ece9);
	border: 2px solid var(--yzp-teal-deep);
	border-radius: 12px;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	grid-template-rows: repeat(3, 1fr);
	padding: 10px;
	box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.6), 0 4px 10px rgba(0, 0, 0, 0.25);
	transition: background 0.2s, border-color 0.2s;
}
.yzp-pip {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--yzp-pip-ink);
	align-self: center;
	justify-self: center;
	opacity: 0;
}
.yzp-cube-face.yzp-face-front  { transform: rotateY(0deg) translateZ(37px); }
.yzp-cube-face.yzp-face-back   { transform: rotateY(180deg) translateZ(37px); }
.yzp-cube-face.yzp-face-right  { transform: rotateY(90deg) translateZ(37px); }
.yzp-cube-face.yzp-face-left   { transform: rotateY(-90deg) translateZ(37px); }
.yzp-cube-face.yzp-face-top    { transform: rotateX(90deg) translateZ(37px); }
.yzp-cube-face.yzp-face-bottom { transform: rotateX(-90deg) translateZ(37px); }

.yzp-pip-show { opacity: 1; }

/* Held dice: gold outline + badge */
.yzp-hold-badge {
	position: absolute;
	top: -10px;
	left: 50%;
	transform: translateX(-50%) translateZ(50px);
	background: var(--yzp-gold);
	color: #3a2a00;
	font-size: 9px;
	font-weight: 800;
	letter-spacing: 0.5px;
	padding: 2px 8px;
	border-radius: 999px;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.15s;
	white-space: nowrap;
}
.yzp-die.yzp-held .yzp-hold-badge {
	opacity: 1;
}
.yzp-die.yzp-held .yzp-cube-face {
	border-color: var(--yzp-gold);
	box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.6), 0 0 14px rgba(255, 209, 102, 0.55);
}

/* ---------- Quick score (under dice) ---------- */
.yzp-quick-score {
	display: none;
	margin-top: 14px;
}
.yzp-quick-score.yzp-visible {
	display: block;
}
.yzp-quick-score-label {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--yzp-text-muted);
	margin-bottom: 8px;
	text-align: center;
}
.yzp-quick-score-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 8px;
}
.yzp-quick-score-btn {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	border: 1px solid rgba(45, 212, 191, 0.4);
	background: rgba(20, 184, 166, 0.12);
	color: var(--yzp-text);
	border-radius: 10px;
	padding: 8px 12px;
	font-size: 12px;
	cursor: pointer;
	text-align: left;
	transition: background 0.15s, transform 0.15s;
}
.yzp-quick-score-btn:hover {
	background: rgba(20, 184, 166, 0.28);
	transform: translateY(-1px);
}
.yzp-quick-score-btn.yzp-score-zero {
	border-color: rgba(159, 184, 201, 0.25);
	background: var(--yzp-surface-2);
	color: var(--yzp-text-muted);
}
.yzp-quick-score-cat {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.yzp-quick-score-val {
	font-weight: 800;
	color: var(--yzp-teal-bright);
	flex-shrink: 0;
}
.yzp-quick-score-btn.yzp-score-zero .yzp-quick-score-val {
	color: var(--yzp-text-muted);
}

/* ---------- Buttons ---------- */
.yzp-action-row {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: center;
	margin-bottom: 20px;
}
.yzp-btn {
	border: none;
	cursor: pointer;
	font-weight: 700;
	border-radius: 12px;
	padding: 12px 22px;
	font-size: 14px;
	transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}
.yzp-btn:active {
	transform: translateY(1px) scale(0.98);
}
.yzp-btn-primary {
	background: linear-gradient(135deg, var(--yzp-teal-bright), var(--yzp-teal-deep));
	color: #06231e;
	box-shadow: 0 8px 20px rgba(20, 184, 166, 0.4);
	flex: 1 1 auto;
	min-width: 200px;
	letter-spacing: 0.5px;
}
.yzp-btn-primary:hover {
	box-shadow: 0 10px 26px rgba(20, 184, 166, 0.55);
}
.yzp-btn-primary:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	box-shadow: none;
}
.yzp-btn-secondary {
	background: var(--yzp-navy-light);
	color: var(--yzp-teal-bright);
	border: 1px solid rgba(45, 212, 191, 0.4);
}
.yzp-btn-ghost {
	background: transparent;
	color: var(--yzp-text-muted);
	border: 1px solid rgba(159, 184, 201, 0.25);
}
.yzp-btn-ghost:hover {
	color: var(--yzp-text);
	border-color: rgba(159, 184, 201, 0.5);
}

/* ---------- Scorecard ---------- */
.yzp-scorecard-wrap {
	overflow-x: auto;
	margin-bottom: 18px;
	border: 1px solid rgba(159, 184, 201, 0.15);
	border-radius: 14px;
	background: var(--yzp-surface-1);
}
.yzp-scorecard {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
	white-space: nowrap;
}
.yzp-scorecard th,
.yzp-scorecard td {
	padding: 8px 12px;
	text-align: center;
	border-bottom: 1px solid rgba(159, 184, 201, 0.12);
}
.yzp-scorecard .yzp-cat-col,
.yzp-scorecard .yzp-cat-label {
	text-align: left;
	color: var(--yzp-text-muted);
}
.yzp-scorecard thead th {
	color: var(--yzp-teal-bright);
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	padding-top: 12px;
	padding-bottom: 12px;
}
.yzp-scorecard thead th.yzp-active-col {
	background: rgba(45, 212, 191, 0.12);
}
.yzp-scorecard-totals-row th {
	padding-top: 0;
	padding-bottom: 10px;
	border-bottom: 2px solid rgba(255, 209, 102, 0.35);
}
.yzp-scorecard-totals-row .yzp-totals-label {
	text-transform: none;
	font-size: 11px;
	color: var(--yzp-text-muted);
}
.yzp-scorecard-totals-row .yzp-totals-value {
	font-size: 16px;
	font-weight: 900;
	color: var(--yzp-gold);
}
.yzp-section-row th {
	text-align: left;
	background: var(--yzp-surface-row);
	color: var(--yzp-gold);
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 1px;
	padding: 6px 12px;
}
.yzp-scorecard td.yzp-scored {
	font-weight: 700;
	color: var(--yzp-text);
}
.yzp-scorecard td.yzp-pending {
	color: rgba(159, 184, 201, 0.35);
}
.yzp-score-btn {
	border: 1px solid rgba(45, 212, 191, 0.4);
	background: rgba(20, 184, 166, 0.12);
	color: var(--yzp-teal-bright);
	border-radius: 8px;
	padding: 4px 10px;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	min-width: 34px;
	transition: background 0.15s, transform 0.15s;
}
.yzp-score-btn:hover {
	background: rgba(20, 184, 166, 0.28);
	transform: scale(1.05);
}
.yzp-score-btn.yzp-score-zero {
	color: var(--yzp-text-muted);
	border-color: rgba(159, 184, 201, 0.25);
	background: rgba(159, 184, 201, 0.08);
}
.yzp-scorecard tfoot .yzp-subtotal-row td {
	color: var(--yzp-text-muted);
	font-size: 12px;
}
.yzp-scorecard tfoot .yzp-grand-total-row td {
	font-weight: 900;
	font-size: 15px;
	color: var(--yzp-gold);
	border-top: 2px solid rgba(255, 209, 102, 0.4);
	border-bottom: none;
}

.yzp-empty-msg {
	color: var(--yzp-text-muted);
	font-style: italic;
}
.yzp-export-link {
	background: none;
	border: none;
	color: var(--yzp-teal-bright);
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: underline;
	padding: 0;
}
.yzp-export-link:hover {
	color: var(--yzp-gold);
}

/* ---------- Options overlay ---------- */
.yzp-options-overlay {
	display: none;
	position: absolute;
	inset: 0;
	background: var(--yzp-overlay-scrim);
	backdrop-filter: blur(2px);
	align-items: flex-start;
	justify-content: center;
	z-index: 20;
	padding: 20px;
	overflow-y: auto;
}
.yzp-options-overlay.yzp-visible {
	display: flex;
}
.yzp-options-card {
	background: linear-gradient(160deg, var(--yzp-navy) 0%, var(--yzp-navy-light) 100%);
	border: 1px solid rgba(45, 212, 191, 0.4);
	border-radius: 18px;
	padding: 24px;
	max-width: 360px;
	width: 100%;
	margin-top: 16px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.yzp-options-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 14px;
}
.yzp-options-header h3 {
	margin: 0;
	font-size: 18px;
	color: var(--yzp-teal-bright);
}
.yzp-options-close {
	background: none;
	border: none;
	color: var(--yzp-text-muted);
	font-size: 16px;
	cursor: pointer;
	padding: 4px;
}
.yzp-options-close:hover {
	color: var(--yzp-text);
}
.yzp-option-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 0;
	border-bottom: 1px solid rgba(159, 184, 201, 0.12);
	font-size: 14px;
	cursor: pointer;
}
.yzp-option-row input {
	accent-color: var(--yzp-teal-bright);
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}
.yzp-option-block {
	padding: 12px 0 4px;
	font-size: 14px;
}
.yzp-speed-choices {
	display: flex;
	gap: 14px;
	margin-top: 8px;
	font-size: 12px;
	color: var(--yzp-text-muted);
}
.yzp-speed-choices label {
	display: flex;
	align-items: center;
	gap: 5px;
	cursor: pointer;
}
.yzp-speed-choices input {
	accent-color: var(--yzp-teal-bright);
}

/* ---------- History & all-time leaderboard panels ---------- */
.yzp-panels {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
	margin-bottom: 16px;
}
@media (max-width: 560px) {
	.yzp-panels { grid-template-columns: 1fr; }
}
.yzp-panel {
	background: var(--yzp-surface-1);
	border: 1px solid rgba(159, 184, 201, 0.15);
	border-radius: 14px;
	padding: 14px;
	max-height: 240px;
	overflow-y: auto;
}
.yzp-panel h4 {
	margin: 0 0 10px;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: var(--yzp-teal-bright);
}
.yzp-panel-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 10px;
}
.yzp-panel-header h4 {
	margin: 0;
}
.yzp-clear-history-btn {
	background: none;
	border: 1px solid rgba(159, 184, 201, 0.25);
	color: var(--yzp-text-muted);
	font-size: 11px;
	border-radius: 6px;
	padding: 3px 8px;
	cursor: pointer;
}
.yzp-clear-history-btn:hover {
	color: var(--yzp-text);
	border-color: rgba(159, 184, 201, 0.5);
}
.yzp-history-list,
.yzp-alltime-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-size: 12px;
}
.yzp-history-list li,
.yzp-alltime-list li {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	background: var(--yzp-surface-row);
	border-radius: 8px;
	padding: 6px 10px;
}
.yzp-history-list li > span:first-child {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.yzp-alltime-list li.yzp-rank-1 {
	background: linear-gradient(90deg, rgba(255, 209, 102, 0.18), transparent);
	border: 1px solid rgba(255, 209, 102, 0.35);
}
.yzp-history-time {
	color: var(--yzp-text-muted);
	font-size: 10px;
}

/* ---------- Export row ---------- */
.yzp-export-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	justify-content: center;
	margin-bottom: 20px;
}
.yzp-export-label {
	font-size: 12px;
	color: var(--yzp-text-muted);
}

/* ---------- Confetti ---------- */
.yzp-confetti-layer {
	position: absolute;
	inset: 0;
	pointer-events: none;
	overflow: hidden;
	z-index: 5;
}
.yzp-confetti-piece {
	position: absolute;
	top: -10px;
	width: 8px;
	height: 14px;
	opacity: 0.9;
	animation: yzp-confetti-fall linear forwards;
}
@keyframes yzp-confetti-fall {
	to {
		transform: translateY(420px) rotate(540deg);
		opacity: 0;
	}
}

/* Scrollbar styling */
.yzp-scorecard-wrap::-webkit-scrollbar,
.yzp-panel::-webkit-scrollbar {
	height: 6px;
	width: 6px;
}
.yzp-scorecard-wrap::-webkit-scrollbar-thumb,
.yzp-panel::-webkit-scrollbar-thumb {
	background: rgba(45, 212, 191, 0.4);
	border-radius: 6px;
}

/* ---------- Light theme ---------- */
.yzp-container.yzp-theme-light {
	--yzp-navy-deep: #f4fbfa;
	--yzp-navy: #e6f6f4;
	--yzp-navy-light: #d7ece9;
	--yzp-teal: #0d9488;
	--yzp-teal-bright: #0f766e;
	--yzp-teal-deep: #115e59;
	--yzp-text: #0f2a44;
	--yzp-text-muted: #4b6478;
	--yzp-gold: #b45309;
	/* Pips stay dark ink regardless of theme — the die face is always light. */
	--yzp-pip-ink: #0f2a44;
	/* Surfaces flip to darken-on-light instead of lighten-on-dark. */
	--yzp-surface-1: rgba(15, 42, 68, 0.04);
	--yzp-surface-2: rgba(15, 42, 68, 0.06);
	--yzp-surface-input: #ffffff;
	--yzp-surface-row: rgba(15, 42, 68, 0.05);
	--yzp-overlay-scrim: rgba(15, 42, 68, 0.45);
}
.yzp-container.yzp-theme-light .yzp-die-cube .yzp-cube-face {
	background: linear-gradient(145deg, #ffffff, #eef7f6);
	border-color: var(--yzp-teal-deep);
	box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.8), 0 4px 10px rgba(15, 42, 68, 0.15);
}
.yzp-container.yzp-theme-light .yzp-die-numeric .yzp-die-face {
	color: #ffffff;
}
.yzp-container.yzp-theme-light .yzp-player-chip {
	color: #ffffff;
}
.yzp-container.yzp-theme-light .yzp-btn-primary {
	color: #ffffff;
}
