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

/* 添加移动端导航菜单样式 */
#mobile-menu-button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 5px;
}

#mobile-menu {
    position: relative;
    z-index: 100;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
header {
    background-color: #333;
    color: #fff;
    padding: 20px 0;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 a {
    color: #fff;
    text-decoration: none;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    padding: 5px 10px;
    transition: background-color 0.3s;
}

nav ul li a:hover,
nav ul li a.active {
    background-color: #555;
    border-radius: 5px;
}

/* 主体内容样式 */
main {
    padding: 30px 0;
}

/* 轮播图样式 */
.banner {
    aspect-ratio: 20/8; /* 设置16:9的宽高比，可根据需要调整 */
    background-color: #337ab7;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background-image: url('../images/banner.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
    min-height: 200px; /* 为小屏幕设置最小高度，避免内容显示不完整 */
    width: 100%; /* 确保宽度充满父容器 */
    overflow: hidden; /* 防止内容溢出 */
    box-shadow: 
        -5px 5px 15px rgba(0, 0, 0, 1), /* 左侧阴影 */
        5px 5px 15px rgba(0, 0, 0, 1); /* 右侧和底部阴影 */
}

.banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.banner-content {
    position: relative;
    height: 100%;
    width: 100%;
}

.banner-content h2 {
    position: absolute;
    bottom: 5.5rem; /* 距离底部20px */
    left: 1.2rem; /* 距离左侧20px */
    text-align: left; /* 文字左对齐 */
    max-width: 70%; /* 限制最大宽度，避免文字过长 */
    font-size: 1.5rem; /* 调整字体大小 */
    margin: 0; /* 移除默认边距 */
    line-height: 1.5; /* 设置行高，提高可读性 */
}

.banner-content p {
    color: #cccccc;
    position: absolute;
    bottom: 2rem;
    left: 1.2rem;
    text-align: left;
    max-width: 70%;
    font-size: 1rem;
    margin: 0;
    line-height: 1.5;
    max-height: 4rem; /* 限制最大高度为2行文本 */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* 添加轮播图幻灯片控制样式 */
.banner-slide {
    opacity: 0;
    pointer-events: none;
}

.banner-slide.active {
    opacity: 1;
    pointer-events: auto;
}

/* 为默认轮播图设置同样的样式 */
.bg-banner {
    color: #cccccc;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: left;
    max-width: 70%;
    margin: 0;
}

/* 分类导航样式 */
.category-nav {
    margin-bottom: 30px;
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.category-nav h3 {
    margin-bottom: 15px;
    font-size: 20px;
}

.category-nav ul {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
}

.category-nav ul li {
    margin-right: 15px;
    margin-bottom: 10px;
}

.category-nav ul li a {
    text-decoration: none;
    color: #337ab7;
    padding: 5px 15px;
    border-radius: 20px;
    transition: all 0.3s;
}

.category-nav ul li a:hover,
.category-nav ul li a.active {
    background-color: #337ab7;
    color: #fff;
}

/* 电影列表样式 */
.movie-section {
    margin-bottom: 40px;
}

.movie-section h3 {
    margin-bottom: 20px;
    font-size: 24px;
    color: #7182b9;
}

.movie-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.movie-item {
    background-color: #fff;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.movie-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.movie-item a {
    text-decoration: none;
    color: #333;
    display: block;
}

.movie-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.movie-item h4 {
    padding: 15px;
    font-size: 16px;
    margin-bottom: 5px;
}

.movie-info {
    padding: 0 15px 10px;
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

.movie-year,
.movie-episodes {
    padding: 0 15px 15px;
    font-size: 14px;
    color: #999;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.pagination a {
    display: inline-block;
    padding: 10px 15px;
    margin: 0 5px;
    background-color: #fff;
    color: #337ab7;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s;
}

.pagination a:hover {
    background-color: #337ab7;
    color: #fff;
}

.pagination a.active {
    background-color: #337ab7;
    color: #fff;
}

.pagination a.disabled {
    background-color: #f0f0f0;
    color: #999;
    cursor: not-allowed;
}

.pagination a.disabled:hover {
    background-color: #f0f0f0;
    color: #999;
}

/* 页脚样式 */
footer {
    background-color: #333;
    color: #fff;
    padding: 30px 0;
    text-align: center;
}

/* 剧情简介 */
.description {
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 30px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.description h3 {
    margin-bottom: 15px;
    font-size: 20px;
}

/* 无数据提示 */
.no-data {
    text-align: center;
    padding: 50px;
    color: #999;
}

/* 评论IP归属地样式 */
/* 保留一些无法用 Tailwind 直接替代的样式 */
.comment-meta {
    margin-bottom: 8px;
}

/* 评论IP样式调整 */
.comment-ip {
    font-size: 12px;
    color: #999;
    font-weight: normal;
    margin-left: 5px;
}

/* 播放器样式 */
.play-container {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.play-area {
    flex: 3;
}

.video-player {
    width: 100%;
    height: 450px;
    background-color: #000;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-player video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.info-area {
    flex: 1;
}

.episodes-list {
    margin: 20px 0;
}

.episodes-list h4 {
    margin-bottom: 10px;
}

.episodes-grid {
    /* 保持原有固定高度 */
    height: 160px; 
    /* 防止按钮在内容不足时被拉伸 */
    align-content: flex-start;
    /* 确保内容从顶部开始排列 */
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    /* 添加滚动条 */
    overflow-y: auto;
    padding-right: 5px;
}

/* 自定义滚动条样式 */
.episodes-grid::-webkit-scrollbar {
    width: 6px;
}

.episodes-grid::-webkit-scrollbar-track {
    background: #2d3748;
    border-radius: 3px;
}

.episodes-grid::-webkit-scrollbar-thumb {
    background: #4a5568;
    border-radius: 3px;
}

.episodes-grid::-webkit-scrollbar-thumb:hover {
    background: #718096;
}

.episode-item {
    height: 46px;
    min-width: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 6px 10px;
    font-size: 1rem;
    background-color: #f0f0f0;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    color: #fff;
}

.episode-item:hover,
.episode-item.active,
.episode-item.bg-primary {
    background-color: #337ab7;
    color: #fff;
}

.comments-section {
    margin-top: 30px;
}

.comment-form {
    margin-bottom: 20px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 5px;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.comment-form textarea {
    height: 100px;
    resize: vertical;
}

.comment-form button {
    padding: 10px 20px;
    background-color: #337ab7;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.comment-item {
    padding: 15px;
    margin-bottom: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

/* 视频播放器相关样式 */
.video-section {
    position: relative;
}

/* 加载指示器样式 */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 50;
}

.loader-content {
    text-align: center;
}

.loader-spinner {
    width: 64px;
    height: 64px;
    border: 4px solid #3b82f6;
    border-top: 4px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

.loader-text {
    color: white;
    font-size: 16px;
}



/* 历史提示样式 */
.history-prompt {
    background-color: rgba(15, 23, 42, 0.95);
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 50;
    min-width: 300px;
}

.prompt-text {
    color: white;
    font-size: 18px;
    margin-bottom: 16px;
}

.prompt-btn, .close-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.prompt-btn {
    background-color: #3b82f6;
    color: white;
}

.prompt-btn:hover {
    background-color: #2563eb;
}

.close-btn {
    background-color: #64748b;
    color: white;
}

.close-btn:hover {
    background-color: #475569;
}

/* 播放速率指示器 */
.rate-indicator {
    position: absolute;
    top: 16px;
    right: 16px;
    background-color: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    z-index: 40;
    font-size: 14px;
}

/* 全屏提示 */
.exit-fullscreen-hint {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    z-index: 50;
    font-size: 14px;
}

/* 短暂消息提示 */
.video-short-message {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    z-index: 50;
    font-size: 14px;
}

/* 颜色变量系统 - 添加必要的变量 */
:root {
    /* 从v目录样式中提取的关键变量 */
    --dark-bg: #0f0f1b;
    --dark-card: #18182a;
    --dark-overlay: rgba(25, 25, 40, 0.8);
    --dark-modal-bg: rgba(24, 24, 42, 0.9);
    --text-primary: #ecf0f1;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
    --border-color: rgba(100, 100, 180, 0.15);
    --border-light: rgba(120, 120, 200, 0.2);
    --shadow-sm: 0 10px 20px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 10px 25px rgba(0, 0, 0, 0.3);
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 12px;
    --spacing-lg: 16px;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --accent-color: #6d6be0;
    /* 原有变量保持不变 */
    /* ... */
}

/* 快捷键帮助样式 - 修改为与v目录一致 */
#shortcutHelp {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(25, 25, 42, 0.9);
    backdrop-filter: blur(5px);
    border-radius: var(--radius-sm);
    padding: var(--spacing-md);
    z-index: 10000;
    max-width: 380px;
    transform: translateY(100px);   /* 默认隐藏在视线外 */
    opacity: 0;
    transition: all 0.3s ease;
    border: 1px solid var(--border-light);
    pointer-events: none;
}

#shortcutHelp:not(.hidden) {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

#shortcutHelp h3 {
    font-size: 1rem;
    margin-bottom: var(--spacing-sm);
    color: #a7a9ff;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

#shortcutHelp h3 i {
    color: var(--accent-color);
}

.shortcuts-grid {
    display: grid;
    grid-template-columns: auto auto;
    gap: var(--spacing-sm);
}

.shortcut-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.key {
    background: rgba(125, 125, 125, 0.2);
    color: white;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    min-width: 30px;
    text-align: center;
    font-weight: normal;
}

.action {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* 历史提示相关样式 */
#shortcutHelp p {
    padding: var(--spacing-sm) 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}

/* 全屏模式 */
.fullscreen-mode {
    overflow: hidden;
}

.fullscreen-mode .container {
    padding: 0 !important;
    max-width: 100% !important;
}

.fullscreen-mode .video-section {
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
}

/* 全屏容器样式 */
#fullscreen-container {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: black;
}

/* 全屏模式下的控件样式 */
.fullscreen-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
    padding: 20px;
    z-index: 10000;
    box-sizing: border-box;
}

/* 确保全屏模式下的提示元素适应大屏幕 */
.fullscreen-mode .rate-indicator,
.fullscreen-mode .exit-fullscreen-hint {
    font-size: 16px !important;
    padding: 8px 16px !important;
}

/* 优化全屏模式下的视频显示 */
#fullscreen-container video {
    max-width: 100vw;
    max-height: 100vh;
}

/* ---------- 下载弹窗（Modal） ---------- */
.download-modal {
    display: none;                     /* 默认隐藏 */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s;
}

.download-modal-content {
    background-color: rgba(25, 25, 42, 0.95);
    border-radius: 8px;
    width: 90%;
    max-width: 610px;
    height: 50vh;                     /* 视口高度 50% */
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    animation: slideIn 0.3s;
}

.download-modal-header {
    padding: 12px 20px;
    background-color: rgba(30, 30, 50, 0.8);
    border-bottom: 1px solid rgba(100, 100, 120, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.download-modal-header h3 {
    margin: 0;
    font-size: 1rem;
    color: #a7a9ff;
}

.download-modal-body {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.download-frame-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.download-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.download-loader-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid #5d75ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.download-loader-text {
    font-size: 0.9rem;
    color: #a7a9ff;
}

/* 动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

/* 完整的响应式设计 */
/* 小型设备 (手机, 小于 480px) */
@media (max-width: 479px) {
    /* 在移动端隐藏轮播图指示器 */
    .banner-indicators {
        display: none !important;
    }
    
    /* 全局样式 */
    body {
        font-size: 14px;
    }
    
    /* 头部样式 */
    header {
        padding: 15px 0;
    }
    
    header .container {
        flex-direction: column;
        text-align: center;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    
    header h1 {
        font-size: 1.5rem;
        margin-bottom: 10px;
        margin-right: 40px;
    }
    
    /* 移动端菜单项样式优化 */
    /* 确保移动菜单完全适应屏幕宽度 */
    
    /* 优化搜索框样式 */
    .w-full.md\:w-80 {
        width: 100%;
    }
    
    /* 调整汉堡菜单按钮位置 */
    #mobile-menu-button {
        position: absolute;
        top: 20px;
        right: 10px;
    }
    
    /* 优化移动端导航链接样式 */
    #mobile-menu a {
        font-size: 16px;
        padding: 10px 15px;
    }
    
    nav ul {
        margin-top: 10px;
        justify-content: center;
        overflow-x: auto;
        flex-wrap: nowrap;
        width: 100%;
        padding-bottom: 5px;
    }
    
    nav ul li {
        margin: 0 5px;
    }
    
    nav ul li a {
        font-size: 13px;
        padding: 4px 8px;
    }
    
    /* 轮播图样式 */
    .banner {
        aspect-ratio: 16/9; /* 保持与桌面端相同的宽高比 */
        margin-bottom: 20px;
    }
    
    .banner-content h2 {
        bottom: 2.5rem; 
        left: 0.5rem;
        font-size: 1.2rem;
    }
    
    .banner-content p {
        bottom: 0.5rem;
        left: 0.5rem;
        font-size: 0.8rem;
        max-height: 3rem; /* 移动端调整最大高度 */
    }
    
    /* 电影列表样式 */
    .movie-section {
        margin-bottom: 25px;
    }
    
    .movie-section h3 {
        font-size: 1.2rem;
        margin-bottom: 12px;
    }
    
    .movie-list {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .movie-item {
        height: 200px;
    }
    
    .movie-item img {
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }
    
    .movie-item h4 {
        padding: 8px 10px;
        font-size: 14px;
    }
    
    .movie-info, .movie-year, .movie-episodes {
        font-size: 12px;
        padding: 0 10px 5px;
    }
    
    /* 播放页样式 */
    .video-section {
        padding: 2px !important;
        margin-bottom: 15px !important;
    }
    
    .video-player {
        height: 200px;
    }
    
    .play-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .info-area {
        order: 2;
    }
    
    /* 电影信息样式 */
    .movie-info {
        padding: 10px !important;
    }
    
    /* 修改为水平排列并调整布局 */
    .movie-info .flex {
        flex-direction: row;
        align-items: flex-start;
    }
    
    .movie-poster {
        width: 120px !important;
        flex-shrink: 0;
        display: none;
    }
    
    .movie-details h2 {
        font-size: 1.1rem !important;
        text-align: left;
    }
    
    .movie-meta p {
        font-size: 12px;
    }
    
    /* 分集列表 */
    .episodes-list {
        margin: 15px 0;
    }
    
    .episodes-grid {
        height: 140px; /* 移动端稍微降低高度 */
    }
    
    .episode-item {
        height: 28px; /* 移动端按钮高度相应减小 */
        padding: 4px 8px; /* 调整内边距 */
        font-size: 1rem; /* 调整字体大小 */
    }
    
    /* 评论区 */
    .comments-section {
        margin-top: 20px;
    }
    
    .comment-form {
        padding: 15px;
    }
    
    .comment-form input,
    .comment-form textarea {
        padding: 8px;
    }
    
    .comment-form button {
        width: 100%;
        padding: 10px;
    }
    
    /* 剧情简介 */
    .description {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .description h3 {
        font-size: 1.1rem;
    }
    
    /* 按钮区域 */
    .flex.justify-center.mb-8 {
        flex-direction: column;
        gap: 10px;
    }
    
    #downloadVideoBtn,
    #toggleShortcutHelp {
        width: 100%;
    }
    
    /* 分类页样式 */
    .category-filter {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .category-filter ul {
        justify-content: center;
    }
    
    .category-filter li a {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    /* 分页样式 */
    .pagination {
        margin-top: 20px;
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .pagination a {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    /* 快捷键帮助 */
    #shortcutHelp {
        bottom: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .shortcuts-grid {
        grid-template-columns: 1fr;
    }
    
    /* 历史提示 */
    .history-prompt {
        margin: 10px;
        min-width: auto;
        width: calc(100% - 20px);
        padding: 15px;
    }
    
    /* 下载弹窗 */
    .download-modal-content {
        width: 95%;
        height: 70vh;
    }
}

/* 中等设备 (手机横屏, 平板, 480px - 767px) */
@media (min-width: 480px) and (max-width: 767px) {
    /* 也可以在平板设备上隐藏轮播图指示器 */
    .banner-indicators {
        display: none !important;
    }
    
    /* 头部样式 */
    header .container {
        flex-direction: column;
        text-align: center;
    }
    
    header h1 {
        margin-bottom: 15px;
        margin-right: 40px;
    }
    
    /* 在中等设备上也保持相同的导航行为 */
    #mobile-menu-button {
        position: absolute;
        top: 20px;
        right: 20px;
    }
    
    nav ul {
        margin-top: 10px;
        justify-content: center;
    }
    
    /* 轮播图样式 - 保持宽高比 */
    .banner {
        aspect-ratio: 16/9;
    }
        
    /* 电影列表样式 */
    .movie-list {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    
    .movie-item {
        height: 220px;
    }
    
    .movie-item img {
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }
    
    /* 播放页样式 */
    .video-player {
        height: 280px;
    }
    
    .play-container {
        flex-direction: column;
    }
    
    /* 电影信息 */
    /* 修改为水平排列并调整布局 */
    .movie-info .flex {
        flex-direction: row;
        align-items: flex-start;
    }
    
    .movie-poster {
        flex-shrink: 0;
        width: 180px !important;
    }
    
    /* 分类页样式 */
    .movie-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 平板设备 (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    /* 电影列表样式 */
    .movie-list {
        grid-template-columns: repeat(4, 1fr);
        gap: 15px;
    }
    
    /* 播放页样式 */
    .video-player {
        height: 350px;
    }
    
    /* 电影信息 */
    .movie-info .flex {
        flex-direction: row;
    }
    
    .movie-poster {
        width: 180px !important;
    }
    
    /* 确保图片在平板上也是占满容器 */
    .movie-item img {
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }
    
    /* 轮播图样式 - 保持宽高比 */
    .banner {
        aspect-ratio: 16/9;
    }
}

/* 全局电影项文字描述样式 */
.movie-item .absolute.bottom-0.left-0.right-0 {
    background: rgba(0, 0, 0, 0.5) !important;
    background-image: none !important;
    /* 为了确保文字可读性，可以添加轻微的文字阴影 */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 1);
}

/* 增强文字可读性的补充样式 */
.movie-item h4, .movie-item p {
    color: white !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 1);
}

/* 确保移动设备上的视频播放器自适应 */
@media (max-width: 1023px) {
    /* 确保移动端容器100%宽度显示 */
    .container {
        max-width: 98% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    /* 优化移动端视频显示 */
    video {
        width: 100% !important;
        height: auto !important;
        max-height: 100vh;
        border-radius: 0 !important;
    }
    
    /* 修复播放页容器宽度 */
    .container.max-w-7xl {
        max-width: 98% !important;
    }
    
    /* 优化移动端触摸体验 */
    a, button {
        -webkit-tap-highlight-color: transparent;
    }
    
    /* 增强移动端按钮触摸区域 */
    button {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* 防止文本选中干扰交互 */
    .video-player, .banner {
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
}
