/* 作品页面样式 */
.works-section {
    padding: 80px 0;
    background: var(--bg-light);
}

/* 标签切换 */
.works-tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 50px;
}

.tab-btn {
    background: var(--white);
    border: 2px solid #e2e8f0;
    padding: 15px 35px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-dark);
}

.tab-btn:hover {
    border-color: #1e3a8a;
    color: #1e3a8a;
}

.tab-btn.active {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    color: var(--white);
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(30, 58, 138, 0.4);
}

.works-content {
    display: none;
}

.works-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

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

/* 作品卡片 */
.work-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.work-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

/* 小说封面 */
.work-cover {
    position: relative;
    height: 400px;
    overflow: hidden;
}

.work-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.work-card:hover .work-cover img {
    transform: scale(1.1);
}

.work-type {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: var(--white);
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.work-info {
    padding: 25px;
}

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

.work-author,
.work-date {
    color: #1e3a8a;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.work-description {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.work-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    color: var(--text-light);
    font-size: 0.9rem;
}

.work-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.work-actions {
    display: flex;
    gap: 10px;
}

.work-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.read-btn {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    color: var(--white);
}

.read-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(30, 58, 138, 0.4);
}

.collect-btn,
.share-btn {
    background: var(--bg-light);
    color: var(--primary-color);
    padding: 12px 15px;
}

.collect-btn:hover,
.share-btn:hover {
    background: #1e3a8a;
    color: var(--white);
}

/* 游记特殊样式 */
.travel-gallery {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.travel-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.travel-location {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-dark);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 散文列表 */
.works-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.essay-item {
    background: var(--white);
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.essay-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(10px);
}

.essay-content {
    flex: 1;
}

.essay-title {
    font-size: 1.4rem;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.essay-excerpt {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 15px;
}

.essay-meta {
    display: flex;
    gap: 20px;
    color: var(--text-light);
    font-size: 0.9rem;
}

.essay-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.icon-btn {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    color: var(--white);
    border: none;
    padding: 10px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.icon-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(30, 58, 138, 0.4);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .works-tabs {
        flex-direction: column;
    }

    .tab-btn {
        width: 100%;
        justify-content: center;
    }

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

    .essay-item {
        flex-direction: column;
        gap: 20px;
    }

    .essay-meta {
        flex-wrap: wrap;
    }
}
