/* 引入 Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&family=Montserrat:wght@400;700&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css');

/* 设置全局样式 */
body {
    font-family:  'Montserrat', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
    display: flex;
    font-size: 16px;
    line-height: 1.6;
}

/* 侧边栏样式 */
.sidebar {
    width: 200px;
    background-color: #ffffff;
    color: #333;
    padding: 20px;
    position: fixed;
    height: 100vh;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    border-right: 1px solid #ddd;
    transition: transform 0.3s ease;
    z-index: 1000;

    overflow-y: auto;       /* 竖向滚动 */

    /* Firefox 细滚动条 */
    scrollbar-width: thin;                /* 细 */
    scrollbar-color: #bbb transparent;    /* 滑块颜色 + 背景透明 */
}

/* Chrome / Edge / Safari 细滚动条 */
.sidebar::-webkit-scrollbar {
    width: 6px;   /* 滚动条宽度 */
}
.sidebar::-webkit-scrollbar-track {
    background: transparent;  /* 背景透明 */
}
.sidebar::-webkit-scrollbar-thumb {
    background-color: #bbb;   /* 滑块颜色 */
    border-radius: 3px;       /* 圆角 */
}
.sidebar::-webkit-scrollbar-thumb:hover {
    background-color: #888;   /* hover 时更深 */
}


/* 内容区域样式 */
.content {
    margin-left: 220px; /* 保证内容区域在侧边栏旁边 */
    padding: 10px;
    flex: 1;
    width: calc(100% - 220px); /* 填满剩余宽度 */
    box-sizing: border-box; /* 包括 padding 在内计算宽度 */
    transition: margin-left 0.3s ease, width 0.3s ease;

    justify-content: center; /* 水平居中 */
    align-items: center; /* 垂直居中 */
    text-align: center; /* 如果有文本内容，使文本也居中 */
}

/* 移动设备上的隐藏效果 */
@media screen and (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%); /* 移动侧边栏到屏幕外 */
    }

    .content {
        margin-left: 0; /* 取消左侧边距 */
        width: 100%; /* 填满屏幕宽度 */
    }
}

/* 侧边栏标题样式 */
.sidebar-title {
    /* font-size: 1.8em; */
    font-weight: 700;
    margin-bottom: 20px;
    color: #007acc;
    text-align: center;
    font-family: 'Montserrat', sans-serif;
}

/* 列表样式 */
.sidebar ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

.sidebar ul li {
    margin: 10px 0;
}

.sidebar ul li a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    font-size: 1em;
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-radius: 8px;
    transition: color 0.3s, background-color 0.3s;
    font-family: 'Montserrat', sans-serif;
}

.sidebar ul li a i {
    margin-right: 10px;
}

.sidebar ul li a:hover,
.sidebar ul li a.active {
    color: #fff;
    background-color: #007acc;
}


.paper-info {
    text-align: center;
    margin: 20px 0;
    padding: 20px;
    background-color: #ffffff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-size: 0.8em;
    font-family: 'Montserrat', sans-serif;
}

.paper-citation,
.contact-us {
    text-align: center;
    margin: 20px 0;
    padding: 20px;
    background-color: #ffffff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-size: 1.em;
    font-family: 'Montserrat', sans-serif;
}

.paper-info h1{
    font-size: 2.5em;
    font-family: 'Montserrat', sans-serif;
}
.paper-citation h2,
.contact-us h2 {
    font-size: 1.8em;
    font-weight: 500;
    margin-bottom: 10px;
    font-family: 'Montserrat', sans-serif;
}

.authors {
    margin-bottom: 10px;
    font-size: 1.2em;
}

.authors .author a, .authors .author {
    color: #007acc;
    text-decoration: none;
    font-weight: normal;
}

.authors .author a:hover {
    text-decoration: underline;
}

.links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 10px;
}

.links p {
    margin: 0;
}

.paper-info a {
    color: #007acc;
    text-decoration: none;
    font-weight: 400;
    font-size: 1.2em;
}

.paper-info a:hover {
    text-decoration: underline;
}
.affiliations {
    font-size: 1em;
    color: #555;
    
}

.gallery-section {
    margin-bottom: 40px; /* 增加底部间距 */
    margin-top: 40px; /* 增加顶部间距 */
}


.gallery-section h2 {
    font-size: 1.5em; /* 调整标题字体大小 */
    font-weight: 800;
    margin-bottom: 20px;
    font-family: 'Montserrat', sans-serif;
    
    text-align: center; /* 文字居中 */
}
.citation-container {
    display: flex;
    justify-content: center;
}
.citation-box {
    background-color: #f0f0f0;
    border-radius: 10px;
    padding: 15px;
    max-width: 80%;
}
pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    text-align: left;
}

.gallery-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* cursor: pointer; */
    transition: transform 0.3s ease-in-out;
}
.play-pause-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(24, 1fr); 
    gap: 7px;
    font-family: 'Montserrat', sans-serif;
    margin: 0 auto;
}

.gallery-item-container {
    display: flex;
    flex-direction: column; /* 上下排布 */
    gap: 0px; /* 与网格间距一致 */
    height: 100%; /* 填满网格单元格高度 */
}

.gallery-item {
    position: relative;
    background-color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    overflow: hidden;
}

