/* ==========================================================
   LCR Dice Pro — Teal & Navy Theme
   ========================================================== */

.lcr-container {
	--lcr-navy-deep: #071a2c;
	--lcr-navy: #0f2a44;
	--lcr-navy-light: #1e3a5f;
	--lcr-teal: #14b8a6;
	--lcr-teal-bright: #2dd4bf;
	--lcr-teal-deep: #0d9488;
	--lcr-text: #e6f6f4;
	--lcr-text-muted: #9fb8c9;
	--lcr-danger: #ff6b6b;
	--lcr-gold: #ffd166;

	max-width: 680px;
	margin: 24px auto;
	padding: 28px;
	border-radius: 20px;
	background: linear-gradient(160deg, var(--lcr-navy-deep) 0%, var(--lcr-navy) 55%, var(--lcr-navy-light) 100%);
	color: var(--lcr-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;
}

.lcr-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;
}

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

/* ---------- Header ---------- */
.lcr-header {
	text-align: center;
	margin-bottom: 18px;
}
.lcr-title {
	margin: 0;
	font-size: 26px;
	font-weight: 800;
	letter-spacing: 0.5px;
	background: linear-gradient(90deg, var(--lcr-teal-bright), #7fe3d8);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}
.lcr-dice-emoji { font-size: 24px; }
.lcr-subtitle {
	margin: 6px 0 0;
	font-size: 13px;
	color: var(--lcr-text-muted);
}

/* ---------- Setup / player input ---------- */
.lcr-setup { margin-bottom: 16px; }
.lcr-input-row {
	display: flex;
	gap: 10px;
	margin-bottom: 10px;
}
.lcr-player-name-input {
	flex: 1;
	padding: 10px 14px;
	border-radius: 10px;
	border: 1px solid var(--lcr-navy-light);
	background: rgba(255, 255, 255, 0.95);
	color: #0f2a44;
	font-size: 14px;
}
.lcr-player-name-input:focus {
	outline: 2px solid var(--lcr-teal-bright);
	outline-offset: 1px;
}
.lcr-player-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.lcr-player-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 10px 6px 14px;
	border-radius: 999px;
	background: rgba(20, 184, 166, 0.14);
	border: 1px solid var(--lcr-teal-deep);
	font-size: 13px;
	font-weight: 600;
}
.lcr-player-chip button {
	border: none;
	background: rgba(255, 107, 107, 0.18);
	color: var(--lcr-danger);
	border-radius: 50%;
	width: 18px;
	height: 18px;
	line-height: 1;
	cursor: pointer;
	font-size: 12px;
}

/* ---------- Controls ---------- */
.lcr-controls {
	display: flex;
	flex-wrap: wrap;
	align-items: end;
	gap: 18px;
	margin-bottom: 16px;
	padding: 14px 16px;
	border-radius: 14px;
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid rgba(255, 255, 255, 0.06);
}
.lcr-control-label {
	display: flex;
	flex-direction: column;
	gap: 4px;
	font-size: 12px;
	color: var(--lcr-text-muted);
}
.lcr-control-label select {
	padding: 7px 10px;
	border-radius: 8px;
	border: 1px solid var(--lcr-navy-light);
	background: var(--lcr-navy);
	color: var(--lcr-text);
	font-size: 13px;
}
.lcr-toggle {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: var(--lcr-text-muted);
	cursor: pointer;
}
.lcr-toggle input { accent-color: var(--lcr-teal-bright); width: 16px; height: 16px; }

/* ---------- Chip table ---------- */
.lcr-table-wrap {
	margin-bottom: 14px;
	border-radius: 14px;
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.08);
}
.lcr-chip-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}
.lcr-chip-table thead th {
	text-align: left;
	padding: 10px 14px;
	background: rgba(255, 255, 255, 0.05);
	color: var(--lcr-text-muted);
	font-weight: 700;
	text-transform: uppercase;
	font-size: 11px;
	letter-spacing: 0.4px;
}
.lcr-chip-table tbody td {
	padding: 9px 14px;
	border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.lcr-chip-table tbody tr.lcr-active-player {
	background: rgba(255, 209, 102, 0.1);
}
.lcr-chip-table tbody tr.lcr-out-player {
	opacity: 0.45;
}
.lcr-empty-row td {
	text-align: center;
	color: var(--lcr-text-muted);
	padding: 16px;
}
.lcr-status-out { color: var(--lcr-danger); font-weight: 700; font-size: 11px; }
.lcr-status-active { color: var(--lcr-gold); font-weight: 700; font-size: 11px; }
.lcr-status-in { color: var(--lcr-teal-bright); font-weight: 700; font-size: 11px; }
.lcr-status-winner { color: var(--lcr-gold); font-weight: 800; font-size: 11px; }

/* ---------- Center pot ---------- */
.lcr-center-pot {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin-bottom: 14px;
	padding: 10px;
	border-radius: 12px;
	background: rgba(20, 184, 166, 0.08);
	border: 1px dashed var(--lcr-teal-deep);
}
.lcr-center-label {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--lcr-text-muted);
}
.lcr-center-count {
	font-size: 20px;
	font-weight: 800;
	color: var(--lcr-gold);
}

