/* 全局样式 */
:root {
    --primary-color: #FF6B6B;
    --text-color: #333;
    --bg-color: #F5F5F5;
    --card-bg: #FFF;
    --border-color: #EEE;
    --header-bg: #FFF;
    --input-bg: #FFF;
    --input-text: #333;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* 暗色主题 */
[data-theme="dark"] {
    --primary-color: #FF6B6B;
    --text-color: #E4E4E4;
    --bg-color: #1A1A1A;
    --card-bg: #242424;
    --border-color: #333;
    --header-bg: #242424;
    --input-bg: #333;
    --input-text: #E4E4E4;
    --shadow: 0 1px 3px rgba(0,0,0,0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-color);
    background: var(--bg-color);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 头部样式 */
.header {
    background: var(--header-bg);
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.header-wrapper {
    display: flex;
    align-items: center;
    height: 70px;
}

.logo {
    width: 180px;
    height: 45px;
    display: flex;
    align-items: center;
}

.logo a {
    display: block;
    width: 100%;
    height: 100%;
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-width: 100%;
    max-height: 100%;
}

.nav-menu {
    flex: 1;
    margin: 0 50px;
    display: flex;
    gap: 30px;
}

.nav-menu a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: color .3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

.search-box {
    position: relative;
    width: 300px;
}

.search-box input {
    width: 100%;
    height: 40px;
    padding: 0 40px 0 15px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    outline: none;
    transition: all .3s;
    background-color: var(--input-bg);
    color: var(--input-text);
}

.search-box input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(255,107,107,.2);
}

.search-box button {
    position: absolute;
    right: 5px;
    top: 5px;
    width: 30px;
    height: 30px;
    border: none;
    background: none;
    cursor: pointer;
    color: #999;
    transition: color .3s;
}

.search-box button:hover {
    color: var(--primary-color);
}

/* 首页样式 */
.banner-section {
    margin-top: 70px;
    padding: 30px 0;
}

.swiper-container {
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.swiper-slide {
    position: relative;
}

.swiper-slide img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: transform 0.3s;
}

.swiper-slide:hover img {
    transform: scale(1.05);
}

.swiper-slide .title {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 20px;
    color: #fff;
    background: linear-gradient(transparent, rgba(0,0,0,.7));
    font-size: 24px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s;
}

.swiper-slide:hover .title {
    opacity: 1;
    transform: translateY(0);
}

.swiper-button-prev,
.swiper-button-next {
    color: #fff;
    opacity: 0;
    transition: all 0.3s;
}

.swiper-container:hover .swiper-button-prev,
.swiper-container:hover .swiper-button-next {
    opacity: 1;
}

.section {
    padding: 30px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-color);
}

.section-header .more {
    color: #666;
    text-decoration: none;
    transition: color .3s;
}

.section-header .more:hover {
    color: var(--primary-color);
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.movie-item {
    position: relative;
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    transition: all .3s ease;
}

.movie-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,.1);
}

.movie-item .poster {
    position: relative;
    padding-top: 140%;
}

.movie-item .poster a {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 1;
}

.movie-item .poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.movie-item .score {
    position: absolute;
    left: 8px;
    bottom: 8px;
    padding: 2px 6px;
    background: rgba(255,107,107,.8);
    color: #fff;
    font-size: 12px;
    border-radius: 2px;
    z-index: 2;
}

.movie-item .type {
    position: absolute;
    left: 8px;
    top: 8px;
    padding: 2px 6px;
    background: rgba(0,0,0,.6);
    color: #fff;
    font-size: 12px;
    border-radius: 2px;
    z-index: 2;
}

.movie-item .remarks {
    position: absolute;
    right: 8px;
    top: 8px;
    padding: 2px 6px;
    background: rgba(0,0,0,.6);
    color: #fff;
    font-size: 12px;
    border-radius: 2px;
    z-index: 2;
}

.movie-item .title {
    padding: 10px;
    text-align: center;
}

.movie-item .title a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.movie-item .title a:hover {
    color: var(--primary-color);
}

