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

:root {
    --primary-color: #ff4757;
    --primary-dark: #e84118;
    --bg-dark: #f5f6fa;
    --bg-card: #ffffff;
    --bg-hover: #f0f1f5;
    --text-primary: #1a1a2e;
    --text-secondary: #57606f;
    --text-muted: #a4b0be;
    --border-color: #e8e9ed;
    --gold: #ffa502;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    margin: 0;
}

/* 左侧边栏 */
.sidebar {
    width: 220px;
    min-height: 100vh;
    background: var(--bg-card);
    border-right: 1px solid var(--border-color);
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    padding: 20px 0;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 20px 24px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 16px;
}

.sidebar-logo .logo-icon {
    font-size: 28px;
}

.sidebar-logo .logo-text {
    font-size: 20px;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary-color), #ff6b81);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 12px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.2s;
}

.sidebar-item:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.sidebar-item.active {
    color: var(--primary-color);
    background: rgba(255, 71, 87, 0.1);
    font-weight: 500;
}

.sidebar-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.sidebar-search {
    display: flex;
    align-items: center;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 6px 8px 6px 14px;
    margin: 0 12px 16px;
}

.sidebar-search input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 13px;
    width: 0;
    min-width: 0;
}

.sidebar-search input::placeholder {
    color: var(--text-muted);
}

.sidebar-search button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.2s;
}

.sidebar-search button:hover {
    background: var(--bg-hover);
}

/* 主内容区 */
.main-content {
    flex: 1;
    margin-left: 220px;
    padding: 24px 32px;
    min-height: 100vh;
    max-width: none;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

/* 轮播区 */
.hero-section {
    margin-bottom: 36px;
    border-radius: 16px;
    overflow: hidden;
}

.hero-slider {
    position: relative;
    height: 360px;
    border-radius: 16px;
    overflow: hidden;
}

.hero-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s;
    cursor: pointer;
}

.hero-item.active {
    opacity: 1;
}

.hero-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 50%, transparent 100%);
}

.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-info {
    position: absolute;
    left: 40px;
    bottom: 40px;
    max-width: 500px;
    z-index: 2;
}

.hero-title {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 12px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.hero-tag {
    background: rgba(255, 71, 87, 0.2);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
}

.hero-dots {
    position: absolute;
    bottom: 20px;
    right: 40px;
    display: flex;
    gap: 8px;
    z-index: 2;
}

.hero-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    cursor: pointer;
    transition: all 0.2s;
}

.hero-dot.active {
    background: var(--primary-color);
    width: 24px;
    border-radius: 4px;
}

/* 内容区块 */
.content-section {
    margin-bottom: 44px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 22px;
    font-weight: 600;
}

.more-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.more-link:hover {
    color: var(--primary-color);
}

/* 视频网格 */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px 16px;
}

.video-card {
    cursor: pointer;
    transition: transform 0.2s;
}

.video-card:hover {
    transform: translateY(-4px);
}

.video-card:hover .video-cover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

/* 横向滚动行 */
.scroll-row-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    margin: 0 -8px;
}

.scroll-row {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 8px 4px 16px;
    flex: 1;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}

.scroll-row::-webkit-scrollbar {
    display: none;
}

.scroll-row.dragging {
    cursor: grabbing;
    scroll-behavior: auto;
}

.scroll-row .video-card {
    flex-shrink: 0;
    width: 160px;
}

/* 左右箭头按钮 */
.scroll-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    font-size: 22px;
    line-height: 1;
    color: #333;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
}

.scroll-arrow:hover {
    background: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.scroll-arrow:active {
    transform: translateY(-50%) scale(0.95);
}

.scroll-arrow-left {
    left: -4px;
}

.scroll-arrow-right {
    right: -4px;
}

.scroll-arrow.hidden {
    opacity: 0;
    pointer-events: none;
}

.video-cover {
    position: relative;
    aspect-ratio: 3/4;
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-card);
    margin-bottom: 10px;
}

.video-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.video-episodes {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
}

