/*
 * 슬롯 목록 모달 — 슬레이트 블루 톤
 * 배경: linear-gradient(rgba(72, 85, 115, 1), rgba(51, 63, 89, 0))
 */
#aceslot_slot_modal {
	--slot-modal-slate-a: rgb(72, 85, 115);
	--slot-modal-slate-b: rgb(51, 63, 89);
	--slot-modal-slate-deep: rgb(30, 36, 50);
	--slot-modal-border: rgba(120, 135, 175, 0.42);
	--slot-modal-border-soft: rgba(100, 118, 158, 0.22);
	--slot-modal-text: #e8eaf2;
	--slot-modal-text-muted: rgba(200, 208, 228, 0.62);
	--slot-modal-accent: rgb(130, 152, 196);
}

#aceslot_slot_modal .modal-dialog.aceslot-slot-dialog {
	max-width: min(960px, 96vw);
	margin: 0.5rem auto;
}

/* PC: 모달 폭·본문 영역 */
@media (min-width: 768px) {
	#aceslot_slot_modal .modal-dialog.aceslot-slot-dialog {
		max-width: min(1420px, 98vw);
	}

	#aceslot_slot_modal .modal-body {
		min-height: 960px;
		max-height: none;
		overflow: hidden;
		padding: 30px 30px 30px;
	}
}

#aceslot_slot_modal .aceslot-slot-content {
	background-color: var(--slot-modal-slate-deep);
	background-image: linear-gradient(rgba(72, 85, 115, 1), rgba(51, 63, 89, 0));
	border: 1px solid var(--slot-modal-border);
	border-radius: 20px;
	box-shadow:
		0 0 0 1px rgba(0, 0, 0, 0.4),
		0 12px 40px rgba(0, 0, 0, 0.55),
		0 0 48px rgba(72, 85, 115, 0.18);
	color: var(--slot-modal-text);
	overflow: hidden;
}

#aceslot_slot_modal .aceslot-slot-head {
	background: linear-gradient(180deg, rgb(0 0 0 / 59%) 0%, rgb(15 17 22) 100%);
	border-bottom: 1px solid var(--slot-modal-border-soft);
	padding: 14px 18px;
	align-items: center;
}

#aceslot_slot_modal .aceslot-slot-head .modal-title {
	font-size: 1.05rem;
	font-weight: 700;
	color: var(--slot-modal-text);
	letter-spacing: -0.02em;
	margin: 0;
}

#aceslot_slot_modal .aceslot-slot-head .close {
	color: rgba(180, 192, 220, 0.95);
	opacity: 0.9;
	text-shadow: none;
	font-size: 1.5rem;
	line-height: 1;
	padding: 0 4px;
	transition: color 0.15s ease, opacity 0.15s ease;
}

#aceslot_slot_modal .aceslot-slot-head .close:hover {
	color: var(--slot-modal-accent);
	opacity: 1;
}

#aceslot_slot_modal .aceslot-slot-foot {
	background: rgba(24, 28, 40, 0.65);
	border-top: 1px solid var(--slot-modal-border-soft);
	justify-content: center;
	gap: 10px;
	flex-wrap: wrap;
	/* padding: 10px 3px 10px; */
}

#aceslot_slot_modal .aceslot-slot-close-btn {
	background: linear-gradient(180deg, rgba(65, 76, 102, 0.95) 0%, rgba(45, 52, 70, 0.98) 100%);
	border: 1px solid var(--slot-modal-border-soft);
	color: var(--slot-modal-text);
	border-radius: 10px;
	padding: 10px 28px;
	font-weight: 600;
	font-size: 14px;
	transition:
		background 0.15s ease,
		border-color 0.15s ease,
		box-shadow 0.15s ease;
}

