/* ==================== 搜索页面样式 ==================== */

.search-page-container {
    min-height: 100vh;
    padding-top: 70px;
    background: linear-gradient(135deg, #0a0a12 0%, #1a1a2e 100%);
}

/* ==================== 搜索头部区域 ==================== */
.search-header-section {
    background: linear-gradient(135deg, rgba(229, 9, 29, 0.1) 0%, rgba(26, 26, 46, 0) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 2rem 1rem;
    margin-bottom: 2rem;
}

.search-box-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.search-page-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: #ffffff;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(229, 9, 29, 0.5);
}

.search-page-title svg {
    color: var(--primary-color);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

/* 主搜索框 */
.main-search-box {
    display: flex;
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.main-search-box input {
    flex: 1;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    color: #ffffff;
    font-size: 1.1rem;
    outline: none;
    transition: all 0.3s;
}

.main-search-box input:focus {
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 4px rgba(229, 9, 29, 0.2), 0 4px 20px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

.main-search-box input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--hover-color) 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(229, 9, 29, 0.4);
    white-space: nowrap;
}

.search-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(229, 9, 29, 0.6);
    animation: buttonGlow 1.5s ease-in-out infinite;
}

.search-btn:active {
    transform: translateY(-1px);
}

@keyframes buttonGlow {
    0%, 100% { box-shadow: 0 4px 15px rgba(229, 9, 29, 0.4); }
    50% { box-shadow: 0 4px 25px rgba(229, 9, 29, 0.8); }
}


/* 搜索统计信息 */
.search-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.stats-query {
    font-weight: 600;
    color: var(--primary-color);
}

.stats-divider {
    color: rgba(255, 255, 255, 0.3);
}


/* ==================== 搜索结果区域 ==================== */
.search-results-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem 4rem 3rem;
    min-height: 400px;
}

/* 加载状态 */
.loading-state {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-spinner p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
    animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* 空状态 */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    gap: 1.5rem;
    text-align: center;
}

.empty-state svg {
    color: rgba(255, 255, 255, 0.2);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.empty-state h3 {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 600;
}

.empty-state p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 1rem;
}

/* 错误状态 */
.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    gap: 1.5rem;
    text-align: center;
}

.error-state svg {
    color: rgba(229, 9, 29, 0.5);
}

.error-state h3 {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 600;
}

.error-state p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 1rem;
}

.retry-btn {
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--hover-color) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.retry-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(229, 9, 29, 0.4);
}

/* 搜索结果网格 */
.search-results-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* 搜索卡片 */
.search-card {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.5);
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.08);
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 40px rgba(229, 9, 29, 0.3);
    border-color: rgba(229, 9, 29, 0.3);
}

.search-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 2/3;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
}

.search-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.search-card:hover .search-card-image img {
    transform: scale(1.1);
}

.search-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.8) 100%);
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    align-items: flex-end;
    padding: 1rem;
}

.search-card:hover .search-card-overlay {
    opacity: 1;
}

.play-button {
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--hover-color) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transform: translateY(10px);
    transition: all 0.3s;
}

.search-card:hover .play-button {
    transform: translateY(0);
}

.play-button:hover {
    background: linear-gradient(135deg, var(--hover-color) 0%, #ff6b7a 100%);
    transform: translateY(-2px);
}

.search-card-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.4rem 0.75rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--hover-color) 100%);
    color: white;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(229, 9, 29, 0.4);
}

.search-card-type-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.4rem 0.75rem;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    color: white;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.search-card-info {
    padding: 1rem;
}

.search-card-title {
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
    min-height: 2.8em;
}

.search-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.search-card-rating {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: #ffc107;
    font-size: 0.85rem;
    font-weight: 600;
}

.search-card-rating svg {
    fill: currentColor;
}

.search-card-year {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
}

.search-card-vote-count {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.75rem;
    margin-top: 0.5rem;
}

/* 分页控件 */
.search-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.pagination-btn:not(:disabled):hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    transform: translateY(-2px);
    border-color: rgba(229, 9, 29, 0.3);
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-btn svg {
    transition: transform 0.3s;
}

