/* 搜索页面样式 */

/* 主容器布局 - 确保侧边栏在所有设备上都能显示 */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
}

/* 博客文章列表样式 */
.blog-grid {
    display: grid;
    gap: 2rem;
}

.blog-card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px var(--shadow-color);
}

.blog-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.blog-content {
    padding: 1.5rem;
}

.blog-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.blog-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.blog-excerpt {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.read-more {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s ease;
}

.read-more:hover {
    gap: 0.75rem;
}

/* 侧边栏样式 */
.sidebar {
    position: sticky;
    top: 100px;
}

.sidebar-section {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px var(--shadow-color);
    border: 1px solid var(--border-color);
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.sidebar-section h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 个人资料卡片样式 */
.profile-card {
    text-align: center;
    padding: 2rem 1.5rem;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    background: linear-gradient(45deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    overflow: hidden;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.profile-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    justify-self: center;
}

.profile-bio {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.social-links a:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-2px);
    border-color: var(--accent-color);
}

/* 分类列表样式 */
.category-list {
    list-style: none;
}

.category-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.category-list li:last-child {
    border-bottom: none;
}

.category-list a {
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.3s ease;
}

.category-list a:hover {
    color: var(--accent-color);
}

.category-count {
    background: var(--bg-tertiary);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

/* 标签样式 */
.tag-high {
    background: var(--accent-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.tag-medium {
    background: var(--accent-bg);
    color: var(--accent-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid var(--accent-color);
}

.tag-low {
    background: var(--bg-tertiary);
    color: var(--text-muted);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.tag-high:hover,
.tag-medium:hover,
.tag-low:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-color);
}

/* 快速导航样式 */
.quick-nav {
    list-style: none;
}

.quick-nav li {
    margin-bottom: 0.5rem;
}

.quick-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.quick-nav a:hover {
    background: var(--bg-tertiary);
    color: var(--accent-color);
}

/* 响应式设计 - 在移动设备上调整布局 */
@media (max-width: 768px) {
    .main-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2rem 1rem;
    }
    
    .sidebar {
        position: static;
        order: -1; /* 在移动设备上将侧边栏放在主要内容之前 */
    }
    
    .sidebar-section {
        margin-bottom: 1.5rem;
    }
}

/* 搜索表单样式 */
.search-form {
    margin: 2rem 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.search-input-group {
    display: flex;
    background: white;
    border-radius: 50px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: all 0.3s ease;
}

.search-input-group:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.search-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    outline: none;
    font-size: 1rem;
    background: transparent;
}

.search-input::placeholder {
    color: #9ca3af;
    font-style: italic;
}

.search-button {
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-button:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    transform: scale(1.05);
}

.search-button:active {
    transform: scale(0.95);
}

/* 搜索结果统计样式 */
.search-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.search-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #4b5563;
}

.search-stats .stat-item strong {
    color: #1f2937;
    font-weight: 600;
}

/* 搜索结果区域样式 */
.search-results-section {
    margin-top: 2rem;
}

.search-results-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #1f2937;
    font-size: 1.5rem;
    font-weight: 600;
}

/* 无搜索结果样式 */
.no-results {
    text-align: center;
    padding: 3rem 1rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin: 2rem 0;
}

.no-results-content h3 {
    color: #374151;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.no-results-content p {
    color: #6b7280;
    margin-bottom: 2rem;
    font-size: 1rem;
}

.search-suggestions {
    text-align: left;
    max-width: 400px;
    margin: 0 auto;
    background: #f9fafb;
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid #3b82f6;
}

.search-suggestions h4 {
    color: #374151;
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 600;
}

.search-suggestions ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.search-suggestions li {
    color: #6b7280;
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
    font-size: 0.9rem;
}

.search-suggestions li:before {
    content: "•";
    color: #3b82f6;
    position: absolute;
    left: 0;
    font-weight: bold;
}

.search-suggestions a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}

.search-suggestions a:hover {
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .search-form {
        margin: 1rem 0;
    }
    
    .search-input-group {
        border-radius: 25px;
    }
    
    .search-input {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .search-button {
        padding: 0.75rem 1rem;
    }
    
    .search-stats {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    .no-results {
        padding: 2rem 1rem;
        margin: 1rem 0;
    }
    
    .search-suggestions {
        max-width: 100%;
        margin: 0 1rem;
    }
}

/* 搜索高亮样式 */
.search-highlight {
    background: #fef3c7;
    padding: 0.1rem 0.2rem;
    border-radius: 3px;
    font-weight: 500;
}

/* 搜索页面默认内容样式 */
.search-default-section {
    text-align: center;
    padding: 3rem 0;
}

.search-intro {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 3rem 2rem;
    box-shadow: 0 4px 20px var(--shadow-color);
    border: 1px solid var(--border-color);
    max-width: 800px;
    margin: 0 auto;
}

.search-intro-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.search-intro-content p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.search-tips {
    text-align: left;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-tertiary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.search-tips h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-tips h3::before {
    content: "💡";
    font-size: 1.5rem;
}

.search-tips ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.search-tips li {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
    font-size: 0.95rem;
    line-height: 1.5;
}

.search-tips li:before {
    content: "•";
    color: var(--accent-color);
    position: absolute;
    left: 0;
    font-weight: bold;
    font-size: 1.2rem;
}

.search-tips i {
    color: var(--accent-color);
    margin-right: 0.5rem;
}

.popular-searches {
    text-align: left;
}

.popular-searches h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.popular-searches h3::before {
    content: "🔥";
    font-size: 1.5rem;
}

.search-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.search-suggestion {
    display: inline-block;
    background: var(--accent-bg);
    color: var(--accent-color);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid var(--accent-color);
    font-weight: 500;
}

.search-suggestion:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--accent-shadow);
}

/* 搜索建议样式 */
.search-suggestions {
    margin-top: 1rem;
}

.search-suggestions .suggestion-item {
    display: inline-block;
    background: #f3f4f6;
    color: #374151;
    padding: 0.5rem 1rem;
    margin: 0.25rem;
    border-radius: 20px;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.search-suggestions .suggestion-item:hover {
    background: #e5e7eb;
    transform: translateY(-1px);
}

/* 搜索历史样式 */
.search-history {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.search-history h4 {
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.search-history .history-item {
    display: inline-block;
    background: #f3f4f6;
    color: #6b7280;
    padding: 0.25rem 0.75rem;
    margin: 0.125rem;
    border-radius: 15px;
    font-size: 0.75rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.search-history .history-item:hover {
    background: #e5e7eb;
    color: #374151;
}
