/* 创意工坊特定样式 */
:root {
    --primary-color: #4a6fa5;
    --secondary-color: #166088;
    --accent-color: #ff6b6b;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --gray-color: #6c757d;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

/* 作品展示区域 */
.workshop-content {
    padding: 40px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 30px;
    color: var(--dark-color);
    position: relative;
    padding-bottom: 15px;
}

.section-title:after {
    content: '';
    position: absolute;
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

/* 分类筛选 */
.workshop-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
}

.filter-btn {
    padding: 8px 20px;
    background-color: var(--light-color);
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.filter-btn:hover {
    background-color: #e9ecef;
}

.filter-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 作品网格布局 */
.workshop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.work-item {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.work-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.work-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.work-info {
    padding: 20px;
}

.work-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.work-author {
    color: var(--gray-color);
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.work-author i {
    margin-right: 5px;
}

.work-description {
    color: var(--gray-color);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.work-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
}

.work-tag {
    background-color: #e9ecef;
    color: var(--gray-color);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
}

.work-tag.art {
    background-color: #fff3cd;
    color: #856404;
}

.work-tag.dlc {
    background-color: #d1ecf1;
    color: #0c5460;
}

.work-tag.mod {
    background-color: #d4edda;
    color: #155724;
}

/* 热门标签样式 */
.work-tag.hot {
    background-color: #f8d7da;
    color: #721c24;
}

/* 作品状态标签 */
.work-status {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.work-status.available {
    background-color: #d4edda;
    color: #155724;
}

.work-status.unavailable {
    background-color: #f8d7da;
    color: #721c24;
}

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

.modal-content {
    background-color: white;
    border-radius: var(--border-radius);
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.modal-close:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.modal-image-container {
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.modal-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-body {
    padding: 30px;
}

.modal-title {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.modal-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    flex-wrap: wrap;
    gap: 15px;
}

.modal-author, .modal-date, .modal-status {
    color: var(--gray-color);
    display: flex;
    align-items: center;
}

.modal-author i, .modal-date i, .modal-status i {
    margin-right: 8px;
}

.modal-description {
    line-height: 1.7;
    color: var(--dark-color);
    margin-bottom: 25px;
}

.modal-details {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 25px;
}

.modal-details h4 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

.modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.modal-tag {
    background-color: var(--primary-color);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 20px;
}

.btn {
    padding: 10px 20px;
    border-radius: var(--border-radius);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.btn-download {
    background-color: var(--primary-color);
    color: white;
}

.btn-download:hover {
    background-color: var(--secondary-color);
}

.btn-favorite {
    background-color: #f8f9fa;
    color: var(--dark-color);
    border: 1px solid #ddd;
}

.btn-favorite:hover {
    background-color: #e9ecef;
}

.btn-favorite.active {
    background-color: #ff6b6b;
    color: white;
    border-color: #ff6b6b;
}

/* 管理员操作按钮 */
.btn-edit {
    background-color: #ffc107;
    color: var(--dark-color);
}

.btn-edit:hover {
    background-color: #e0a800;
}

.btn-delete {
    background-color: #dc3545;
    color: white;
}

.btn-delete:hover {
    background-color: #c82333;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .workshop-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .modal-content {
        max-height: 95vh;
    }
    
    .modal-image-container {
        height: 250px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .workshop-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-overlay {
        padding: 10px;
    }
}

/* 空状态提示 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-color);
    grid-column: 1 / -1;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #ddd;
}

/* 加载更多按钮 */
.load-more {
    text-align: center;
    margin-bottom: 40px;
}

.btn-load-more {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 12px 40px;
    font-size: 1rem;
}

.btn-load-more:hover {
    background-color: var(--primary-color);
    color: white;
}