/* === Frutiger Aero 全局变量 === */
:root {
    /* 经典的 Win7 极光色调 */
    --bg-gradient: linear-gradient(180deg, #235b8e 0%, #6faacc 50%, #99c9e5 100%);
    
    /* 玻璃质感变量 */
    --glass-border: 1px solid rgba(255, 255, 255, 0.6);
    --glass-bg: rgba(255, 255, 255, 0.25);
    --glass-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    
    /* 文字颜色 */
    --text-primary: #1e395b; /* Win7 标题深蓝 */
    --text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
    
    /* 动画曲线 (Win7 风格的弹跳感) */
    --win7-ease: cubic-bezier(0.19, 1, 0.22, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
}

body {
    /* 背景图 + 渐变兜底 */
    background: 
        url('https://lt.sntp.uk/xlHWuQ.jpg') no-repeat center center fixed,
        var(--bg-gradient);
    background-size: cover;
    color: var(--text-primary);
    min-height: 100vh;
}

/* --- 顶部导航栏 (Aero Glass) --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 5%;
    /* 模拟磨砂玻璃 */
    background: linear-gradient(to bottom, rgba(240,248,255,0.85) 0%, rgba(200,225,255,0.65) 100%);
    border-bottom: 1px solid rgba(255,255,255,0.6);
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px); /* 现代浏览器毛玻璃支持 */
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.6rem;
    font-weight: 700;
    color: #1e395b;
    text-shadow: var(--text-shadow);
}

.logo i {
    /* 经典的四色徽标光泽 */
    background: linear-gradient(135deg, #f35325, #81bc06, #05a6f0, #ffba08);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.2));
}

.nav-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 4px;
    border: 1px solid transparent;
    transition: all 0.2s;
    text-shadow: var(--text-shadow);
    font-size: 0.95rem;
}

/* 按钮悬停：经典的高光水晶质感 */
.nav-links a:hover, .nav-links a.active {
    background: linear-gradient(to bottom, #eafdff 0%, #b4d9ee 50%, #9bcbe6 51%, #aed9f3 100%);
    border: 1px solid #7da2ce;
    box-shadow: inset 0 0 2px #fff, 0 2px 4px rgba(0,0,0,0.1);
}

/* --- Hero 标题区域 --- */
.hero {
    text-align: center;
    padding: 3rem 1rem;
    color: #fff;
    text-shadow: 0 2px 5px rgba(0,0,0,0.6); /* 增强阴影以适应复杂背景 */
}

.hero h1 {
    font-size: 3.2rem;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

/* --- 筛选控制栏 (水晶条) --- */
.controls-container {
    max-width: 1400px;
    margin: 0 auto 2rem auto;
    padding: 12px 25px;
    /* 半透明白底 + 渐变 */
    background: linear-gradient(to bottom, rgba(255,255,255,0.9) 0%, rgba(225,235,255,0.8) 100%);
    border: 1px solid rgba(255,255,255,0.8);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1), inset 0 1px 0 rgba(255,255,255,0.9);
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(8px);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-group i {
    font-size: 1.2rem;
    color: #3c7fb1;
}

.filter-group select {
    padding: 6px 12px;
    border-radius: 4px;
    border: 1px solid #7da2ce;
    background: linear-gradient(to bottom, #fff 0%, #f0f0f0 100%);
    color: var(--text-primary);
    font-weight: 600;
    outline: none;
    cursor: pointer;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}

.result-count {
    font-weight: 600;
    text-shadow: 0 1px 0 rgba(255,255,255,0.6);
    color: #444;
}

/* --- 壁纸网格 --- */
.gallery-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px 4rem 20px;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.no-results {
    text-align: center;
    padding: 3rem;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    font-size: 1.2rem;
    width: 100%;
    grid-column: 1 / -1;
}

/* --- 水晶卡片 --- */
.card {
    background: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    position: relative;
    backdrop-filter: blur(5px);
}

.card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0,0,0,0.25), 0 0 15px rgba(255,255,255,0.4);
    border-color: #fff;
    z-index: 2;
}

.card-img-wrapper {
    width: 100%;
    aspect-ratio: 16/10; 
    overflow: hidden;
    position: relative;
    background: #000; /* 图片未加载时的底色 */
}

/* 典型的 Aero 高光遮罩 (给图片加反光) */
.card-img-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(to bottom, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
}

.card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    opacity: 1; 
}

