/*
Theme Name: The Smart Edit Theme
Theme URI: https://junjieg.com
Author: The Smart Edit
Description: Clean, modern theme with swapped title hierarchy,
             unified search bar sizing, enlarged footer text,
             and fully responsive layout.
Version: 4.8
License: GPL-2.0-or-later
Text Domain: smart-edit
*/

/* ========== 基础与背景 ========== */
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Roboto, Helvetica, Arial, sans-serif;
    color: #333333;
    background: linear-gradient(180deg, #edf1f7 0%, #f4f6fa 40%, #ffffff 100%);
    background-attachment: fixed;
    line-height: 1.8;
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: 0.01em;
}
a {
    color: #0071e3;
    text-decoration: none;
    transition: color 0.2s ease;
}
a:hover {
    color: #005bb5;
}
.container {
    max-width: 1060px;
    margin: 0 auto;
    padding: 0 32px;
}

/* ========== 头部导航 ========== */
.site-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}
.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}
.site-branding h1 {
    margin: 0;
    font-size: 40px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #000000;
}
.site-branding h1 a {
    color: #000000;
}
.site-branding p {
    margin: 2px 0 0;
    font-size: 13px;
    color: #6e6e73;
    font-weight: 500;
    letter-spacing: 0.2px;
}
.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 32px;
}
.main-navigation a {
    font-weight: 500;
    color: #1d1d1f;
    font-size: 15px;
    letter-spacing: 0.2px;
    position: relative;
    text-decoration: none;
    padding-bottom: 6px;
    transition: color 0.2s ease, transform 0.2s ease;
}
.main-navigation a::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: #0071e3;
    border-radius: 2px;
    transition: width 0.25s ease, left 0.25s ease;
}
.main-navigation a:hover {
    color: #0071e3;
    transform: translateY(-1px);
}
.main-navigation a:hover::after {
    width: 100%;
    left: 0;
}

/* ========== 英雄区域 ========== */
.hero-message {
    padding: 80px 0 30px;
    text-align: center;
    background: transparent;
}
.hero-message h2 {
    font-size: 72px;
    margin-bottom: 18px;
    color: #000000;
    font-weight: 700;
    letter-spacing: -1.5px;
    line-height: 1.15;
}
.hero-message p {
    font-size: 19px;
    color: #555555;
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.7;
    font-weight: 400;
}

/* ========== 首页居中搜索框 ========== */
.hero-search {
    padding: 0 0 40px;
    text-align: center;
}
.hero-search .search-form {
    display: flex;
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
    box-shadow: 0 4px 16px rgba(0,0,0,0.05);
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.08);
    background: #fff;
}
.hero-search .search-form input[type="search"] {
    flex: 1;
    padding: 14px 18px;
    font-size: 16px;
    border: none;
    outline: none;
    font-family: Arial, Helvetica, sans-serif;
    color: #333;
    background: transparent;
}
.hero-search .search-form input[type="search"]::placeholder {
    color: #999;
    font-style: italic;
}
.hero-search .search-form button {
    padding: 0 28px;
    background: #0071e3;
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
    font-family: Arial, Helvetica, sans-serif;
}
.hero-search .search-form button:hover {
    background: #005bb5;
}

/* ========== 首页内容区块 ========== */
body.home .hero-message + .container,
body.home .hero-message + .container + .container {
    background: #ffffff;
    border-radius: 28px;
    padding: 44px 40px 36px;
    margin-top: 50px;
    margin-bottom: 50px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.07);
    border: 1px solid rgba(0, 0, 0, 0.04);
}
body.home .category-grid {
    padding: 0 0 30px;
}