/* 详情页样式 */
.movie-detail {
    margin-top: 60px;
    padding: 20px 0;
    position: relative;
    background: var(--bg-color);
    transition: all 0.3s ease;
}

.movie-detail .container {
    max-width: 90%;
    margin: 0 auto;
}

.detail-wrapper {
    position: relative;
    z-index: 1;
    background: var(--bg-color);
    transition: all 0.3s ease;
}

.movie-info {
    display: flex;
    gap: 40px;
    background: var(--card-bg);
    padding: 30px;
    border-radius: 8px;
}

.movie-info .poster {
    width: 260px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
}

.movie-info h1 {
    font-size: 28px;
    margin-bottom: 20px;
}

.meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 25px;
}

.meta span {
    color: #666;
}

.score-box {
    display: inline-flex;
    align-items: center;
    margin-bottom: 25px;
    background: #FFF5F5;
    padding: 10px 20px;
    border-radius: 8px;
}

.score-box .score {
    position: static;
    font-size: 32px;
    margin-right: 10px;
    background: none;
    color: var(--primary-color);
    padding: 0;
}

.score-box .total {
    color: #666;
}

/* 播放器页面样式 */
.player-wrapper {
    position: relative;
    padding-top: 56.25%; /* 16:9 比例 */
    background: #000;
}

#player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.play-info {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.play-list {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
}

.episode-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.episode-item {
    text-align: center;
}

.episode-item a {
    display: block;
    padding: 8px;
    background: var(--bg-color);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 4px;
    transition: all .3s;
}

.episode-item a:hover,
.episode-item a.active {
    background: var(--primary-color);
    color: #fff;
}

/* 筛选件样式优化 */
.filter-section {
    margin: 70px 0 20px 0;
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.filter-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
}

.filter-toggle .text {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-color);
}

.filter-toggle .arrow {
    border: solid var(--text-color);
    border-width: 0 2px 2px 0;
    display: inline-block;
    padding: 3px;
    transform: rotate(45deg);
    transition: transform 0.3s;
}

.filter-toggle.active .arrow {
    transform: rotate(-135deg);
}

.filter-content {
    display: none;
    padding: 20px;
}

.filter-content.show {
    display: block;
}

.filter-item {
    margin-bottom: 20px;
}

.filter-item:last-child {
    margin-bottom: 0;
}

.filter-item .label {
    display: block;
    font-size: 15px;
    color: #666;
    margin-bottom: 12px;
}

.filter-item .values {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-item .values a {
    display: inline-block;
    padding: 6px 15px;
    border-radius: 20px;
    color: var(--text-color);
    background: var(--bg-color);
    text-decoration: none;
    transition: all 0.3s;
    font-size: 14px;
}

.filter-item .values a:hover {
    background: var(--primary-color);
    color: #fff;
}

.filter-item .values a.active {
    background: var(--primary-color);
    color: #fff;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .filter-section {
        margin: 60px 10px 15px 10px;
    }

    .filter-toggle {
        padding: 12px 15px;
    }

    .filter-content {
        padding: 15px;
    }

    .filter-item {
        margin-bottom: 15px;
    }

    .filter-item .label {
        font-size: 14px;
        margin-bottom: 10px;
    }

    .filter-item .values {
        gap: 8px;
    }

    .filter-item .values a {
        padding: 5px 12px;
        font-size: 13px;
    }

    /* 横向滚动优化 */
    .filter-item .values {
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 5px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
    }

    .filter-item .values::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }
}

/* 平板端适配 */
@media (min-width: 769px) and (max-width: 1024px) {
    .filter-section {
        margin: 70px 15px 20px 15px;
    }

    .filter-item .values {
        gap: 12px;
    }

    .filter-item .values a {
        padding: 6px 18px;
    }
}

/* 热播部分样式 */
.hot-section {
    margin: 20px 0;
}

.section-header {
    margin-bottom: 15px;
    border-left: 4px solid #FF6B6B;
    padding-left: 10px;
}

