/* 视觉艺术馆 - 自适应尺寸展示样式 */

.visual-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    padding: 2rem;
}

/* 作品卡片 - 自适应尺寸 */
.artwork-card {
    background: var(--card-bg, rgba(30, 30, 35, 0.8));
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(212, 175, 55, 0.1);
}

.artwork-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(212, 175, 55, 0.1);
}

/* 画作框架 - 保持原始比例 */
.artwork-frame {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a1f 0%, #2a2a2f 100%);
}

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

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

/* 悬停遮罩 */
.artwork-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.artwork-card:hover .artwork-overlay {
    opacity: 1;
}

.btn-view {
    background: linear-gradient(135deg, #d4af37 0%, #f4d03f 100%);
    color: #1a1a1f;
    border: none;
    padding: 12px 28px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-view:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(212, 175, 55, 0.4);
}

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

.artwork-title {
    font-size: 1.2rem;
    color: #d4af37;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.artwork-artist {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.artwork-desc {
    color: #aaa;
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.artwork-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.artwork-price {
    font-size: 1.3rem;
    color: #e74c3c;
    font-weight: 700;
}

.copyright-tag {
    background: rgba(212, 175, 55, 0.15);
    color: #d4af37;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

/* 加载状态 */
.loading-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem;
    color: #888;
    font-size: 1.1rem;
}

/* 作品详情弹窗 */
.artwork-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.modal-content {
    position: relative;
    background: linear-gradient(135deg, #1e1e24 0%, #2a2a30 100%);
    border-radius: 16px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    border: 1px solid rgba(212, 175, 55, 0.2);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.artwork-viewer {
    display: grid;
    grid-template-columns: 2fr 1fr;
    width: 1000px;
    max-width: 95vw;
}

.viewer-image {
    background: #0a0a0f;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    min-height: 500px;
}

.viewer-image img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 8px;
}

.viewer-info {
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.viewer-info h2 {
    color: #d4af37;
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.viewer-info .artist {
    color: #888;
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.viewer-info .desc {
    color: #aaa;
    line-height: 1.8;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.price-section {
    background: rgba(212, 175, 55, 0.1);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.price-label {
    display: block;
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.price-value {
    display: block;
    color: #e74c3c;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.copyright-note {
    color: #666;
    font-size: 0.8rem;
}

.btn-buy {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-buy:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(231, 76, 60, 0.4);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 响应式 */
@media (max-width: 768px) {
    .visual-gallery {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
        padding: 1rem;
    }
    
    .artwork-viewer {
        grid-template-columns: 1fr;
        width: 95vw;
    }
    
    .viewer-image {
        min-height: 300px;
    }
}
