/* styles.css - 所有CSS样式 */
@import url('https://fonts.googleapis.com/css2?family=PingFang+SC:wght@300;400;500;600&display=swap');

:root {
    --color-primary: #2563eb;
    --color-primary-dark: #1e40af;
    --color-bg-main: #06090f;
    --color-bg-card: #0f172a;
    --color-bg-nav: #0d1117;
    --color-bg-nav-links: #0a0d14;
    --color-text-primary: #ffffff;
    --color-text-secondary: #94a3b8;
    --color-text-muted: #64748b;
    --color-border: rgba(148, 163, 184, 0.1);
    --color-highlight: #f59e0b;
}

* {
    font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--color-bg-main);
    color: var(--color-text-secondary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

.container-main {
    width: 1240px;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

/* 按钮样式 */
.search-btn {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: white;
    padding: 8px 20px;
    border-radius: 4px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
}

.search-btn:hover {
    background: linear-gradient(135deg, var(--color-primary-dark), #1e3a8a);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* 筛选标签样式 */
.filter-tag {
    background-color: #1e293b;
    color: var(--color-text-secondary);
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    white-space: nowrap;
    font-size: 14px;
    user-select: none;
}

.filter-tag:hover {
    background-color: #334155;
    transform: translateY(-1px);
}

.filter-tag.active {
    background: linear-gradient(135deg, var(--color-primary), #1e3a8a);
    color: white;
    border-color: var(--color-primary);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

/* ==================== 方案A：爱奇艺风格卡片优化 ==================== */
.poster-card {
    background-color: var(--color-bg-card);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--color-border);
    height: auto;
    min-height: 500px; /* 总高度500px，海报320px + 文字180px */
    display: flex;
    flex-direction: column;
    position: relative;
}

.poster-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
    border-color: rgba(37, 99, 235, 0.3);
}

/* ==================== 海报区域 - 2:3比例 ==================== */
.poster-container {
    cursor: pointer;
    position: relative;
    overflow: hidden;
    height: 320px; /* 爱奇艺风格：更高的海报区域 */
    min-height: 320px;
    width: 100%;
    flex-shrink: 0;
}

.poster-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 保持2:3比例填充 */
    background: linear-gradient(45deg, #1e293b, #334155);
    transition: transform 0.5s ease;
    display: block;
}

.poster-container:hover .poster-img {
    transform: scale(1.05);
}

/* 播放按钮 */
.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(37, 99, 235, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7);
    z-index: 3;
}

.poster-container:hover .play-button {
    opacity: 1;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(37, 99, 235, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
    }
}

/* ==================== 内容区域 - 紧凑排列 ==================== */
.poster-card > .p-4 {
    padding: 14px 16px 16px 16px; /* 紧凑内边距 */
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 180px; /* 内容区域高度 */
}

/* ==================== 文字信息 - 紧密排列 ==================== */

/* 电影标题 */
.movie-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 6px; /* 适当间距 */
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    min-height: 22px;
}

.poster-card:hover .movie-title {
    color: #60a5fa;
}

/* 电影描述 - 刚好2行，紧密排列 */
.movie-description {
    color: var(--color-text-secondary);
    font-size: 13px;
    line-height: 1.5; /* 紧凑行高 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 10px;
    flex-shrink: 0;
    min-height: 39px; /* 13px * 1.5 * 2 = 39px */
    max-height: 39px;
}

/* 基本信息标签 */
.poster-card > .p-4 > div:first-of-type {
    margin-bottom: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* 分类标签区域 */
.poster-card > .p-4 > div:nth-last-child(2) {
    margin-top: auto;
    margin-bottom: 8px;
}

/* 底部区域 */
.poster-card > .p-4 > div:last-of-type {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 6px;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
}

/* 筛选面板 */
.filter-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-panel.open {
    max-height: 700px;
}

/* 二维码样式 */
.qr-popup {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background-color: var(--color-bg-card);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
    width: 280px;
    border: 1px solid rgba(37, 99, 235, 0.2);
    transform: translateY(10px);
}

.qr-trigger:hover .qr-popup {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.qr-popup:before {
    content: '';
    position: absolute;
    top: -8px;
    right: 30px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid var(--color-bg-card);
}

.qr-code-img {
    width: 200px;
    height: 200px;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    overflow: hidden;
    margin: 0 auto;
    border: 1px solid #e5e7eb;
}

.qr-code-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 80px 0;
    color: var(--color-text-muted);
}

/* 年份和分类网格布局 */
.filter-grid-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 年份网格 - 12列布局 */
.year-grid {
    display: grid;
    grid-template-columns: repeat(12, auto);
    gap: 8px;
}

/* 分类网格 - 12列布局 */
.category-grid {
    display: grid;
    grid-template-columns: repeat(12, auto);
    gap: 8px;
}

/* 第二行需要偏移一个位置 */
.year-grid-offset,
.category-grid-offset {
    display: grid;
    grid-template-columns: repeat(11, auto);
    gap: 8px;
    margin-left: calc(100% / 12);
}

/* 确保标签宽度一致 */
.filter-tag, .category-tag {
    min-width: 72px;
    text-align: center;
}

.category-tag {
    background-color: #1e293b;
    color: var(--color-text-secondary);
    padding: 6px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    white-space: nowrap;
    min-width: 72px;
    text-align: center;
    font-size: 14px;
    user-select: none;
}

.category-tag:hover {
    background-color: #334155;
    transform: translateY(-1px);
}

.category-tag.active {
    background: linear-gradient(135deg, var(--color-primary), #1e3a8a);
    color: white;
    border-color: var(--color-primary);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

/* ==================== 评分徽章 ==================== */
.rating-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    font-weight: bold;
    font-size: 14px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    z-index: 2;
}

/* ==================== 响应式调整 ==================== */

/* 大屏幕 (≥1280px) */
@media (min-width: 1280px) {
    .poster-container {
        height: 340px;
    }
    
    .poster-card {
        min-height: 520px;
    }
}

/* 中等屏幕 (1024px-1279px) */
@media (max-width: 1279px) and (min-width: 1024px) {
    .poster-container {
        height: 300px;
    }
    
    .poster-card {
        min-height: 480px;
    }
}

/* 平板 (768px-1023px) */
@media (max-width: 1023px) and (min-width: 768px) {
    .poster-container {
        height: 260px;
    }
    
    .poster-card {
        min-height: 440px;
    }
    
    .poster-card > .p-4 {
        padding: 12px 14px 14px 14px;
    }
    
    .movie-title {
        font-size: 15px;
    }
    
    .movie-description {
        font-size: 12.5px;
        min-height: 37px;
        max-height: 37px;
    }
}

/* 手机 (≤767px) */
@media (max-width: 767px) {
    .poster-container {
        height: 220px;
    }
    
    .poster-card {
        min-height: 400px;
    }
    
    .poster-card > .p-4 {
        padding: 10px 12px 12px 12px;
        min-height: 160px;
    }
    
    .movie-title {
        font-size: 15px;
    }
    
    .movie-description {
        font-size: 12px;
        min-height: 34px;
        max-height: 34px;
    }
}

/* 小手机 (≤480px) */
@media (max-width: 480px) {
    .poster-container {
        height: 200px;
    }
    
    .poster-card {
        min-height: 380px;
    }
    
    .movie-description {
        min-height: 30px;
        max-height: 30px;
        line-height: 1.4;
    }
}

/* 回到顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.5);
}

/* 重置筛选按钮 */
.reset-filters {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 14px;
}

.reset-filters:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-1px);
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
}

.page-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #1e293b;
    color: var(--color-text-secondary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    font-size: 14px;
}

.page-btn:hover {
    background-color: #334155;
    border-color: var(--color-primary);
}

.page-btn.active {
    background: linear-gradient(135deg, var(--color-primary), #1e3a8a);
    color: white;
}

/* 通知样式 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--color-bg-card);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    border-left: 4px solid var(--color-primary);
    z-index: 1000;
    transform: translateX(120%);
    transition: transform 0.3s ease;
    max-width: 350px;
    backdrop-filter: blur(10px);
}

.notification.show {
    transform: translateX(0);
}

/* 收藏按钮 */
.favorite-btn {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(15, 23, 42, 0.8);
    color: var(--color-text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
    backdrop-filter: blur(4px);
}

.favorite-btn:hover {
    color: #fbbf24;
    background: rgba(15, 23, 42, 0.9);
}

.favorite-btn.active {
    color: #fbbf24;
}

/* 标签云效果 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-cloud .filter-tag {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 加载更多按钮 */
.load-more {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: white;
    padding: 12px 30px;
    border-radius: 25px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    margin: 30px auto;
    display: block;
    font-size: 14px;
}

.load-more:hover {
    background: linear-gradient(135deg, var(--color-primary-dark), #1e40af);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
}

.load-more:disabled {
    background: #475569;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 导航链接样式 */
.nav-link-item {
    transition: all 0.2s ease;
    position: relative;
    color: var(--color-text-secondary);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    white-space: nowrap;
}

.nav-link-item:hover {
    color: var(--color-text-primary);
    background: rgba(37, 99, 235, 0.1);
    transform: translateY(-1px);
}

.nav-link-item.active {
    color: #60a5fa;
    font-weight: 500;
    background: rgba(37, 99, 235, 0.15);
}

.nav-link-item.active:after {
    content: '';
    position: absolute;
    bottom: -9px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-dark));
    border-radius: 1px;
}

/* 图片加载动画 */
.image-loading {
    position: relative;
    overflow: hidden;
}

.image-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* 骨架屏加载效果 */
.skeleton {
    background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 6px;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-card);
}

::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* 筛选面板标题 */
.filter-title-highlight {
    color: var(--color-highlight);
    font-weight: 600;
}

/* 焦点样式 */
*:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* 打印样式 */
@media print {
    .back-to-top,
    .notification,
    .qr-popup,
    .search-btn,
    .reset-filters,
    .load-more,
    .favorite-btn,
    .play-button {
        display: none !important;
    }
    
    body {
        background-color: white;
        color: black;
    }
}

/* 新增：音效音量控制 */
.audio-control {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 999;
    background: var(--color-bg-card);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--color-border);
    transition: all 0.3s ease;
}

.audio-control:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.audio-control.muted {
    opacity: 0.6;
}

.audio-control.muted i {
    color: #ef4444;
}

/* ==================== 移除齿轮（管理入口按钮） ==================== */
/* 注释掉以下CSS规则 */
/*
.admin-link {
    position: fixed;
    bottom: 85px;
    left: 30px;
    z-index: 999;
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
    transition: all 0.3s ease;
    text-decoration: none;
}

.admin-link:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(139, 92, 246, 0.4);
}

.admin-link i {
    font-size: 18px;
}
*/



/* ==================== 网盘提示样式（优化版） ==================== */
.disk-hint {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.4), transparent);
    color: white;
    padding: 14px 16px;
    font-size: 13px;
    font-weight: 500;
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.poster-container:hover .disk-hint {
    opacity: 1;
    transform: translateY(0);
}

.disk-hint i {
    margin-right: 8px;
    font-size: 12px;
    color: #60a5fa;
    animation: pulse-icon 2s infinite;
}

/* 图标脉动动画 */
@keyframes pulse-icon {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.1);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 0.8;
    }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .disk-hint {
        padding: 10px 12px;
        font-size: 11px;
    }
    
    .disk-hint i {
        font-size: 10px;
        margin-right: 6px;
    }
}