/* 全局重置 & 基础变量 */
:root {
    /* 日系清新配色 */
    --bg-primary: #F5F0E8;
    --bg-secondary: #FFFFFF;
    --text-primary: #333333;
    --text-secondary: #666666;
    --accent-primary: #E85D75; /* 樱花粉 */
    --accent-secondary: #2D4059; /* 藏青 */
    --accent-tertiary: #F8B400; /* 暖黄 */
    /* 题材标签色 */
    --pure-color: #E85D75;
    --suspense-color: #2D4059;
    --work-color: #00A896;
    --heal-color: #99C24D;
    --reasoning-color: #6A4C93;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "PingFang SC", "Microsoft Yahei", "Hiragino Sans GB", sans-serif;
    transition: all 0.3s ease;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 95%;
    max-width: 1400px;
    margin: 0 auto;
}

a {
    text-decoration: none;
    color: inherit;
}

/* 顶部导航 */
.header {
    background-color: var(--bg-secondary);
    padding: 20px 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 999;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    flex-direction: column;
}

.logo h1 {
    font-size: 28px;
    color: var(--accent-primary);
    font-weight: 700;
}

.logo-sub {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 5px;
}

.search-box {
    display: flex;
    width: 350px;
    max-width: 100%;
}

.search-box input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #eee;
    border-radius: 4px 0 0 4px;
    outline: none;
    font-size: 14px;
}

.search-box button {
    background-color: var(--accent-primary);
    color: #fff;
    border: none;
    padding: 0 20px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 14px;
}

.search-box button:hover {
    background-color: #D64862;
}

/* 分类标签栏 */
.category-nav {
    background-color: var(--bg-secondary);
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 30px;
}

.nav-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.tab-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.tab-title {
    font-size: 14px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.tab-btn {
    background-color: #F8F8F8;
    border: none;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
}

.tab-btn.active {
    background-color: var(--accent-primary);
    color: #fff;
}

.tab-btn:hover:not(.active) {
    background-color: #F0E6E8;
    color: var(--accent-primary);
}

/* 主要内容区通用样式 */
.main-content {
    padding: 0 0 50px;
}

.section {
    margin-bottom: 60px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-primary);
}

.section-header h2 {
    font-size: 22px;
    color: var(--accent-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 最新上线（时间轴） */
.timeline {
    position: relative;
    padding-left: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--accent-primary);
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
    display: flex;
    gap: 20px;
}

.timeline-date {
    width: 80px;
    font-size: 14px;
    color: var(--text-secondary);
    text-align: right;
    padding-top: 10px;
    white-space: nowrap;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -34px;
    top: 10px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--accent-primary);
}

.timeline-card {
    flex: 1;
    display: flex;
    gap: 15px;
    background-color: var(--bg-secondary);
    padding: 15px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.timeline-card img {
    width: 200px;
    height: 280px;
    object-fit: cover;
    border-radius: 4px;
}

.card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-info h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--accent-secondary);
}

.card-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.tag {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: #fff;
}

.pure-tag {
    background-color: var(--pure-color);
}

.suspense-tag {
    background-color: var(--suspense-color);
}

.work-tag {
    background-color: var(--work-color);
}

.heal-tag {
    background-color: var(--heal-color);
}

.reasoning-tag {
    background-color: var(--reasoning-color);
}

.episode, .sub-group {
    font-size: 12px;
    color: var(--text-secondary);
}

.card-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: auto;
}

.play-btn {
    display: block;
    background-color: var(--accent-primary);
    color: #fff;
    text-align: center;
    padding: 10px 0;
    border-radius: 4px;
    font-size: 14px;
    margin-top: 15px;
}

.play-btn:hover {
    background-color: #D64862;
    transform: translateY(-2px);
}

/* 热门日剧（网格） */
.rijou-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.rijou-card {
    background-color: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.rijou-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.card-img {
    position: relative;
    height: 420px;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--accent-tertiary);
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 700;
}

.card-bottom {
    padding: 15px;
}

.card-bottom h3 {
    font-size: 16px;
    margin-bottom: 10px;
    color: var(--accent-secondary);
}

.card-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.quarter-tag, .sub-tag {
    font-size: 12px;
    padding: 2px 8px;
    border: 1px solid #eee;
    border-radius: 4px;
    color: var(--text-secondary);
}

/* 经典日剧（轮播） */
.carousel-controls {
    display: flex;
    gap: 10px;
}

.carousel-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--bg-secondary);
    border: 1px solid #eee;
    color: var(--accent-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover {
    background-color: var(--accent-primary);
    color: #fff;
    border-color: var(--accent-primary);
}

.carousel-container {
    overflow: hidden;
    border-radius: 8px;
}

.carousel-track {
    display: flex;
    gap: 15px;
    transition: transform 0.5s ease;
}

.classic-card {
    min-width: calc(25% - 11px);
    position: relative;
    height: 220px;
}

.classic-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.classic-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
}

.classic-overlay h3 {
    font-size: 18px;
    margin-bottom: 5px;
}

.classic-overlay p {
    font-size: 12px;
    margin-bottom: 10px;
    opacity: 0.9;
}

.small-btn {
    width: auto;
    padding: 6px 15px;
    font-size: 12px;
    display: inline-block;
}

/* 关于{固定关键词1} */
.about-content {
    background-color: var(--bg-secondary);
    padding: 25px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    line-height: 1.8;
}

.about-content p {
    margin-bottom: 15px;
    color: var(--text-secondary);
}

.contact-box {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.contact-box p {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    font-size: 14px;
}

/* 页脚 */
.footer {
    background-color: var(--accent-secondary);
    color: #fff;
    padding: 40px 0;
    margin-top: 50px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #ccc;
    font-size: 14px;
}

.footer-links a:hover {
    color: var(--accent-primary);
}

.copyright {
    text-align: center;
    font-size: 13px;
    color: #999;
}

/* 回到顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--accent-primary);
    color: #fff;
    border: none;
    font-size: 24px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 998;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: #D64862;
    transform: translateY(-5px);
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .classic-card {
        min-width: calc(33.33% - 10px);
    }
}

@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        gap: 15px;
    }
    .search-box {
        width: 100%;
    }
    .timeline-card {
        flex-direction: column;
    }
    .timeline-card img {
        width: 100%;
        height: auto;
    }
    .classic-card {
        min-width: calc(50% - 7px);
    }
}

@media (max-width: 480px) {
    .nav-tabs {
        gap: 10px;
    }
    .tab-group {
        width: 100%;
    }
    .timeline {
        padding-left: 25px;
    }
    .timeline-date {
        width: 60px;
        font-size: 12px;
    }
    .classic-card {
        min-width: 100%;
    }
    .back-to-top {
        width: 40px;
        height: 40px;
        font-size: 20px;
        bottom: 20px;
        right: 20px;
    }
}