/* ===============================================
   Search Page Styles - Speedkitx.com
   =============================================== */

/* Search Hero Section - Modern Fashion Design */
.search-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    color: white;
    padding: 5rem 0 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* 动态背景装饰 */
.search-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(102, 126, 234, 0.3) 0%, transparent 50%);
    animation: heroFloat 15s ease-in-out infinite;
}

@keyframes heroFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(5deg); }
    66% { transform: translate(-20px, 20px) rotate(-5deg); }
}

/* 时尚几何装饰元素 */
.search-hero::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 100px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 100" preserveAspectRatio="none"><path fill="%23f8f9fa" d="M0,50 Q360,0 720,50 T1440,50 L1440,100 L0,100 Z"></path></svg>');
    background-size: cover;
    z-index: 2;
}

.search-hero .container {
    position: relative;
    z-index: 3;
}

/* H1 - Search Title - Modern Typography */
.search-hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2),
                 0 0 40px rgba(255, 255, 255, 0.3);
    letter-spacing: -1px;
    position: relative;
    display: inline-block;
}

/* 时尚标题装饰 */
.search-hero h1::before {
    content: '🔍';
    position: absolute;
    left: -60px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.5rem;
    opacity: 0.8;
    animation: searchPulse 2s ease-in-out infinite;
}

@keyframes searchPulse {
    0%, 100% { transform: translateY(-50%) scale(1); opacity: 0.8; }
    50% { transform: translateY(-50%) scale(1.15); opacity: 1; }
}

/* Query Highlight in Title */
.search-query-highlight {
    color: #FFD700;
    font-weight: 800;
    text-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

/* Intro Text (50-70 words) - Fashion Design */
.search-hero p {
    font-size: 1.15rem;
    line-height: 1.9;
    opacity: 0.95;
    max-width: 800px;
    margin: 0 auto;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    font-weight: 400;
    padding: 0 2rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 1.5rem 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* ===============================================
   Search Page Main Container
   =============================================== */

.search-page {
    padding: 3rem 0 4rem;
    background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 50%, #f5f7fa 100%);
    min-height: 60vh;
}

/* ===============================================
   Search Box Container - Fashion Glassmorphism
   =============================================== */

.search-box-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 2.5rem;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.15),
                0 0 0 1px rgba(255, 255, 255, 0.5);
    margin-bottom: 2.5rem;
    border: 1px solid rgba(102, 126, 234, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* 渐变边框效果 */
.search-box-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 24px;
    padding: 2px;
    background: linear-gradient(135deg, #667eea, #764ba2, #f093fb);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s;
}

.search-box-container:hover {
    box-shadow: 0 25px 70px rgba(102, 126, 234, 0.25),
                0 0 0 1px rgba(255, 255, 255, 0.8);
    transform: translateY(-5px);
}

.search-box-container:hover::before {
    opacity: 1;
}

/* Search Input Wrapper - Modern Style */
.search-input-wrapper {
    display: flex;
    gap: 1rem;
    max-width: 700px;
    margin: 0 auto;
    align-items: center;
    position: relative;
}

.search-input-wrapper input {
    flex: 1;
    padding: 1.2rem 1.8rem 1.2rem 3.5rem;
    border: 2px solid transparent;
    border-radius: 50px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, #667eea, #764ba2) border-box;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

/* 搜索图标 */
.search-input-wrapper::before {
    content: '🔍';
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.3rem;
    opacity: 0.5;
    z-index: 1;
    pointer-events: none;
}

.search-input-wrapper input:focus {
    outline: none;
    border-color: transparent;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, #667eea, #f093fb) border-box;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2),
                0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.search-input-wrapper input::placeholder {
    color: #adb5bd;
}

/* Search Button - Fashion Gradient */
.search-btn {
    padding: 1.2rem 2.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: 200% 200%;
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.35);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
}

/* 按钮光效 */
.search-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.search-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.5);
    background-position: 100% 0;
}

.search-btn:hover::before {
    width: 300px;
    height: 300px;
}

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

/* ===============================================
   Search Title (替代原 Category Filter Chips)
   =============================================== */

.search-filters {
    text-align: center;
    margin-top: 2rem;
}

.search-filters h2 {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    padding: 0.5rem 0;
}

/* 搜索查询文本高亮 */
.search-query-text {
    color: #667eea;
    font-weight: 800;
    position: relative;
    background: none;
    -webkit-text-fill-color: #667eea;
}

.search-query-text::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to right, #667eea, #764ba2);
    border-radius: 2px;
}

/* 搜索结果数量 */
.search-count {
    color: #764ba2;
    font-weight: 700;
    font-size: 1.1rem;
    margin-left: 0.5rem;
}

/* ===============================================
   Optional Explanation Block
   =============================================== */

.search-explanation {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.08) 100%);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    border-left: 4px solid #667eea;
}

.search-explanation h3 {
    font-size: 1.3rem;
    color: #667eea;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.search-explanation p {
    color: #555;
    line-height: 1.8;
    font-size: 1.05rem;
}

