/* 视图模式切换开关 */
.view-mode-toggle {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin: 10px 0;
    gap: 10px;
}

.view-mode-toggle span {
    font-size: 14px;
    color: #333;
}

/* 滑动开关样式 */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: #2196F3;
}

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

/* 圆形滑块 */
.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.slider-text {
    position: absolute;
    font-size: 12px;
    color: white;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.slider-text.left {
    left: 8px;
}

.slider-text.right {
    right: 8px;
}

@media (max-width: 480px) {
    .slider-text {
        font-size: 10px;
    }
}

/* 电影网格容器样式 */
.movie-grid-container {
    max-width: 1200px;
    margin: 5px auto;
    padding: 0 5px;
}

/* 分页容器样式 */
.pagination-container {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.pagination {
    display: flex;
    gap: 5px;
    align-items: center;
}

.page-numbers {
    display: flex;
    gap: 5px;
}

.page-btn {
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    background-color: #fff;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    color: #333;
    min-width: 36px;
    text-align: center;
}

.page-btn:hover {
    background-color: #f5f5f5;
    border-color: #d0d0d0;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f8f8f8;
}

.page-numbers {
    font-size: 14px;
    color: #333;
    padding: 8px 12px;
    min-width: 60px;
    text-align: center;
}

.pagination {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
}

.pagination-container {
    margin: 20px 0;
    padding: 10px 0;
}

.page-info {
    color: #666;
    font-size: 14px;
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 3px;
}

/* 电影卡片样式 */
.movie-card.is-movie {
    border-left: 2px solid #0066ff;
}

/* 电视剧卡片样式 */
.movie-card.is-tv {
    border-left: 2px solid #ff0000;
}

/* 动漫卡片样式 */
.movie-card.is-anime {
    border-left: 2px solid #ffff00;
}

/* 动漫剧卡片样式 */
.movie-card.is-anime-drama {
    border-left: 2px solid #00ff00;
}

.movie-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    position: relative;
    z-index: 10;
    border-left: 2px solid transparent;
}

.movie-card:hover {
    transform: translateY(-5px);
}

.movie-poster {
    width: 100%;
    height: 0;
    padding-bottom: 150%;
    position: relative;
    overflow: hidden;
}

.movie-poster img {
    position: absolute;
    width: 100%;
    object-fit: cover;
}




/* 电影信息覆盖层 */
.movie-meta-overlay {
    position: absolute;
    top: 1px;
    right: 1px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    z-index: 100;
}

.meta-item {
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 5px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: bold;
    text-shadow: 0 1px 1px rgba(0,0,0,0.5);
}

.meta-item-quality {
    background-color: #ff0000 !important;
}

.meta-item-year {
    background-color: #00bb06 !important;
}

.meta-item-rating {
    background-color: #000000 !important;
}

.meta-item-type {
    background-color: #ff9900 !important;
}

.meta-item-country {
    background-color: #0077ff !important;
}

.meta-item-audio {
    background-color: #9900ff !important;
}

.meta-item-update {
    background-color: rgba(82, 82, 82, 0.7)important;
}

/* 信息覆盖层 */
.movie-info-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    z-index: 100;
    padding: 3px;
    border-radius: 0 0 5px 5px;
}

.meta-item {
    font-size: 10px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    padding: 2px 4px;
    margin: 0;
}

/* 响应式调整 */
@media (min-width: 1200px) {
    .meta-item {
        font-size: 12px;
        padding: 3px 6px;
    }
}

@media (max-width: 768px) {
    .movie-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .meta-item {
        font-size: 8px;
        padding: 1px 2px;
    }
}

@media (max-width: 480px) {
    .meta-item {
        font-size: 7px;
    }
    
    .view-mode-toggle {
        gap: 5px;
    }
    .view-mode-toggle span {
        font-size: 12px;
    }
    .switch {
        width: 40px;
        height: 24px;
    }
    .slider:before {
        height: 18px;
        width: 18px;
    }
    input:checked + .slider:before {
        transform: translateX(16px);
    }
    
    .slide-panel {
        width: 180px;
        height: 140px;
    }
    
    .movie-title {
        font-size: 11px;
    }
}

.movie-info {
    padding: 3px;
}

.movie-title {
    margin: 0 0 0 0;
    font-size: 15px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 响应式调整 */
@media (min-width: 1200px) {
    .movie-title {
        font-size: 18px;
    }
}

@media (max-width: 768px) {
    .movie-title {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .movie-title {
        font-size: 11px;
    }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .movie-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}