/* ========== 基础变量 ========== */
:root {
    --font-en: 'League Spartan', serif;
    --font-cn: 'Source Han Serif CN', serif;
    --text-color: #1a1a1a;
    --light-text: #666;
    --border-color: #e0e0e0;
    --hover-color: #999;
    --spacing-unit: 20px;
    --primary-color: #1a1a1a;
    --secondary-color: #666;
    --modal-bg: rgba(0, 0, 0, 0.95);
    --transition-speed: 0.3s;
}

/* ========== 基础样式 ========== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    font-family: var(--font-en);
    background: #fff;
}

[lang="en"], .en-text { font-family: var(--font-en); }

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* ========== 退回按钮 ========== */
.back-button {
    position: absolute;
    top: 30px;
    left: 30px;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    font-size: 1.2rem;
    color: var(--text-color);
    transition: all var(--transition-speed) ease;
    z-index: 100;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.05);
}

.back-button:hover {
    background: white;
    transform: translateX(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

/* ========== 艺术品详情布局 ========== */
.artwork-detail-container {
    display: flex;
    height: 100vh;
    position: relative;
}

.artwork-info-panel {
    width: 35%;
    min-width: 400px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    border-right: 1px solid var(--border-color);
    height: 100%;
    overflow-y: auto;
    background: #fff;
    position: relative;
}

.content-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 60px 40px 40px;
}

.text-content {
    margin-top: 60px;
}

.artwork-display {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background-color: #f8f8f8;
    height: 100%;
}

.image-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.main-image {
    max-width: 80%;
    max-height: 80%;
    width: auto;
    height: auto;
    object-fit: contain;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

/* 艺术品信息样式 */
.artwork-title {
    font: 400 2.4rem/1.2 var(--font-en);
    margin-bottom: 15px;
    letter-spacing: -0.02em;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 15px;
}

.artwork-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--primary-color);
}

.artwork-meta {
    font-size: 1.1rem;
    color: var(--secondary-color);
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.artwork-description {
    font-size: 1.15rem;
    line-height: 1.8;
    margin-bottom: 40px;
    max-width: 500px;
    color: #333;
    font-family: var(--font-en);
    font-weight: 400;
}

/* 缩略图导航 */
.thumbnail-nav {
    margin-top: 40px;
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
}

.thumbnail-title {
    font-size: 1.25rem;
    font-weight: 400;
    margin-bottom: 20px;
    letter-spacing: 0.05em;
    font-family: var(--font-en);
    color: var(--primary-color);
}

.thumbnail-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    max-width: 500px;
}

.thumbnail {
    width: 100%;
    aspect-ratio: 4/3;
    cursor: pointer;
    object-fit: cover;
    opacity: 0.7;
    transition: all var(--transition-speed) ease;
    border: 1px solid transparent;
    border-radius: 4px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

.thumbnail:hover {
    opacity: 0.9;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.thumbnail.active {
    opacity: 1;
    border: 2px solid var(--primary-color);
}

/* ========== 全屏模态框样式 ========== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.2); /* 修改为半透明黑色背景 */
    backdrop-filter: blur(12px); /* 增加背景模糊效果 */
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

.modal.show {
    display: block;
    opacity: 1;
}


.modal-content {
    display: block;
    margin: auto;
    max-width: 95%;
    max-height: 95%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    object-fit: contain;
}

/* ========== 简洁关闭按钮 ========== */
.close-btn {
    position: absolute;
    top: 30px;
    right: 40px;
    background: white; /* 白色背景 */
    color: black; /* 黑色叉号 */
    font-size: 40px;
    font-weight: bold;
    transition: all 0.3s ease;
    cursor: pointer;
    z-index: 2001;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%; /* 圆形按钮 */
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15); /* 添加阴影 */
    line-height: 1;
}

.close-btn:hover {
    color: #333; /* 鼠标悬停时叉号颜色加深 */
    background: #f8f8f8; /* 悬停时背景微变 */
    transform: scale(1.05); /* 轻微放大效果 */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); /* 悬停时阴影加深 */
}

/* ========== 响应式设计 ========== */
@media (max-width: 1024px) {
    .artwork-detail-container {
        flex-direction: column;
    }
    
    .artwork-info-panel {
        width: 100%;
        min-width: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 0;
        height: auto;
        overflow-y: visible;
    }
    
    .content-wrapper {
        padding: 70px 20px 30px;
    }
    
    .text-content {
        margin-top: 40px;
    }
    
    .artwork-display {
        padding: 30px 20px;
        height: 60vh;
    }
    
    .artwork-title {
        font-size: 2rem;
    }
    
    .thumbnail-grid {
        grid-template-columns: repeat(4, 1fr);
        max-width: 100%;
    }
    
    .back-button {
        top: 20px;
        left: 20px;
    }
    
    .main-image {
        max-width: 90%;
        max-height: 90%;
    }
}

@media (max-width: 768px) {
    .artwork-title {
        font-size: 1.8rem;
    }
    
    .artwork-description {
        font-size: 1.05rem;
    }
    
    .back-button {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
    
    .text-content {
        margin-top: 30px;
    }
    
    .close-btn {
        top: 20px;
        right: 25px;
        font-size: 35px;
    }
}

@media (max-width: 480px) {
    .content-wrapper {
        padding: 60px 15px 20px;
    }
    
    .artwork-title {
        font-size: 1.6rem;
    }
    
    .artwork-meta {
        font-size: 0.95rem;
    }
    
    .thumbnail-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .back-button {
        top: 15px;
        left: 15px;
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    .text-content {
        margin-top: 20px;
    }
    
    .main-image {
        max-width: 95%;
        max-height: 95%;
    }
    
    .modal-content {
        max-width: 98%;
        max-height: 98%;
    }
    
    .close-btn {
        top: 15px;
        right: 15px;
        font-size: 30px;
    }
}

/* 原电脑端样式保持不变 */
.thumbnail-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  max-width: 500px;
}

/* 平板端调整 */
@media (max-width: 1024px) {
  .thumbnail-grid {
    max-width: 100%;
  }
}

/* 移动端调整 */
@media (max-width: 768px) {
  .thumbnail-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  
  .thumbnail {
    aspect-ratio: 4/3;
    max-width: 100px;
  }
}

/* 小手机调整 */
@media (max-width: 480px) {
  .thumbnail-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  
  .thumbnail {
    max-width: 80px;
  }
}