/* ==========================================
   搜索页面样式
   牛僧站长网搜索功能样式
========================================== */

/* 搜索页面主容器 */
.search-page {
    min-height: calc(100vh - 150px);
    background: #f8fafc;
    padding-bottom: 60px; /* 添加底部间距，防止与footer粘连 */
}

/* 搜索头部 */
.search-header-section {
    background: #f8fafc;
    padding: 20px 0;
    border-bottom: 1px solid #e2e8f0;
}

.breadcrumb {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    font-size: 14px;
}

.breadcrumb-item {
    color: #64748b;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-item:hover {
    color: #1e293b;
}

.breadcrumb-separator {
    margin: 0 10px;
    color: #94a3b8;
}

.breadcrumb-current {
    color: #1e293b;
    font-weight: 500;
}

.search-result-header {
    text-align: left;
}

.search-result-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #1e293b;
}

.search-result-title mark {
    background: #fef08a;
    color: #365314;
    padding: 2px 6px;
    border-radius: 4px;
}

/* 删除了搜索表单相关样式，现在使用顶部导航栏的搜索功能 */

.filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
}

.filter-label {
    font-weight: 500;
}

.filter-select {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
}

.filter-select option {
    background: #333;
    color: white;
}

/* 搜索统计 */
.search-stats {
    text-align: left;
    font-size: 14px;
    color: #64748b;
}

.stats-text {
    margin: 0;
}

.filter-info {
    font-size: 13px;
}

.clear-filter {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: underline;
    margin-left: 8px;
}

.clear-filter:hover {
    color: white;
}

/* 搜索结果容器 */
.search-results {
    padding: 40px 0 60px;
}

/* 搜索内容包装器 */
.search-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    margin-bottom: 40px; /* 添加底部间距 */
}

/* 主要内容区域 */
.search-main {
    min-width: 0; /* 防止flex item溢出 */
}

/* 结果列表 */
.results-list {
    max-width: 100%;
}

.result-item {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.result-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.result-content {
    padding: 24px;
}

.result-header {
    margin-bottom: 16px;
}

.result-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
}

.result-link {
    color: #1e293b;
    text-decoration: none;
    transition: color 0.3s ease;
}

.result-link:hover {
    color: #ff7a59;
}

.result-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: #64748b;
    flex-wrap: wrap;
}

.category-link {
    color: #ff7a59;
    text-decoration: none;
    font-weight: 500;
}

.category-link:hover {
    text-decoration: underline;
}

.result-badge {
    background: #ff7a59;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.result-excerpt {
    color: #475569;
    line-height: 1.6;
    margin-bottom: 16px;
}

.result-excerpt mark {
    background: #fef3cd;
    color: #856404;
    padding: 1px 3px;
    border-radius: 3px;
}

.result-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-thumbnail {
    width: 80px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
}

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

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

.tag-item {
    background: #f1f5f9;
    color: #475569;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
}

/* 搜索侧边栏 */
.search-sidebar {
    width: 300px;
}

/* 侧边栏小部件 */
.sidebar-widget {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 24px;
    overflow: hidden;
}

.widget-title {
    background: #f8fafc;
    padding: 16px 20px;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    border-bottom: 1px solid #e2e8f0;
}

/* 简单列表样式 */
.simple-list {
    padding: 0;
}

.simple-item {
    border-bottom: 1px solid #f1f5f9;
}

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

.simple-link {
    display: block;
    padding: 16px 20px;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.3s ease;
}

.simple-link:hover {
    background: #f8fafc;
}

.simple-title {
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    margin: 0 0 6px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.simple-meta {
    font-size: 12px;
    color: #94a3b8;
}

/* 广告/推荐工具样式 */
.ad-content {
    padding: 20px;
}

.ad-item {
    text-align: center;
    margin-bottom: 24px;
}

.ad-item:last-child {
    margin-bottom: 0;
}

.ad-image {
    width: 80px;
    height: 80px;
    margin: 0 auto 12px;
    border-radius: 8px;
    overflow: hidden;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ad-item h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 8px 0;
}

.ad-item p {
    font-size: 13px;
    color: #64748b;
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.ad-link {
    display: inline-block;
    background: #ff7a59;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.ad-link:hover {
    background: #e5654b;
}

/* 分页导航 */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 40px 0 0;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.pagination-info {
    color: #64748b;
    font-size: 14px;
}

.pagination-links {
    display: flex;
    gap: 8px;
}

.page-link {
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    color: #475569;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.page-link:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.page-link.current {
    background: #ff7a59;
    color: white;
    border-color: #ff7a59;
}

/* 无结果状态 */
.no-results {
    text-align: center;
    max-width: 600px;
    margin: 60px auto;
    padding: 40px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.no-results-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.no-results-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 12px;
}

.no-results-desc {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 30px;
}

/* 搜索建议 */
.search-suggestions {
    margin-bottom: 30px;
    text-align: left;
}

.suggestions-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 12px;
}

.suggestions-list {
    list-style: none;
    padding-left: 0;
}

.suggestions-list li {
    color: #64748b;
    margin-bottom: 8px;
    padding-left: 16px;
    position: relative;
}

.suggestions-list li::before {
    content: '•';
    color: #ff7a59;
    position: absolute;
    left: 0;
}

/* 推荐内容 */
.recommended-content {
    text-align: left;
}

.recommended-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 16px;
}

