/* ========================================
   TK Works - 作品集样式
   ======================================== */

/* 配色方案 */
:root {
    --primary-color: #2563eb;
    --secondary-color: #7c3aed;
    --accent-color: #f59e0b;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
}

/* ========================================
   作品集网格布局
   ======================================== */

.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    padding: 40px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

@media (max-width: 992px) {
    .works-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 576px) {
    .works-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 20px 10px;
    }
}

/* ========================================
   作品卡片样式
   ======================================== */

.work-card {
    background: var(--bg-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.work-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* 卡片头部（封面） */
.work-card-header {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.work-card-header.category-actor {
    aspect-ratio: 2 / 3;
}

.work-card-header.category-drama {
    aspect-ratio: 3 / 4;
}

.work-card-header.category-video {
    aspect-ratio: 16 / 9;
}

.work-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.work-card:hover .work-card-image {
    transform: scale(1.05);
}

/* 卡片覆盖层 */
.work-card-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;
}

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

.work-card-link {
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border: 2px solid white;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.work-card-link:hover {
    background: white;
    color: #333;
}

/* 类别标签 */
.work-category-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-dark);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    z-index: 10;
}

.work-category-badge.category-actor {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.work-category-badge.category-drama {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.work-category-badge.category-video {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

/* 卡片正文 */
.work-card-body {
    padding: 16px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.work-card-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--text-dark);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.work-card-description {
    font-size: 14px;
    color: var(--text-light);
    margin: 0 0 12px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

/* 元信息徽章 */
.work-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.meta-badge {
    display: inline-block;
    background: var(--bg-light);
    color: var(--text-dark);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

/* ========================================
   筛选导航
   ======================================== */

.works-filter {
    padding: 20px 0;
    text-align: center;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 56px;
    z-index: 100;
}

.filter-tags {
    display: inline-flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-tag {
    padding: 8px 20px;
    border: 2px solid var(--border-color);
    background: var(--bg-white);
    color: var(--text-dark);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-tag:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

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

/* ========================================
   作品详情页样式
   ======================================== */

.work-category {
    display: inline-block;
    padding: 6px 16px;
    background: var(--primary-color);
    color: white;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
}

.work-info-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.work-poster {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.work-meta {
    margin-top: 16px;
}

.work-meta p {
    margin: 8px 0;
    color: var(--text-dark);
    line-height: 1.6;
}

.work-meta strong {
    color: var(--text-dark);
    font-weight: 600;
}

.work-links {
    margin-top: 20px;
}

.work-links h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.work-links .btn {
    margin-right: 8px;
    margin-bottom: 8px;
}

.work-content {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-dark);
    margin: 32px 0;
}

.work-content h2 {
    font-size: 24px;
    font-weight: 700;
    margin-top: 32px;
    margin-bottom: 16px;
    color: var(--text-dark);
}

.work-content h3 {
    font-size: 20px;
    font-weight: 700;
    margin-top: 24px;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.work-content p {
    margin-bottom: 16px;
}

.work-navigation {
    margin: 32px 0;
}

/* ========================================
   首页作品展示区
   ======================================== */

.featured-works {
    padding: 60px 0;
    background: var(--bg-light);
}

.featured-works h2 {
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    color: var(--text-dark);
}

.featured-works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .featured-works {
        padding: 40px 20px;
    }

    .featured-works h2 {
        font-size: 24px;
        margin-bottom: 24px;
    }

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

/* ========================================
   Hero Section
   ======================================== */

.hero-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
}

.hero-section h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
}

.hero-section p {
    font-size: 20px;
    margin-bottom: 32px;
    opacity: 0.9;
}

.hero-section .btn {
    padding: 12px 32px;
    font-size: 16px;
    font-weight: 600;
}

@media (max-width: 768px) {
    .hero-section {
        padding: 60px 20px;
    }

    .hero-section h1 {
        font-size: 32px;
    }

    .hero-section p {
        font-size: 16px;
    }
}

/* ========================================
   动画效果
   ======================================== */

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

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

/* 隐藏作品卡片 */
.work-card.hidden {
    display: none;
}

/* ========================================
   响应式优化
   ======================================== */

@media (max-width: 768px) {
    .work-info-card .col-md-4,
    .work-info-card .col-md-8 {
        width: 100%;
        padding: 0;
    }

    .work-poster {
        margin-bottom: 20px;
    }
}

/* ========================================
   打印样式
   ======================================== */

@media print {
    .works-filter,
    .work-card-overlay,
    .work-navigation {
        display: none;
    }

    .work-card {
        box-shadow: none;
        border: 1px solid var(--border-color);
        page-break-inside: avoid;
    }
}