/* ========== 分类卡片 ========== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 50px 0 60px;
}
.category-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 24px;
    padding: 40px 36px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
    border-top: 4px solid #0071e3;
}
.category-card:nth-child(2) {
    border-top-color: #ff9f0a;
}
.category-card:nth-child(3) {
    border-top-color: #30b158;
}
.category-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.13);
    border-color: rgba(0, 0, 0, 0.1);
}
.category-card h3 {
    margin-top: 0;
    font-size: 26px;
    color: #000000;
    font-weight: 600;
    margin-bottom: 14px;
    letter-spacing: -0.3px;
}
.category-card p {
    color: #555555;
    margin-bottom: 22px;
    font-size: 16px;
    line-height: 1.7;
    flex-grow: 1;
}
.card-link {
    font-weight: 600;
    color: #0071e3;
    font-size: 16px;
    margin-top: auto;
}

/* ========== 内容区域排版 ========== */
.container h2 {
    font-size: 28px;
    color: #000000;
    margin-bottom: 28px;
    font-weight: 600;
    letter-spacing: -0.4px;
}
.container hr {
    margin: 24px 0 44px;
    border: none;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}
.site-main {
    padding: 50px 0;
}
.entry-title {
    font-size: 24px;
    margin: 0 0 10px;
    font-weight: 600;
}
.entry-title a {
    color: #000000;
}
.entry-title a:hover {
    color: #0071e3;
}
.entry-meta {
    color: #86868b;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 16px;
}
.entry-content {
    margin-bottom: 40px;
    color: #333333;
}

/* ========== 文章页排版 ========== */
.single-title {
    font-size: 36px;
    font-weight: 700;
    color: #000;
    letter-spacing: -0.5px;
    line-height: 1.2;
    margin: 0 0 10px;
}
.single-header {
    margin-bottom: 28px;
    padding-bottom: 18px;
    border-bottom: 2px solid #0071e3;
}
.single-meta {
    color: #6e6e73;
    font-size: 15px;
    font-weight: 500;
    display: flex;
    gap: 16px;
}
.single-content {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 19px;
    line-height: 1.9;
    color: #2c2c2c;
}
.single-content h2,
.single-content h3 {
    font-family: Arial, Helvetica, sans-serif;
    color: #000;
    font-weight: 700;
    margin-top: 2.2em;
    margin-bottom: 0.6em;
}
.single-content h2 {
    font-size: 28px;
}
.single-content h3 {
    font-size: 22px;
}
.single-content p {
    margin-bottom: 1.5em;
}
.single-content img {
    max-width: 100%;
    height: auto;
    border-radius: 14px;
    margin: 1.8em 0;
}

/* 文章页阅读背景容器 */
.single .site-main {
    background: #fafbfc;
    border-radius: 20px;
    padding: 40px 48px;
    margin-top: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.03);
}
.single .site-main .container {
    background: transparent;
    padding: 0;
}

/* ========== 分类归档页 ========== */
.category-title {
    margin: 0 0 12px;
    font-size: 32px;
    font-weight: 700;
    color: #000;
    letter-spacing: -0.5px;
    text-align: left;
}

.category-search {
    margin: 0 0 10px;
    text-align: left;
}

.category-search .search-form {
    display: flex;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.08);
    background: #fff;
}

.category-search .search-form input[type="search"] {
    flex: 1;
    padding: 13px 16px;
    font-size: 16px;
    border: none;
    outline: none;
    font-family: Arial, Helvetica, sans-serif;
    color: #333;
    background: transparent;
}

.category-search .search-form input[type="search"]::placeholder {
    color: #999;
    font-style: italic;
}

.category-search .search-form button {
    padding: 0 24px;
    background: #0071e3;
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
    font-family: Arial, Helvetica, sans-serif;
}

.category-search .search-form button:hover {
    background: #005bb5;
}

.archive-description {
    color: #555;
    font-size: 16px;
    margin-bottom: 20px;
    line-height: 1.6;
    text-align: left;
}

.archive-divider {
    margin: 24px 0 36px;
    border: none;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

/* ========== 搜索结果页标签 ========== */
.search-results-label {
    font-size: 15px;
    font-weight: 500;
    color: #666;
    margin: 0 0 32px;
    padding-bottom: 20px;
    border-bottom: 2px solid #0071e3;
}

.search-results-label span {
    color: #0071e3;
    font-weight: 700;
    background: rgba(0, 113, 227, 0.08);
    padding: 2px 8px;
    border-radius: 6px;
}

/* ========== 统一搜索框 ========== */
.inline-search-form {
    display: flex;
    max-width: 400px;
    width: 100%;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.08);
    background: #fff;
}

