/* ==========================================
   全局初始化与公共样式
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: #141414;
    color: #ffffff;
    line-height: 1.6;
    -webkit-text-size-adjust: 100%;
}

a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #e50914;
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 公共头部 */
header {
    background-color: #000000;
    padding: 15px 0;
    border-bottom: 2px solid #e50914;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #e50914;
    letter-spacing: 2px;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    font-size: 15px;
    font-weight: 500;
}

.nav-links a.active {
    color: #e50914;
    border-bottom: 2px solid #e50914;
    padding-bottom: 3px;
}

/* 公共页脚 */
footer {
    background-color: #000000;
    text-align: center;
    padding: 25px 0;
    margin-top: 40px;
    color: #666666;
    font-size: 13px;
    border-top: 1px solid #222222;
}

/* 公共板块标题 */
.section-title {
    font-size: 20px;
    border-left: 4px solid #e50914;
    padding-left: 10px;
    margin: 30px 0 15px 0;
}

/* ==========================================
   页面 1：电视剧首页自适应样式
   ========================================== */
.hero-section {
    display: flex;
    gap: 30px;
    background: linear-gradient(180deg, #1f1f1f 0%, #141414 100%);
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.poster-box {
    flex-shrink: 0;
}

.poster-box img {
    width: 240px;
    height: 340px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    display: block;
}

.info-box {
    flex: 1;
}

.info-box h1 {
    font-size: 28px;
    margin-bottom: 12px;
}

.drama-meta {
    margin-bottom: 15px;
    color: #aaaaaa;
    font-size: 13px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.drama-desc {
    font-size: 15px;
    color: #cccccc;
    text-align: justify;
}

/* 全部集数自适应网格 */
.episode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(75px, 1fr)); 
    gap: 10px;
}

.ep-item {
    background-color: #262626;
    text-align: center;
    padding: 10px 0;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
	width:200px;
}

.ep-item:hover {
    background-color: #e50914;
    transform: translateY(-2px);
}

/* 演员表横向滚动 */
.cast-grid {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.cast-card {
    width: 120px;
    background-color: #1f1f1f;
    border-radius: 6px;
    overflow: hidden;
    text-align: center;
    flex-shrink: 0;
}

.cast-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.cast-name {
    font-size: 13px;
    font-weight: bold;
    padding: 6px 4px 2px 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cast-role {
    font-size: 11px;
    color: #888888;
    padding-bottom: 8px;
}

/* ==========================================
   页面 2 & 3：新闻列表与内容样式
   ========================================== */
.news-list-box {
    background-color: #1f1f1f;
    border-radius: 8px;
    padding: 5px 15px;
    margin-top: 15px;
}

.news-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #333333;
}

.news-item:last-child {
    border-bottom: none;
}

.news-link {
    font-size: 15px;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-time {
    color: #666666;
    font-size: 13px;
    flex-shrink: 0;
}

/* 新闻详情页 */
.article-wrapper {
    background-color: #1f1f1f;
    border-radius: 8px;
    padding: 30px 20px;
    margin-top: 20px;
}

.article-header {
    text-align: center;
    border-bottom: 1px solid #333333;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.article-header h1 {
    font-size: 24px;
    margin-bottom: 12px;
}

.article-meta-info {
    color: #888888;
    font-size: 13px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.article-content {
    font-size: 15px;
    color: #dddddd;
    line-height: 1.7;
}

.article-content p {
    margin-bottom: 15px;
    text-indent: 2em;
}

/* ==========================================
   媒体查询 - 平板与手机端适配 (<768px)
   ========================================== */
@media (max-width: 768px) {
    .nav-bar {
        flex-direction: column;
        gap: 12px;
    }

    .hero-section {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .poster-box img {
        width: 200px;
        height: 280px;
    }

    .drama-meta {
        justify-content: center;
    }

    .article-wrapper {
        padding: 20px 15px;
    }

    .article-header h1 {
        font-size: 20px;
    }
}

/* 针对极窄屏幕手机的微调 (<480px)
   ========================================== */
@media (max-width: 480px) {
    .section-title {
        font-size: 18px;
    }
    
    .news-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .news-link {
        white-space: normal;
    }
}