.recommended-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.recommended-item {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.recommended-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.recommended-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.recommended-thumb {
    width: 100%;
    height: 120px;
    overflow: hidden;
}

.recommended-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recommended-info {
    padding: 12px;
}

.recommended-title {
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    margin-bottom: 8px;
    line-height: 1.4;
}

.recommended-category {
    font-size: 12px;
    color: #ff7a59;
}

/* 初始搜索状态 */
.search-welcome {
    text-align: center;
    max-width: 600px;
    margin: 60px auto;
    padding: 40px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.welcome-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.welcome-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 12px;
}

.welcome-desc {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 30px;
}

/* 热门搜索 */
.popular-searches {
    margin-bottom: 30px;
}

.popular-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 16px;
}

.popular-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.popular-tag {
    background: #f1f5f9;
    color: #475569;
    padding: 6px 12px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.popular-tag:hover {
    background: #ff7a59;
    color: white;
}

/* 分类快捷入口 */
.category-shortcuts {
    text-align: left;
}

.shortcuts-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 16px;
    text-align: center;
}

.shortcuts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.shortcut-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    text-decoration: none;
    color: #475569;
    transition: all 0.3s ease;
}

.shortcut-item:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
}

.shortcut-icon {
    font-size: 1.5rem;
}

.shortcut-name {
    flex: 1;
    font-weight: 500;
}

.shortcut-count {
    font-size: 12px;
    color: #94a3b8;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .search-content-wrapper {
        grid-template-columns: 1fr 280px;
        gap: 30px;
    }
    
    .search-sidebar {
        width: 280px;
    }
}

@media (max-width: 768px) {
    .search-content-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .search-sidebar {
        width: 100%;
        order: 2; /* 侧边栏移到底部 */
    }
    
    .search-main {
        order: 1; /* 主内容在上 */
    }
    
    .search-result-title {
        font-size: 1.5rem;
        text-align: left; /* 移动端左对齐 */
    }
    
    /* 删除了不再需要的搜索表单移动端样式 */
    
    .search-stats {
        text-align: left; /* 搜索统计左对齐 */
    }
    
    .results-list {
        text-align: left; /* 结果列表左对齐 */
    }
    
    .result-content {
        padding: 16px;
    }
    
    .result-title {
        font-size: 1.1rem;
    }
    
    .result-meta {
        gap: 12px;
    }
    
    .pagination {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .shortcuts-grid {
        grid-template-columns: 1fr;
    }
    
    .popular-tags {
        justify-content: flex-start;
    }
    
    /* 侧边栏在移动端的样式调整 */
    .sidebar-widget {
        margin-bottom: 20px;
    }
    
    .ad-content {
        padding: 16px;
    }
    
    .ad-item {
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .search-hero {
        padding: 40px 0 20px;
    }
    
    .search-title {
        font-size: 1.6rem;
    }
    
    .result-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/* ===== 政策页面专用样式 ===== */
.policy-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 40px; /* 增加底部间距 */
}

.policy-section {
    margin-bottom: 25px;
}

.policy-section h2 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 15px;
    border-left: 4px solid #007bff;
    padding-left: 15px;
    font-weight: 600;
}

/* 使用条款页面使用绿色主题 */
.search-page:has([href="/terms"]) .policy-section h2,
body[data-page="terms"] .policy-section h2 {
    border-left-color: #28a745;
}

.policy-section h3 {
    font-size: 1.1rem;
    color: #333;
    margin: 18px 0 10px;
    font-weight: 600;
}

.policy-section p {
    line-height: 1.6;
    color: #555;
    margin-bottom: 12px;
}

.policy-section ul {
    margin: 12px 0;
    padding-left: 20px;
}

.policy-section li {
    line-height: 1.6;
    color: #555;
    margin-bottom: 6px;
}

.policy-section strong {
    color: #333;
    font-weight: 600;
}

.policy-section a {
    color: #007bff;
    text-decoration: none;
}

.policy-section a:hover {
    text-decoration: underline;
}

/* 政策页面移动端响应式 */
@media (max-width: 768px) {
    .policy-content {
        padding: 25px 20px;
    }
    
    .policy-section h2 {
        font-size: 1.2rem;
    }
    
    .policy-section h3 {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .policy-content {
        padding: 20px 15px;
    }
    
    .policy-section h2 {
        font-size: 1.1rem;
    }
    
    .policy-section h3 {
        font-size: 0.95rem;
    }
    
    .policy-section p {
        font-size: 0.9rem;
    }
    
    .policy-section li {
        font-size: 0.9rem;
    }
}

/* ===== 站点地图页面专用样式 ===== */
.sitemap-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 40px; /* 增加底部间距 */
}

.sitemap-section {
    margin-bottom: 35px;
}

.sitemap-section-title {
    font-size: 1.4rem;
    color: #333;
    margin-bottom: 20px;
    border-left: 4px solid #007bff;
    padding-left: 15px;
    font-weight: 600;
}

/* 网站导航网格 */
.sitemap-nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 10px;
}

