/* 搜索结果页面样式 */

/* 面包屑导航 */
.breadcrumb {
    background: #f9f9f9;
    padding: 15px 0;
    margin-bottom: 30px;
}

.breadcrumb ol {
    display: flex;
    gap: 10px;
    list-style: none;
}

.breadcrumb li:not(:last-child)::after {
    content: ">";
    margin-left: 10px;
    color: #999;
}

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

.breadcrumb a:hover {
    color: #0066cc;
}

/* 搜索结果头部 */
.search-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #0066cc;
}

.search-info h1 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 10px;
}

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

.result-count {
    color: #0066cc;
    font-weight: bold;
}

.search-term {
    color: #0066cc;
    font-weight: bold;
}

.search-filters {
    display: flex;
    gap: 20px;
    align-items: center;
}

.filter-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: #fff;
}

/* 内容布局 */
.content-layout {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 30px;
}

/* 搜索结果 */
.search-results {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.result-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.result-section h2 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

/* 游戏结果 */
.game-results {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.game-card {
    display: flex;
    gap: 20px;
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s ease;
}

.game-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.game-image {
    position: relative;
    flex-shrink: 0;
}

.game-image img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
}

.game-status {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #0066cc;
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.game-info {
    flex: 1;
}

.game-info h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.game-info h3 a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.game-info h3 a:hover {
    color: #0066cc;
}

.game-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: #666;
}

.game-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.rating {
    font-size: 1.2rem;
    font-weight: bold;
    color: #ff9800;
}

.rating-stars {
    color: #ff9800;
    font-size: 1rem;
}

.game-desc {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
}

.game-actions {
    display: flex;
    gap: 10px;
}

.btn-primary {
    display: inline-block;
    padding: 8px 16px;
    background: #0066cc;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s ease;
    font-size: 0.9rem;
}

.btn-primary:hover {
    background: #0052a3;
}

.btn-secondary {
    display: inline-block;
    padding: 8px 16px;
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-secondary:hover {
    background: #e0e0e0;
    color: #0066cc;
}

/* 新闻结果 */
.news-results {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.article-card {
    display: flex;
    gap: 20px;
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s ease;
}

.article-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.article-image {
    flex-shrink: 0;
}

.article-image img {
    width: 200px;
    height: 120px;
    object-fit: cover;
    border-radius: 4px;
}

.article-content {
    flex: 1;
}

.article-content h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.article-content h3 a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-content h3 a:hover {
    color: #0066cc;
}

.article-summary {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
    font-size: 0.95rem;
}

.article-meta {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: #999;
}

/* 攻略结果 */
.guide-results {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* 论坛结果 */
.forum-results {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.topic-card {
    display: flex;
    gap: 20px;
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s ease;
}

.topic-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.topic-content {
    flex: 1;
}

.topic-content h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.topic-content h3 a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.topic-content h3 a:hover {
    color: #0066cc;
}

.topic-summary {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
    font-size: 0.95rem;
}

.topic-meta {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: #999;
}

.topic-stats {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    min-width: 60px;
}

.reply-count {
    font-size: 1.2rem;
    font-weight: bold;
    color: #0066cc;
}

.view-count {
    font-size: 0.9rem;
    color: #999;
}

/* 局部 skeleton：搜索加载中占位 */
.skeleton-card {
    position: relative;
    overflow: hidden;
    border: 1px solid #eef1f6;
}

.skeleton-line {
    height: 12px;
    border-radius: 8px;
    background: linear-gradient(90deg, #eef1f6 25%, #e4e9f2 37%, #eef1f6 63%);
    background-size: 300% 100%;
    animation: search-skeleton-shimmer 1.2s ease-in-out infinite;
    margin-bottom: 12px;
}

.skeleton-line.w-100 { width: 100%; }
.skeleton-line.w-80 { width: 80%; }
.skeleton-line.w-60 { width: 60%; }

@keyframes search-skeleton-shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: 0 0; }
}

.game-results .game-card,
.news-results .article-card,
.guide-results .article-card,
.forum-results .topic-card {
    animation: search-fade-in 0.26s ease;
}

@keyframes search-fade-in {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .skeleton-line,
    .game-results .game-card,
    .news-results .article-card,
    .guide-results .article-card,
    .forum-results .topic-card {
        animation: none;
    }
}

/* 搜索无结果空态 */
.search-empty-state {
    margin: 4px 0 24px;
    padding: 36px 28px;
    border-radius: 12px;
    border: 1px solid #e6edf7;
    background: linear-gradient(180deg, #f9fbff 0%, #ffffff 100%);
    text-align: center;
}

.search-empty-illustration {
    width: 88px;
    height: 88px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #dbeafe 0%, #bfdbfe 50%, #93c5fd 100%);
    position: relative;
}

.search-empty-illustration .lens {
    position: absolute;
    left: 26px;
    top: 24px;
    width: 34px;
    height: 34px;
    border: 4px solid #1E3A8A;
    border-radius: 50%;
}

.search-empty-illustration .lens::after {
    content: '';
    position: absolute;
    right: -10px;
    bottom: -12px;
    width: 14px;
    height: 4px;
    border-radius: 4px;
    background: #1E3A8A;
    transform: rotate(45deg);
    transform-origin: center;
}

.search-empty-state h3 {
    margin-bottom: 8px;
    font-size: 22px;
    color: #1f2937;
}

.search-empty-state p {
    margin-bottom: 16px;
    color: #64748b;
}

.search-empty-suggestions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.suggestion-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #334155;
    font-size: 13px;
    transition: all 0.2s ease;
}

.suggestion-chip:hover {
    border-color: #1E3A8A;
    color: #1E3A8A;
    text-decoration: none;
}

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

.page-btn {
    display: inline-block;
    padding: 8px 16px;
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.page-btn:hover {
    background: #e0e0e0;
    color: #0066cc;
}

.page-btn.active {
    background: #0066cc;
    color: #fff;
}

.page-ellipsis {
    padding: 8px 16px;
    color: #999;
}

/* 侧边栏 */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-section {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
}

.sidebar-section h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #333;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

/* 搜索框 */
.sidebar-search {
    display: flex;
    gap: 10px;
}

.sidebar-search input {
    flex: 1;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 0.9rem;
}

.sidebar-search button {
    padding: 10px 15px;
    background: #0066cc;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.sidebar-search button:hover {
    background: #0052a3;
}

/* 热门搜索 */
.hot-searches {
    list-style: none;
}

.hot-searches li {
    margin-bottom: 10px;
}

.hot-searches li a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
    padding: 5px 0;
    font-size: 0.95rem;
}

.hot-searches li a:hover {
    color: #0066cc;
}

/* 搜索历史 */
.search-history {
    list-style: none;
    margin-bottom: 15px;
}

.search-history li {
    margin-bottom: 10px;
}

.search-history li a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
    padding: 5px 0;
    font-size: 0.95rem;
}

.search-history li a:hover {
    color: #0066cc;
}

.clear-history {
    color: #0066cc;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.clear-history:hover {
    color: #0052a3;
    text-decoration: underline;
}

/* 相关游戏 */
.related-games {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.related-games li {
    display: flex;
    gap: 10px;
    align-items: center;
}

.related-games img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

.similar-game-info {
    flex: 1;
}

.similar-game-info a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
    margin-bottom: 5px;
}

.similar-game-info a:hover {
    color: #0066cc;
}

.game-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .content-layout {
        grid-template-columns: 1fr;
    }
    
    .search-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .search-filters {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .game-card {
        flex-direction: column;
        gap: 15px;
    }
    
    .game-image img {
        width: 100%;
        height: 200px;
    }
    
    .article-card {
        flex-direction: column;
        gap: 15px;
    }
    
    .article-image img {
        width: 100%;
        height: 180px;
    }
    
    .topic-card {
        flex-direction: column;
        gap: 15px;
    }
    
    .topic-stats {
        flex-direction: row;
        justify-content: space-around;
        min-width: auto;
        padding-top: 10px;
        border-top: 1px solid #f0f0f0;
    }
}