@charset "UTF-8";
/* CSS Document */
@media screen and (min-width:601px) { /*桌面*/
/*=========================相簿=========================*/
	
#bg {
	width: 100%;
	height: 100vh;
	position: fixed;
	z-index: 299;
	background-color: hsla(0,0%,0%,0.95);
	top: 0px;
	left: 0px;
	display: none;
}
/* Style for the gallery items */
#gallery {
	display: flex;
	flex-wrap: wrap;
	justify-content: center; /* 水平居中 */
    align-items: center; /* 垂直居中 */
	
}
.gallery-item {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 10px;
    overflow: hidden;
    text-align: center;
    z-index: 1;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    border-radius: 5px;
	transition: transform 0.8s,opacity 0.8s;
}
	
.gallery-item:hover{
	transform: scale(1.05);
	opacity: 1;
}
	
.gallery-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	cursor: pointer;
	transition: opacity 0.8s;
	opacity: 0.8;
}
	
.gallery-item img:hover{
	opacity: 1;	
}
/* Style for the overlay */
#overlay {
	display: none;
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 90%;
	height: 90vh;
	max-width: 1000px;
	max-height: 1000px;
	justify-content: center;
	align-items: center;
	z-index: 300;
	border:0px solid #fff;
}
#overlay img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	cursor: pointer;
	display: block;
	margin-left: auto;
	margin-right: auto;
	transition: opacity 0.5s ease-in-out; /* Smooth fade-in/fade-out transition */
}
#overlay .caption {
	color: #fff;
	text-align: center;
	margin-top: 5px;
	font-size:17px;
}
#closeBtn {
	position: absolute;
	top: 10px;
	right: 	20px;
	color: #fff;
	cursor: pointer;
	font-size: 50px;
	font-weight: lighter;
}
#prevBtn, #nextBtn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 70px;
    cursor: pointer;
    color: hsla(0,0%,100%,1.00);
    text-align: center;
    font-weight: lighter;
    padding: 20px;
    text-shadow: 0px 0px hsla(0,0%,0%,0.60);
}
#prevBtn {
	left: 30px;
}
#nextBtn {
	right: 30px;
}
/*=========================相簿=========================*/
}
	
@media screen and (max-width:600px) { /*行動裝置*/
/*=========================相簿=========================*/
	
#bg {
	width: 100%;
	height: 100vh;
	position: fixed;
	z-index: 1000;
	background-color: hsla(0,0%,0%,0.95);
	top: 0px;
	left: 0px;
	display: none;
}
/* Style for the gallery items */
#gallery {
	display: flex;
	flex-wrap: wrap;
	justify-content: center; /* 水平居中 */
    align-items: center; /* 垂直居中 */
	
}
.gallery-item {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 10px;
    overflow: hidden;
    text-align: center;
    z-index: 1;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    border-radius: 5px;
	transition: transform 0.8s;
}
	
.gallery-item:hover{
	transform: scale(1.05);
}
	
.gallery-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	cursor: pointer;
	opacity: 1;
}
/* Style for the overlay */
#overlay {
	display: none;
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 90%;
	height: 90vh;
	max-width: 1000px;
	max-height: 1000px;
	justify-content: center;
	align-items: center;
	z-index: 1100;
	border:0px solid #fff;
}
#overlay img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	cursor: pointer;
	display: block;
	margin-left: auto;
	margin-right: auto;
	transition: opacity 0.5s ease-in-out; /* Smooth fade-in/fade-out transition */
}
#overlay .caption {
	color: #fff;
	text-align: center;
	margin-top: 5px;
	font-size:12px;
}
#closeBtn {
	position: absolute;
	top: 10px;
	right: 	20px;
	color: #fff;
	cursor: pointer;
	font-size: 50px;
	font-weight: lighter;
	z-index: 1200;
}
#prevBtn, #nextBtn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 50px;
    cursor: pointer;
    color: hsla(0,0%,100%,1.00);
    text-align: center;
    font-weight: lighter;
    z-index: 1200;
    text-shadow: 0px 0px 7px hsla(0,0%,0%,0.60);
    padding: 20px;
}
#prevBtn {
	left: 0px;
}
#nextBtn {
	right: 0px;
}
/*=========================相簿=========================*/
	
	}