/* Gremlin Slots — all rules scoped under .gs-app so nothing leaks. */

.gs-app {
	--gs-bg: #050510;
	--gs-panel: #0a1525;
	--gs-panel-deep: #050a14;
	--gs-line: #00bfff;
	--gs-bright: #00e5ff;
	--gs-text: #e0f0ff;
	--gs-muted: #88ccee;
	--gs-gold: #ffcc00;

	background: var(--gs-bg);
	color: var(--gs-text);
	font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
	padding: 14px 10px 22px;
	border-radius: 14px;
	max-width: 1100px;
	margin: 0 auto;
	position: relative;
}

.gs-app *,
.gs-app *::before,
.gs-app *::after {
	box-sizing: border-box;
}

.gs-logo {
	text-align: center;
	margin-bottom: 2px;
}

.gs-logo img {
	max-width: 180px;
	width: 100%;
	height: auto;
	filter: drop-shadow(0 0 10px var(--gs-line));
}

.gs-app .gs-title {
	text-align: center;
	color: var(--gs-bright);
	font-size: 1.2rem;
	margin: 2px 0 8px;
	text-shadow: 0 0 8px var(--gs-line);
	letter-spacing: 0.04em;
}

.gs-level {
	text-align: center;
	margin-bottom: 8px;
	font-size: 0.9rem;
}

.gs-lvl {
	color: var(--gs-gold);
	font-weight: 700;
	font-size: 1.1rem;
}

.gs-xp-bar {
	width: 220px;
	max-width: 100%;
	height: 10px;
	background: #1a2a3a;
	border-radius: 6px;
	margin: 4px auto;
	overflow: hidden;
	border: 1px solid var(--gs-line);
}

.gs-xp-fill {
	height: 100%;
	width: 0;
	background: linear-gradient(90deg, var(--gs-line), var(--gs-bright));
	transition: width 0.3s ease;
}

.gs-xp-text {
	font-size: 0.75rem;
	color: var(--gs-muted);
}

.gs-jackpots {
	display: flex;
	justify-content: center;
	gap: 6px;
	margin-bottom: 8px;
	flex-wrap: wrap;
}

.gs-jackpot {
	background: var(--gs-panel);
	border: 1px solid var(--gs-line);
	border-radius: 7px;
	padding: 5px 8px;
	text-align: center;
	min-width: 96px;
	font-size: 0.72rem;
}

.gs-jackpot .gs-jp-name {
	color: var(--gs-muted);
}

.gs-jackpot .gs-jp-amount {
	color: var(--gs-gold);
	font-weight: 700;
	font-size: 0.95rem;
	font-variant-numeric: tabular-nums;
}

.gs-jackpot .gs-jp-count {
	color: #aaa;
	font-size: 0.68rem;
	margin-top: 2px;
}

.gs-jackpot.gs-jp-hit {
	animation: gs-flash 0.5s ease 3;
}

.gs-balance {
	text-align: center;
	color: var(--gs-bright);
	font-size: 1.05rem;
	font-weight: 700;
	margin-bottom: 3px;
	font-variant-numeric: tabular-nums;
}

.gs-free-spins {
	text-align: center;
	color: var(--gs-gold);
	font-weight: 700;
	font-size: 0.9rem;
	margin-bottom: 5px;
	min-height: 18px;
}

.gs-status {
	text-align: center;
	color: var(--gs-bright);
	font-weight: 700;
	min-height: 20px;
	margin-bottom: 10px;
	font-size: 0.88rem;
	padding: 0 6px;
}

.gs-status.gs-error {
	color: #ff8f8f;
}

/* --- Cabinet ------------------------------------------------------- */

.gs-level,
.gs-jackpots,
.gs-balance,
.gs-status,
.gs-controls,
.gs-paytable,
.gs-disclaimer,
.gs-free-spins {
	max-width: 560px;
	margin-left: auto;
	margin-right: auto;
}

.gs-cabinet {
	position: relative;
	width: 100%;
	max-width: 1040px;
	margin: 0 auto 10px;
	aspect-ratio: 1280 / 720;
	user-select: none;
}

.gs-cabinet-art {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	display: block;
	pointer-events: none;
}

/* Reel window, measured off the cabinet artwork. */
.gs-machine {
	position: absolute;
	left: 29.531%;
	top: 36.667%;
	width: 40.938%;
	height: 44.167%;
	display: flex;
	gap: 0;
}