.section-header h2 {
    font-size: 18px;
    margin: 0;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
    gap: 5px;
}

.pagination .page-item {
    list-style: none;
}

.pagination .page-item .page-link {
    display: inline-block;
    padding: 8px 12px;
    color: var(--text-color);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    text-decoration: none;
    transition: all .3s;
}

.pagination .page-item .page-link:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.pagination .page-item.active .page-link {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.pagination .page-item.disabled .page-link {
    color: #999;
    background: var(--bg-color);
    border-color: var(--border-color);
    cursor: not-allowed;
}

/* 上一页/下一页特殊样式 */
.pagination .page-item:first-child .page-link,
.pagination .page-item:last-child .page-link {
    padding: 8px 15px;
}

/* 省略号样式 */
.pagination .page-item.disabled .page-link {
    background: transparent;
    border: none;
    padding: 8px 5px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .pagination {
        flex-wrap: wrap;
    }
    
    .pagination .page-item .page-link {
        padding: 6px 10px;
        font-size: 13px;
    }
}

/* 响应式优化 */
@media (max-width: 768px) {
    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }

    .filter-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-item .label {
        margin-bottom: 10px;
    }

    .episode-list {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }

    .player-wrapper {
        padding-top: 75%; /* 4:3 比例 */
    }
}

/* 继续补充其他样式... */

/* 底部样式 */
.footer {
    background: var(--card-bg);
    padding: 30px 0;
    margin-top: 40px;
}

.footer-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-info {
    color: #666;
}

.footer-info p {
    margin: 5px 0;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: #666;
    text-decoration: none;
    transition: color .3s;
}

.footer-links a:hover {
    color: var(--primary-color);
}

/* 静态页面样式 */
.page-content {
    margin-top: 70px;
    padding: 30px 0;
}

.content-box {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,.1);
}

.content-box h1 {
    font-size: 28px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.content-text {
    color: #666;
    line-height: 1.8;
}

.content-text h2 {
    font-size: 20px;
    color: var(--text-color);
    margin: 25px 0 15px;
}

.content-text h3 {
    font-size: 16px;
    color: var(--text-color);
    margin: 20px 0 10px;
}

.content-text p {
    margin-bottom: 15px;
}

.content-text ul,
.content-text ol {
    padding-left: 20px;
    margin-bottom: 15px;
}

.content-text li {
    margin-bottom: 8px;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    right: 30px;
    bottom: 30px;
    width: 40px;
    height: 40px;
    background: rgba(0,0,0,.6);
    color: #fff;
    text-align: center;
    line-height: 40px;
    border-radius: 4px;
    cursor: pointer;
    display: none;
    transition: all .3s;
}

.back-to-top:hover {
    background: rgba(0,0,0,.8);
}

/* 响应式布局 */
@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }
    
    .header-wrapper {
        height: auto;
        padding: 10px 0;
        flex-wrap: wrap;
    }
    
    .logo {
        width: 140px;
        height: 38px;
        display: flex;
        align-items: center;
    }
    
    .nav-menu {
        width: 100%;
        margin: 10px 0;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .search-box {
        width: 100%;
    }
    
    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }
    
    .movie-info {
        flex-direction: column;
    }
    
    .movie-info .poster {
        width: 100%;
        margin-bottom: 20px;
    }
    
    .filter-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filter-item .label {
        margin-bottom: 10px;
    }
    
    .footer-wrapper {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .footer-links {
        justify-content: center;
    }
}

/* 加载动画 */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,.9);
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 图片懒加载效果 */
.lazy-load {
    opacity: 0;
    transition: opacity .5s;
}

.lazy-load.loaded {
    opacity: 1;
}

/* 卡片悬停效果 */
.movie-item {
    position: relative;
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    transition: all .3s cubic-bezier(.4,0,.2,1);
}

.movie-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 20px rgba(0,0,0,.1);
}

.movie-item .poster::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,.7));
    opacity: 0;
    transition: opacity .3s;
}

.movie-item:hover .poster::after {
    opacity: 1;
}