/* ===============================================
   Search Results Header
   =============================================== */

.search-results-header {
    text-align: center;
    margin: 2.5rem 0 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.search-results-header h2 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.search-results-header p {
    font-size: 1.1rem;
    color: #666;
}

.results-count {
    color: #667eea;
    font-weight: 700;
}

/* ===============================================
   Result List - Game Cards
   =============================================== */

.search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Enhanced Game Card for Search Results */
.search-game-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 2px solid transparent;
}

.search-game-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 28px rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.3);
}

.search-game-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.search-game-card-content {
    padding: 1.5rem;
}

/* Game Name */
.search-game-card-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
}

/* Short Description */
.search-game-card-description {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Category Tag */
.search-game-card-category {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 20px;
    font-size: 0.85rem;
    color: #667eea;
    margin-bottom: 1rem;
    font-weight: 500;
}

/* View Details Button */
.search-game-card-btn {
    display: block;
    width: 100%;
    padding: 0.8rem 1.2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.search-game-card-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.35);
    background: linear-gradient(135deg, #5568d3 0%, #6a3d8f 100%);
}

/* ===============================================
   Empty State / No Results
   =============================================== */

.no-results {
    text-align: center;
    padding: 5rem 2rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    margin: 2rem 0;
}

.no-results-icon {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    opacity: 0.3;
}

.no-results h2 {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 1rem;
    font-weight: 700;
}

.no-results p {
    color: #666;
    font-size: 1.15rem;
    line-height: 1.8;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.no-results-suggestions {
    margin-top: 2rem;
}

.no-results-suggestions h3 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 1rem;
    font-weight: 600;
}

.no-results-suggestions ul {
    list-style: none;
    padding: 0;
}

.no-results-suggestions li {
    color: #666;
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}

.no-results a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}

.no-results a:hover {
    border-bottom-color: #667eea;
    color: #5568d3;
}

/* ===============================================
   Disclaimer Section
   =============================================== */

.search-disclaimer {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 152, 0, 0.1) 100%);
    padding: 2rem;
    border-radius: 12px;
    border-left: 4px solid #ffc107;
    margin-top: 3rem;
}

.search-disclaimer h3 {
    font-size: 1.2rem;
    color: #f57c00;
    margin-bottom: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-disclaimer h3::before {
    content: '⚠';
    font-size: 1.5rem;
}

.search-disclaimer p {
    color: #666;
    line-height: 1.7;
    font-size: 1rem;
}

/* Search Page Disclaimer (Footer 上方) */
.search-page-disclaimer {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    padding: 1.5rem 0;
    text-align: center;
    border-top: 1px solid rgba(102, 126, 234, 0.1);
    margin-top: 3rem;
}

.search-page-disclaimer p {
    color: #666;
    font-size: 0.95rem;
    margin: 0;
    font-style: italic;
}

/* ===============================================
   Loading State
   =============================================== */

.search-loading {
    text-align: center;
    padding: 4rem 2rem;
}

.search-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.search-loading p {
    color: #666;
    font-size: 1.1rem;
}

/* ===============================================
   Load More Button (浏览更多按钮)
   =============================================== */

.load-more-container {
    text-align: center;
    margin: 3rem 0;
}

.load-more-btn {
    padding: 1.2rem 3rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: 200% 200%;
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.35);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
}

.load-more-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.load-more-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.5);
    background-position: 100% 0;
}

.load-more-btn:hover::before {
    width: 300px;
    height: 300px;
}

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

/* ===============================================
   Responsive Design
   =============================================== */

@media (max-width: 768px) {
    .search-hero h1 {
        font-size: 2rem;
    }

    .search-hero h1::before {
        display: none; /* 移动端隐藏搜索图标 */
    }

    .search-hero p {
        font-size: 1rem;
        padding: 1.2rem 1.5rem;
    }

    .search-box-container {
        padding: 1.5rem;
    }

    .search-input-wrapper {
        flex-direction: column;
    }

    .search-input-wrapper::before {
        display: none; /* 移动端隐藏图标 */
    }

    .search-input-wrapper input {
        padding: 1.1rem 1.8rem; /* 移除左侧内边距 */
    }

    .search-btn {
        width: 100%;
    }

    .search-filters h2 {
        font-size: 1.5rem;
    }

    .search-results-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .search-results-header h2 {
        font-size: 1.5rem;
    }

    .load-more-btn {
        width: 100%;
        padding: 1.1rem 2rem;
    }

    .no-results {
        padding: 3rem 1.5rem;
    }

    .no-results h2 {
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    .search-hero {
        padding: 3rem 0 2rem;
    }

    .search-hero h1 {
        font-size: 1.8rem;
    }

    .search-page {
        padding: 2rem 0 3rem;
    }

    .search-box-container {
        padding: 1.2rem;
    }

    .search-input-wrapper input {
        font-size: 1rem;
        padding: 1rem 1.5rem;
    }

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

    .no-results-icon {
        font-size: 3.5rem;
    }
}