.video-duration {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.video-card:hover .play-overlay {
    opacity: 1;
}

.play-icon {
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.video-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.video-meta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
}

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

.rank-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    background: var(--bg-card);
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.rank-item:hover {
    background: var(--bg-hover);
}

.rank-num {
    width: 30px;
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    color: var(--text-muted);
}

.rank-item:nth-child(1) .rank-num { color: #ff6b6b; }
.rank-item:nth-child(2) .rank-num { color: #feca57; }
.rank-item:nth-child(3) .rank-num { color: #48dbfb; }

.rank-cover {
    width: 60px;
    height: 80px;
    border-radius: 6px;
    object-fit: cover;
}

.rank-info {
    flex: 1;
}

.rank-title {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 4px;
}

.rank-desc {
    font-size: 12px;
    color: var(--text-muted);
}

.rank-hot {
    font-size: 13px;
    color: var(--primary-color);
}

/* 排行榜页 */
.rank-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.rank-tab {
    padding: 8px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.rank-tab:hover {
    background: var(--bg-hover);
}

.rank-tab.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.rank-full-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.rank-full-list .rank-item {
    margin: 0;
}

/* 分类页 */
/* 分类页 - 内容类型切换 */
.category-type-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.cat-type-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 24px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.cat-type-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.cat-type-btn.active {
    background: linear-gradient(135deg, var(--primary-color), #ff6b9d);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.3);
}

.cat-type-icon {
    font-size: 20px;
}

/* 分类区块 */
.category-section {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 16px;
}

.category-section-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cat-tag {
    padding: 6px 16px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.cat-tag:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
}

.cat-tag.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* 分类结果头部 */
.category-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 24px 0 16px;
}

.category-result-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.result-count {
    font-size: 13px;
    color: var(--text-muted);
}

/* 搜索结果页 */
.search-result-header {
    margin-bottom: 20px;
}

.search-result-header h2 {
    font-size: 20px;
    margin-bottom: 16px;
}

.search-result-header h2 span {
    color: var(--primary-color);
}

.search-tabs {
    display: flex;
    gap: 8px;
}

.search-tab {
    padding: 8px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.search-tab.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* 热门搜索 */
.hot-search-section {
    margin-bottom: 20px;
    padding: 16px;
    background: var(--bg-card);
    border-radius: 12px;
}

.hot-search-section h3 {
    font-size: 15px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.hot-search-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hot-tag {
    padding: 6px 16px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.hot-tag:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
}

/* 更多页面 */
.more-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.more-header h2 {
    font-size: 20px;
}

.back-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.back-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.load-more {
    text-align: center;
    margin-top: 30px;
}

.load-more button {
    padding: 10px 40px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.load-more button:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* 弹窗 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--bg-dark);
    border-radius: 16px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    background: var(--bg-card);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 24px;
    color: var(--text-secondary);
    z-index: 10;
    transition: all 0.2s;
}

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

/* 设置弹窗 */
.settings-modal {
    width: 420px;
    padding: 30px;
}

.settings-modal h3 {
    margin-bottom: 24px;
    font-size: 20px;
}

.settings-group {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 28px;
}

.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--bg-dark);
    border-radius: 12px;
    transition: opacity 0.2s;
}

.setting-info {
    flex: 1;
}

.setting-title {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 4px;
}

.setting-desc {
    font-size: 12px;
    color: var(--text-muted);
}

/* 开关 */
.switch {
    position: relative;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color);
    transition: 0.3s;
    border-radius: 26px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.switch input:checked + .slider {
    background-color: var(--primary-color);
}

.switch input:checked + .slider:before {
    transform: translateX(22px);
}

.delay-input {
    display: flex;
    align-items: center;
    gap: 8px;
}

.delay-input input {
    width: 70px;
    padding: 6px 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    text-align: center;
    outline: none;
}

.delay-input input:focus {
    border-color: var(--primary-color);
}

.delay-input span {
    font-size: 13px;
    color: var(--text-secondary);
}

.save-settings-btn {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s;
}

.save-settings-btn:hover {
    background: var(--primary-dark);
}

/* 侧栏底部 */
.sidebar-footer {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    padding-left: 12px;
    padding-right: 12px;
}

/* 详情弹窗 */
.detail-modal {
    max-width: 900px;
}

.detail-hero {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.detail-hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(20px);
    transform: scale(1.1);
}

.detail-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, var(--bg-dark) 100%);
}

.detail-content {
    padding: 0 30px 30px;
    margin-top: -150px;
    position: relative;
    z-index: 2;
}

.detail-main {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
}

.detail-cover {
    width: 180px;
    height: 240px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    flex-shrink: 0;
}

.detail-info {
    flex: 1;
    padding-top: 100px;
}

.detail-title {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 12px;
}

.detail-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.detail-tag {
    background: rgba(255, 71, 87, 0.15);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
}

.detail-stats {
    display: flex;
    gap: 24px;
    margin-bottom: 16px;
    color: var(--text-secondary);
    font-size: 14px;
}

.detail-actions {
    display: flex;
    gap: 12px;
}

.play-btn {
    padding: 12px 32px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
    border-radius: 25px;
    color: white;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.play-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 71, 87, 0.4);
}

.fav-btn {
    padding: 12px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.fav-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.detail-intro {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.detail-intro h3 {
    font-size: 16px;
    margin-bottom: 12px;
}

.detail-intro p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.8;
}

/* 集数列表 */
.episodes-section h3 {
    font-size: 16px;
    margin-bottom: 16px;
}

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

.episode-btn {
    padding: 10px 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}

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

.episode-btn.played {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* 播放弹窗 */
.player-modal {
    max-width: 1000px;
}

/* 播放器全屏模式 - 撑满整个屏幕 */
.player-body {
    padding: 0;
}

.player-container {
    position: relative;
    background: #000;
    border-radius: 16px 16px 0 0;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 70vh;
}

#dplayer {
    width: 100%;
    height: 100% !important;
}

#dplayer .dplayer-video-wrap {
    width: 100%;
    height: 100%;
}

#dplayer video {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
}

#iframePlayer {
    width: 100%;
    height: 100%;
    background: #000;
}