/* 按钮点击效果 */
.play-btn {
    position: relative;
    overflow: hidden;
}

.play-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width .6s, height .6s;
}

.play-btn:active::after {
    width: 200px;
    height: 200px;
}

/* 搜索框动画 */
.search-box input {
    width: 100%;
    height: 40px;
    padding: 0 40px 0 15px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    outline: none;
    transition: all .3s cubic-bezier(.4,0,.2,1);
}

.search-box input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255,107,107,.1);
    width: calc(100% + 50px);
}

/* 自定义动条 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    :root {
        --primary-color: #FF6B6B;
        --text-color: #E1E1E1;
        --bg-color: #1A1A1A;
        --card-bg: #2A2A2A;
        --border-color: #3A3A3A;
    }

    .loading {
        background: rgba(26,26,26,.9);
    }

    .search-box input {
        background: var(--card-bg);
        color: var(--text-color);
    }

    .movie-item .poster::after {
        background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,.9));
    }

    ::-webkit-scrollbar-track {
        background: var(--card-bg);
    }

    ::-webkit-scrollbar-thumb {
        background: #444;
    }

    ::-webkit-scrollbar-thumb:hover {
        background: #555;
    }
}

/* 页面切换动画 */
.fade-enter {
    opacity: 0;
    transform: translateY(20px);
}

.fade-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: opacity .5s, transform .5s;
}

/* 骨架加载 */
.skeleton {
    background: linear-gradient(90deg, 
        var(--card-bg) 25%, 
        var(--border-color) 37%, 
        var(--card-bg) 63%
    );
    background-size: 400% 100%;
    animation: skeleton-loading 1.4s ease infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0 50%;
    }
}

/* 轮播图样式优化 */
.banner-section {
    margin-top: 70px;
    padding: 30px 0;
}

.swiper-container {
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.swiper-slide {
    position: relative;
}

.swiper-slide img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: transform 0.3s;
}

.swiper-slide:hover img {
    transform: scale(1.05);
}

.swiper-slide .title {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 20px;
    color: #fff;
    background: linear-gradient(transparent, rgba(0,0,0,.7));
    font-size: 24px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s;
}

.swiper-slide:hover .title {
    opacity: 1;
    transform: translateY(0);
}

.swiper-button-prev,
.swiper-button-next {
    color: #fff;
    opacity: 0;
    transition: all 0.3s;
}

.swiper-container:hover .swiper-button-prev,
.swiper-container:hover .swiper-button-next {
    opacity: 1;
}

/* 图片懒加载 */
.lazy {
    opacity: 0;
    transition: opacity 0.3s;
}

.lazy.loaded {
    opacity: 1;
}

.movie-item .poster a:hover img {
    transform: scale(1.05);
    transition: transform .3s;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 8px 20px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    transition: all .3s;
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-outline {
    background: none;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: #fff;
}

/* 详情页样式调整 */
.detail-wrapper {
    margin-top: 5px;
}

/* 播放器样式 */
.player-box {
    background: #000 !important;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

#player {
    width: 100% !important;
    height: 600px !important;
    background: #000;
}

/* 确保DPlayer控制栏可见 */
.dplayer {
    width: 100% !important;
    height: 100% !important;
}

.dplayer-video-wrap {
    width: 100% !important;
    height: 100% !important;
    position: relative;
}

/* 控制栏样式 */
.dplayer-controller {
    opacity: 1 !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 50px !important;
    padding: 0 20px !important;
    user-select: none !important;
    transition: all 0.3s ease !important;
    z-index: 100 !important;
}

.dplayer-controller-mask {
    background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAADGCAYAAAAT+OqFAAAAdklEQVQoz42QQQ7AIAgEF/T/D+kbq/RWAlnQyyazA4aoAB4FsBSA/bFjuF1EOL7VbrIrBuusmrt4ZZORfb6ehbWdnRHEIiITaEUKa5EJqUakRSaEYBJSCY2dEstQY7AuxahwXFrvZmWl2rh4JZ07z9dLtesfNj5q0FU3A5ObbwAAAABJRU5ErkJggg==) repeat-x bottom !important;
}

