/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

/* 应用容器 */
#app {
    width: 100%;
    max-width: 768px;
    margin: 0 auto;
    background-color: #fff;
    min-height: 100vh;
}

/* 顶部导航栏 */
.header {
    display: flex;
    align-items: center;
    height: 50px;
    background-color: #fff;
    border-bottom: 1px solid #eee;
    padding: 0 16px;
    position: sticky;
    top: 0;
    z-index: 100;
}

/* 返回按钮 */
.back-button {
    width: 36px;
    height: 36px;
    border: none;
    background-color: #fff;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    transition: all 0.2s ease;
    outline: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.back-button::before {
    content: '←';
    font-size: 20px;
    font-weight: bold;
    color: #333;
}

.back-button:hover {
    background-color: #f8f8f8;
    transform: scale(1.05);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

.back-button:active {
    transform: scale(0.95);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* 页面标题 */
.page-title {
    flex: 1;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

/* 搜索栏 */
.search-bar {
    padding: 12px;
    background-color: #fff;
    border-bottom: 1px solid #eee;
}

/* 搜索容器 */
.search-container {
    background-color: #fff;
    border-bottom: 1px solid #f5f5f5;
}

/* 热搜词标题 */
.hot-keywords-header {
    padding: 0;
}

.hot-keywords-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

/* 搜索框下方的热搜词样式 */
.search-hot-keywords {
    padding: 0;
}

.search-hot-keywords-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.hot-keyword-tag {
    padding: 4px 10px;
    background-color: #f5f5f5;
    color: #333;
    font-size: 13px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 120px;
}

.hot-keyword-tag:hover {
    background-color: #e8e8e8;
    transform: translateY(-1px);
}

/* 前三名热搜词特殊样式 */
.hot-keyword-top-1 {
    background-color: #ffebee;
    color: #e53935;
    font-weight: 500;
}

.hot-keyword-top-1:hover {
    background-color: #ffcdd2;
}

.hot-keyword-top-2 {
    background-color: #fff3e0;
    color: #f57c00;
    font-weight: 500;
}

.hot-keyword-top-2:hover {
    background-color: #ffe0b2;
}

.hot-keyword-top-3 {
    background-color: #fff8e1;
    color: #fbc02d;
    font-weight: 500;
}

.hot-keyword-top-3:hover {
    background-color: #fff176;
}

#searchInput {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    background-color: #f8f8f8;
}

#searchInput:focus {
    background-color: #fff;
    border-color: #4a90e2;
}

/* 频道列表 */
.channel-list {
    padding: 16px;
}

#channelContainer {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.channel-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
    background-color: #fafafa;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.channel-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-bottom: 8px;
    background-color: #ddd;
}

.channel-name {
    font-size: 12px;
    color: #333;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

/* 加载动画 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.loading::after {
    content: '';
    width: 24px;
    height: 24px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #4a90e2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 错误提示 */
.error-message {
    padding: 40px 20px;
    text-align: center;
    color: #999;
    font-size: 15px;
    line-height: 1.6;
}

/* 加载更多样式 */
.load-more {
    padding: 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
    background-color: #f9f9f9;
    border-top: 1px solid #eee;
    margin-top: 16px;
}

/* 搜索结果页面样式 */
.search-results {
    padding: 16px;
}

.search-result-item {
    display: flex;
    padding: 12px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

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

.result-cover {
    width: 80px;
    height: 110px;
    border-radius: 4px;
    margin-right: 12px;
    background-color: #ddd;
}

.result-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.result-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.result-score {
    font-size: 12px;
    color: #ff6b3b;
}

.result-intro {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* 详情页面样式 */
.vod-detail {
    padding-bottom: 16px;
}

.detail-header {
    position: relative;
    overflow: hidden;
}

.detail-bg {
    width: 100%;
    object-fit: cover;
    filter: brightness(0.5);
}

.detail-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    color: #fff;
}

.detail-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 8px;
}

.detail-meta {
    font-size: 13px;
    opacity: 0.9;
}

.detail-content {
    padding: 16px;
}

.detail-intro {
    font-size: 14px;
    color: #333;
    line-height: 1.6;
    margin-bottom: 16px;
}

.section-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 12px;
}

/* 演员滚动容器 */
.actor-scroll-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #ddd #f5f5f5;
}

/* 隐藏滚动条但保留滚动功能 */
.actor-scroll-container::-webkit-scrollbar {
    height: 4px;
}

.actor-scroll-container::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 2px;
}

.actor-scroll-container::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 2px;
}

.actor-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}

/* 演员列表样式 */
.actor-list {
    display: flex;
    gap: 12px;
    padding: 8px 0;
    margin-bottom: 8px;
    min-width: fit-content;
}

.actor-item {
    padding: 6px 12px;
    background-color: #f0f0f0;
    border-radius: 16px;
    font-size: 13px;
    color: #333;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.actor-item:hover {
    background-color: #e0e0e0;
}

.actor-empty {
    padding: 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

/* 播放器源选择样式 */
.player-source-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.player-source-item {
    padding: 8px 16px;
    background-color: #f0f0f0;
    border-radius: 20px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
}

.player-source-item:hover {
    background-color: #e0e0e0;
}

.player-source-item.active {
    background-color: #4a90e2;
    color: #fff;
}

/* 剧集滚动容器 */
.episode-scroll-container {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #ccc #f5f5f5;
    padding-bottom: 5px;
}

/* 自定义滚动条样式 */
.episode-scroll-container::-webkit-scrollbar {
    height: 6px;
}

.episode-scroll-container::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 3px;
}

.episode-scroll-container::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.episode-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* 剧集列表样式 */
.episode-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.episode-item {
    width: 50px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f0f0f0;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.episode-item:hover {
    background-color: #e0e0e0;
}

.episode-item.active {
    background-color: #4a90e2;
    color: #fff;
}

.episode-empty {
    padding: 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
    width: 100%;
}

/* 标签容器样式 */
.tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

/* 标签项样式 */
.tag-item {
    padding: 4px 12px;
    background-color: #f5f5f5;
    border-radius: 16px;
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.tag-item:hover {
    background-color: #e8e8e8;
    color: #333;
}