/* 全局基础样式 独立不共用index css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
:root {
    --primary-color: #1d1d1f;
    --secondary-color: #86868b;
    --accent-color: #0071e3;
    --bg-light: #fafafa;
    --card-bg: #ffffff;
    --border-color: #e5e7eb;
    /* 弱化阴影参数，降低厚重感 */
    --shadow-light: 0 2px 12px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 6px 24px rgba(0, 0, 0, 0.08);
    --transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
html[data-theme="dark"] {
    --primary-color: #f5f5f7;
    --secondary-color: #a1a1a6;
    --accent-color: #0a84ff;
    --bg-light: #121212;
    --card-bg: #1f1f1f;
    --border-color: #333333;
    /* 深色模式同样弱化阴影 */
    --shadow-light: 0 2px 12px rgba(0, 0, 0, 0.12);
    --shadow-hover: 0 6px 24px rgba(0, 0, 0, 0.2);
}
html {
    scroll-behavior: smooth;
    transition: background-color 0.4s ease, color 0.4s ease;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Microsoft YaHei", sans-serif;
    line-height: 1.7;
    color: var(--primary-color);
    background-color: var(--bg-light);
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    user-select: none;
    -webkit-user-select: none;
}
/* 交互按钮允许选中文字 */
.lang-current, .lang-option, #theme-toggle, a {
    user-select: text;
    -webkit-user-select: text;
    cursor: pointer;
}
a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}
ul {
    list-style: none;
}
img {
    max-width: 100%;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
}
img.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    background: var(--border-color);
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}
/* 导航栏 - 移除滚动后下方突兀阴影 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-color);
    z-index: 9999;
    transition: var(--transition);
}
.navbar.scrolled {
    /* 彻底去掉导航栏阴影 */
    box-shadow: none;
    background: rgba(255, 255, 255, 0.92);
}
html[data-theme="dark"] .navbar {
    background: rgba(18, 18, 18, 0.85);
}
html[data-theme="dark"] .navbar.scrolled {
    background: rgba(18, 18, 18, 0.92);
}
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.logo {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.4px;
}
.back-home-link {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    color: var(--primary-color);
}
.back-home-link:hover {
    color: var(--accent-color);
}
.nav-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10001;
}
/* 语言下拉 */
.lang-dropdown {
    position: relative;
}
.lang-current {
    background: var(--card-bg);
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    border-radius: 8px;
    transition: var(--transition);
    font-size: 14px;
}
.lang-current:hover {
    background: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
}
.lang-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-light);
    min-width: 140px;
    display: none;
}
.lang-option {
    display: block;
    width: 100%;
    background: transparent;
    color: var(--primary-color);
    border: none;
    padding: 10px 16px;
    text-align: left;
    transition: var(--transition);
    font-size: 14px;
}
.lang-option:hover {
    background: var(--accent-color);
    color: #fff;
}
/* 主题按钮 */
.theme-toggle {
    background: var(--card-bg);
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 16px;
}
.theme-toggle:hover {
    background: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
}
html[data-theme="dark"] .icon-moon { display: none; }
html:not([data-theme="dark"]) .icon-sun { display: none; }
/* 扩展画廊头部hero */
.more-hero {
    width: 100%;
    height: 60vh;
    background: none;
    background-color: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-top: 70px;
}
html[data-theme="dark"] .more-hero {
    background-color: #121212;
}
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
    animation: fadeUp 1.2s ease-out forwards;
}
.hero h2 {
    font-size: 72px;
    font-weight: 600;
    letter-spacing: -2px;
    margin-bottom: 16px;
    color: var(--primary-color);
}
.hero .subtitle {
    font-size: 24px;
    font-weight: 300;
    opacity: 0.95;
    color: var(--secondary-color);
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}
/* 筛选按钮区域 */
.filter-container {
    text-align: center;
    padding: 40px 0 10px;
}
.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
}
.filter-btn {
    padding: 10px 22px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--primary-color);
    border-radius: 30px;
    font-size: 16px;
    transition: var(--transition);
    cursor: pointer;
}
.filter-btn.active,
.filter-btn:hover {
    background: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
}
/* 作品网格 */
.gallery-section {
    padding: 100px 0;
}
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 20px;
    align-items: start;
}
.gallery-card {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: opacity 0.4s ease, transform 0.4s ease, var(--transition);
    cursor: pointer;
}
.gallery-card.hidden {
    display: none;
}
.gallery-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}
/* 所有卡片统一竖版比例，横图居中裁剪不改变容器高度 */
.card-image {
    width: 100%;
    position: relative;
    padding-bottom: 150%;
    overflow: hidden;
}
.landscape-card .card-image {
    padding-bottom: 150%;
}
/* 骨架屏 */
.img-loading {
    background: linear-gradient(90deg, #f2f2f2 25%, #e6e6e6 37%, #f2f2f2 63%);
    background-size: 400% 100%;
    animation: skeleton-loading 1.4s ease infinite;
}
html[data-theme="dark"] .img-loading {
    background: linear-gradient(90deg, #2c2c2c 25%, #3d3d3d 37%, #2c2c2c 63%);
    background-size: 400% 100%;
}
@keyframes skeleton-loading {
    0% { background-position: 100% 0; }
    100% { background-position: 0 0; }
}
.card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 1;
    transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
}
.img-loading img {
    opacity: 0;
}
.gallery-card:hover .card-image img {
    transform: scale(1.04);
}
/* 右下角水印 */
.card-image::after {
    content: attr(data-copyright);
    position: absolute;
    right: 16px;
    bottom: 16px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(0, 0, 0, 0.45);
    padding: 6px 14px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.35s ease, transform 0.35s ease;
    z-index: 50;
    pointer-events: none;
}
.gallery-card:hover .card-image::after {
    opacity: 1;
    transform: translateY(0);
}
.card-info {
    padding: 24px;
}
.card-info p {
    font-size: 17px;
    font-weight: 500;
}
/* 灯箱 */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 0 60px rgba(0,0,0,0.6);
}
.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}
.lightbox-close:hover {
    color: #aaa;
    transform: scale(1.1);
}
/* 页脚 */
.footer {
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
    color: var(--secondary-color);
    font-size: 14px;
}
/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: var(--accent-color);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    box-shadow: var(--shadow-light);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}
.back-to-top.show {
    opacity: 1;
    visibility: visible;
}
.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

/* ========== 响应式关键修改 ========== */
/* 平板、手机端统一一行2列 */
@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}
@media (max-width: 768px) {
    .nav-container { padding: 0 16px; height: 70px; }
    .hero h2 { font-size: 40px; }
    .hero .subtitle { font-size: 18px; }
    .lightbox-close { right: 20px; top: 20px; font-size: 30px; }
}
@media (max-width: 480px) {
    .logo { font-size: 19px; }
    .theme-toggle { width: 36px; height: 36px; font-size: 14px; }
    .filter-btn { padding: 8px 16px; font-size:14px; }
}
@media (max-width: 360px) {
    .hero h2 { font-size: 32px; }
    .hero .subtitle { font-size: 16px; }
}