/* 控制栏元素样式 */
.dplayer-bar-wrap,
.dplayer-icons {
    opacity: 1 !important;
    visibility: visible !important;
}

/* 进度条样式 */
.dplayer-bar-time {
    display: block !important;
}

/* 音量控制样式 */
.dplayer-volume {
    display: inline-block !important;
}

/* 设置按钮样式 */
.dplayer-setting {
    display: inline-block !important;
}

/* 全屏按钮样式 */
.dplayer-full {
    display: inline-block !important;
}

/* 播放按钮样式 */
.dplayer-play-icon {
    display: block !important;
}

/* 时间显示样式 */
.dplayer-time {
    display: inline-block !important;
}

/* 确保控制栏在hover时显示 */
.dplayer-controller {
    opacity: 0;
    transition: all .3s ease;
}

.dplayer:hover .dplayer-controller {
    opacity: 1;
}

/* 响应式调整 */
@media (max-width: 768px) {
    #player {
        height: 300px !important;
    }
    
    .dplayer-controller {
        padding: 0 10px !important;
    }
}

/* 播放列表样式 */
.play-box {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.box-header {
    margin-bottom: 15px;
}

.box-header h2 {
    font-size: 18px;
    margin: 0;
}

.play-list {
    position: relative;
}

.episode-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.episode-item a {
    display: block;
    padding: 8px;
    text-align: center;
    background: var(--bg-color);
    color: var(--text-color);
    border-radius: 4px;
    text-decoration: none;
    transition: all .3s;
}

.episode-item a:hover,
.episode-item a.active {
    background: var(--primary-color);
    color: #fff;
}

/* 基本信息样式 */
.basic-info {
    display: flex;
    gap: 20px;
    background: var(--card-bg);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.poster-wrap {
    width: 200px;
    flex-shrink: 0;
}

.info {
    flex: 1;
    min-width: 0;
}

/* 响应式调整 */
@media (max-width: 1200px) {
    #player {
        height: 500px;
    }
}

@media (max-width: 768px) {
    #player {
        height: 300px;
    }
}

/* 下载地址和相似推荐样式 */
.download-box,
.similar-box {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

/* 播放器容器样式 */
.player-box {
    background: #000 !important;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
    min-height: 600px; /* 添加最小高度 */
}

#player {
    width: 100% !important;
    height: 600px !important;
    background: #000;
    display: block;
    position: relative;
    z-index: 3;
}

.dplayer {
    width: 100% !important;
    height: 100% !important;
    position: relative;
    z-index: 4;
}

.dplayer-video-wrap {
    width: 100% !important;
    height: 100% !important;
    position: relative;
    z-index: 5;
}

/* 主题切换按钮样式 */
.theme-switch {
    margin-left: 20px;
}