.gs-reel {
	flex: 1 1 20%;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.gs-symbol {
	flex: 1 1 33.333%;
	background-repeat: no-repeat;
	background-position: center;
	background-size: 88% 88%;
	border-radius: 4px;
}

/* --- Handle -------------------------------------------------------- */

.gs-handle {
	position: absolute;
	left: 78.438%;
	top: 32.778%;
	width: 8.75%;
	height: 47.222%;
	transform-origin: 16.1% 77.6%;
	cursor: grab;
	touch-action: none;
	transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
	z-index: 3;
}

.gs-handle img {
	width: 100%;
	height: 100%;
	display: block;
	pointer-events: none;
}

.gs-handle.gs-dragging {
	cursor: grabbing;
	transition: none;
}

.gs-handle.gs-locked {
	cursor: default;
	opacity: 0.55;
}

.gs-handle:focus-visible {
	outline: 2px solid var(--gs-bright);
	outline-offset: 3px;
	border-radius: 40px;
}

.gs-has-cabinet .gs-title,
.gs-has-cabinet .gs-logo {
	display: none;
}

.gs-symbol.gs-win {
	box-shadow: inset 0 0 14px 3px rgba(61, 169, 255, 0.75);
	animation: gs-flash 0.45s ease 3;
}

.gs-reel.gs-spinning .gs-symbol {
	animation: gs-blur 0.07s infinite;
}

@keyframes gs-blur {
	0%, 100% { filter: blur(0); }
	50% { filter: blur(1.2px); }
}

@keyframes gs-flash {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.45; }
}

.gs-controls {
	text-align: center;
	margin-top: 4px;
}

.gs-bet-label {
	color: var(--gs-muted);
	font-size: 0.85rem;
	margin-right: 4px;
}

.gs-app input[type="number"] {
	background: #0a1a2e;
	border: 1px solid var(--gs-line);
	color: var(--gs-text);
	padding: 7px;
	border-radius: 6px;
	width: 74px;
	text-align: center;
	font-size: 0.92rem;
}

.gs-app .gs-btn {
	background: linear-gradient(145deg, #0a2a4a, #061828);
	color: var(--gs-text);
	border: 2px solid var(--gs-line);
	padding: 9px 14px;
	border-radius: 8px;
	cursor: pointer;
	font-size: 0.92rem;
	font-weight: 700;
	margin: 3px;
	line-height: 1.2;
	min-height: 42px;
}

.gs-app .gs-btn:hover:not(:disabled) {
	border-color: var(--gs-bright);
}

.gs-app .gs-btn:focus-visible,
.gs-app input:focus-visible {
	outline: 2px solid var(--gs-bright);
	outline-offset: 2px;
}

.gs-app .gs-btn:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.gs-app .gs-btn.gs-stop {
	border-color: #ff5555;
	color: #ffaaaa;
}

.gs-app .gs-btn.gs-ad {
	border-color: var(--gs-gold);
	color: var(--gs-gold);
}

.gs-app .gs-btn.gs-buy {
	border-color: #00ff88;
	color: #00ff88;
}

.gs-paytable {
	max-width: 330px;
	margin: 12px auto 0;
	font-size: 0.7rem;
	color: var(--gs-muted);
	text-align: center;
	line-height: 1.45;
}

.gs-disclaimer {
	max-width: 330px;
	margin: 10px auto 0;
	font-size: 0.65rem;
	color: #6688aa;
	text-align: center;
	line-height: 1.5;
}

.gs-notice {
	padding: 16px;
	text-align: center;
	border: 1px solid #00bfff;
	border-radius: 10px;
	background: #0a1525;
	color: #e0f0ff;
}

.gs-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.85);
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.gs-overlay[hidden] {
	display: none;
}

.gs-modal {
	background: var(--gs-panel);
	border: 2px solid var(--gs-line);
	border-radius: 14px;
	padding: 18px;
	max-width: 360px;
	width: 100%;
	text-align: center;
	color: var(--gs-text);
	max-height: 90vh;
	overflow-y: auto;
}

.gs-modal h3 {
	color: var(--gs-bright);
	margin: 0 0 12px;
	font-size: 1.2rem;
}

.gs-modal-note {
	font-size: 0.75rem;
	color: var(--gs-muted);
	margin: 10px 0;
	line-height: 1.5;
}

.gs-coin-balance {
	color: var(--gs-gold);
	font-weight: 700;
	font-size: 0.9rem;
	margin: 0 0 12px;
}

.gs-package {
	background: #0d1f35;
	border: 1px solid var(--gs-line);
	border-radius: 10px;
	padding: 12px;
	margin-bottom: 10px;
	cursor: pointer;
	width: 100%;
	color: inherit;
	font: inherit;
	text-align: center;
}

.gs-package:hover {
	border-color: var(--gs-bright);
}

