/* 搜索结果页面样式 */
.search-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
}

.search-header {
    margin-bottom: 20px;
}

/* 全局搜索区域 */
.global-search {
    background: #f5f5f5;
    padding: 20px 0;
    border-bottom: 1px solid #e0e0e0;
}

.search-input-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.search-input-wrapper {
    display: flex;
    width: 100%;
}

.search-input-wrapper input[type="text"] {
    flex: 1;
    padding: 12px 15px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px 0 0 4px;
    border-right: none;
}

.search-button {
    padding: 12px 25px;
    background-color: #01b4e4;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-weight: bold;
}

.search-button:hover {
    background-color: #019fcb;
}

.search-content {
    display: flex;
    gap: 30px;
}

/* 左侧筛选区域 */
.filter-sidebar {
    width: 260px;
    flex-shrink: 0;
}

.filter-section {
    margin-bottom: 25px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
}

.filter-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    color: #333;
}

.result-types {
    list-style: none;
    padding: 0;
    margin: 0;
}

.result-types li {
    margin-bottom: 10px;
}

.result-types a {
    color: #333;
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
}

.result-types a.active {
    color: #01b4e4;
    font-weight: bold;
}

.result-types a:hover {
    color: #01b4e4;
}

.result-types span {
    color: #777;
}

.filter-group {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.year-range {
    display: flex;
    align-items: center;
    gap: 10px;
}

.year-range select {
    flex: 1;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.search-tips {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
}

.search-tips p {
    margin-bottom: 10px;
    font-size: 14px;
}

.search-tips ul {
    padding-left: 20px;
    font-size: 14px;
}

/* 右侧搜索结果 */
.search-results {
    flex: 1;
    width: 100%;
    min-width: 870px; /* 添加最小宽度 */
}

.search-results h2 {
    margin-top: 0;
    margin-bottom: 5px;
    font-size: 22px;
}

.result-count {
    color: #666;
    margin-bottom: 20px;
}

.result-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%; /* 确保结果列表占满容器宽度 */
}

.result-item {
    display: flex;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
    width: 100%; /* 确保每个结果项占满容器宽度 */
    margin-bottom: 10px;
}

.result-item:hover {
    transform: translateY(-3px);
}

.result-poster {
    width: 150px;
    min-width: 150px;
    height: 225px;
}

.result-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.result-info {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.result-title {
    margin: 0;
    font-size: 20px;
}

.result-title a {
    color: #000;
    text-decoration: none;
}

.result-title a:hover {
    color: #01b4e4;
}

.result-rating {
    background: #01b4e4;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: bold;
}

.result-meta {
    margin-bottom: 12px;
    color: #666;
    font-size: 14px;
}

.result-meta span {
    margin-right: 15px;
}

.result-description {
    margin-bottom: 12px;
    line-height: 1.5;
    color: #333;
    flex-grow: 1;
    min-height: 40px; /* 添加最小高度 */
    width: 100%; /* 确保宽度占满父容器 */
}

.result-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background: #f0f0f0;
    color: #555;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.no-results {
    display: flex;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
    width: 100%; /* 确保每个结果项占满容器宽度 */
}

/* 分页控件 */
.pagination {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 8px;
}

@media (max-width: 900px) {
    .search-content {
        flex-direction: column;
    }
    
    .filter-sidebar {
        width: 100%;
    }
    
    .search-results {
        width: 100%;
        min-width: 100%; /* 在小屏幕下确保占满宽度 */
    }
}

@media (max-width: 600px) {
    .result-item {
        flex-direction: column;
    }
    
    .result-poster {
        width: 100%;
        height: 200px;
    }
    
    .result-info {
        width: 100%; /* 确保在小屏幕上信息区域占满宽度 */
    }

    .search-results {
        min-width: auto; /* 在更小的屏幕下自适应 */
    }
    
    .result-description {
        min-height: 30px; /* 较小屏幕下减小最小高度 */
    }
}

/* 添加额外的响应式布局支持 */
@media (max-width: 480px) {
    .search-page {
        padding: 10px;
    }
    
    .result-header {
        flex-direction: column;
    }
    
    .result-rating {
        margin-top: 8px;
    }
}

.search-content {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.search-page {
    margin-bottom: 40px; /* 添加底部边距，防止内容和 footer 重叠 */
}