/**
 *
 * Slots  Machine extension for the phpBB Forum Software package.
 *
 * @copyright (c) phpBB Limited <https://www.phpbb.com>, <https://www.phpbbextnl.be>, SpIdErPiGgY
 * @license GNU General Public License, version 2 (GPL-2.0)
 *
 */
 
.slotmachine-page {
	margin: 12px 0 20px;
}

.slotmachine-layout {
	display: grid;
	grid-template-columns: minmax(0, 1.75fr) minmax(290px, 360px);
	gap: 16px;
	align-items: start;
}

.slotmachine-main,
.slotmachine-sidebar .panel {
	margin-bottom: 0;
}

.slotmachine-hero {
	margin-bottom: 14px;
}

.slotmachine-title {
	margin: 0 0 4px;
}

.slotmachine-subtitle {
	margin: 0;
	color: #666;
}

.slotmachine-cabinet {
	padding: 14px;
	border: 1px solid #9a6a16;
	border-radius: 14px;
	background: linear-gradient(180deg, #3a2407 0%, #1a1003 16%, #381f04 100%);
	box-shadow: inset 0 1px 0 rgba(255, 233, 173, 0.25), 0 8px 18px rgba(0, 0, 0, 0.2);
}

.slotmachine-stage {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 56px;
	gap: 12px;
	align-items: stretch;
}

.slotmachine-machine-core {
	padding: 12px;
	border: 1px solid #8d6118;
	border-radius: 12px;
	background: linear-gradient(180deg, #4b2a08 0%, #261404 14%, #130c03 100%);
	box-shadow: inset 0 0 0 1px rgba(255, 214, 124, 0.18), inset 0 18px 28px rgba(255, 182, 56, 0.08);
}

.slotmachine-topbar {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	align-items: center;
	margin-bottom: 10px;
	font-size: 11px;
	text-transform: uppercase;
	color: #e4c98c;
}

.slotmachine-topbar-label {
	font-weight: 700;
	letter-spacing: .04em;
	color: #fff2c8;
}

.slotmachine-cost strong {
	color: #fff2c8;
}

.slotmachine-reels {
	display: grid;
	grid-template-columns: repeat(5, minmax(56px, 1fr));
	gap: 8px;
	padding: 12px;
	border: 1px solid #8d6118;
	border-radius: 12px;
	background: linear-gradient(180deg, #120a03 0%, #281502 50%, #120a03 100%);
	box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(255, 211, 114, 0.08);
}

.slotmachine-reel {
	min-height: 96px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid #7a5a1d;
	border-radius: 10px;
	background: linear-gradient(180deg, #fff9ee 0%, #f0e3c0 48%, #fff7e5 100%);
	box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 0 0 1px rgba(255, 211, 120, 0.1);
	font-size: 42px;
	line-height: 1;
	transition: transform .2s ease, opacity .2s ease, box-shadow .2s ease;
}

.slotmachine-reel.is-spinning {
	opacity: .92;
	transform: translateY(4px) scale(.985);
}

.slotmachine-reel.is-stop {
	transform: scale(1.05);
	box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 0 0 1px rgba(255, 211, 120, 0.1), 0 0 12px rgba(255, 193, 58, 0.35);
}

.slotmachine-symbol {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1em;
}

.slotmachine-symbol-seven {
	font-weight: 800;
	font-size: 1.05em;
	color: #b31313;
	text-shadow: 0 1px 0 #fff, 0 0 8px rgba(179, 19, 19, 0.18);
}

.slotmachine-symbol-joker {
	filter: drop-shadow(0 2px 3px rgba(0,0,0,.12));
}

.slotmachine-symbol-bar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0;
	padding: 6px 10px;
	min-width: 54px;
	min-height: 40px;
	border: 1px solid rgba(255, 240, 196, 0.16);
	border-radius: 8px;
	background: linear-gradient(180deg, #323232 0%, #151515 52%, #050505 100%);
	color: #fff8da;
	font-weight: 900;
	letter-spacing: .08em;
	font-size: 20px;
	line-height: 1;
	text-align: center;
	text-shadow: 0 1px 0 rgba(0, 0, 0, 0.82), 0 0 8px rgba(255, 235, 160, 0.22);
	box-shadow: inset 0 1px 0 rgba(255,255,255,.14), inset 0 -1px 0 rgba(0,0,0,.35), 0 1px 2px rgba(0,0,0,.18);
}

.slotmachine-symbol-bar span {
	display: block;
	width: 100%;
	text-align: center;
}

.slotmachine-handle {
	position: relative;
	width: 56px;
	min-height: 188px;
	border: 1px solid #6f4d16;
	border-radius: 18px;
	background: linear-gradient(180deg, #2a1704 0%, #120b03 100%);
	box-shadow: inset 0 0 0 1px rgba(255, 207, 103, 0.12), 0 4px 10px rgba(0,0,0,.2);
	cursor: pointer;
	overflow: visible;
	transition: transform .18s ease, box-shadow .18s ease;
}

.slotmachine-handle:hover,
.slotmachine-handle:focus-visible {
	box-shadow: inset 0 0 0 1px rgba(255, 207, 103, 0.15), 0 6px 14px rgba(0,0,0,.25);
}

.slotmachine-handle-stick {
	position: absolute;
	left: 50%;
	top: 34px;
	width: 10px;
	height: 112px;
	margin-left: -5px;
	border-radius: 999px;
	background: linear-gradient(180deg, #e2e2e2 0%, #b3b3b3 30%, #6f6f6f 100%);
	box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 1px 3px rgba(0,0,0,.35);
	transform-origin: top center;
	transition: transform .18s ease;
}

.slotmachine-handle-knob {
	position: absolute;
	left: 50%;
	top: 6px;
	width: 28px;
	height: 28px;
	margin-left: -14px;
	border-radius: 50%;
	background: radial-gradient(circle at 30% 30%, #ffd0d0, #ff5757 34%, #b00000 78%);
	box-shadow: inset -2px -4px 6px rgba(94, 0, 0, 0.35), 0 0 0 2px rgba(255,255,255,.08), 0 2px 8px rgba(0,0,0,.35);
	transition: transform .18s ease;
}

.slotmachine-handle.is-pulled {
	transform: translateY(2px);
}

.slotmachine-handle.is-pulled .slotmachine-handle-stick {
	transform: rotate(17deg) translateY(8px);
}

.slotmachine-handle.is-pulled .slotmachine-handle-knob {
	transform: translate(9px, 13px);
}

.slotmachine-hud {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
	margin-top: 10px;
}

.slotmachine-hud-box {
	padding: 10px;
	border: 1px solid #7a5720;
	border-radius: 8px;
	background: linear-gradient(180deg, rgba(255,245,214,.98) 0%, rgba(241,224,177,.96) 100%);
	box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}

.slotmachine-hud-box span {
	display: block;
	font-size: 11px;
	color: #6b5320;
	text-transform: uppercase;
}

.slotmachine-hud-box strong {
	display: block;
	margin-top: 4px;
	font-size: 22px;
	color: #222;
}

.slotmachine-hud-box-win strong {
	color: #1e7f27;
}

.slotmachine-controls {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 14px;
}

.slotmachine-button {
	position: relative;
	min-width: 132px;
	padding: 8px 10px;
	border: 1px solid rgba(41, 20, 3, 0.9);
	border-radius: 10px;
	color: #fff7dd;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: .01em;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
	box-shadow: inset 0 1px 0 rgba(255,255,255,.28), inset 0 -1px 0 rgba(0,0,0,.3), 0 3px 8px rgba(0,0,0,.24);
	transition: transform .12s ease, filter .12s ease, box-shadow .12s ease;
}

.slotmachine-button:hover:not(:disabled),
.slotmachine-button:focus-visible:not(:disabled) {
	filter: brightness(1.08);
	transform: translateY(-1px);
	box-shadow: inset 0 1px 0 rgba(255,255,255,.32), inset 0 -1px 0 rgba(0,0,0,.3), 0 5px 12px rgba(0,0,0,.28);
}

.slotmachine-button:active:not(:disabled) {
	transform: translateY(1px);
	box-shadow: inset 0 2px 6px rgba(0,0,0,.28), 0 2px 4px rgba(0,0,0,.22);
}

.slotmachine-button:disabled {
	opacity: .55;
	filter: grayscale(.15);
	cursor: default;
}

.slotmachine-button-spin {
	background: linear-gradient(180deg, #ffcc39 0%, #ff930f 52%, #cb4d0b 100%);
	font-size: 14px;
	padding: 8px 12px;
	min-width: 80px;
}

.slotmachine-button-collect {
	background: linear-gradient(180deg, #38bb72 0%, #17843d 52%, #0f5828 100%);
}

.slotmachine-button-claim {
	background: linear-gradient(180deg, #3ca8ff 0%, #1d6fe2 52%, #123f99 100%);
}

.slotmachine-button-mute {
	background: linear-gradient(180deg, #b96aff 0%, #7b36d6 52%, #4d218d 100%);
	font-size: 14px;
	padding: 8px 12px;
	min-width: 95px;
}

.slotmachine-message {
	margin-top: 14px;
	min-height: 22px;
	padding: 13px 16px;
	border: 1px solid #7f5a1d;
	border-radius: 10px;
	background: linear-gradient(180deg, #201005 0%, #0d0803 100%);
	color: #f7d56f;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.45;
	text-align: center;
	box-shadow: inset 0 0 0 1px rgba(255, 215, 123, 0.12), inset 0 0 18px rgba(255, 174, 54, 0.12);
}

.slotmachine-message.is-win {
	background: linear-gradient(180deg, #1b1710 0%, #111 100%);
	border-color: #8c6b21;
	color: #f2cf6a;
	box-shadow: inset 0 0 0 1px rgba(255, 215, 123, 0.18), inset 0 0 22px rgba(255, 197, 66, 0.16), 0 0 12px rgba(255, 197, 66, 0.16);
}

.slotmachine-sidebar {
	position: sticky;
	top: 12px;
	align-self: start;
}

.slotmachine-sidebar-panel {
	border: 1px solid #d3c19b;
	border-radius: 10px;
	background: linear-gradient(180deg, #f9f5eb 0%, #f1e6cd 100%);
	box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}

.slotmachine-sidebar-head {
	margin: -2px 0 12px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: #856014;
}

.slotmachine-usercard {
	display: flex;
	gap: 12px;
	align-items: center;
	font-size: 11px;
}

.slotmachine-usercard h3,
.slotmachine-board h3 {
	margin: 0 0 10px;
}

.slotmachine-avatar img,
.slotmachine-row-avatar img {
	display: block;
	max-width: 42px;
	max-height: 42px;
	border-radius: 50%;
}

.slotmachine-username {
	display: block;
	margin: 6px 0 4px;
	font-size: 20px;
	line-height: 1.15;
}

.slotmachine-spin-count {
	font-size: 18px;
	font-weight: 700;
	color: #243b53;
}

.slotmachine-spin-count span {
	font-size: 20px;
	color: #0b5cad;
}

.slotmachine-guest-note {
	margin-top: 6px;
	font-size: 11px;
	color: #8a6d3b;
}

.slotmachine-sidebar-divider {
	height: 1px;
	margin: 14px 0;
	background: linear-gradient(90deg, rgba(133,96,20,0), rgba(133,96,20,.35), rgba(133,96,20,0));
}

.slotmachine-leaderboard {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.slotmachine-row {
	display: grid;
	grid-template-columns: 34px minmax(0, 1fr) auto;
	gap: 10px;
	align-items: center;
	padding: 8px 10px;
	border: 1px solid #e1e1e1;
	border-radius: 8px;
	background: #fafafa;
}

.slotmachine-row-top {
	box-shadow: inset 0 1px 0 rgba(255,255,255,.65);
}

.slotmachine-row-first {
	background: linear-gradient(180deg, #fff7da 0%, #f8ebbf 100%);
	border-color: #e3c96d;
}

.slotmachine-row-second {
	background: linear-gradient(180deg, #f7f8fb 0%, #ebeff5 100%);
	border-color: #ccd5e2;
}

.slotmachine-row-third {
	background: linear-gradient(180deg, #fdf1e7 0%, #f4deca 100%);
	border-color: #ddb48c;
}

.slotmachine-row-rank {
	font-weight: 700;
	text-align: center;
	color: #2d3748;
}

.slotmachine-row-user {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
}

.slotmachine-row-name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-weight: 700;
}

.slotmachine-row-score {
	font-weight: 800;
	font-size: 0.70rem;
	line-height: 1;
	color: #d35400;
	min-width: 70px;
	text-align: right;
	letter-spacing: 0.5px;
	text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.slotmachine-empty {
	margin: 0;
	padding: 10px 12px;
	border: 1px dashed #d2c29d;
	border-radius: 8px;
	background: rgba(255,255,255,.5);
	color: #6b5a36;
}

.slotmachine-paytable-panel {
	margin-top: 16px;
}

.slotmachine-paytable {
	padding: 14px;
	border: 1px solid #ded4bc;
	border-radius: 10px;
	background: linear-gradient(180deg, #fffdfa 0%, #f8f2e7 100%);
}

.slotmachine-paytable-title {
	margin-bottom: 8px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: #7a5b1b;
}

.slotmachine-paytable-tablewrap {
	overflow-x: auto;
}

.slotmachine-paytable-table {
	width: 100%;
	min-width: 760px;
	border-collapse: separate;
	border-spacing: 0;
}

.slotmachine-paytable-table th,
.slotmachine-paytable-table td {
	padding: 10px 12px;
	border-bottom: 1px solid #e3dcc9;
	vertical-align: middle;
}

.slotmachine-paytable-table thead th {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: #6d531a;
	background: linear-gradient(180deg, #fffdf8 0%, #f5eddc 100%);
	position: sticky;
	top: 0;
	z-index: 1;
}

.slotmachine-paytable-table tbody tr:last-child td {
	border-bottom: 0;
}

.slotmachine-paytable-col-symbol {
	width: 84px;
}

.slotmachine-paytable-col-payout {
	width: 86px;
	text-align: center;
	white-space: nowrap;
}

.slotmachine-paytable-symbolcell {
	text-align: center;
}

.slotmachine-paytable-table tbody td:nth-child(3),
.slotmachine-paytable-table tbody td:nth-child(4),
.slotmachine-paytable-table tbody td:nth-child(5) {
	text-align: center;
	font-weight: 700;
	color: #0b5cad;
}

.slotmachine-paytable-table strong {
	display: block;
	font-size: 14px;
	color: #1d2d44;
	margin-bottom: 2px;
}

.slotmachine-paytable-table span {
	display: block;
	font-size: 12px;
	color: #7b8c9b;
}

.slotmachine-paytable-featured td {
	background: linear-gradient(180deg, #fffdf4 0%, #f8f0d1 100%);
}

.slotmachine-paytable-mixrow td {
	background: linear-gradient(180deg, #f7f9fb 0%, #edf2f7 100%);
}

.slotmachine-paytable-mixpayout {
	text-align: left !important;
	color: #0b5cad;
	font-weight: 700;
}

.slotmachine-payrow-mix {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 48px;
	padding: 4px 6px;
	border-radius: 6px;
	background: #1d2d44;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
	.slotmachine-reel,
	.slotmachine-handle,
	.slotmachine-handle-stick,
	.slotmachine-handle-knob,
	.slotmachine-button {
		transition: none;
	}
}

@media (max-width: 1100px) {
	.slotmachine-layout {
		grid-template-columns: 1fr;
	}

	.slotmachine-sidebar {
		position: static;
		top: auto;
	}
}

@media (max-width: 700px) {
	.slotmachine-stage {
		grid-template-columns: minmax(0, 1fr) 46px;
		gap: 8px;
	}

	.slotmachine-reels {
		grid-template-columns: repeat(5, minmax(42px, 1fr));
		gap: 6px;
		padding: 8px;
	}

	.slotmachine-reel {
		min-height: 76px;
		font-size: 34px;
	}

	.slotmachine-symbol-bar {
		flex-direction: column;
		align-items: center;
		justify-content: center;
		min-width: 32px;
		width: 32px;
		min-height: 56px;
		padding: 6px 0;
		line-height: 1;
		letter-spacing: 0;
		font-size: 15px;
	}

	.slotmachine-handle {
		width: 46px;
		min-height: 164px;
	}

	.slotmachine-hud,
	.slotmachine-row {
		grid-template-columns: 1fr;
	}

	.slotmachine-controls {
		gap: 8px;
	}

	.slotmachine-button {
		min-width: 0;
		flex: 1 1 calc(50% - 8px);
		font-size: 13px;
		padding: 9px 10px;
		min-height: 42px;
		line-height: 1.2;
	}

	.slotmachine-button-spin,
	.slotmachine-button-collect,
	.slotmachine-button-claim,
	.slotmachine-button-buy,
	.slotmachine-button-mute {
		font-size: 13px;
		padding: 9px 10px;
	}

	.slotmachine-message {
		font-size: 14px;
		padding: 12px 14px;
	}

	.slotmachine-username {
		font-size: 24px;
	}

	.slotmachine-spin-count {
		font-size: 20px;
	}

	.slotmachine-spin-count span {
		font-size: 22px;
	}

	.slotmachine-paytable {
		padding: 10px;
	}

	.slotmachine-paytable-table {
		min-width: 0;
	}

	.slotmachine-paytable-table thead {
		display: none;
	}

	.slotmachine-paytable-table,
	.slotmachine-paytable-table tbody,
	.slotmachine-paytable-table tr,
	.slotmachine-paytable-table td {
		display: block;
		width: 100%;
	}

	.slotmachine-paytable-table tr {
		margin-bottom: 10px;
		border: 1px solid #ddd4bf;
		border-radius: 8px;
		overflow: hidden;
		background: #fff;
	}

	.slotmachine-paytable-table td {
		border-bottom: 1px solid #eee5d4;
		text-align: left !important;
		padding: 8px 10px;
	}

	.slotmachine-paytable-table td:last-child {
		border-bottom: 0;
	}

	.slotmachine-paytable-table td:nth-child(3)::before,
	.slotmachine-paytable-table td:nth-child(4)::before,
	.slotmachine-paytable-table td:nth-child(5)::before {
		display: inline-block;
		min-width: 26px;
		margin-right: 8px;
		font-weight: 700;
		color: #6d531a;
	}

	.slotmachine-paytable-table td:nth-child(3)::before {
		content: '3x';
	}

	.slotmachine-paytable-table td:nth-child(4)::before {
		content: '4x';
	}

	.slotmachine-paytable-table td:nth-child(5)::before {
		content: '5x';
	}

	.slotmachine-paytable-mixpayout::before {
		content: 'Bonus';
		display: inline-block;
		min-width: 46px;
		margin-right: 8px;
		font-weight: 700;
		color: #6d531a;
	}

	.slotmachine-upbox {
		margin-top: 10px;
		padding: 9px 10px;
		font-size: 13px;
	}

	.slotmachine-upbox-head {
		font-size: 10px;
		margin-bottom: 3px;
	}
}

@media (max-width: 480px) {
	.slotmachine-stage {
		grid-template-columns: minmax(0, 1fr) 40px;
		gap: 6px;
	}

	.slotmachine-reels {
		grid-template-columns: repeat(5, minmax(36px, 1fr));
		gap: 4px;
		padding: 6px;
	}

	.slotmachine-reel {
		min-height: 64px;
		font-size: 28px;
	}

	.slotmachine-symbol-bar {
		min-width: 28px;
		width: 28px;
		min-height: 48px;
		font-size: 13px;
		padding: 4px 0;
	}

	.slotmachine-handle {
		width: 40px;
		min-height: 140px;
	}

	.slotmachine-controls {
		gap: 6px;
	}

	.slotmachine-button {
		flex: 1 1 calc(50% - 6px);
		font-size: 12px;
		padding: 8px 8px;
		min-height: 38px;
		border-radius: 8px;
	}

	.slotmachine-button-spin,
	.slotmachine-button-collect,
	.slotmachine-button-claim,
	.slotmachine-button-buy,
	.slotmachine-button-mute {
		font-size: 12px;
		padding: 8px 8px;
	}

	.slotmachine-message {
		font-size: 13px;
		padding: 10px 12px;
	}

	.slotmachine-username {
		font-size: 20px;
	}

	.slotmachine-spin-count {
		font-size: 18px;
	}

	.slotmachine-spin-count span {
		font-size: 20px;
	}

	.slotmachine-upbox {
		padding: 8px 9px;
		font-size: 12px;
	}
}

.slotmachine-upbox {
	margin-top: 12px;
	padding: 10px 12px;
	border: 1px solid #7a5720;
	border-radius: 8px;
	background: linear-gradient(180deg, rgba(255, 247, 222, 0.98) 0%, rgba(243, 229, 190, 0.96) 100%);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
	color: #4f3d15;
}

.slotmachine-upbox-head {
	font-size: 11px;
	text-transform: uppercase;
	font-weight: 700;
	letter-spacing: 0.04em;
	color: #6b5320;
	margin-bottom: 4px;
}

.slotmachine-upbox-balance strong {
	color: #222;
}

.slotmachine-upbox-line + .slotmachine-upbox-line {
	margin-top: 4px;
}

.slotmachine-button-buy {
	background: linear-gradient(180deg, #f8eed0 0%, #e4ca8d 100%);
	color: #33260d;
	border-color: #8e6a25;
}