#iframePlayer iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.player-info {
    padding: 20px;
    background: var(--bg-card);
    border-radius: 0 0 16px 16px;
}

.player-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.player-episodes {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.player-ep-btn {
    padding: 6px 12px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

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

.player-ep-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* 全屏模式下纯视频播放 */
#playerBody:fullscreen {
    width: 100vw !important;
    height: 100vh !important;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

#playerBody:fullscreen .player-container {
    width: 100%;
    height: 100%;
    max-height: none;
    aspect-ratio: auto;
    border-radius: 0;
}

#playerBody:fullscreen #dplayer {
    width: 100% !important;
    height: 100% !important;
}

#playerBody:fullscreen .player-info {
    display: none !important;
}

#playerBody:fullscreen .loading,
#playerBody:fullscreen .error {
    color: #fff;
}

/* 兼容webkit前缀 */
#playerBody:-webkit-full-screen {
    width: 100vw !important;
    height: 100vh !important;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

#playerBody:-webkit-full-screen .player-container {
    width: 100%;
    height: 100%;
    max-height: none;
    aspect-ratio: auto;
    border-radius: 0;
}

#playerBody:-webkit-full-screen #dplayer {
    width: 100% !important;
    height: 100% !important;
}

#playerBody:-webkit-full-screen .player-info {
    display: none !important;
}

/* 播放方式选择 */
.play-options-container {
    padding: 24px;
}

.play-options-header {
    text-align: center;
    margin-bottom: 24px;
}

.play-options-header h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.play-options-header p {
    color: var(--text-muted);
    font-size: 14px;
}

.play-options-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.play-option-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.play-option-card:hover {
    border-color: var(--primary-color);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.play-option-card.has-key {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.1), rgba(255, 107, 157, 0.05));
}

.play-option-icon {
    font-size: 32px;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-dark);
    border-radius: 12px;
}

.play-option-info {
    flex: 1;
}

.play-option-info h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.play-option-info p {
    font-size: 13px;
    color: var(--text-muted);
}

.badge-green {
    display: inline-block;
    padding: 2px 8px;
    background: #e8f5e9;
    color: #4caf50;
    font-size: 11px;
    border-radius: 10px;
    font-weight: 500;
}

.play-option-arrow {
    font-size: 20px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.play-options-footer {
    text-align: center;
    padding: 12px;
    background: var(--bg-dark);
    border-radius: 8px;
    margin-bottom: 16px;
}

.play-options-footer p {
    font-size: 12px;
    color: var(--text-muted);
}

.back-btn {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    margin-bottom: 12px;
    transition: all 0.2s;
}

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

/* 全屏按钮 */
.player-title {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* 设置弹窗 */
.settings-modal {
    max-width: 450px;
    padding: 30px;
}

.settings-modal h2 {
    margin-bottom: 24px;
    font-size: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary-color);
}

.help-text {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.6;
}

.help-text a {
    color: var(--primary-color);
    text-decoration: none;
}

.help-text a:hover {
    text-decoration: underline;
}

.settings-info {
    margin-top: 24px;
    padding: 16px;
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.settings-info h4 {
    font-size: 14px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.settings-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.settings-info li {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.8;
    padding-left: 16px;
    position: relative;
}

.settings-info li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

.settings-info strong {
    color: var(--text-primary);
    font-weight: 500;
}

.save-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s;
}

.save-btn:hover {
    transform: translateY(-1px);
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-size: 14px;
}

.error {
    text-align: center;
    padding: 40px;
    color: var(--primary-color);
    font-size: 14px;
}

.no-data {
    text-align: center;
    padding: 60px;
    color: var(--text-muted);
}

.no-data-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 30px;
    margin-left: 220px;
    color: var(--text-muted);
    font-size: 13px;
    border-top: 1px solid var(--border-color);
}

/* 提示消息 */
.toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    z-index: 2000;
    animation: toastIn 0.3s ease;
}

.toast.error {
    border-left: 4px solid var(--primary-color);
    color: var(--text-primary);
}

.toast.success {
    border-left: 4px solid #4cd137;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* 响应式 */
@media (max-width: 768px) {
    .sidebar {
        width: 60px;
    }
    
    .sidebar-logo .logo-text,
    .sidebar-item span:last-child,
    .sidebar-search {
        display: none;
    }
    
    .sidebar-logo {
        justify-content: center;
        padding: 0 0 20px;
    }
    
    .sidebar-item {
        justify-content: center;
        padding: 12px;
    }
    
    .main-content {
        margin-left: 60px;
        padding: 16px;
    }
    
    .footer {
        margin-left: 60px;
    }
    
    .hero-slider {
        height: 200px;
    }
    
    .hero-info {
        left: 20px;
        bottom: 20px;
    }
    
    .hero-title {
        font-size: 20px;
    }
    
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }
    
    .rank-full-list {
        grid-template-columns: 1fr;
    }
    
    .detail-main {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .detail-info {
        padding-top: 0;
    }
    
    .detail-tags {
        justify-content: center;
    }
    
    .detail-stats {
        justify-content: center;
    }
    
    .detail-actions {
        justify-content: center;
    }
}