.gs-package .gs-pkg-chips {
	font-size: 1.15rem;
	font-weight: 700;
	color: var(--gs-gold);
}

.gs-package .gs-pkg-price {
	font-size: 0.85rem;
	color: var(--gs-muted);
	margin-top: 3px;
}

.gs-ad-banner {
	height: 110px;
	border-radius: 10px;
	margin-bottom: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.05rem;
	font-weight: 700;
	color: #fff;
	text-shadow: 0 1px 3px #000;
	text-align: center;
	padding: 8px;
}

.gs-ad-timer {
	font-size: 1.5rem;
	color: var(--gs-gold);
	font-weight: 700;
	margin: 8px 0;
	font-variant-numeric: tabular-nums;
}

@media (prefers-reduced-motion: reduce) {
	.gs-app *,
	.gs-app *::before,
	.gs-app *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

@media (max-width: 380px) {
	.gs-symbol { background-size: 92% 92%; }
	.gs-app .gs-btn { padding: 8px 10px; font-size: 0.85rem; }
}

.gs-jp-name {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
}

.gs-jp-icon {
	width: 20px;
	height: 20px;
	border-radius: 4px;
	flex: 0 0 auto;
}

/* -------------------------------------------------------------- sound */

.gs-audio {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	max-width: 560px;
	margin: 0 auto 10px;
}

.gs-mute {
	background: rgba(10, 17, 25, 0.85);
	border: 1px solid rgba(61, 169, 255, 0.45);
	color: var(--gs-bright);
	border-radius: 50%;
	width: 34px;
	height: 34px;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.gs-mute:hover {
	box-shadow: 0 0 10px rgba(61, 169, 255, 0.5);
}

.gs-mute.gs-muted {
	color: #5b6b7d;
	border-color: rgba(91, 107, 125, 0.4);
	box-shadow: none;
}

.gs-volume {
	-webkit-appearance: none;
	appearance: none;
	width: 130px;
	height: 4px;
	border-radius: 3px;
	background: linear-gradient(90deg, var(--gs-line), var(--gs-bright));
	outline: none;
	cursor: pointer;
}

.gs-volume::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: var(--gs-bright);
	border: none;
	box-shadow: 0 0 6px rgba(159, 228, 255, 0.8);
}

.gs-volume::-moz-range-thumb {
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: var(--gs-bright);
	border: none;
	box-shadow: 0 0 6px rgba(159, 228, 255, 0.8);
}

.gs-mute.gs-muted + .gs-volume {
	opacity: 0.4;
}

/* -------------------------------------------------------------- music */

.gs-music {
	display: flex;
	align-items: center;
	gap: 10px;
	max-width: 560px;
	margin: 0 auto 8px;
	padding: 8px 12px;
	background: rgba(10, 21, 37, 0.85);
	border: 1px solid rgba(0, 191, 255, 0.35);
	border-radius: 10px;
}

.gs-music-play,
.gs-music-skip {
	background: transparent;
	border: 1px solid rgba(0, 191, 255, 0.45);
	color: var(--gs-bright);
	border-radius: 50%;
	width: 30px;
	height: 30px;
	font-size: 12px;
	line-height: 1;
	cursor: pointer;
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
}

.gs-music-play:hover,
.gs-music-skip:hover {
	box-shadow: 0 0 10px rgba(0, 191, 255, 0.5);
}

.gs-music-now {
	flex: 1 1 auto;
	min-width: 0;
	text-align: left;
	line-height: 1.25;
}

.gs-music-label {
	display: block;
	font-size: 9px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--gs-muted);
	opacity: 0.75;
}

.gs-music-title {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: var(--gs-text);
	text-decoration: none;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.gs-music-title.gs-has-link {
	color: var(--gs-bright);
	text-decoration: underline;
	text-underline-offset: 2px;
	cursor: pointer;
}

.gs-music-title.gs-has-link:hover {
	color: var(--gs-gold);
}

.gs-music-vol {
	width: 80px;
	flex: 0 0 auto;
}

/* ------------------------------------------------------------ ptc ads */

.gs-ad-banner.gs-ad-media {
	padding: 0;
	background: #000;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

.gs-ad-banner.gs-ad-media a {
	display: block;
	line-height: 0;
	width: 100%;
}

.gs-ad-banner.gs-ad-media img,
.gs-ad-banner.gs-ad-media video {
	display: block;
	width: 100%;
	height: auto;
	max-height: 320px;
	object-fit: contain;
}

.gs-ad-link {
	display: inline-block;
	margin-top: 8px;
	font-size: 13px;
	font-weight: 600;
	color: var(--gs-bright);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.gs-ad-link:hover {
	color: var(--gs-gold);
}
