/* 影视播放页特有样式 */
@import url('../res/design/index.css');

.container {
    max-width: 900px;
    display: block;
}

/* 电影网格 */
.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

/* 电影卡片 */
.movie-card {
    background: var(--theme-glass-bg);
    backdrop-filter: blur(var(--theme-glass-blur)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--theme-glass-blur)) saturate(180%);
    border: 1px solid var(--theme-glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1),
                box-shadow 0.3s cubic-bezier(0.2, 0, 0, 1);
    box-shadow: 0 8px 32px var(--theme-glass-shadow),
                inset 0 1px 2px rgba(255, 255, 255, 0.5);
    animation: card-enter 0.5s cubic-bezier(0.2, 0, 0, 1) backwards;
}

.movie-card:nth-child(1) { animation-delay: 0.05s; }
.movie-card:nth-child(2) { animation-delay: 0.1s; }
.movie-card:nth-child(3) { animation-delay: 0.15s; }
.movie-card:nth-child(4) { animation-delay: 0.2s; }
.movie-card:nth-child(5) { animation-delay: 0.25s; }
.movie-card:nth-child(6) { animation-delay: 0.3s; }

.movie-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(100, 100, 120, 0.2),
                inset 0 1px 2px rgba(255, 255, 255, 0.5);
}

.movie-poster {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    background: linear-gradient(135deg, rgba(90, 107, 122, 0.1), rgba(139, 123, 139, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--theme-text-secondary);
    font-size: 3rem;
    position: relative;
    overflow: hidden;
}

.movie-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.movie-card:hover .movie-poster img {
    transform: scale(1.05);
}

.movie-poster .play-icon {
    position: absolute;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
}

.movie-card:hover .play-icon {
    opacity: 1;
    transform: scale(1);
}

.play-icon svg {
    width: 28px;
    height: 28px;
    fill: var(--theme-primary);
    margin-left: 3px;
}

.movie-info {
    padding: 16px 20px 20px;
}

.movie-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--theme-text);
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.movie-meta {
    font-size: 0.85rem;
    color: var(--theme-text-secondary);
    display: flex;
    gap: 12px;
}

.movie-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* 播放器区域 */
.player-section {
    margin-bottom: 32px;
}

.player-wrapper {
    background: var(--theme-glass-bg);
    backdrop-filter: blur(var(--theme-glass-blur)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--theme-glass-blur)) saturate(180%);
    border: 1px solid var(--theme-glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 8px 32px var(--theme-glass-shadow),
                inset 0 1px 2px rgba(255, 255, 255, 0.5);
}

.player-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(90, 107, 122, 0.1);
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    color: var(--theme-text);
    cursor: pointer;
    transition: all 0.2s ease;
}

.back-btn:hover {
    background: rgba(90, 107, 122, 0.2);
}

.back-btn svg {
    width: 18px;
    height: 18px;
}

.player-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--theme-text);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-container {
    position: relative;
    width: 100%;
    background: #000;
    aspect-ratio: 16/9;
}

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

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--theme-text-secondary);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 1.1rem;
}

/* 响应式 */
@media (max-width: 600px) {
    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }
    
    .movie-card {
        border-radius: var(--radius-lg);
    }
    
    .movie-info {
        padding: 12px 14px 14px;
    }
    
    .movie-title {
        font-size: 0.95rem;
    }
    
    .movie-meta {
        font-size: 0.75rem;
    }
    
    .player-header {
        padding: 12px 16px;
    }
    
    .back-btn {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    .player-title {
        font-size: 1rem;
    }
}

/* 减少动画 */
@media (prefers-reduced-motion: reduce) {
    .movie-card {
        animation: none;
    }
    
    .movie-card:hover {
        transform: none;
    }
}