/* 电影网站通用样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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: #1a1a1a;
    color: white;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #ff6b35;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    background-color: #ff6b35;
}

/* 搜索框 */
.search-box {
    display: flex;
    align-items: center;
}

.search-input {
    padding: 8px 15px;
    border: none;
    border-radius: 20px 0 0 20px;
    width: 250px;
    outline: none;
}

.search-btn {
    padding: 8px 15px;
    background: #ff6b35;
    color: white;
    border: none;
    border-radius: 0 20px 20px 0;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-btn:hover {
    background: #e55a2b;
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

/* 主要内容区域 */
.main-content {
    min-height: calc(100vh - 200px);
    padding: 30px 0;
}

/* 页面标题 */
.page-title {
    text-align: center;
    margin-bottom: 40px;
    color: #333;
    font-size: 32px;
    font-weight: bold;
}

/* 电影网格布局 */
.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.movie-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.movie-poster {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
}

.movie-info {
    padding: 15px;
}

.movie-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
    text-decoration: none;
    display: block;
    line-height: 1.4;
}

.movie-title:hover {
    color: #ff6b35;
}

.movie-meta {
    font-size: 13px;
    color: #666;
    margin-bottom: 5px;
}

.movie-rating {
    background: #ff6b35;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    display: inline-block;
    margin-top: 8px;
}

/* 分类标签 */
.category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: center;
}

.category-tag {
    background: white;
    color: #333;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    border: 2px solid #ddd;
    transition: all 0.3s;
    font-size: 14px;
}

.category-tag:hover,
.category-tag.active {
    background: #ff6b35;
    color: white;
    border-color: #ff6b35;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
}

.pagination a,
.pagination span {
    padding: 10px 15px;
    background: white;
    color: #333;
    text-decoration: none;
    border-radius: 5px;
    border: 1px solid #ddd;
    transition: all 0.3s;
}

.pagination a:hover,
.pagination .current {
    background: #ff6b35;
    color: white;
    border-color: #ff6b35;
}

/* 底部 */
.footer {
    background: #1a1a1a;
    color: white;
    text-align: center;
    padding: 30px 0;
    margin-top: 50px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #ff6b35;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #1a1a1a;
        flex-direction: column;
        padding: 20px;
        gap: 10px;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .nav-container {
        flex-wrap: wrap;
    }
    
    .search-box {
        order: 3;
        width: 100%;
        margin-top: 15px;
    }
    
    .search-input {
        width: calc(100% - 60px);
    }
    
    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .movie-poster {
        height: 220px;
    }
    
    .movie-info {
        padding: 10px;
    }
    
    .movie-title {
        font-size: 14px;
    }
    
    .category-tags {
        gap: 8px;
    }
    
    .category-tag {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 15px;
    }
    
    .container {
        padding: 0 15px;
    }

    .filter-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .filter-label {
        min-width: auto;
    }

    .filter-options {
        gap: 6px;
    }

    .filter-option {
        padding: 3px 8px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .movie-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .search-input {
        width: calc(100% - 50px);
        font-size: 14px;
    }
    
    .page-title {
        font-size: 24px;
    }
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 50px;
    color: #666;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ff6b35;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 搜索建议样式 */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 60px;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
}

.suggestion-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.3s;
}

.suggestion-item:hover {
    background-color: #f8f9fa;
}

.suggestion-item:last-child {
    border-bottom: none;
}

/* 筛选器样式增强 */
.filter-section {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.filter-row {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-row:last-child {
    margin-bottom: 0;
}

.filter-label {
    font-weight: bold;
    color: #333;
    min-width: 60px;
    font-size: 14px;
}

.filter-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-option {
    padding: 4px 12px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 15px;
    text-decoration: none;
    color: #495057;
    font-size: 13px;
    transition: all 0.3s;
}

.filter-option:hover,
.filter-option.active {
    background: #ff6b35;
    color: white;
    border-color: #ff6b35;
}

.filter-group {
    margin-bottom: 25px;
}

.filter-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #ff6b35;
    display: inline-block;
}

/* 面包屑导航 */
.breadcrumb {
    background: white;
    padding: 15px 0;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb-item a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb-item a:hover {
    color: #ff6b35;
}

.breadcrumb-item:not(:last-child)::after {
    content: '>';
    color: #999;
    font-size: 12px;
}

.breadcrumb-item:last-child {
    color: #333;
    font-weight: 500;
}