#aceslot_slot_modal .aceslot-slot-close-btn:hover {
	background: linear-gradient(180deg, rgba(80, 92, 120, 0.98) 0%, rgba(55, 64, 86, 1) 100%);
	border-color: rgba(130, 152, 196, 0.45);
	box-shadow: 0 0 0 1px rgba(72, 85, 115, 0.35);
	color: #fff;
}

#aceslot_slot_modal .modal-body {
	max-height: min(84vh, 720px);
	overflow: auto;
	background-color: rgb(8 10 14);
	background-image: linear-gradient(rgba(72, 85, 115, 0.35), rgba(51, 63, 89, 0));
	/* padding: 14px 16px 18px; */
}

#aceslot_slot_modal .modal-footer {
	width: 100%;
	border: none;
	/* margin: 40px auto 0; */
	padding: 0;
}

#aceslot_slot_modal .modal-body::-webkit-scrollbar {
	width: 6px;
}

#aceslot_slot_modal .modal-body::-webkit-scrollbar-thumb {
	background: linear-gradient(180deg, rgba(90, 105, 145, 0.9), rgba(45, 52, 70, 1));
	border-radius: 6px;
}

/* GF_User #slot_modal .gp-slot-modal-grid 와 동일 역할 */
#aceslot_slot_modal .gp-slot-modal-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 12px;
	padding: 4px 2px;
}

@media (max-width: 767px) {
	#aceslot_slot_modal .gp-slot-modal-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 8px;
	}

	/* 푸터를 본문과 살짝 띄움 */
	#aceslot_slot_modal .aceslot-slot-foot {
		margin-top: 14px;
	}
}

.aceslot-slot-card {
	background: linear-gradient(180deg, rgb(55 64 86 / 62%) 0%, rgb(23 24 24 / 70%) 100%);
	border: 1px solid var(--slot-modal-border-soft);
	border-radius: 12px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.aceslot-slot-card:hover {
	border-color: rgba(130, 152, 196, 0.45);
	box-shadow: 0 4px 22px rgba(72, 85, 115, 0.28);
}

.aceslot-slot-thumb {
	aspect-ratio: 16 / 10;
	background: linear-gradient(145deg, rgba(51, 63, 89, 0.9) 0%, rgba(35, 42, 58, 1) 50%, rgba(51, 63, 89, 0.75) 100%);
	display: flex;
	align-items: center;
	justify-content: center;
	border-bottom: 1px solid var(--slot-modal-border-soft);
}

.aceslot-slot-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center center;
}

.aceslot-slot-thumb img.aceslot-slot-thumb-default {
	object-fit: contain;
	padding: 10px 12px;
	background: rgba(0, 0, 0, 0.12);
}

.aceslot-slot-card-ph {
	width: 100%;
	height: 100%;
	min-height: 88px;
	background: linear-gradient(
		90deg,
		rgba(72, 85, 115, 0.15) 0%,
		rgba(130, 152, 196, 0.2) 50%,
		rgba(72, 85, 115, 0.15) 100%
	);
	background-size: 200% 100%;
	animation: aceslot-shimmer 1.2s ease-in-out infinite;
	position: relative;
}

.aceslot-slot-card-ph::after {
	content: "";
	position: absolute;
	inset: 0;
	margin: auto;
	width: 36px;
	height: 36px;
	border-radius: 8px;
	border: 2px solid rgba(130, 152, 196, 0.35);
	border-top-color: rgba(180, 198, 235, 0.95);
	animation: aceslot-spin 0.9s linear infinite;
	opacity: 0.65;
}

@keyframes aceslot-shimmer {
	0% {
		background-position: 200% 0;
	}
	100% {
		background-position: -200% 0;
	}
}

@keyframes aceslot-spin {
	to {
		transform: rotate(360deg);
	}
}

