@font-face {
    font-family: 'exo'; /* 给字体起个名字 */
    src: url('fonts/Exo-Regular.otf') format('opentype'); /* 路径根据你项目中的位置调整 */
    font-weight: normal;
    font-style: normal;
}
/* 导航栏 */
body {
    font-family: exo, sans-serif;
    margin: 0;
    padding: 0;
}

.nav-container {
    background-color: #ffff;
    padding: 10px 0;
    text-align: center;
    display: flex;
    justify-content: space-between;
    align-items: center; 
}

.nav-container a {
    display: inline-block;
    width: 75px; /* Set the width of the icons */
    height: 75px; /* Set the height of the icons */
    background-size: contain; /* Make sure the icon fits */
    background-repeat: no-repeat; /* Prevent the background from repeating */
    margin: 0 4%; /* Add horizontal margin for spacing */
}

.nav-container .home {
    background-image: url('Icons/home.png');
}

.nav-container .archive {
    background-image: url('Icons/archive.png');
}

.nav-container .about {
    background-image: url('Icons/about.png');
}

.nav-container .game {
    background-image: url('Icons/game.png');
}

.nav-container a:hover {
    transform: scale(1.10); /* Slightly enlarge the image on hover */
}


/* Container for the images */
.Content {
    white-space: nowrap;
    display: -webkit-box;
    -webkit-box-pack: center;
    -webkit-box-align: center;
    -webkit-box-orient: vertical;
    text-align: center;
    overflow: visible;
    height: 100%;
    width: 100%;
    margin: 0 auto;
}

/* Container for each image and its corresponding hidden info */
.image-container {
    position: relative;
    width: 25%;
    height: auto;
    margin-left: 4%;
    margin-right: 4%;
    margin-top: 70px;
    margin-bottom: 70px;
    background-color: white; /* White background to cover any uncovered areas */
    overflow: hidden; /* Ensure content doesn't overflow */
    display: inline-block;
}

/* Style for Bed images */
.Bed {
    width: 100%; /* Make Bed images responsive to container width */
    height: auto; /* Maintain aspect ratio */
    display: block; /* Remove any extra space below the image */

}

/* Style for hiddenInfo images */
.hiddenInfo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%; /* Cover the full width of the container */
    height: 100%; /* Cover the full height of the container */
    object-fit: contain; /* Maintain aspect ratio without cropping */
    opacity: 0; /* Hidden by default */
    transition: opacity 0.5s ease-in-out; /* Transition effect for hover */
    z-index: 10; /* Ensure it is above Bed images */
    cursor: url('Icons/pointer.png') , auto;

}

/* Show the hiddenInfo on hover with a delay */
.image-container:hover .hiddenInfo {
    opacity: 1;
    transition: opacity 0.3s ease-in-out 0.3s; /* Add delay for transition */
}

.close {
    color: #aaa;
    padding-top: 15px;
    padding-left: 25px;
    float: left;
    opacity: 0;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.image-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.image-gallery img {
    max-width: 50%;
    height: auto;
}


/* Modal Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
}

/* Modal Content */
.modal-content {
    background-image: url('Image/commentsframe.jpg'); /* Custom background image */
    background-size: contain;
    background-position: center; /* 居中显示背景图像 */
    background-repeat: no-repeat; /* 避免重复显示背景图像 */
    background-color: rgba(0, 0, 0, 0.5); /* 其他样式 */
    color: #fff;
    margin: auto;
    margin-top: 10%;
    padding: 20px;
    border: 1px solid #888;
    width: 100%;
    max-width: 900px;
    height: 100vh;
    max-height: 620px;
    overflow: hidden;
    position: relative;
    border-radius: 8px;
    display: flex;
    flex-direction: row;
}

/* Carousel section */
.modal-carousel {
    flex: 1; /* Take up half the space */
    position: relative;
    overflow: hidden; /* Hide overflow for carousel effect */
    width: 100%;
    padding-right:40px;
}

/* Style for carousel-container */
.carousel-container {
    display: flex;
    padding-left: 10px;
    transition: transform 0.5s ease;
    width: 100%; /* Make sure container takes full width */
    height: 100%; /* Make sure container takes full height */
    align-items: center; /* Center images vertically */
}

/* Style for images inside carousel-container */
.carousel-container img {
    padding-bottom: 30px;
    padding-left: 40px;
    padding-right: 30px;
    width: 85%; /* Make images take up full width of the container */
    height: auto; /* Maintain aspect ratio */
    object-fit: cover; /* Cover the container without distortion */
    max-width: 100%; /* Ensure images do not overflow container */
    max-height: 100%; /* Ensure images do not overflow container */
}

/* Navigation buttons */
.carousel-prev, .carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    opacity: 0;
    z-index: 1000; /* Ensure buttons are above content */
}

