/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: white;
}

/* 导航栏样式 */
header {
    padding: 0.3rem 0;
    background: white;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(238, 238, 238, 0.3);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.2rem 0;
    width: 100%;
}

/* Logo样式 */
.logo {
    margin-right: auto;
    padding-left: 3rem;
}

.logo a.home-link {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 1rem;
    letter-spacing: 0.05em;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.8rem;
}

.logo .cn-name {
    font-size: 1rem;
}

.logo .en-name {
    font-size: 0.7rem;
    opacity: 0.7;
    letter-spacing: 0.1em;
    position: relative;
    top: 1px;
}

/* 导航链接 */
nav ul {
    display: flex;
    list-style: none;
    align-items: center;
    padding-right: 3rem;
}

nav ul li {
    margin-left: 2.5rem;
}

nav ul li a {
    text-decoration: none;
    color: #333;
    position: relative;
    padding: 0.3rem 0;
    font-size: 0.9rem;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: #333;
    transition: width 0.3s ease;
}

nav ul li a:hover::after {
    width: 100%;
}

/* 语言切换按钮 */
.lang-switch {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 4rem;
}

.lang-switch button {
    padding: 0.3rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #333;
    font-size: 0.9rem;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.lang-switch button:hover {
    color: #000;
    opacity: 1;
}

.lang-switch button.active {
    opacity: 1;
}

.lang-switch span {
    color: #999;
    font-size: 0.9rem;
}

/* 作品过滤按钮 */
.filter-container {
    margin-bottom: 2rem;
    text-align: center;
}

.filter-btn {
    padding: 0.5rem 1rem;
    margin: 0 0.5rem;
    border: 1px solid #333;
    background: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn.active {
    background: #333;
    color: white;
}

/* 作品详情弹窗 */
.artwork-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-content {
    background: white;
    padding: 2rem;
    max-width: 80%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-image {
    max-width: 100%;
    height: auto;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

/* 作品悬停效果 */
.artwork {
    position: relative;
    width: 100%;
    background-color: #fff;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    aspect-ratio: 3 / 4;
    cursor: pointer;
}

.artwork img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.3s ease;
}

.artwork-info {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 2rem;
    text-align: center;
}

/* 鼠标悬停效果 */
.artwork:hover .artwork-info {
    opacity: 1;
    visibility: visible;
}

.artwork:hover img {
    transform: scale(1.02);
}

/* 移除之前的 hover::after 效果 */
.artwork-info::after {
    display: none;
}

/* 添加查看大图提示 */
.artwork-info p:last-child {
    margin-top: 1.5rem;
    padding: 0.5rem 1.5rem;
    border: 1px solid #333;
    font-size: 0.9rem;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.artwork-info:hover p:last-child {
    background: #333;
    color: white;
    opacity: 1;
}

/* 让文字更清晰可见 */
.artwork-info h2 {
    color: #000;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.artwork-info p {
    color: #333;
    margin-bottom: 0.3rem;
}

/* 主要内容区域 */
main {
    max-width: 1200px;
    margin: 100px auto 2rem;
    padding: 0 2rem;
}

/* 作品网格 */
.artwork-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin: 2rem 0;
}

/* 关于页面样式 */
.bio {
    max-width: 800px;
    margin: 0 auto;
}

.artist-portrait {
    width: 100%;
    max-width: 400px;
    height: auto;
    margin: 2rem 0;
}

.bio-text {
    margin: 2rem 0;
}

.awards, .collections {
    margin: 2rem 0;
}

.awards h2, .collections h2 {
    margin-bottom: 1rem;
    font-weight: normal;
}

.awards ul, .collections ul {
    list-style: none;
}

.awards li, .collections li {
    margin-bottom: 0.5rem;
    color: #666;
}

/* 联系页面样式 */
.contact-info {
    margin: 0;
    padding: 0;
}

.contact-info h1 {
    margin-bottom: 3rem;
    font-weight: normal;
    text-align: center;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 4rem;
}

.contact-item {
    padding: 1.5rem;
    background: #f9f9f9;
}

.contact-item h2 {
    margin-bottom: 1.5rem;
    font-weight: normal;
    font-size: 1.2rem;
}

.contact-item h3 {
    margin-bottom: 1rem;
    font-weight: normal;
    color: #666;
}

.contact-item p {
    margin-bottom: 0.5rem;
    color: #666;
}

.contact-item a {
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #333;
    transition: all 0.3s ease;
}

.contact-item a:hover {
    color: #000;
    border-bottom-color: #000;
}

.newsletter {
    margin-top: 4rem;
    text-align: center;
    padding: 2rem;
    background: #f9f9f9;
}

.newsletter h2 {
    margin-bottom: 1rem;
    font-weight: normal;
}

.newsletter p {
    margin-bottom: 1.5rem;
    color: #666;
}

.subscribe-form {
    display: flex;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.subscribe-form input {
    flex: 1;
    padding: 0.8rem;
    border: 1px solid #ddd;
    font-size: 1rem;
}

.subscribe-form button {
    padding: 0.8rem 2rem;
    background: #333;
    color: white;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
}

.subscribe-form button:hover {
    background: #000;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .subscribe-form {
        flex-direction: column;
    }

    .subscribe-form button {
        width: 100%;
    }

    /* 调整导航栏Logo的左边距 */
    .logo {
        padding-left: 1rem;
    }

    /* 调整导航菜单的右边距 */
    nav ul {
        padding-right: 1rem;
    }

    /* 调整导航项之间的间距 */
    nav ul li {
        margin-left: 1.5rem;
    }

    /* 调整语言切换按钮的边距 */
    .lang-switch {
        margin-left: 1.5rem;
    }

    /* 其他移动端样式保持不变 */
    .about-container {
        grid-template-columns: 1fr !important;
        gap: 3rem;
        padding: 2rem 1.5rem;
        margin-top: 60px;
    }

    .bio-resume-section {
        padding-right: 0;
    }

    .contact-section {
        border-left: none;
        padding-left: 0;
        padding: 0;
        margin-top: 2rem;
    }

    .bio-resume-section h2,
    .contact-section h2 {
        font-size: 1.4rem;
        margin-bottom: 1.5rem;
        letter-spacing: 0.02em;
    }

    .bio-content p {
        font-size: 0.95rem;
        line-height: 1.8;
        margin-bottom: 1.5rem;
        color: #333;
    }

    .resume-item h3 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
        color: #444;
    }

    .resume-item p {
        font-size: 0.9rem;
        line-height: 1.6;
        margin-bottom: 0.8rem;
        color: #666;
    }

    .contact-info p {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

    .contact-info span {
        min-width: 70px;
        color: #666;
    }

    /* 社交媒体部分调整 */
    .social-media {
        margin-top: 2rem;
        padding-top: 0;
        border-top: none;
    }

    .social-media h3 {
        font-size: 1.1rem;
        margin-bottom: 1.2rem;
    }

    .social-media p {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

    .social-media span {
        min-width: 70px;
        color: #666;
    }

    /* 展开按钮调整 */
    .toggle-resume {
        margin: 2rem 0;
        padding: 0.7rem 1.8rem;
        font-size: 0.9rem;
    }

    /* 调整页面整体边距 */
    #about.page-section {
        padding: 80px 1rem 40px;
    }

    #works .artwork-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* 作品页面整体布局调整 */
    .works-section {
        margin-top: 60px;
        padding: 0;
        min-height: 100vh;
        position: relative;
    }

    .works-container {
        flex-direction: column;
        width: 100%;
        padding: 0;
        margin: 0;
        min-height: calc(100vh - 60px);
    }

    /* 年份筛选器样式调整 */
    .year-filter {
        position: fixed;
        top: 50px; /* 降低顶部位置 */
        left: 0;
        right: 0;
        padding: 0.5rem 1rem; /* 减小内边距 */
        margin: 0;
        display: flex;
        justify-content: flex-start;
        gap: 0.6rem; /* 减小间距 */
        background: rgba(255, 255, 255, 0.98);
        border-bottom: 1px solid #eee;
        z-index: 100;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* 作品内容区域调整 */
    .works-content {
        width: 100%;
        padding-top: 40px; /* 减小顶部间距 */
    }

    /* 作品网格调整为双列 */
    .artwork-grid {
        display: grid;
        grid-template-columns: 1fr !important;
        gap: 3rem !important;
        margin: 0;
        padding: 1.5rem;
        width: 100%;
    }

    /* 作品容器调整 */
    .artwork {
        width: 100%;
        aspect-ratio: 4/5;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        margin: 0;
    }

    .artwork img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        display: block;
    }

    /* 作品信息样式调整 */
    .artwork-info {
        padding: 1.5rem;
    }

    .artwork-info h2 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .artwork-info p {
        font-size: 0.9rem;
        margin-bottom: 0.3rem;
    }

    /* 展开按钮调整 */
    .load-more {
        margin: 2rem 0;
        padding: 0 1rem;
    }

    .load-more button {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
        display: block;
    }

    /* 移除所有可能冲突的样式 */
    #works {
        padding: 0 !important;
        height: auto !important;
        background: white;
    }

    #works .artwork-grid {
        margin: 0 !important;
        padding: 1rem !important;
        gap: 3rem !important;
    }

    .year-btn {
        padding: 0.4rem 0.8rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .year-btn {
        padding: 0.3rem 0.8rem;
        font-size: 0.95rem;
    }

    .year-filter {
        padding: 0.6rem 1rem;
    }

    .artwork-grid {
        gap: 2.5rem !important;
        padding: 1rem;
    }

    .artwork-info {
        padding: 1.2rem;
    }

    .artwork-info h2 {
        font-size: 0.95rem;
    }

    .artwork-info p {
        font-size: 0.85rem;
        margin-bottom: 0.25rem;
    }

    .works-section {
        margin-top: 50px;
    }

    .about-container {
        padding: 1.5rem 1rem;
        gap: 2rem;
    }

    .bio-resume-section h2,
    .contact-section h2 {
        font-size: 1.3rem;
        margin-bottom: 1.2rem;
    }

    .bio-content p {
        font-size: 0.9rem;
        line-height: 1.7;
    }

    .resume-item h3 {
        font-size: 1rem;
    }

    .resume-item p,
    .contact-info p,
    .social-media p {
        font-size: 0.85rem;
    }

    .contact-section {
        padding-top: 2rem;
    }

    .contact-info span,
    .social-media span {
        min-width: 65px;
    }
}

/* 主页样式 */
.home-page {
    height: 100vh;
    background: white;
    overflow: hidden;
    position: relative;
}

.home-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5px);
}

