
/* 全局变量 - 柔和浪漫风格 */
:root {
    --primary-color: #ff6b81; /* 柔和粉 */
    --secondary-color: #ff4757; /* 深粉 */
    --bg-color: #fdf2f5; /* 极浅粉背景 */
    --white: #ffffff;
    --text-main: #2f3542;
    --text-light: #747d8c;
    --border-radius: 12px;
    --shadow: 0 5px 15px rgba(255, 107, 129, 0.15);
    --font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 顶部导航 */
.kdrama-header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--secondary-color);
}

.nav-menu a {
    margin: 0 15px;
    font-weight: 500;
    color: var(--text-main);
}

.nav-menu a:hover, .nav-menu a.active {
    color: var(--primary-color);
}

.search-box {
    display: flex;
    align-items: center;
    background: #f1f2f6;
    padding: 5px 15px;
    border-radius: 20px;
}

.search-box input {
    border: none;
    background: transparent;
    outline: none;
    width: 120px;
    font-size: 0.9rem;
}

.search-box button {
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--text-light);
}

/* 英雄区域 */
.hero-banner {
    padding: 60px 0;
    background: linear-gradient(135deg, #fff0f3 0%, #ffffff 100%);
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.hero-text {
    flex: 1;
}

.badge {
    display: inline-block;
    background: var(--primary-color);
    color: var(--white);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-bottom: 15px;
    font-weight: bold;
}

.hero-text h1 {
    font-size: 3rem;
    color: var(--text-main);
    margin-bottom: 10px;
}

.meta-info {
    color: var(--text-light);
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.summary {
    color: var(--text-main);
    margin-bottom: 30px;
    font-size: 1.05rem;
    max-width: 500px;
}

.hero-btns {
    display: flex;
    gap: 15px;
}

.btn-play {
    padding: 12px 30px;
    background: var(--secondary-color);
    color: var(--white);
    border-radius: var(--border-radius);
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(255, 71, 87, 0.3);
}

.btn-play:hover {
    background: #ff3344;
    transform: translateY(-2px);
}

.btn-detail {
    padding: 12px 30px;
    background: var(--white);
    color: var(--text-main);
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-weight: bold;
}

.btn-detail:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.hero-img {
    flex: 0 0 300px;
}

.hero-img img {
    width: 100%;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transform: rotate(-3deg);
    transition: transform 0.3s;
}

.hero-img img:hover {
    transform: rotate(0deg) scale(1.02);
}

/* 通用区块 */
.section-container {
    padding: 60px 0;
}

.bg-light {
    background: var(--white);
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 30px;
}

.section-title h2 {
    font-size: 1.8rem;
    color: var(--text-main);
    position: relative;
    padding-left: 15px;
}

.section-title h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    bottom: 5px;
    width: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

.more {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* 剧集网格 */
.drama-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
}

.drama-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.drama-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.card-poster {
    position: relative;
    height: 330px;
    overflow: hidden;
}

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

.drama-card:hover .card-poster img {
    transform: scale(1.05);
}

.ep-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: var(--white);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.card-desc {
    padding: 15px;
}

.card-desc h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-desc p {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* 排行榜 */
.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.rank-item {
    display: flex;
    align-items: center;
    background: var(--bg-color);
    padding: 15px;
    border-radius: var(--border-radius);
    transition: background 0.3s;
}

.rank-item:hover {
    background: #ffeaa7;
}

.rank-index {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--secondary-color);
    width: 40px;
    text-align: center;
}

.rank-item img {
    width: 60px;
    height: 90px;
    object-fit: cover;
    border-radius: 6px;
    margin-right: 15px;
}

.rank-info {
    flex: 1;
}

.rank-info h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.rank-info p {
    font-size: 0.9rem;
    color: var(--text-light);
}

.btn-rank {
    padding: 6px 15px;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.85rem;
}

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

/* 页脚 */
.site-footer {
    background: #2f3542;
    color: #dfe4ea;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: var(--white);
    margin-bottom: 20px;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a:hover {
    color: var(--primary-color);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #57606f;
    font-size: 0.85rem;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .header-flex {
        flex-direction: column;
        height: auto;
        padding: 15px 0;
        gap: 15px;
    }

    .nav-menu {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
    }

    .hero-img {
        flex: 0 0 auto;
        width: 200px;
    }

    .hero-btns {
        justify-content: center;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}