.carousel-prev {
    left: 10px;
}

.carousel-next {
    right: 10px;
}

.audio-container {
    position: absolute;
    margin-left: 80px;
    margin-top: 600px;
    z-index: 1000;
    height: 10px;
}
audio {
    width: 300px; /* 设置音频播放器的宽度 */
    height: 20px; /* 设置音频播放器的高度 */
    color: white;
}
audio::-webkit-media-controls-panel {
    background-color: white; /* 设置背景透明 */
    border: none; /* 去掉边框 */
    
}

/* Comments section */
.modal-comments {
    padding-top: 50px;
    flex: 1; /* Take up the other half of the space */
    color: gray;
    box-sizing: border-box; /* Include padding and border in the width */
    justify-content: space-between; /* Push textarea-container to the bottom */

}

.modal-comments p {
    margin: 10px 0;
}


/* Style for textarea container */
.textarea-container {
    display: flex;
    flex-direction: column; /* Stack textareas vertically */
    position: absolute;
    bottom: 0;
    left: 510px;
    width: 220px;
    padding: 10px;
    padding-bottom: 12px;
}

/* Style for individual textareas */
textarea {
    font-family: exo, sans-serif;
    color: gray;
    width: 100%; /* Adjust width with padding */
    margin-bottom: 10px; /* Space between textareas */
    height: 20px;
    box-sizing: border-box;
    background: transparent;
    z-index: 1; /* Ensure it's below the image */
    border: none; /* 去掉边框 */
    outline: none; /* 去掉点击时的高亮边框 */
    resize: none; /* 禁止用户调整文本框大小 */
    overflow: hidden; /* 去掉滚动条 */

}

/* 使用伪元素在 textarea 聚焦时显示白色背景 */
textarea.focused {
    background-color: white;
    z-index: 100; /* 保证覆盖层在 textarea 背后 */
}

#frame {
    position: absolute;
    max-width: 320px;
    top: 0; /* Adjust based on your layout */
    left: 0; /* Adjust based on your layout */
    display: none; /* Hide initially */
    z-index: 100; /* Ensure it's above the textareas */
}

/* Style for the submit button */
.submit-button {
    top: 620px;
    left: 750px;
    position: absolute;
    width: 36px; /* Adjust width */
    height: 13px; /* Adjust height */
    opacity: 1; /* Ensure button is visible */
    background-color: #4CAF50; /* Example background color */
    color: white; /* Button text color */
    opacity: 0;
    border: none;
    cursor: pointer; /* Change cursor to pointer on hover */
}

.like-container {
    top: 590px;
    left: 800px;
    position: absolute;
    display: flex;
    align-items: center;
}
/* Style for the like button */
.like-button {
    top: 25px;
    left: -2px;
    position: absolute;
    width: 25px; /* Adjust width */
    height: 18px; /* Adjust height */
    opacity: 1; /* Ensure button is visible */
    background-color: transparent; /* Example background color */
    color: white; /* Button text color */
    /* opacity: 0; */
    border: none;
    cursor: pointer; /* Change cursor to pointer on hover */
}
.like-button.liked {
    background: url('Icons/like.png') no-repeat center;
    width: 30px; /* Adjust width */
    height: 30px; /* Adjust height */
    background-size: contain;
}

.like-count {
    position: absolute;
    color:gray;
    left: 30px; /* 距离右边10px */
    top: 40px; /* 垂直居中 */
    transform: translateY(-50%);
}
.comment-count {
    position: absolute;
    color: gray;
    left: 85px; /* 距离右边10px */
    top: 40px; /* 垂直居中 */
    transform: translateY(-50%);
}

/* Class to disable hover effect */
.disable-hover .hiddenInfo:hover {
    /* Disable hover effect */
    opacity: 0 !important;
    transform: none !important;
}