.home-header .home-nav {
    display: flex;
    justify-content: center;
    gap: 3rem;
    padding: 0.5rem 0;
}

.home-header .home-nav a {
    color: #333;
    text-decoration: none;
    font-size: 1.2rem;
    letter-spacing: 0.1em;
    position: relative;
    padding: 0.5rem 0;
}

.home-header .home-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: #333;
    transition: width 0.3s ease;
}

.home-header .home-nav a:hover::after {
    width: 100%;
}

.home-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
}

.home-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    animation: zoomIn 12s ease-out forwards;
}

@keyframes zoomIn {
    from {
        transform: scale(1.05);
    }
    to {
        transform: scale(1.15);
    }
}

/* Logo链接样式 */
.logo a.home-link:hover {
    color: #000;
}

/* 响应式调整 */
@media (max-width: 768px) {
    #works {
        padding: 100px 1.5rem 60px;
    }

    #works .artwork-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 1rem;
    }

    .load-more {
        margin: 4rem 0 2rem;
    }
}

/* 页面滑动效果 */
.page-section {
    min-height: 100vh;
    width: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 80px 2rem;
}

.scroll-container {
    overflow-y: auto;
    height: 100vh;
}

.scroll-container > section {
    min-height: 100vh;
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 2rem;
}

/* 作品页面布局 */
.works-container {
    display: flex;
    gap: 4.5rem;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 0.3rem;
}