.theme-btn {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 8px;
    font-size: 18px;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.theme-btn:hover {
    background: rgba(255,255,255,0.1);
}

/* 图标显示控制 */
[data-theme="light"] .dark-icon,
[data-theme="dark"] .light-icon {
    display: none;
}

/* 应用主题到各个元素 */
body {
    background-color: var(--bg-color);
    color: var(--text-color);
}

.header {
    background-color: var(--header-bg);
    box-shadow: var(--shadow);
}

.search-box input {
    background-color: var(--input-bg);
    color: var(--input-text);
    border-color: var(--border-color);
}

.movie-item {
    background-color: var(--card-bg);
}

.section-header h2 {
    color: var(--text-color);
}

/* 其他元素的主题适配... */

/* 移动端导航样式 */
.menu-toggle {
    display: none;
    padding: 10px;
    cursor: pointer;
    color: var(--text-color);
}

.menu-toggle .fa {
    font-size: 20px;
}

/* 响应式布局 */
@media (max-width: 768px) {
    /* 头部导航 */
    .header-wrapper {
        flex-direction: column;
        height: auto;
        padding: 10px 0;
    }
    
    .logo {
        width: 140px;
        height: 38px;
        display: flex;
        align-items: center;
    }
    
    .logo a {
        display: block;
        width: 100%;
        height: 100%;
    }
    
    .logo img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        max-width: 100%;
        max-height: 100%;
    }
    
    .menu-toggle {
        display: block;
        position: absolute;
        right: 15px;
        top: 15px;
    }
    
    .nav-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        margin: 0;
        padding: 10px 0;
        gap: 0;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu a {
        padding: 12px 15px;
        border-bottom: 1px solid var(--border-color);
    }
    
    .search-box {
        width: 100%;
        margin: 10px 0;
    }
    
    /* 影片网格 */
    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }
    
    /* 筛选条件 */
    .filter-section {
        margin-top: 60px;
    }
    
    .filter-item {
        margin-bottom: 15px;
    }
    
    .filter-item .label {
        display: block;
        margin-bottom: 10px;
    }
    
    .filter-item .values {
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
    }
    
    .filter-item .values::-webkit-scrollbar {
        display: none;
    }
    
    .filter-item .values a {
        margin: 0 5px;
        padding: 6px 12px;
    }
    
    /* 播放页面 */
    .player-box {
        min-height: auto;
    }
    
    #player {
        height: 220px !important;
    }
    
    .basic-info {
        flex-direction: column;
    }
    
    .poster-wrap {
        width: 100%;
        max-width: 200px;
        margin: 0 auto 20px;
    }
    
    .info {
        padding: 0;
    }
    
    .play-list .episode-list {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 8px;
    }
    
    .episode-item a {
        padding: 6px;
        font-size: 13px;
    }
    
    /* 分页 */
    .pagination {
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 10px;
    }
    
    .pagination::-webkit-scrollbar {
        display: none;
    }
}

/* 平板适配 */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 0 20px;
    }
    
    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
    
    #player {
        height: 400px !important;
    }
}

/* 移动端优化补充 */
@media (max-width: 768px) {
    /* 搜索框优化 */
    .search-box {
        position: relative;
        margin: 10px 15px;
    }
    
    .search-box input {
        width: 100%;
        height: 36px;
        padding: 0 35px 0 12px;
        font-size: 14px;
    }
    
    .search-box button {
        position: absolute;
        right: 0;
        top: 0;
        width: 36px;
        height: 36px;
    }

    /* 主题切换按钮位置调整 */
    .theme-switch {
        position: absolute;
        right: 60px;
        top: 15px;
    }
    
    /* 详情页优化 */
    .movie-detail {
        margin-top: 60px;
        padding: 15px;
    }
    
    .basic-info .meta span {
        display: block;
        margin: 5px 0;
    }
    
    .desc {
        font-size: 14px;
        line-height: 1.6;
    }
    
    /* 播放列表优化 */
    .play-box {
        margin: 15px 0;
    }
    
    .box-header {
        padding: 12px 15px;
    }
    
    .play-list {
        padding: 10px;
    }
    
    /* 相似推荐优化 */
    .similar-box {
        margin: 15px 0;
    }
    
    .similar-box .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    /* 底部优化 */
    .footer {
        padding: 20px 0;
        font-size: 12px;
    }
    
    .footer-links a {
        padding: 5px 8px;
    }
}

/* 平板端补充优化 */
@media (min-width: 769px) and (max-width: 1024px) {
    .similar-box .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    
    .basic-info {
        gap: 20px;
    }
    
    .poster-wrap {
        flex: 0 0 200px;
    }
}

/* 移动端错误提示样式 */
.mobile-error-tip {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 15px 25px;
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
    line-height: 1.5;
    z-index: 1000;
    animation: fadeInOut 3s ease-in-out;
}

@keyframes fadeInOut {
    0% { opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { opacity: 0; }
}

/* 移动端播放按钮样式优化 */
.play-btn {
    position: relative;
    overflow: hidden;
}

/* 添加波纹效果 */
.play-btn:active::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    animation: ripple 0.6s linear;
}