.inline-search-form input[type="search"] {
    flex: 1;
    padding: 13px 16px;
    font-size: 16px;
    border: none;
    outline: none;
    font-family: Arial, Helvetica, sans-serif;
    color: #333;
    background: transparent;
}

.inline-search-form input[type="search"]::placeholder {
    color: #999;
    font-style: italic;
}

.inline-search-form button {
    padding: 0 24px;
    background: #0071e3;
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
    font-family: Arial, Helvetica, sans-serif;
}

.inline-search-form button:hover {
    background: #005bb5;
}

/* ========== 搜索关键词高亮 ========== */
.search-highlight {
    color: #0071e3;
    font-weight: 700;
    background: rgba(0, 113, 227, 0.08);
    padding: 1px 6px;
    border-radius: 4px;
}

/* ========== 页脚（字体调大） ========== */
.site-footer {
    background: #f5f5f7;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding: 36px 0;
    margin-top: 80px;
}
.footer-links {
    text-align: center;
    margin-bottom: 16px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 22px;
}
.footer-links a {
    color: #6e6e73;
    font-size: 15px;
    transition: color 0.2s ease;
}
.footer-links a:hover {
    color: #1d1d1f;
}
.footer-disclosure {
    max-width: 600px;
    margin: 0 auto 14px;
    text-align: center;
}
.footer-disclosure p {
    color: #86868b;
    font-size: 13px;
    line-height: 1.6;
    text-align: center;
}
.footer-copy {
    text-align: center;
    color: #86868b;
    font-size: 14px;
}

/* ========== 响应式设计 ========== */

/* 平板 */
@media (max-width: 1024px) {
    .container {
        padding: 0 28px;
    }
    .hero-message h2 {
        font-size: 56px;
    }
    .hero-message p {
        font-size: 18px;
    }
    .category-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 24px;
    }
    .category-card {
        padding: 32px 28px;
    }
}

/* 手机 */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    .site-header .container {
        flex-direction: column;
        gap: 12px;
    }
    .site-branding h1 {
        font-size: 30px;
        font-weight: 800;
    }
    .main-navigation ul {
        gap: 18px;
        justify-content: center;
        flex-wrap: wrap;
    }
    .main-navigation a {
        font-size: 14px;
        padding-bottom: 4px;
    }
    .hero-message {
        padding: 60px 0 20px;
    }
    .hero-message h2 {
        font-size: 36px;
        letter-spacing: -0.8px;
    }
    .hero-message p {
        font-size: 16px;
    }
    .hero-search {
        padding: 0 0 30px;
    }
    .hero-search .search-form {
        max-width: 100%;
    }
    .hero-search .search-form input[type="search"] {
        font-size: 15px;
        padding: 12px 14px;
    }
    .hero-search .search-form button {
        padding: 0 20px;
        font-size: 14px;
    }
    body.home .hero-message + .container,
    body.home .hero-message + .container + .container {
        border-radius: 20px;
        padding: 24px 20px;
        margin-top: 30px;
        margin-bottom: 30px;
    }
    .category-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 30px 0 40px;
    }
    .category-card {
        padding: 28px 24px;
        border-radius: 20px;
    }
    .category-card h3 {
        font-size: 22px;
    }
    .category-card p {
        font-size: 15px;
    }
    .entry-title {
        font-size: 20px;
    }
    .entry-content {
        font-size: 16px;
    }
    .footer-links {
        flex-direction: column;
        gap: 12px;
    }
    .footer-disclosure {
        padding: 0 16px;
    }
    .site-footer {
        padding: 28px 0;
        margin-top: 60px;
    }
    .single-title {
        font-size: 32px;
    }
    .single-content {
        font-size: 17px;
    }
    .single .site-main {
        padding: 24px 20px;
    }
    .category-title {
        font-size: 26px;
        font-weight: 700;
    }
    .category-search .search-form {
        max-width: 100%;
    }
    .search-results-label {
        font-size: 14px;
    }
    .inline-search-form {
        max-width: 100%;
    }
}