/* 年份筛选列表样式 */
.works-section {
    position: relative;
    padding: 2rem 0;
    margin-top: 80px; /* 为导航栏留出空间 */
}

.year-filter {
    position: sticky;
    top: 100px;
    left: 0;
    padding-right: 1rem;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    z-index: 10;
}

.year-filter::-webkit-scrollbar {
    width: 4px;
}

.year-filter::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.year-filter::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 2px;
}

.year-filter::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.year-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    margin-bottom: 0.8rem;
    border: none;
    background: none;
    color: #666;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    width: 100%;
    min-height: 40px;
}

.year-btn span {
    display: block;
    line-height: 1;
}

.year-btn:hover {
    color: #000;
    background-color: #f5f5f5;
}

.year-btn.active {
    color: #000;
    font-weight: 500;
    background-color: #f0f0f0;
}

/* 确保作品网格区域有合适的边距 */
.artwork-grid {
    margin-left: 120px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 0 4rem;
}

/* 作品内容区域 */
.works-content {
    flex: 1;
    position: relative;
    padding-bottom: 5rem;
}

/* 作品页面样式调整 */
#works {
    background: white;
    height: auto;
    padding: 100px 2.5rem 60px;
}

#works .artwork-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5rem;
    margin: 2rem 0;
}

/* 查看更多按钮样式 */
.load-more {
    text-align: center;
    position: relative;
    width: 100%;
    margin: 3rem 0;
}

