/* 艺术展馆风格 - 主样式 */
:root {
    --primary-color: #6F62C3;
    --secondary-color: #E8E8F5;
    --accent-color: #A2A2E0;
    --text-color: #333;
    --light-color: #F3F0FF;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --frame-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    background: linear-gradient(135deg, #E8E8F5 0%, #F3F0FF 100%);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    background-attachment: fixed;
}

/* 新版布局样式 */
.new-layout {
    display: flex;
    gap: 30px;
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
    min-height: calc(100vh - 200px);
}

/* 左侧艺术家简介区域 */
.artist-sidebar {
    width: 360px;
    flex-shrink: 0;
}

.artist-intro-container {
    background: white;
    border-radius: 24px;
    padding: 25px;
    box-shadow: var(--shadow);
    border: 1px solid var(--light-color);
    position: sticky;
    top: 20px;
}

.artist-photo-container {
    text-align: center;
    margin-bottom: 20px;
}

.artist-photo-circle {
    width: 160px;
    height: 160px;
    margin: 0 auto;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--primary-color);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.artist-photo-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.default-avatar {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: white;
}

.artist-name {
    font-size: 1.6rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 0 0 5px 0;
    text-align: center;
}

.artist-title-tag {
    background: var(--light-color);
    color: var(--primary-color);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    display: inline-block;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
}

.artist-description {
    color: #555;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 15px 0;
    padding: 12px;
    background: var(--light-color);
    border-radius: 12px;
}

.artist-tags-container {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 15px;
    justify-content: center;
}

.artist-tag {
    background: white;
    color: var(--primary-color);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    border: 1px solid var(--light-color);
    display: flex;
    align-items: center;
    gap: 5px;
}

.artist-update-info {
    font-size: 0.75rem;
    color: #888;
    padding-top: 12px;
    border-top: 1px solid var(--light-color);
    text-align: center;
}

/* 右侧内容区 */
.content-area {
    flex: 1;
    min-width: 0;
}

/* 系列导航 + 统计区域包装器 */
.series-stats-wrapper {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

/* 系列导航容器 */
.series-nav-container {
    flex: 2;
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--light-color);
}

.series-nav-title,
.stats-title {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--light-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.series-nav {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
}

.series-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s;
    background: var(--light-color);
    font-size: 0.9rem;
}

.series-item:hover {
    background: var(--secondary-color);
    color: var(--primary-color);
    transform: translateX(3px);
}

.series-item.active {
    background: var(--primary-color);
    color: white;
}

.series-item.active .series-count {
    background: white;
    color: var(--primary-color);
}

.series-count {
    background: var(--secondary-color);
    color: var(--primary-color);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
}

/* 统计容器 */
.stats-container {
    flex: 1;
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--light-color);
}

.series-stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stat-item {
    background: #F3F0FF !important;
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s;
    border: 2px solid transparent !important;
    border-image: linear-gradient(135deg, #6F62C3 0%, #6F62C3 100%) 1 !important;
}

.stat-item:hover {
    transform: translateY(-3px);
    background: var(--secondary-color) !important;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
    display: block;
}

.stat-label {
    color: #666;
    font-size: 0.8rem;
}

/* 内容头部 */
.content-header {
    background: white;
    padding: 20px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    text-align: center;
    border: 1px solid var(--light-color);
}

.current-series-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 5px;
    font-weight: bold;
}

/* 作品网格 */
.paintings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

/* 画作卡片 */
.painting-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    border: 3px solid transparent !important;
    border-image: linear-gradient(135deg, #6F62C3 0%, #6F62C3 100%) 1 !important;
    position: relative;
}

.painting-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.painting-card.dragging {
    opacity: 0.5;
    transform: scale(0.95);
}

.painting-card.drag-over {
    border: 3px dashed var(--primary-color);
    background: rgba(111, 98, 195, 0.05);
}

.painting-image {
    width: 100%;
    height: 220px;
    object-fit: contain;
    cursor: pointer;
    transition: opacity 0.5s;
    background: #f5f5f5;
}

.painting-card:hover .painting-image {
    opacity: 0.9;
}

.painting-info {
    padding: 15px;
    text-align: center;
    background: white;
}

.painting-series {
    background: #F3F0FF;
    color: #333;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    display: inline-block;
    margin-bottom: 10px;
}

.painting-title {
    font-size: 1rem;
    color: #333;
    margin-bottom: 8px;
    font-weight: bold;
    line-height: 1.4;
}

.painting-description {
    color: #666;
    margin-bottom: 10px;
    line-height: 1.5;
    font-size: 0.85rem;
}

.painting-meta {
    display: flex;
    justify-content: space-between;
    color: #888;
    font-size: 0.8rem;
    border-top: 1px solid #eee;
    padding-top: 10px;
}