.gallery-item::before {
    content: '';
    display: block;
    padding-bottom: calc(100% / (var(--aspect-ratio, 1))); /* 默认宽高比 1:1 */
}

.gallery-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.gallery-item:hover .gallery-image {
    transform: scale(1.1);
    opacity: 0.4;
}
.gallery-item:hover .gallery-image-pure {
    transform: scale(1.1);
    opacity: 0.;
}

.prompt-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    border-radius: 5px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    text-align: center;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prompt-text-inner {
    max-width: 80%; 
    width: fit-content;
    margin: 0 auto;
    line-height: 1.5;
}

.gallery-item:hover .prompt-text {
    opacity: 1;
}


.overlay-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: transform 0.3s ease-in-out;
}



.resolution,
.resolution-svd,
.resolution-sd3,
.resolution-1-5 {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: rgba(0, 0, 0, 0.2);
    color: #fff;
    padding: 2px 5px;
    font-size: 0.9em;
    border-radius: 3px;
    font-family: 'Montserrat', sans-serif;
}

/* 为不同类定义不同的背景颜色 */
.resolution-svd {
    background-color: rgba(87, 51, 15, 0.7);
}

.resolution-sd3 {
    background-color: rgba(166, 148, 48, 0.7);
}

.resolution-1-5 {
    background-color: rgba(17, 65, 68, 0.7);
}

/* 在移动设备上隐藏 */
@media screen and (max-width: 1048px) {
    .resolution,
    .resolution-svd,
    .resolution-sd3,
    .resolution-1-5 {
        display: none;
    }
}

.watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(211, 211, 211, 0.5);
    color: #333;
    padding: 5px 10px;
    font-size: 1.2em;
    border-radius: 3px;
    font-family: 'Montserrat', sans-serif;
    font-weight: bold;
    pointer-events: none;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.9);
}

.modal-content-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: calc(100% - 100px); /* 留出空间给缩略图 */
    overflow: auto;
    position: relative;
}

.modal-content {
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.3s ease; /* 添加平滑的缩放动画 */
    cursor: grab; /* 添加抓手光标 */
    width: auto; /* 确保初始宽度 */
    height: auto; /* 确保初始高度 */
    max-width: 100%;
    max-height: 100%;
}

.modal-content:active {
    cursor: grabbing; /* 添加拖动光标 */
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
}

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

.thumbnails {
    position: fixed;
    top: 50%;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 80%;
    overflow-y: auto;
    transform: translateY(-50%);
    z-index: 2;
}

.thumbnails img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease-in-out;
}

.thumbnails img:hover {
    transform: scale(1.1);
}

.thumbnail-active {
    border: 2px solid #007acc;
}


#mobile-warning {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 69, 0, 0.9); /* Semi-transparent red-orange */
    color: white;
    text-align: center;
    padding: 15px;
    z-index: 1000;
    font-family: Arial, sans-serif;
}

#mobile-warning button {
    background-color: white;
    color: rgba(255, 69, 0, 0.9);
    border: none;
    padding: 10px 20px;
    margin-top: 10px;
    cursor: pointer;
    font-weight: bold;
}

#mobile-warning button:hover {
    background-color: rgba(255, 255, 255, 0.8);
}




/* Slider for horizontal scrolling */
/* Ensure the container takes full width */
.slider-container {
    position: relative;
    width: 100%;
    overflow-x: auto;
    padding: 10px;
    box-sizing: border-box;
    scrollbar-width: thin; /* For Firefox */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    scroll-behavior: smooth;
}

/* Slider layout */
.slider {
    display: flex;
    gap: 10px; /* Space between group-items */
    flex-wrap: nowrap; /* Prevent wrapping for horizontal scrolling */
    min-width: max-content; /* Ensure slider content doesn't wrap */
}

/* Smooth scrolling for Webkit browsers */
.slider-container::-webkit-scrollbar {
    height: 8px;
}

.slider-container::-webkit-scrollbar-thumb {
    background-color: #888;
    border-radius: 4px;
}

.slider-container::-webkit-scrollbar-thumb:hover {
    background-color: #555;
}


/* Group item with dynamic width based on --span */
.group-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: calc(var(--span) * (100vw / 24)); /* Base width of 300px per span */
    height: 100%; /* Ensure consistent height */
}


.prompt-display {
    padding: 6px;
    background-color: #ffffff; /* 白色背景，干净简洁 */
    border: 1px solid #e0e0e0; /* 细边框，增加层次感 */
    border-radius: 6px; /* 更柔和的圆角 */
    flex-grow: 1; /* 保留原有弹性布局 */
    height: 56px; /* 固定高度 */
    overflow-y: auto; /* 垂直滚动 */
    line-height: 1.2; /* 减小行间距 */
}

.prompt-display::-webkit-scrollbar {
    display: none; 
}

.prompt-display {
    scrollbar-width: none;
}

.slider-btn {
    background: linear-gradient(135deg, #6e8efb, #a777e3);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.3s ease;
    opacity: 1; /* 始终可见 */
}

.slider-btn:hover {
    background: linear-gradient(135deg, #5a76db, #8c5cc1);
    transform: translateY(-10%) scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.left-btn {
    margin-right: 15px;
    margin-bottom: 8px;
}

.right-btn {
    margin-left: 15px;
    margin-bottom: 8px;
}