.pagination-btn.prev:hover svg {
    transform: translateX(-3px);
}

.pagination-btn.next:hover svg {
    transform: translateX(3px);
}

.page-numbers {
    display: flex;
    gap: 0.5rem;
}

.page-number {
    min-width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.page-number:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    transform: translateY(-2px);
}

.page-number.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--hover-color) 100%);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 2px 10px rgba(229, 9, 29, 0.4);
}

.page-number.ellipsis {
    background: transparent;
    border: none;
    cursor: default;
    color: rgba(255, 255, 255, 0.3);
}

.page-number.ellipsis:hover {
    background: transparent;
    transform: none;
}

/* ==================== 响应式设计 ==================== */

/* 桌面端 (1400px) */
@media (max-width: 1400px) {
    .search-results-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 平板端 (992px) */
@media (max-width: 992px) {
    .search-page-container {
        min-height: 100vh;
        padding-top: 64px;
    }

    .search-results-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .main-search-box {
        flex-direction: column;
    }

    .search-btn {
        justify-content: center;
    }
}

/* 平板端 (768px) */
@media (max-width: 768px) {
    .search-header-section {
        padding: 1.5rem 1rem;
    }

    .search-box-wrapper {
        gap: 1.25rem;
    }

    .search-page-title {
        font-size: 1.5rem;
    }

    .search-page-title svg {
        width: 24px;
        height: 24px;
    }

    .main-search-box input {
        padding: 0.875rem 1.25rem;
        font-size: 1rem;
    }

    .search-btn {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }

    .search-results-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .search-pagination {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .pagination-btn {
        padding: 0.625rem 1rem;
        font-size: 0.9rem;
    }

    .page-number {
        min-width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
}

/* 移动端 (480px) */
@media (max-width: 480px) {
    .search-page-container {
        min-height: 100vh;
        padding-top: 60px;
    }

    .search-header-section {
        padding: 1.25rem 0.75rem;
    }

    .search-page-title {
        font-size: 1.25rem;
        gap: 0.5rem;
    }

    .search-page-title svg {
        width: 20px;
        height: 20px;
    }

    .main-search-box input {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }

    .search-btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }

    .search-btn span {
        display: none;
    }

    .search-btn svg {
        margin: 0;
    }


    .search-stats {
        font-size: 0.8rem;
        gap: 0.5rem;
    }

    .search-results-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .search-card {
        border-radius: 12px;
    }

    .search-card-title {
        font-size: 0.85rem;
        line-height: 1.3;
        min-height: 2.2em;
    }

    .search-card-info {
        padding: 0.75rem;
    }

    .search-card-meta {
        gap: 0.5rem;
    }

    .search-card-rating {
        font-size: 0.8rem;
    }

    .search-card-badge {
        font-size: 0.65rem;
        padding: 0.3rem 0.6rem;
        top: 0.5rem;
        right: 0.5rem;
    }

    .search-card-type-badge {
        font-size: 0.65rem;
        padding: 0.3rem 0.6rem;
        top: 0.5rem;
        left: 0.5rem;
    }

    .search-pagination {
        gap: 0.5rem;
        padding-top: 1.5rem;
    }

    .pagination-btn {
        padding: 0.5rem 0.875rem;
        font-size: 0.85rem;
        gap: 0.4rem;
    }

    .pagination-btn span {
        display: none;
    }

    .page-number {
        min-width: 36px;
        height: 36px;
        font-size: 0.85rem;
        border-radius: 10px;
    }
}

/* 小屏手机 (360px) */
@media (max-width: 360px) {
    .search-page-title {
        font-size: 1.1rem;
    }

    .main-search-box input {
        padding: 0.625rem 0.875rem;
        font-size: 0.9rem;
    }

    .search-btn {
        padding: 0.625rem 1.25rem;
    }

    .search-results-grid {
        gap: 0.625rem;
    }

    .search-card-title {
        font-size: 0.8rem;
    }
}