/* 编辑删除按钮 */
.painting-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    justify-content: center;
}

.edit-btn {
    background: #6F62C3 !important;
    color: white !important;
    border: none !important;
    padding: 6px 12px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s;
}

.edit-btn:hover {
    background: #5548A8 !important;
    transform: translateY(-2px);
}

.delete-btn {
    background: #dc3545 !important;
    color: white !important;
    border: none !important;
    padding: 6px 12px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s;
}

.delete-btn:hover {
    background: #c82333 !important;
    transform: translateY(-2px);
}

/* 批量删除面板 */
.batch-delete-panel {
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 16px;
    border: 3px solid #6F62C3;
    box-shadow: 0 5px 15px rgba(111, 98, 195, 0.1);
}

/* 排序面板 */
.sort-panel {
    background: linear-gradient(135deg, #6F62C3 0%, #A2A2E0 100%);
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 25px;
    color: white;
}

/* 分页 */
.pagination-container {
    margin-top: 40px;
    text-align: center;
}

.pagination-inner {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: white;
    padding: 12px 20px;
    border-radius: 50px;
    box-shadow: var(--shadow);
    border: 2px solid #F3F0FF;
}

.page-link {
    padding: 8px 16px;
    background: #F3F0FF;
    color: var(--primary-color);
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
}

.page-link:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.page-link.active {
    background: var(--primary-color);
    color: white;
}

/* 页脚 */
.footer {
    margin-top: 60px;
    padding: 30px;
    text-align: center;
    color: #555;
    border-top: 2px solid #E8E8F5;
    background: rgba(255, 255, 255, 0.9);
}

.footer a {
    color: var(--primary-color);
    text-decoration: none;
}

.footer a:hover {
    color: var(--accent-color);
}

/* 消息提示 */
.message {
    padding: 12px 20px;
    border-radius: 10px;
    margin: 20px auto;
    max-width: 400px;
    display: flex;
    align-items: center;
    gap: 10px;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.message-success {
    background: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

.message-error {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.modal-img {
    max-width: 100%;
    max-height: 80vh;
    border: 20px solid var(--primary-color);
    border-radius: 10px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}

.modal-close {
    position: absolute;
    top: -40px;
    right: -40px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-info {
    position: absolute;
    bottom: -60px;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 15px;
    border-radius: 0 0 10px 10px;
    text-align: center;
}

/* 复选框样式 */
.delete-checkbox {
    width: 18px;
    height: 18px;
    accent-color: #6F62C3;
    cursor: pointer;
}

.delete-checkbox:checked {
    accent-color: #6F62C3;
}

/* 拖拽手柄 */
.drag-handle {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    cursor: move;
    z-index: 10;
}

.drag-handle:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #E8E8F5;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #6F62C3;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #A2A2E0;
}

::-webkit-scrollbar-corner {
    background: #E8E8F5;
}

/* 动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .new-layout {
        flex-direction: column;
    }
    
    .artist-sidebar {
        width: 100%;
    }
    
    .artist-intro-container {
        position: static;
        display: flex;
        flex-wrap: wrap;
        gap: 20px;
        align-items: center;
    }
    
    .artist-photo-container {
        flex-shrink: 0;
    }
    
    .artist-info {
        flex: 1;
    }
    
    .series-stats-wrapper {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .new-layout {
        padding: 15px;
    }
    
    .artist-intro-container {
        flex-direction: column;
        text-align: center;
    }
    
    .artist-name {
        text-align: center;
    }
    
    .artist-title-tag {
        display: inline-block;
        width: auto;
    }
    
    .artist-tags-container {
        justify-content: center;
    }
    
    .paintings-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 15px;
    }
    
    .series-nav {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .series-nav-container,
    .stats-container {
        padding: 15px;
    }
    
    .gallery-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .paintings-grid {
        grid-template-columns: 1fr;
    }
    
    .series-nav {
        grid-template-columns: 1fr;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .painting-title {
        font-size: 0.9rem;
    }
    
    .artist-name {
        font-size: 1.3rem;
    }
    
    .artist-photo-circle {
        width: 120px;
        height: 120px;
    }
}

/* 宽幅标题栏 */
.wide-header {
    text-align: center;
    padding: 60px 0;
}

.wide-header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
}

.wide-header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

@media (max-width: 768px) {
    .wide-header {
        padding: 40px 0;
    }
    .wide-header h1 {
        font-size: 2rem;
    }
    .wide-header p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .wide-header {
        padding: 30px 0;
    }
    .wide-header h1 {
        font-size: 1.6rem;
    }
}

/* 强制覆盖 */
.sidebar div:last-child,
.artist-tag,
.pagination-container {
    background-color: #F3F0FF !important;
}

.stat-item,
.painting-series {
    border-color: #E8E8F5 !important;
}