.sitemap-nav-item {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.sitemap-nav-item:hover {
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0,123,255,0.1);
}

.sitemap-nav-link {
    display: block;
    padding: 15px;
    text-decoration: none;
    color: inherit;
}

.sitemap-nav-link strong {
    display: block;
    color: #333;
    font-size: 1rem;
    margin-bottom: 5px;
}

.sitemap-nav-link span {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* 日期分组 */
.sitemap-date-group {
    margin-bottom: 30px;
}

.sitemap-date-title {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f1f5f9;
    font-weight: 600;
}

.article-count {
    font-size: 0.9rem;
    color: #666;
    font-weight: normal;
}

/* 文章列表 */
.sitemap-article-list {
    display: grid;
    gap: 12px;
}

.sitemap-article-item {
    border: 1px solid #f1f5f9;
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.sitemap-article-item:hover {
    border-color: #d1d5db;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.sitemap-article-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    text-decoration: none;
    color: inherit;
    gap: 15px;
}

.sitemap-article-main {
    flex: 1;
    min-width: 0;
}

.sitemap-article-title {
    font-size: 1rem;
    color: #333;
    margin-bottom: 5px;
    font-weight: 500;
    line-height: 1.4;
    word-break: break-word;
}

.sitemap-article-title:hover {
    color: #007bff;
}

.sitemap-article-summary {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
    margin: 0;
}

.sitemap-article-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}

.sitemap-article-date {
    font-size: 0.8rem;
    color: #888;
}

.sitemap-article-category {
    font-size: 0.75rem;
    color: #007bff;
    background: #f8f9ff;
    padding: 2px 6px;
    border-radius: 12px;
    white-space: nowrap;
}

/* 无文章状态 */
.no-articles {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* 站点地图移动端响应式 */
@media (max-width: 768px) {
    .sitemap-content {
        padding: 25px 20px;
    }
    
    .sitemap-nav-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .sitemap-article-link {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .sitemap-article-meta {
        flex-direction: row;
        align-items: center;
        align-self: stretch;
        justify-content: space-between;
    }
}

@media (max-width: 480px) {
    .sitemap-content {
        padding: 20px 15px;
    }
    
    .sitemap-section-title {
        font-size: 1.2rem;
    }
    
    .sitemap-date-title {
        font-size: 1.1rem;
    }
    
    .sitemap-nav-link {
        padding: 12px;
    }
    
    .sitemap-article-link {
        padding: 12px;
    }
    
    .sitemap-article-title {
        font-size: 0.95rem;
    }
}

/* ===== 工具页面专用样式 ===== */
.tools-content {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 40px; /* 添加底部间距 */
}

.tools-intro {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.tools-intro h2 {
    color: #333;
    font-size: 24px;
    margin-bottom: 10px;
    font-weight: 600;
}

.tools-intro p {
    color: #666;
    line-height: 1.6;
    font-size: 16px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.tool-item {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
}

.tool-item:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

.tool-header {
    margin-bottom: 15px;
}

.tool-name {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.tool-name a {
    color: #333;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tool-name a:hover {
    color: #3b82f6;
}

.external-link-icon {
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.tool-name a:hover .external-link-icon {
    opacity: 1;
}

.tool-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 14px;
}

.tool-actions {
    text-align: right;
}

.tool-button {
    display: inline-block;
    background: #3b82f6;
    color: #fff;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s ease;
}

.tool-button:hover {
    background: #2563eb;
    color: #fff;
}

.tools-notice {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-top: 30px;
}

.tools-notice h3 {
    color: #333;
    font-size: 18px;
    margin-bottom: 15px;
    font-weight: 600;
}

.tools-notice ul {
    margin: 0;
    padding-left: 20px;
    color: #666;
}

.tools-notice li {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* 工具页面响应式 */
@media (max-width: 768px) {
    .search-page {
        padding-bottom: 40px; /* 移动端减少底部间距 */
    }
    
    .search-content-wrapper {
        margin-bottom: 30px; /* 移动端减少间距 */
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .tool-item {
        padding: 15px;
    }
    
    .tools-content {
        padding: 20px;
        margin-bottom: 30px; /* 移动端减少底部间距 */
    }
    
    .tools-intro h2 {
        font-size: 20px;
    }
    
    .tool-name {
        font-size: 16px;
    }
    
    .tools-notice {
        padding: 15px;
    }
    
    .tools-notice h3 {
        font-size: 16px;
    }
    
    .policy-content {
        margin-bottom: 30px; /* 移动端减少间距 */
    }
    
    .sitemap-content {
        margin-bottom: 30px; /* 移动端减少间距 */
    }
} 