* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}
.menu {
	display: flex;
	align-items: center;
	justify-content: space-between;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 8vh;
	padding: 0 25px 0 25px;
	background: linear-gradient(to left, rgba(242, 246, 252, 0.6), transparent);
	background-color: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
	z-index: 999;
}
.menu-links a {
	position: relative;
	color: #4E4E74;
	text-decoration: none;
	font-weight: 500;
	font-size: 21px;
	overflow: hidden;
	padding: 5px 12px;
	transition: color 0.3s ease;
	z-index: 1;
	white-space: nowrap;
}
.menu-links a::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: #FFBA19; /* 背景滑入的顏色 */
	transform: translateX(-100%);
	transition: transform 0.4s ease;
	border-radius: 3px;
	z-index: -1;
}
.menu-links a:hover::before {
	width: -1%;
	transform: translateX(95%);
}
.menu-links a:hover {
	color: #000000;
	font-weight: bold;
}	  
/* TOP手機板樣式 */
@media (max-width: 768px) {
	.menu-toggle {
		display: block;
		position: relative;
		margin-left: auto;
		z-index: 1000;
	}
	.menu-links {
		display: none;
		position: absolute;
		top: 8vh;
		left: 0;
		width: 100%;
		background-color: rgba(28,29,41,0.9);
		flex-direction: column;
		align-items: center;
		padding: 10px 0;
		gap: 12px;
	}
	.menu-links a {
		color: white;
		font-size: 18px;
	}
	.menu-links.show {
		display: flex;
	}
}	  
/* TOP背景 */
.topbg {
	position: relative;
	width: 100%;
	height: 70vh;
	max-height: 70vh;
	margin-bottom: 1%;
	background-repeat: no-repeat;
	background-position: center top;
	background-size: cover;
	overflow: hidden;
	transition: background-image 0.9s ease-in-out;
}  
/* TOP底部漸層 */
.topbg-gradient {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 10vh;
	z-index: 2; /* 比 .banner-img（預設 z-index: 1）更高 */
	background: linear-gradient(to top, rgba(255, 251, 230, 1), transparent);
	pointer-events: none; /* 不影響滑鼠點擊行為 */
}
/* TOP背景-手機 */
@media (max-width: 768px) {
	.topbg {
		height: 55vh;
		max-height: 55vh;
		margin-bottom: 2%;
	}
}
.topbg picture {
	position: absolute;
	width: 100%;
	height: 100%;
	left: 0;
	display: flex;
	justify-content: center;
	align-items: flex-start;
	overflow: hidden;
}
.banner-img {
	position: absolute;
	height: 100%;
	object-fit: contain;
	object-position: center top;
	transition: opacity 0.8s ease, transform 0.8s ease;
	opacity: 0;
	transform: translateX(-80%);
	will-change: transform, opacity;
}
.banner-img.active {
	opacity: 1;
	transform: translateX(0);
	z-index: 1;
}
.banner-img.next {
	z-index: 0;
}  
/* 遊戲卡片樣式 */
.info {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin-bottom: 1vh;
	width: 100%;
}
.game_content {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;  /* 置中 */
	gap: 8px;
	max-width: 1770px; /* 350*5 + 4*5px */
	margin: 0 auto;
}
.game {
	position: relative;
	overflow: hidden;
	cursor: pointer;
	flex-grow: 0;
	flex-shrink: 1; /* 可縮小 */
	flex-basis: calc((100% - 4 * 8px) / 5); /* 一排5欄時寬度 */
	max-width: 350px;
	display: flex;
	flex-direction: column;
	align-items: center;
	border: 3px solid #FFE7AC;
	border-radius: 10px;
	background-color: #FFFDF0;
	padding: 2px;
	box-sizing: border-box;
	transition: transform 0.2s ease;
}
/* overlay覆蓋整個卡片 */
.game .overlay {
	position: absolute;
	top: 0; left: 0; right: 0; bottom: 0;
	background-color: rgba(30, 39, 48, 0.8);
	display: flex;
	flex-direction: column;  /* 垂直排列 */
	justify-content: center;
	align-items: center;
	gap: 12px; /* 按鈕間距 */
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s ease;
	z-index: 10;
}
/* hover時顯示overlay */
.game:hover .overlay {
	opacity: 1;
	pointer-events: auto;
}
/* 按鈕樣式(實心) */
.download-btn {
	width: 80%;
	padding: 10px 20px;
	font-size: 14pt;
	color: white !important;
	background-color: #008AA2;
	border: none;
	border-radius: 5px;
	cursor: pointer;
	transition: box-shadow 0.3s ease, background-color 0.3s ease;
	display: block; /* 讓 <a> 像按鈕一樣佔滿空間 */
	text-align: center; /* 讓文字置中 */
	text-decoration: none !important; /* 移除下劃線 */
	box-sizing: border-box; /* 確保 padding 不會撐大寬度 */
}
.download-btn:hover {
	border: 1px solid #00ADC4;
	background-color: #00415D;
	text-shadow: 0 0 10px rgba(34, 192, 237, 0.8); 
}
/* 按鈕樣式(空心) */
.info-btn {
	width: 80%;
	padding: 10px 20px;
	font-size: 14pt;
	color: #B9B9B9;
	background-color: transparent;
	border: 2px solid #707070;
	border-radius: 5px;
	cursor: pointer;
	transition: background-color 0.3s ease, color 0.3s ease;
	text-align: center;
	box-sizing: border-box;
}
.info-btn:hover {
	color: white;
	border: 1px solid white;
	background-color: rgba(156, 211, 255, 0.2);
	text-shadow: 0 0 10px rgba(156, 211, 255, 0.8); 
}	  
/* 1280px以下一排4欄 */
@media (max-width: 1280px) {
	.game_content {
		max-width: calc(350px * 4 + 3 * 8px); /* 1404px */
	}
	.game {
		flex-basis: calc((100% - 3 * 8px) / 4);
	}
}
/* 990px以下一排3欄 */
@media (max-width: 990px) {
	.game_content {
		max-width: calc(350px * 3 + 2 * 8px); /* 1076px */
	}
	.game {
		flex-basis: calc((100% - 2 * 8px) / 3);
	}
}
/* 768px以下一排2欄 */
@media (max-width: 768px) {
	.game_content {
		max-width: calc(350px * 2 + 1 * 8px); /* 708px */
	}
	.game {
		flex-basis: calc((100% - 1 * 8px) / 2);
	}
}
/* 480px以下一排2欄 */
@media (max-width: 480px) {
	.game_content {
		max-width: calc(350px * 2 + 1 * 8px); /* 708px */
	}
	.game {
		flex-basis: calc((100% - 1 * 8px) / 2);
	}
}
.game:hover {
	transform: translateY(-4px);
}
.game img {
	width: 100%;
	height: auto;
	max-width: 100%;
}
/* 遊戲卡片標題 */
.game-title,
.game-title-L {
	/*background-color: aqua;*/
	width: 100%;
	font-size: 18px;
	font-weight: bold;
	color: #B45A42;
	margin: 2px 0;
	text-align: center;
}
@media (max-width: 1090px) {
	.game-title-L {
		white-space: nowrap;
		padding: 3px 0;
		overflow: hidden;
		text-overflow: ellipsis;
		display: inline-block;
		max-width: 100%;
		font-size: clamp(13px, 2.2vw, 18px); /* 自動縮放 */
	}
}
/* 裝置icon */
.icons {
	display: flex;
	gap: 8px;
	justify-content: center;
	white-space: nowrap;
}
.icon {
	width: 20px;
	height: 20px;
}
.info-btn-link {
	display: inline-block;
	text-decoration: none;
}

/*頂部BANNER排版_兩個橫版小圖*/ 
.topbg_2 {
    display: flex;
    justify-content: center;
	margin: 0 auto 15px auto;
    width: 100%;             /* 容器佔滿全寬或自訂如 90% */
    max-width: 100vw;        /* 絕對不超出螢幕 */
    overflow: hidden;
}
@media (max-width:960px){
	.topbg_2{
		flex-direction: column;
		align-items: center;
	}
	  }
.topbg_2 img {
    flex: 1;                 /* 兩張圖平分 */
    min-width: 0;            /* 防止圖片撐破容器 */
    width: 100%;
    height: auto;            /* 等比縮放 */
    display: block;
    object-fit: cover;       /* 確保填滿區域 */
    transition: 0.3s ease;
}

.topbg_2 img:hover {
    filter: brightness(0.6); /* 懸停時變暗，營造停止感 */
	cursor: pointer;
}