/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* 艺术家信息区域样式 */
.artist-info {
    display: flex;
    margin-top: 20px;
    padding: 40px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    gap: 40px;
}

.artist-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    justify-content: center;
}

.artist-name {
    font-size: 2.5rem;
    font-weight: bold;
    margin-top: 100px;
    margin-bottom: 10px;
    padding-left: 40px;
}

.artist-bio {
    font-size: 1rem;
    line-height: 1.8;
    color: #444;
    white-space: pre-line;
}

.artist-portrait {
    width: 400px;
    height: 400px;
    object-fit: contain;
    background: transparent !important;
}

.artist-portrait-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    min-width: 400px;
}

/* 作品和展览网格布局 */
.artworks-grid, .exhibitions-grid {
    display: grid;
    gap: 50px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.artworks-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.exhibitions-grid {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
}

.work-item, .exhibition-item {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: opacity 0.3s ease;
    min-height: 0;
    width: 100%;
}

.exhibition-item {
    display: flex !important;
    flex-direction: column !important;
}

.work-item:hover, .exhibition-item:hover {
    opacity: 0.8;
}



.exhibition-poster-container {
    width: 100%;
    aspect-ratio: 1;
    background: transparent !important;
    margin-bottom: 8px;
    overflow: hidden;
    position: relative;
}

.exhibition-poster {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    background: transparent !important;
    min-width: 100%;
    min-height: 100%;
}

.exhibition-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
    min-height: 60px;
    padding: 8px 0;
    width: 100%;
    min-width: 200px;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.exhibition-title {
    font-weight: bold;
    font-size: 1.1em;
    line-height: 1.3;
    word-wrap: break-word;
}

.exhibition-dates {
    color: #666;
    font-size: 1.1em;
    line-height: 1.2;
    flex-shrink: 0;
}

/* 分隔线 */
.section-divider {
    border: none;
    border-top: 1px solid #ddd;
    margin: 40px 0;
}

.section-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 40px 0 20px;
    padding: 0 40px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* 新增：头像下方按钮样式 */
.artist-btn-container {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 0px;
    margin: 1px 0 0 0;
}
.artist-btn-container button {
    padding: 1px 1px;
    font-size: 1rem;
    background: #2196f3;
    color: #fff;
    cursor: pointer;
    height: 18px;
    min-width: 100px;
}
.artist-btn-container button:hover {
    background: #1565c0;
    border-color: #1565c0;
}

/* 响应式布局 */
@media (max-width: 900px) {
    .artist-info {
        flex-direction: column;
        padding: 20px;
    }

    .artist-portrait {
        width: 100%;
        max-width: 400px;
        height: auto;
        aspect-ratio: 1;
        margin: 0 auto;
        object-fit: contain;
    }

    .artist-text {
        width: 100%;
        justify-content: center;
    }

    .artworks-grid, .exhibitions-grid {
        padding: 10px;
        gap: 40px;
    }

    .artworks-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .exhibitions-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }



    .section-title {
        padding: 0 20px;
        margin: 30px 0 15px;
    }

    .artist-btn-container {
        flex-direction: row;
        margin-top: 6px;
    }
    .artist-btn-container button {
        font-size: 0.98rem;
        height: 18px;
        min-width: 80px;
        padding: 1px 1px;
    }

    .artist-portrait-block {
        min-width: 0;
        width: 100%;
        gap: 8px;
    }
}

@media (max-width: 600px) {
    .artist-name {
        font-size: 2rem;
        margin-top: 100px;
        padding-left: 20px;
    }

    .artworks-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .exhibitions-grid {
        grid-template-columns: 1fr;
    }



    .artist-btn-container {
        gap: 1px;
        margin-top: 1px;
    }
    .artist-btn-container button {
        font-size: 0.95rem;
        height: 18px;
        min-width: 70px;
        padding: 1px 1px;
    }
}

/* 全屏弹窗样式 */
.fullscreen-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: white;
    z-index: 9999;
    display: flex;
    flex-direction: column;
}

.viewer-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.viewer-main {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: row;
}

.main-image-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafafa;
    padding: 40px;
}

#viewer-main-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    background: white;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.thumbnails-section {
    width: 320px;
    min-width: 320px;
    background: white;
    border-left: 1px solid #e5e5e5;
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 20px;
}

.viewer-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
    z-index: 10;
}

.viewer-close:hover {
    background: #f5f5f5;
    transform: scale(1.1);
}

.viewer-close svg {
    color: #666;
}

.thumbnails-container {
    flex: 1;
    overflow-y: auto;
    padding-top: 20px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    max-width: 100%;
}

.thumbnail-item {
    aspect-ratio: 1;
    width: 100%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    border-radius: 4px;
    overflow: hidden;
}

.thumbnail-item:hover {
    border-color: #ddd;
}

.thumbnail-item.active {
    border-color: #333;
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    aspect-ratio: 1;
}

.artwork-info {
    background: #fafafa;
    padding: 20px;
    margin-top: 40px;
    border-top: 1px solid #e5e5e5;
    border-bottom: 1px solid #e5e5e5;
    flex-shrink: 0;
}

.artwork-details h3 {
    font-size: 18px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.artwork-details h4 {
    font-size: 16px;
    font-weight: 400;
    color: #333;
    margin-bottom: 12px;
}

.artwork-details p {
    font-size: 14px;
    color: #666;
    margin-bottom: 4px;
    line-height: 1.4;
}

/* 全屏弹窗响应式设计 */
@media (max-width: 768px) {
    .viewer-main {
        flex-direction: column;
        height: 100%;
    }
    
    .main-image-section {
        flex: 1;
        padding: 20px;
        min-height: 0;
        max-height: 70vh;
    }
    
    .thumbnails-section {
        width: 100%;
        min-width: auto;
        height: auto;
        max-height: 30vh;
        border-left: none;
        border-top: 1px solid #e5e5e5;
        overflow-y: auto;
        flex-shrink: 0;
        padding: 15px;
    }
    
    .thumbnails-container {
        display: flex !important;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 8px;
        grid-template-columns: none !important;
        white-space: nowrap;
        padding-top: 10px;
    }
    
    .thumbnail-item {
        min-width: 60px;
        width: 60px;
        height: 60px;
        aspect-ratio: 1;
        flex-shrink: 0;
        overflow: hidden;
        border-radius: 4px;
    }
    
    .thumbnail-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        aspect-ratio: 1;
        display: block;
    }
    
    .artwork-info {
        margin-top: 20px;
        padding: 15px;
        border-top: 1px solid #e5e5e5;
        border-bottom: 1px solid #e5e5e5;
    }
    
    .viewer-close {
        top: 15px;
        right: 15px;
        width: 36px;
        height: 36px;
        z-index: 1000;
    }
}

/* 更小屏幕的额外适配 */
@media (max-width: 480px) {
    .thumbnails-section {
        max-height: 35vh;
        padding: 10px;
    }
    
    .main-image-section {
        max-height: 65vh;
        padding: 15px;
    }
    
    .thumbnail-item {
        min-width: 50px;
        width: 50px;
        height: 50px;
    }
    
    .artwork-info {
        padding: 10px;
    }
    
    .artwork-details h3 {
        font-size: 16px;
    }
    
    .artwork-details h4 {
        font-size: 14px;
    }
    
    .artwork-details p {
        font-size: 12px;
    }
} 