.aceslot-slot-meta {
	padding: 10px 10px 12px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.aceslot-slot-ko {
	font-size: 13px;
	font-weight: 600;
	color: rgba(228, 232, 245, 0.96);
	line-height: 1.35;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.aceslot-slot-en {
	font-size: 11px;
	color: var(--slot-modal-text-muted);
	letter-spacing: 0.04em;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.aceslot-slot-meta .play-btn {
	position: static;
	transform: none;
	width: 100%;
	margin-top: 4px;
	font-size: 13px;
	padding: 8px 10px;
}

/* 전역 img { pointer-events: none } 등과 무관하게 입장 버튼이 항상 클릭·호버 수신 */
#aceslot_slot_modal .aceslot-slot-card {
	position: relative;
}
#aceslot_slot_modal .aceslot-slot-thumb,
#aceslot_slot_modal .aceslot-slot-thumb img {
	pointer-events: none;
}
#aceslot_slot_modal .aceslot-slot-meta .play-btn.aceslot-slot-play {
	position: relative;
	z-index: 1;
	pointer-events: auto;
}

/* 모달 내부는 전역 노란 play-btn 대신 슬레이트 톤 */
#aceslot_slot_modal .aceslot-slot-meta .play-btn.btn-yellow {
	background: linear-gradient(180deg, rgb(59 62 75) 0%, rgb(21 23 28) 100%);
	border: 1px solid rgb(20 25 34);
	color: #ffffffad;
	box-shadow: none;
}

#aceslot_slot_modal .aceslot-slot-meta .play-btn.btn-yellow:hover:not(:disabled) {
	filter: brightness(1.06);
	border-color: rgba(160, 178, 220, 0.65);
	color: #fff;
}

#aceslot_slot_modal .aceslot-slot-meta .play-btn.btn-yellow:disabled {
	opacity: 0.55;
}

#aceslot_slot_modal .modal-body > .text-center .play-btn.btn-yellow {
	background: linear-gradient(180deg, rgba(90, 105, 145, 0.95) 0%, rgba(58, 68, 95, 1) 100%);
	border: 1px solid rgba(130, 152, 196, 0.5);
	color: #fff;
	box-shadow: none;
}

.aceslot-slot-loading {
	text-align: center;
	padding: 36px 16px;
	color: var(--slot-modal-text-muted);
}

.aceslot-slot-spin {
	width: 36px;
	height: 36px;
	margin: 0 auto 12px;
	border: 3px solid rgba(100, 118, 158, 0.35);
	border-top-color: rgba(160, 178, 220, 0.95);
	border-radius: 50%;
	animation: aceslot-spin 0.75s linear infinite;
}

.providers-section .aceslot-prov-empty,
#aceslot_slot_modal .aceslot-prov-empty {
	width: 100%;
	text-align: center;
	padding: 28px 16px;
	color: var(--slot-modal-text-muted);
	margin: 0;
}

.providers-section .aceslot-prov-loading {
	width: 100%;
	text-align: center;
	padding: 24px 16px;
	color: var(--slot-modal-text-muted);
	margin: 0;
	font-size: 14px;
}

/* 로딩 스피너 + 스켈레톤 */
#aceslot_slot_modal .gp-slot-modal-grid > .gp-slot-modal-loading {
	grid-column: 1 / -1;
	width: 100%;
	padding: 4px 0 16px;
}

#aceslot_slot_modal .gp-slot-modal-loading-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	margin-bottom: 20px;
}

#aceslot_slot_modal .gp-slot-modal-spinner {
	width: 44px;
	height: 44px;
	border: 3px solid rgba(100, 118, 158, 0.35);
	border-top-color: rgba(160, 178, 220, 0.95);
	border-radius: 50%;
	animation: aceslot-spin 0.7s linear infinite;
}

#aceslot_slot_modal .gp-slot-modal-loading-text {
	margin: 0;
	font-size: 14px;
	font-weight: 500;
	color: var(--slot-modal-text-muted);
	letter-spacing: 0.02em;
}

#aceslot_slot_modal .gp-slot-modal-skeleton-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 14px;
}