/* ---------- Turn indicator ---------- */
.lcr-turn-indicator {
	text-align: center;
	padding: 10px 16px;
	border-radius: 12px;
	background: rgba(20, 184, 166, 0.08);
	border: 1px solid var(--lcr-teal-deep);
	margin-bottom: 16px;
	font-size: 13px;
	color: var(--lcr-text-muted);
}
.lcr-turn-name {
	color: var(--lcr-teal-bright);
	font-weight: 700;
}

/* ---------- Dice stage ---------- */
.lcr-dice-stage {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 16px;
	min-height: 90px;
	margin-bottom: 10px;
	flex-wrap: wrap;
}
.lcr-die {
	width: 72px;
	height: 72px;
	border-radius: 14px;
	background: linear-gradient(145deg, #f4fbfa, #d7ece9);
	border: 2px solid var(--lcr-teal-deep);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 30px;
	font-weight: 900;
	color: #06231e;
	box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35), inset 0 2px 4px rgba(255, 255, 255, 0.35);
}
.lcr-die.lcr-rolling { animation: lcr-die-shake 0.5s ease-in-out infinite; }
@keyframes lcr-die-shake {
	0%, 100% { transform: rotate(0deg) scale(1); }
	25% { transform: rotate(-8deg) scale(1.05); }
	75% { transform: rotate(8deg) scale(1.05); }
}
.lcr-die.lcr-landed { animation: lcr-die-land 0.4s ease; }
@keyframes lcr-die-land {
	0% { transform: scale(1.3); box-shadow: 0 0 0 6px rgba(255, 209, 102, 0.4); }
	100% { transform: scale(1); box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35), inset 0 2px 4px rgba(255, 255, 255, 0.35); }
}
.lcr-die.lcr-face-L { background: linear-gradient(145deg, #dbeeff, #8ec4f5); border-color: #1c6fc9; color: #051529; }
.lcr-die.lcr-face-C { background: linear-gradient(145deg, #fff6d6, #ffe38a); border-color: #c99a1a; color: #2b1f00; }
.lcr-die.lcr-face-R { background: linear-gradient(145deg, #ffe3e3, #ffb3b3); border-color: #c0392b; color: #2b0a0a; }
.lcr-die.lcr-face-dot { background: linear-gradient(145deg, #ddffe6, #93e8ac); border-color: #1f8a4c; color: #062712; }

.lcr-roll-readout {
	text-align: center;
	font-size: 13px;
	color: var(--lcr-text-muted);
	min-height: 18px;
	margin-bottom: 16px;
}

/* ---------- Buttons ---------- */
.lcr-action-row {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: center;
	margin-bottom: 18px;
}
.lcr-btn {
	border: none;
	border-radius: 12px;
	padding: 12px 22px;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.lcr-btn:active { transform: scale(0.97); }
.lcr-btn-primary {
	background: linear-gradient(135deg, var(--lcr-teal-bright), var(--lcr-teal-deep));
	color: #06231e;
	box-shadow: 0 8px 20px rgba(20, 184, 166, 0.35);
}
.lcr-btn-secondary {
	background: rgba(20, 184, 166, 0.14);
	color: var(--lcr-teal-bright);
	border: 1px solid var(--lcr-teal-deep);
}
.lcr-btn-ghost {
	background: transparent;
	color: var(--lcr-text-muted);
	border: 1px solid rgba(255, 255, 255, 0.12);
}
.lcr-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* ---------- Winner banner ---------- */
.lcr-winner-banner {
	text-align: center;
	padding: 16px;
	border-radius: 14px;
	background: linear-gradient(135deg, rgba(255, 209, 102, 0.18), rgba(255, 209, 102, 0.05));
	border: 1px solid var(--lcr-gold);
	margin-bottom: 18px;
}
.lcr-winner-text {
	font-size: 18px;
	font-weight: 800;
	color: var(--lcr-gold);
}

/* ---------- Panels ---------- */
.lcr-panels {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}
@media (max-width: 560px) {
	.lcr-panels { grid-template-columns: 1fr; }
}
.lcr-panel {
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid rgba(255, 255, 255, 0.06);
	border-radius: 14px;
	padding: 14px 16px;
}
.lcr-panel h4 {
	margin: 0 0 10px;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--lcr-text-muted);
}
.lcr-panel p {
	margin: 0;
	font-size: 12.5px;
	line-height: 1.55;
	color: var(--lcr-text-muted);
}
.lcr-history-list {
	list-style: none;
	margin: 0;
	padding: 0;
	max-height: 220px;
	overflow-y: auto;
	font-size: 12.5px;
}
.lcr-history-list li {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	padding: 6px 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.lcr-history-list li:last-child { border-bottom: none; }
.lcr-history-time { color: var(--lcr-text-muted); font-size: 11px; }
.lcr-empty-msg { color: var(--lcr-text-muted); text-align: center; padding: 10px 0; }

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