/* ===== 播放页专用样式 ===== */
main.play-container {
    max-width: 900px !important;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
}

/* 播放器容器 - 确保不遮挡外部内容 */
.player-wrapper {
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    position: relative;
    /* 设置固定高度，使用 aspect-ratio */
    aspect-ratio: 16/9;
    min-height: 400px;
    max-height: 70vh;
}

/* 加载状态 - 限制在 player-wrapper 内部 */
#player-loading {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 15px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16162a 100%);
    z-index: 5;
}

#player-loading::before {
    content: '';
    width: 50px;
    height: 50px;
    border: 4px solid rgba(0, 212, 255, 0.2);
    border-top-color: #00d4ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

#player-loading::after {
    content: '正在加载...';
    color: #fff;
    font-size: 16px;
}

/* 错误状态 - 限制在 player-wrapper 内部 */
#player-error {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16162a 100%);
    z-index: 5;
}

#k1-video-player {
    width: 100%;
    height: 100%;
    background: #000;
    display: block;
}

.movie-info-card {
    background: var(--bg-card, #1a1a2e);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color, #2a2a4e);
}

.movie-info-header {
    display: flex;
    align-items: flex-start;
    gap: 25px;
    margin-bottom: 20px;
}

.movie-poster {
    width: 180px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.movie-poster img {
    width: 100%;
    height: 270px;
    object-fit: cover;
    display: block;
}

@media (min-width: 769px) {
    .movie-info-header .movie-poster img {
        height: auto;
        aspect-ratio: 2/3;
    }
}

.movie-details {
    flex: 1;
}

.movie-details h1 {
    margin: 0 0 15px 0;
    font-size: 26px;
    color: var(--text-primary, #fff);
    font-weight: 700;
}

.movie-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px 25px;
    margin-bottom: 15px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.meta-label {
    color: var(--text-secondary, #888);
    font-size: 14px;
}

.meta-value {
    color: var(--text-primary, #fff);
    font-size: 14px;
}

.rating {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 700;
    color: #fff;
}

/* 别名样式 */
.movie-alias {
    color: var(--text-secondary, #888);
    font-size: 14px;
    margin-bottom: 15px;
}

/* 操作按钮组 */
.movie-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: var(--bg-secondary, #252542);
    border: 1px solid var(--border-color, #2a2a4e);
    border-radius: 8px;
    color: var(--text-secondary, #888);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: var(--primary-color, #00d4ff);
    border-color: var(--primary-color, #00d4ff);
    color: #000;
    transform: translateY(-2px);
}

.action-btn.active {
    background: #ff6b35;
    border-color: #ff6b35;
    color: #fff;
}

.action-btn i {
    font-size: 16px;
}

/* 常见问题模块 */
.faq-section {
    background: var(--bg-card, #1a1a2e);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color, #2a2a4e);
}

.faq-section h2 {
    margin: 0 0 20px 0;
    font-size: 20px;
    color: var(--text-primary, #fff);
    font-weight: 700;
}

.faq-item {
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color, #2a2a4e);
}

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

.faq-question {
    color: var(--text-primary, #fff);
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 15px;
}

.faq-answer {
    color: var(--text-secondary, #888);
    font-size: 14px;
    line-height: 1.6;
}

/* 播放源标签 */
.source-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.source-tab {
    padding: 10px 20px;
    background: var(--bg-card, #1a1a2e);
    border: 2px solid var(--border-color, #2a2a4e);
    border-radius: 8px;
    color: var(--text-secondary, #888);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.source-tab:hover {
    border-color: #00d4ff;
    color: #00d4ff;
}

.source-tab.active {
    background: #00d4ff;
    border-color: #00d4ff;
    color: #000;
    font-weight: 600;
}

/* 剧集列表 */
.episode-section {
    background: var(--bg-card, #1a1a2e);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color, #2a2a4e);
}

.episode-section h3 {
    margin: 0 0 15px 0;
    color: var(--text-primary, #fff);
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.episode-section h3::before {
    content: '📺';
}

.episode-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.episode-btn {
    padding: 12px 8px;
    background: var(--bg-secondary, #252542);
    border: 1px solid var(--border-color, #2a2a4e);
    border-radius: 6px;
    color: var(--text-primary, #fff);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
    font-size: 14px;
}

.episode-btn:hover {
    border-color: #00d4ff;
    background: rgba(0, 212, 255, 0.1);
    transform: translateY(-2px);
}

.episode-btn.active {
    background: #00d4ff;
    border-color: #00d4ff;
    color: #000;
    font-weight: 600;
}

/* 剧情简介 */
.synopsis {
    background: var(--bg-card, #1a1a2e);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color, #2a2a4e);
}

.synopsis h2 {
    margin: 0 0 15px 0;
    color: var(--text-primary, #fff);
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.synopsis h2::before {
    content: '📝';
}

.synopsis p {
    color: var(--text-secondary, #888);
    line-height: 1.8;
    font-size: 14px;
}

/* 相关推荐 */
.related-section {
    background: var(--bg-card, #1a1a2e);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border-color, #2a2a4e);
}

.related-section h2 {
    margin: 0 0 20px 0;
    color: var(--text-primary, #fff);
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.related-section h2::before {
    content: '🎬';
}

/* 响应式 */
@media (max-width: 768px) {
    .movie-info-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .movie-poster {
        width: 140px;
    }

    .movie-poster img {
        height: 210px;
    }

    .movie-details h1 {
        font-size: 20px;
    }

    .episode-list {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }

    .play-container {
        padding: 15px;
    }
}

/* 新闻卡片样式 */
.news-card {
    background: var(--bg-secondary, #252542);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 212, 255, 0.2);
}

.news-card a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.news-card .news-pic {
    width: 100%;
    height: 160px;
    overflow: hidden;
}

.news-card .news-pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-card:hover .news-pic img {
    transform: scale(1.05);
}

.news-card .news-info {
    padding: 15px;
}

.news-card .news-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #fff);
    margin: 0 0 10px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card .news-meta {
    display: flex;
    gap: 10px;
    font-size: 12px;
    color: var(--text-secondary, #888);
}

.news-card .news-category {
    background: var(--primary-color, #00d4ff);
    color: #000;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.news-card .news-time {
    opacity: 0.7;
}

/* News grid layout (extracted from inline style) */
[class~="news-grid"] {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}
