:root {
    --primary: #FF6B35;
    --primary-light: #FF8C5A;
    --bg: #FFF8F5;
    --text: #333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'PingFang SC', Roboto, 'Helvetica Neue', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部 */
.header {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    padding: 30px 0;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo a {
    color: #fff;
    text-decoration: none;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 1px;
}

.search-box form {
    display: flex;
    background: #fff;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.search-box input {
    border: none;
    padding: 12px 20px;
    width: 260px;
    font-size: 16px;
    outline: none;
}

.search-box button {
    background: var(--primary);
    border: none;
    color: #fff;
    padding: 0 25px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.search-box button:hover {
    background: #e55a2b;
}

/* 主页布局 */
.home-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    margin-top: 40px;
}

@media (max-width: 768px) {
    .home-layout {
        grid-template-columns: 1fr;
    }
    .search-box input {
        width: 160px;
    }
    .header .container {
        justify-content: center;
        gap: 15px;
    }
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.category-card {
    background: #fff;
    border-radius: 16px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.04);
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    color: var(--text);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(255, 107, 53, 0.15);
}

.category-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.category-name {
    font-size: 20px;
    font-weight: 600;
}

/* 侧边栏热门 */
.sidebar {
    background: #fff;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.04);
}

.sidebar h3 {
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 22px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.hot-list {
    list-style: none;
}

.hot-list li {
    padding: 10px 0;
    border-bottom: 1px dashed #e0e0e0;
}

.hot-list li a {
    text-decoration: none;
    color: #555;
    transition: color 0.3s;
    display: flex;
    align-items: center;
}

.hot-list li a:hover {
    color: var(--primary);
}

.hot-list li a::before {
    content: "🔥";
    margin-right: 8px;
}

/* 文章列表 */
.article-list {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.04);
}

.article-item {
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.article-item h3 a {
    text-decoration: none;
    color: #222;
    font-size: 20px;
    font-weight: 600;
    transition: color 0.3s;
}

.article-item h3 a:hover {
    color: var(--primary);
}

.article-meta {
    color: #999;
    font-size: 14px;
    margin-top: 8px;
}

/* 详情页 */
.article-detail {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    margin-top: 30px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.04);
}

.article-detail h1 {
    font-size: 36px;
    font-weight: 800;
    color: #111;
    margin-bottom: 20px;
    line-height: 1.3;
}

.article-detail .content {
    font-size: 17px;
    color: #444;
    line-height: 1.8;
}

.article-detail .content p {
    margin-bottom: 15px;
}

.back-home {
    display: inline-block;
    margin-top: 30px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

/* 悬浮按钮 */
.float-buttons {
    position: fixed;
    bottom: 40px;
    right: 40px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 999;
}

.float-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(255,107,53,0.4);
    transition: transform 0.3s, background 0.3s;
    font-size: 22px;
}

.float-btn:hover {
    background: #e55a2b;
    transform: scale(1.1);
}

#backToTop {
    display: none;
}

/* 搜索页 */
.search-results {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    margin-top: 30px;
}

.search-results .result-item {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

mark {
    background: #FFF3E0;
    color: #e65100;
    padding: 2px 4px;
    border-radius: 3px;
}
/* ========== 搜索页美化 ========== */
.search-results {
    background: #fff;
    border-radius: 20px;
    padding: 35px;
    margin-top: 30px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.04);
}

.search-header {
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.search-header h2 {
    color: #FF6B35;
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.search-query {
    color: #666;
    font-size: 16px;
    margin: 0;
}

.search-query strong {
    color: #FF6B35;
    background: #FFF3E8;
    padding: 2px 10px;
    border-radius: 20px;
}

/* 结果卡片列表 */
.results-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.result-card {
    display: block;
    text-decoration: none;
    color: #333;
    padding: 25px 28px;
    background: #FAFAFA;
    border-radius: 16px;
    border: 1px solid #f0f0f0;
    transition: all 0.25s ease;
}

.result-card:hover {
    background: #FFF9F5;
    border-color: #FFB088;
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.1);
    transform: translateY(-2px);
}

.result-title {
    font-size: 21px;
    font-weight: 700;
    color: #222;
    margin-bottom: 12px;
    line-height: 1.4;
}

.result-card:hover .result-title {
    color: #FF6B35;
}

/* 摘要文字 */
.result-summary {
    font-size: 15px;
    color: #666;
    line-height: 1.7;
    margin-bottom: 15px;
}

/* 底部 meta */
.result-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #999;
}

.meta-date {
    display: flex;
    align-items: center;
    gap: 5px;
}

.meta-arrow {
    color: #FF6B35;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.2s;
}

.result-card:hover .meta-arrow {
    opacity: 1;
}

/* 关键词高亮 */
mark {
    background: linear-gradient(180deg, transparent 60%, #FFD9B0 60%);
    color: #CC4F1A;
    padding: 0 4px;
    border-radius: 3px;
    font-weight: 600;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.empty-state p {
    font-size: 18px;
    color: #666;
    margin-bottom: 10px;
}

.empty-tip {
    font-size: 15px;
    color: #999;
}

.back-home-btn {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 30px;
    background: #FF6B35;
    color: #fff;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    transition: background 0.3s;
}

.back-home-btn:hover {
    background: #E55A2B;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .search-results {
        padding: 20px;
    }

    .result-card {
        padding: 20px;
    }

    .result-title {
        font-size: 18px;
    }
}