/* style/screenshots.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    width: 1200px;
    margin: 0 auto;
}

/* 头部样式 */
header {
    background: linear-gradient(to right, #1a2a6c, #b21f1f, #fdbb2d);
    color: white;
    padding: 20px 0;
    text-align: center;
}

h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* 导航菜单 */
nav {
    background-color: #222;
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
}

nav ul li {
    position: relative;
}

nav ul li a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 15px 25px;
    transition: all 0.3s ease;
}

nav ul li a:hover {
    background-color: #b21f1f;
    color: #ffd700;
}

/* 截图展示区 */
.screenshots-section {
    margin: 30px 0;
}

.section-title {
    font-size: 1.8em;
    color: #b21f1f;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 30px;
    text-align: center;
}

.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    aspect-ratio: 16/9;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(178, 31, 31, 0.3);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: white;
    padding: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .caption {
    opacity: 1;
}

/* 分类筛选 */
.filter-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.filter-btn {
    padding: 8px 16px;
    background-color: #f0f0f0;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover, .filter-btn.active {
    background-color: #b21f1f;
    color: white;
}

/* 图片查看器样式 */
.image-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.image-viewer.active {
    opacity: 1;
    pointer-events: auto;
}

.image-viewer-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.image-viewer img {
    border: 15px solid #fff;
    border-radius: 5px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
    max-width: 100%;
    max-height: 80vh;
    display: block;
}

.close-viewer {
    position: absolute;
    top: -40px;
    right: -40px;
    color: white;
    font-size: 30px;
    cursor: pointer;
    background-color: #b21f1f;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.close-viewer:hover {
    transform: rotate(90deg);
    background-color: #8a1919;
}

.image-caption {
    position: absolute;
    bottom: -40px;
    left: 0;
    width: 100%;
    text-align: center;
    color: white;
    font-size: 18px;
    padding: 10px;
    background-color: rgba(178, 31, 31, 0.8);
    border-radius: 5px;
}

/* 页脚 */
footer {
    background-color: #222;
    color: #aaa;
    text-align: center;
    padding: 20px 0;
    margin-top: 30px;
}

footer p {
    margin: 5px 0;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .container {
        width: 95%;
    }
}

@media (max-width: 768px) {
    .gallery-container {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    nav ul {
        flex-wrap: wrap;
    }
    
    nav ul li {
        width: 50%;
        text-align: center;
    }
    
    .close-viewer {
        top: -30px;
        right: -30px;
        width: 30px;
        height: 30px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .gallery-container {
        grid-template-columns: 1fr;
    }
    
    .filter-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .image-viewer img {
        border-width: 10px;
    }
    
    .image-caption {
        font-size: 16px;
        bottom: -30px;
    }
}