@media (max-width: 767px) {
	#aceslot_slot_modal .gp-slot-modal-skeleton-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 8px;
	}
}

#aceslot_slot_modal .gp-slot-skel-card {
	background: linear-gradient(180deg, rgba(55, 64, 86, 0.75) 0%, rgba(35, 40, 55, 0.92) 100%);
	border: 1px solid var(--slot-modal-border-soft);
	border-radius: 12px;
	overflow: hidden;
	animation: aceslot-skel-pulse 1.15s ease-in-out infinite;
}

#aceslot_slot_modal .gp-slot-modal-skeleton-grid > .gp-slot-skel-card:nth-child(1) {
	animation-delay: 0s;
}
#aceslot_slot_modal .gp-slot-modal-skeleton-grid > .gp-slot-skel-card:nth-child(2) {
	animation-delay: 0.06s;
}
#aceslot_slot_modal .gp-slot-modal-skeleton-grid > .gp-slot-skel-card:nth-child(3) {
	animation-delay: 0.12s;
}
#aceslot_slot_modal .gp-slot-modal-skeleton-grid > .gp-slot-skel-card:nth-child(4) {
	animation-delay: 0.18s;
}
#aceslot_slot_modal .gp-slot-modal-skeleton-grid > .gp-slot-skel-card:nth-child(5) {
	animation-delay: 0.24s;
}
#aceslot_slot_modal .gp-slot-modal-skeleton-grid > .gp-slot-skel-card:nth-child(6) {
	animation-delay: 0.3s;
}
#aceslot_slot_modal .gp-slot-modal-skeleton-grid > .gp-slot-skel-card:nth-child(7) {
	animation-delay: 0.36s;
}
#aceslot_slot_modal .gp-slot-modal-skeleton-grid > .gp-slot-skel-card:nth-child(8) {
	animation-delay: 0.42s;
}

@keyframes aceslot-skel-pulse {
	0%,
	100% {
		opacity: 1;
		border-color: var(--slot-modal-border-soft);
	}
	50% {
		opacity: 0.78;
		border-color: rgba(130, 152, 196, 0.38);
	}
}

#aceslot_slot_modal .gp-slot-skel-card .skel-thumb {
	height: 110px;
	background: linear-gradient(
		105deg,
		rgba(51, 63, 89, 0.95) 0%,
		rgba(72, 85, 115, 0.65) 45%,
		rgba(58, 68, 92, 0.85) 55%,
		rgba(51, 63, 89, 0.95) 100%
	);
	background-size: 220% 100%;
	animation: aceslot-skel-thumb 1.35s ease-in-out infinite;
}

@keyframes aceslot-skel-thumb {
	0% {
		background-position: 100% 0;
	}
	100% {
		background-position: -100% 0;
	}
}

#aceslot_slot_modal .gp-slot-skel-card .skel-body {
	padding: 10px 0 10px 12px;
}

#aceslot_slot_modal .gp-slot-skel-card .skel-line {
	height: 11px;
	border-radius: 5px;
	background: rgba(100, 118, 158, 0.28);
	margin-bottom: 8px;
}

#aceslot_slot_modal .gp-slot-skel-card .skel-line-lg {
	width: 78%;
}

#aceslot_slot_modal .gp-slot-skel-card .skel-line-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding-right: 0;
}

#aceslot_slot_modal .gp-slot-skel-card .skel-line-sm {
	flex: 1;
	min-width: 0;
	height: 9px;
	margin-bottom: 0;
}

#aceslot_slot_modal .gp-slot-skel-card .skel-btn-fake {
	flex-shrink: 0;
	width: 56px;
	height: 30px;
	border-radius: 8px 0 0 8px;
	background: linear-gradient(145deg, rgba(72, 85, 115, 0.85) 0%, rgba(40, 46, 62, 1) 100%);
	border: 1px solid rgba(130, 152, 196, 0.32);
}
