/* Gacha Lottery **************************************************/

.page-node-41 main {
	background: var(--i2-theme-bg-earth);
	padding-top: 120px;
}

.gacha-lottery-section {
	/* margin-top: 100px; */
	padding: 100px 0;
}

.gacha-lottery-section div:first-child h2 {
	margin-bottom: 30px;
}

.gacha-lottery-section .content {
	position: relative;
}

.gacha-lottery-section .sub-content {
	position: relative;
	max-width: 300px;
	display: block;
	margin: auto;
	margin-bottom: 200px;
}

.gacha-lottery-section .sub-content .machine {
	position: relative;
	z-index: 1;
}

.gacha-lottery-section .sub-content .machine::after {
	content: '';
	width: 440px;
	height: 595px;
	transform: rotate(60deg);
	border-radius: 300px;
	background: var(--i2-theme-bg-yellow-1);
	display: block;
	position: absolute;
	z-index: 1;
	top: -52px;
	left: calc(50% - 220px);
}

.gacha-lottery-section .sub-content .machine>img {
	position: relative;
	z-index: 2;
}

.gacha-lottery-section .sub-content .glass {
	position: absolute;
	left: calc(50% - 147px);
	top: 69px;
	z-index: 4;
}

.gacha-lottery-section .sub-content .rotate-button {
	position: absolute;
	left: calc(50% - 55px);
	bottom: 147px;
	cursor: pointer;
	transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
	z-index: 2;
}

.gacha-lottery-section .sub-content .rotate-button.rotation {
	transform: rotate(150deg);
}

.gacha-lottery-section .sub-content .tips {
	position: absolute;
	bottom: 205px;
	left: calc(50% + 12px);
	z-index: 2;
}

.gacha-lottery-section .sub-content .lottery-machine {
	position: relative;
	width: 297px;
	height: 182px;
	overflow: hidden;
	border-radius: 10px;
	position: absolute;
	left: calc(50% - 148px);
	bottom: 296px;
	background: #d6fae2;
	z-index: 2;
}

.gacha-lottery-section .sub-content .status {
	position: absolute;
	left: 50%;
	top: 180px;
	transform: translateX(-50%);
	width: 120px;
	height: 40px;
	text-align: center;
	z-index: 10;
	font-weight: bold;
	color: #333;
	background: rgba(255, 255, 255, 0.7);
	border-radius: 8px;
	line-height: 40px;
	font-size: 18px;
	pointer-events: none;
	display: none;
}

.selected-ball-anim {
	position: absolute;
	left: 25%;
	/* 球從更上方開始 */
	bottom: 23.7%;
	width: 44px;
	z-index: 99;
	pointer-events: none;
	transform: translateX(-50%);
}

.selected-ball-anim .ball-fly {
	position: absolute;
	width: 44px;
	height: 44px;
	left: 50%;
	top: 0;
	background-size: cover;
	border-radius: 50%;
	box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
	transition:
		top 0.7s cubic-bezier(.34, 1.56, .64, 1),
		left 0.7s cubic-bezier(.34, 1.56, .64, 1),
		transform 0.5s cubic-bezier(.34, 1.56, .64, 1),
		opacity 0.2s;
	transform: translateX(-50%) scale(0.9);
}

/* 掉到出球口 */
.ball-fly.at-exit {
	top: 20px;
	/* 根據你出球口的實際位置微調 */
	transform: translateX(-50%) scale(1.6);
}

/* 飛到中間並放大 */
.ball-fly.fly-to-center {
	transform: translateX(-50%) scale(1.4);
}

.result-container {
	position: absolute;
	left: 50%;
	top: 0;
	transform: translateX(-50%);
	width: 100%;
	height: 100%;
	max-width: 720px;
	z-index: -1;
	display: flex;
	justify-content: center;
	align-items: center;
}

.result-container.show {
	z-index: 15;
}

.result-container .ball-top,
.result-container .ball-bottom {
	max-width: 130%;
}

.result-ball {
	opacity: 0;
	transform: scale(0.7);
	transition: opacity 0.4s, transform 0.4s;
	width: 100%;
}

.result-ball.show {
	opacity: 1;
	transform: scale(1);
	padding: 0 15px;
}

.result-ball .result-content {
	max-height: 0;
	opacity: 0;
	transition: max-height 0.6s cubic-bezier(.4, 0, .2, 1), opacity 0.4s ease;
	background-color: #fff;
	text-align: center;
	border-radius: 30px;
	position: relative;
}

.result-ball .result-content.show {
	opacity: 1;
	margin: 20px 0;
	border: 2px solid var(--i2-theme-blue);
	padding: 30px 50px;
}

.result-ball .result-content::after {
	content: '';
	background: url(/themes/custom/i2_theme/image/gacha-lottery/star.svg) no-repeat;
	background-size: auto;
	background-size: cover;
	background-position: 50%;
	position: absolute;
	width: 52px;
	height: 53px;
	right: 8.3%;
	top: -8px;
}

.result-ball .result-content .subcontent {
	width: 100%;
	max-width: 470px;
	display: block;
	margin-left: auto;
	margin-right: auto;
	font-size: 28px;
	color: var(--i2-theme-blue);
	text-align: center;
	letter-spacing: 1.4px;
	margin-top: 10px;
	margin-bottom: 32px;
	position: relative;
}

.result-ball .result-content .subcontent::before {
	content: '';
	background: url(/themes/custom/i2_theme/image/gacha-lottery/colon.svg) no-repeat;
	background-size: auto;
	background-size: cover;
	background-position: 50%;
	position: absolute;
	width: 45px;
	height: 29px;
	left: -45px;
	top: -18px;
}

.result-ball .result-content .subcontent::after {
	content: '';
	background: url(/themes/custom/i2_theme/image/gacha-lottery/colon.svg) no-repeat;
	background-size: auto;
	background-size: cover;
	background-position: 50%;
	position: absolute;
	width: 45px;
	height: 29px;
	-webkit-transform: rotate(180deg);
	-ms-transform: rotate(180deg);
	transform: rotate(180deg);
	right: -45px;
	bottom: 10px;
}

.result-ball .result-content>img {
	width: 88px;
	height: 86px;
	object-fit: cover;
}

.result-ball .result-content>a {
	border-radius: 30px;
	border: 1px solid #B6F0BB;
	background: #FFF;
	line-height: 1;
	display: inline-block;
	padding: 12px 22px;
	color: var(--i2-theme-blue);
}

.result-ball .result-content>a:hover {
	background-color: #B6F0BB;
	color: var(--i2-theme-blue) !important;
}

.result-ball .result-content>a img {
	vertical-align: baseline;
	margin-left: 10px;
}

.ball {
	position: absolute;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	overflow: hidden;
	transition: opacity 0.5s;
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
}

.paragraph--type--daily-tips {
	display: none;
}