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

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

	max-width: 820px;
	margin: 24px auto;
	padding: 28px;
	border-radius: 20px;
	background: linear-gradient(160deg, var(--mdp-navy-deep) 0%, var(--mdp-navy) 55%, var(--mdp-navy-light) 100%);
	color: var(--mdp-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;
}
.mdp-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;
}
.mdp-container * {
	box-sizing: border-box;
	position: relative;
	z-index: 1;
}

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

/* ---------- Turn bar + dice ---------- */
.mdp-turn-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	flex-wrap: wrap;
	padding: 12px 16px;
	border-radius: 12px;
	background: rgba(20, 184, 166, 0.08);
	border: 1px solid var(--mdp-teal-deep);
	margin-bottom: 10px;
}
.mdp-turn-indicator { font-size: 13px; color: var(--mdp-text-muted); }
.mdp-turn-name { color: var(--mdp-teal-bright); font-weight: 700; }
.mdp-dice-pair { display: flex; gap: 10px; }
.mdp-die {
	width: 52px;
	height: 52px;
	border-radius: 12px;
	background: linear-gradient(145deg, #f4fbfa, #d7ece9);
	border: 2px solid var(--mdp-teal-deep);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 22px;
	font-weight: 900;
	color: #06231e;
	box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35), inset 0 2px 4px rgba(255, 255, 255, 0.35);
}
.mdp-die.mdp-rolling { animation: mdp-die-shake 0.5s ease-in-out infinite; }
@keyframes mdp-die-shake {
	0%, 100% { transform: rotate(0deg) scale(1); }
	25% { transform: rotate(-8deg) scale(1.05); }
	75% { transform: rotate(8deg) scale(1.05); }
}
.mdp-die.mdp-landed { animation: mdp-die-land 0.4s ease; }
@keyframes mdp-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 6px 14px rgba(0, 0, 0, 0.35), inset 0 2px 4px rgba(255, 255, 255, 0.35); }
}
.mdp-die.mdp-doubles { border-color: var(--mdp-gold); }

.mdp-dice-pair-standalone { justify-content: center; margin: 18px 0; }
.mdp-dice-pair-standalone .mdp-die { width: 80px; height: 80px; font-size: 34px; }

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

/* ---------- Buttons ---------- */
.mdp-action-row {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: center;
	margin-bottom: 18px;
}
.mdp-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;
}
.mdp-btn:active { transform: scale(0.97); }
.mdp-btn-primary {
	background: linear-gradient(135deg, var(--mdp-teal-bright), var(--mdp-teal-deep));
	color: #06231e;
	box-shadow: 0 8px 20px rgba(20, 184, 166, 0.35);
}
.mdp-btn-secondary {
	background: rgba(20, 184, 166, 0.14);
	color: var(--mdp-teal-bright);
	border: 1px solid var(--mdp-teal-deep);
}
.mdp-btn-ghost {
	background: transparent;
	color: var(--mdp-text-muted);
	border: 1px solid rgba(255, 255, 255, 0.12);
}
.mdp-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- Winner banner ---------- */
.mdp-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(--mdp-gold);
	margin-bottom: 18px;
}
.mdp-winner-text { font-size: 18px; font-weight: 800; color: var(--mdp-gold); }

/* ---------- Setup / player input ---------- */
.mdp-setup { margin-bottom: 16px; }
.mdp-input-row { display: flex; gap: 10px; margin-bottom: 10px; }
.mdp-player-name-input {
	flex: 1;
	padding: 10px 14px;
	border-radius: 10px;
	border: 1px solid var(--mdp-navy-light);
	background: rgba(255, 255, 255, 0.95);
	color: #0f2a44;
	font-size: 14px;
}
.mdp-player-name-input:focus { outline: 2px solid var(--mdp-teal-bright); outline-offset: 1px; }
.mdp-player-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.mdp-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(--mdp-teal-deep);
	font-size: 13px;
	font-weight: 600;
}
.mdp-player-chip button {
	border: none;
	background: rgba(255, 107, 107, 0.18);
	color: var(--mdp-danger);
	border-radius: 50%;
	width: 18px;
	height: 18px;
	line-height: 1;
	cursor: pointer;
	font-size: 12px;
}
.mdp-token-swatch {
	display: inline-block;
	width: 10px;
	height: 10px;
	border-radius: 50%;
}

/* ---------- Controls ---------- */
.mdp-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);
}
.mdp-standalone-controls { justify-content: center; }
.mdp-control-label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--mdp-text-muted); }
.mdp-control-label select {
	padding: 7px 10px;
	border-radius: 8px;
	border: 1px solid var(--mdp-navy-light);
	background: var(--mdp-navy);
	color: var(--mdp-text);
	font-size: 13px;
}
.mdp-toggle { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--mdp-text-muted); cursor: pointer; }
.mdp-toggle input { accent-color: var(--mdp-teal-bright); width: 16px; height: 16px; }

/* ---------- Board ---------- */
.mdp-board-wrap {
	margin-bottom: 16px;
	overflow-x: auto;
}
.mdp-board {
	display: grid;
	grid-template-columns: repeat(11, minmax(52px, 1fr));
	grid-template-rows: repeat(11, minmax(52px, 1fr));
	gap: 2px;
	background: rgba(255, 255, 255, 0.06);
	border-radius: 12px;
	padding: 6px;
	min-width: 620px;
	aspect-ratio: 1 / 1;
}
.mdp-space {
	background: rgba(15, 42, 68, 0.85);
	border-radius: 6px;
	padding: 3px 4px;
	font-size: 8px;
	line-height: 1.2;
	color: var(--mdp-text-muted);
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	overflow: hidden;
	position: relative;
	border: 1px solid rgba(255, 255, 255, 0.05);
}
.mdp-space-name { font-weight: 700; color: var(--mdp-text); word-break: break-word; }
.mdp-space-price { color: var(--mdp-text-muted); font-size: 7px; }
.mdp-space-swatch { height: 5px; border-radius: 2px; margin-bottom: 2px; }
.mdp-space-center {
	grid-column: 2 / 11;
	grid-row: 2 / 11;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(20, 184, 166, 0.05);
	border-radius: 10px;
	font-size: 13px;
	color: var(--mdp-text-muted);
	text-align: center;
	padding: 20px;
}
.mdp-space-owned { box-shadow: inset 0 0 0 2px var(--mdp-gold); }
.mdp-space-tokens {
	position: absolute;
	top: 2px;
	right: 2px;
	display: flex;
	flex-wrap: wrap;
	gap: 1px;
	max-width: 90%;
	justify-content: flex-end;
}
.mdp-token-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.5);
}

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

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

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

/* ---------- Modal (buy prompt / card draw) ---------- */
.mdp-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(2, 10, 20, 0.6);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 999;
	padding: 20px;
}
.mdp-modal {
	background: var(--mdp-navy);
	border: 1px solid var(--mdp-teal-deep);
	border-radius: 16px;
	padding: 22px;
	max-width: 360px;
	width: 100%;
	text-align: center;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}
.mdp-modal h4 { margin: 0 0 10px; color: var(--mdp-teal-bright); font-size: 15px; }
.mdp-modal p { margin: 0 0 16px; font-size: 13px; color: var(--mdp-text); line-height: 1.5; }