.load-more button {
    margin: 0 auto;
    display: inline-block;
    padding: 1rem 3rem;
    font-size: 1.1rem;
    min-width: 200px;
}

/* 关于页面新样式 */
.about-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
}

.bio-resume-section {
    padding-right: 2rem;
}

.bio-resume-section h2,
.contact-section h2 {
    font-size: 1.8rem;
    font-weight: 200;
    margin-bottom: 2rem;
    color: #333;
}

.toggle-resume {
    margin: 2rem 0;
    padding: 0.8rem 2rem;
    background: none;
    border: 1px solid #333;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

.toggle-resume:hover {
    background: #333;
    color: white;
}

.resume-content.hidden {
    display: none;
}

.resume-item {
    margin-bottom: 2rem;
}

/* 隐藏额外作品 */
.artwork.hidden {
    position: absolute;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

/* 展开状态的作品页样式 */
#works.expanded {
    height: auto;
}

/* 作品大图预览 */
.artwork-preview {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    cursor: zoom-in;
    user-select: none;
}

.preview-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
}

.preview-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    display: block;
    transition: transform 0.2s ease-out;
    transform-origin: center center;
    will-change: transform;
}

.preview-content.zoomed {
    cursor: grab;
}

.preview-content.zoomed:active {
    cursor: grabbing;
}

.preview-info {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    text-align: center;
    opacity: 0.9;
    background: rgba(0, 0, 0, 0.7);
    padding: 1rem 2rem;
    border-radius: 4px;
    pointer-events: none;
    z-index: 10001;
}

.zoom-hint {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    background: rgba(0, 0, 0, 0.7);
    padding: 1rem 2rem;
    border-radius: 4px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10001;
    white-space: nowrap;
}

.close-preview {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    z-index: 10000;
}

.close-preview:hover {
    opacity: 1;
}

footer {
    width: 100%;
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
    position: relative;
    bottom: 0;
    left: 0;
    background-color: #fff;
    z-index: 100;
    border-top: 1px solid #eee;
}

footer a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    display: inline-block;
}

footer a:hover {
    color: #333;
}

/* 图片错误处理样式 */
.image-error {
    background-color: #f8f8f8;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 0.9rem;
}

.error-message {
    text-align: center;
    padding: 2rem;
    color: #666;
    background: #f8f8f8;
    border-radius: 4px;
}

.social-media {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: none;
}

.social-media h3 {
    font-size: 1.2rem;
    font-weight: normal;
    margin-bottom: 1rem;
    color: #666;
}

.social-media p {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.social-media span {
    color: #666;
    margin-right: 0.5rem;
    min-width: 60px;
    display: inline-block;
}

.social-media a {
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
    padding-bottom: 2px;
}

.social-media a:hover {
    border-bottom-color: #333;
}

.contact-section {
    padding-left: 4rem;
    border-left: 1px solid #eee;
}

.contact-info p {
    margin-bottom: 1rem;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-info span {
    color: #666;
    margin-right: 0.5rem;
    min-width: 60px;
    display: inline-block;
}