.res-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    /* 深蓝渐变胶囊 */
    background: linear-gradient(to bottom, #005a9e, #003366);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid rgba(255,255,255,0.3);
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    z-index: 2;
}

.card-info {
    padding: 15px;
    /* 银色金属拉丝背景 */
    background: linear-gradient(to bottom, #f0f0f0 0%, #e0e0e0 100%);
    border-top: 1px solid rgba(255,255,255,0.8);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
    text-shadow: 0 1px 0 #fff;
}

.card-meta {
    font-size: 0.85rem;
    color: #555;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tag {
    /* 浅蓝高光标签 */
    background: linear-gradient(to bottom, #ebf4fc 0%, #c4e0f4 100%);
    color: #1e395b;
    padding: 2px 8px;
    border-radius: 3px;
    border: 1px solid #a6cbe7;
    font-size: 0.8rem;
    font-weight: 700;
}

/* --- 模态框动画核心样式 (FLIP 动画支持) --- */
.modal {
    display: none; 
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    /* 深色半透明背景 */
    background-color: rgba(0,0,0,0.8); 
    backdrop-filter: blur(15px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    
    /* 动画状态 */
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    opacity: 1;
}

.modal-content {
    max-width: 90%;
    max-height: 80vh;
    border-radius: 8px;
    /* 经典的 Win7 窗口发光阴影 */
    box-shadow: 0 0 50px rgba(0,120,212,0.4), 0 20px 60px rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.2);
    object-fit: contain;
    
    /* 动画关键属性 */
    transform-origin: top left;
    transform: translate(0, 0) scale(1);
    transition: transform 0.4s var(--win7-ease);
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    text-shadow: 0 0 10px #000;
    opacity: 0;
    transition: opacity 0.3s ease 0.1s;
}
.modal.active .close-btn { opacity: 1; }
.close-btn:hover { color: #50a6ff; text-shadow: 0 0 15px #0078d4; }

.caption {
    margin-top: 15px;
    color: #fff;
    font-size: 1.3rem;
    text-shadow: 0 2px 4px #000;
    background: rgba(0,0,0,0.4);
    padding: 5px 20px;
    border-radius: 20px;
    opacity: 0;
    transition: opacity 0.3s ease 0.1s;
    border: 1px solid rgba(255,255,255,0.1);
}
.modal.active .caption { opacity: 1; }

/* 经典 Win7 风格下载按钮 */
.download-btn {
    margin-top: 20px;
    padding: 10px 30px;
    /* 灰色渐变金属质感 */
    background: linear-gradient(to bottom, #f3f3f3 0%, #dcdcdc 50%, #bcbcbc 51%, #d0d0d0 100%);
    color: #333;
    text-decoration: none;
    border-radius: 6px;
    border: 1px solid #999;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: inset 0 1px 0 #fff, 0 3px 5px rgba(0,0,0,0.3);
    
    opacity: 0;
    transition: opacity 0.3s ease 0.1s, all 0.2s;
}
.modal.active .download-btn { opacity: 1; }

.download-btn:hover {
    /* 悬停变蓝 */
    background: linear-gradient(to bottom, #eaf6fd 0%, #d9f0fc 50%, #bee6fd 51%, #a7d9f5 100%);
    border-color: #3c7fb1;
    color: #1e395b;
    box-shadow: 0 0 15px rgba(60, 127, 177, 0.6), inset 0 1px 0 #fff;
    transform: translateY(-1px);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
    }
    .controls-container {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    .hero h1 { font-size: 2rem; }
}