@keyframes ripple {
    to {
        transform: translate(-50%, -50%) scale(3);
        opacity: 0;
    }
}

/* 影片详情页样式 */
.movie-detail {
    padding: 20px 0;
}

.movie-detail .container {
    max-width: 90%;
    margin: 0 auto;
}

.detail-wrapper {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

/* 基本信息样式 */
.basic-info {
    display: flex;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.poster-wrap {
    flex: 0 0 300px;
    margin-right: 30px;
}

.poster {
    position: relative;
    width: 100%;
    padding-top: 140%;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.poster img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.info {
    flex: 1;
    min-width: 0;
}

.info h1 {
    font-size: 24px;
    margin: 0 0 15px;
    color: #333;
}

.score-box {
    display: inline-flex;
    align-items: baseline;
    margin-bottom: 20px;
    background: #ff9900;
    padding: 5px 15px;
    border-radius: 4px;
    color: #fff;
}

.score {
    font-size: 28px;
    font-weight: bold;
    margin-right: 4px;
}

.total {
    font-size: 14px;
}

.meta {
    margin-bottom: 20px;
    line-height: 1.8;
}

.meta span {
    display: inline-block;
    margin-right: 20px;
    color: #666;
}

.desc {
    color: #666;
    line-height: 1.8;
}

.desc h3 {
    font-size: 16px;
    color: #333;
    margin: 0 0 10px;
}

.desc p {
    margin: 0;
    text-align: justify;
}

/* 播放列表样式 */
.play-box {
    margin: 20px 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.box-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.box-header h2 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.play-list {
    padding: 20px;
}

.episode-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.episode-item {
    flex: 0 0 auto;
}

.play-btn {
    display: inline-block;
    padding: 8px 15px;
    background: #f5f5f5;
    border-radius: 4px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
}

.play-btn:hover {
    background: #e0e0e0;
}

.play-btn.active {
    background: #ff9900;
    color: #fff;
}

/* 相似推荐样式 */
.similar-box {
    margin: 20px 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 响应式布局 */
@media (max-width: 768px) {
    .basic-info {
        flex-direction: column;
        padding: 15px;
    }
    
    .poster-wrap {
        flex: none;
        width: 70%;
        max-width: 300px;
        margin: 0 auto 20px;
    }
    
    .info h1 {
        font-size: 20px;
        text-align: center;
    }
    
    .score-box {
        display: flex;
        justify-content: center;
        margin: 0 auto 20px;
    }
    
    .meta span {
        display: block;
        margin-bottom: 5px;
    }
}

/* 播放器区域样式 */
.player-box {
    background: #000;
    position: relative;
    z-index: 2;
}

#player {
    width: 100%;
    padding-bottom: 56.25%; /* 16:9比例 */
    position: relative;
}

#player > div {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
}

/* 关灯效果 - 使用主题变量 */
[data-theme="dark"] {
    --primary-color: #FF6B6B;
    --text-color: #E4E4E4;
    --bg-color: #1A1A1A;
    --card-bg: #242424;
    --border-color: #333;
    --header-bg: #242424;
    --input-bg: #333;
    --input-text: #E4E4E4;
    --shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* 详情页内容区域 */
.basic-info,
.play-box,
.similar-box {
    background: var(--card-bg);
    color: var(--text-color);
    transition: all 0.3s ease;
}

.info h1,
.box-header h2 {
    color: var(--text-color);
}

.meta span,
.desc {
    color: var(--text-color);
    opacity: 0.8;
}

/* 播放按钮样式 */
.play-btn {
    background: var(--input-bg);
    color: var(--text-color);
}

.play-btn:hover {
    background: var(--primary-color);
    color: #fff;
}

.play-btn.active {
    background: var(--primary-color);
    color: #fff;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .player-box {
        margin-top: 70px;
    }
    
    .movie-detail {
        padding-top: 0;
    }
    
    .detail-wrapper:not(:has(.player-box)) {
        margin-top: 70px;
    }
}