/* ============================================================
   blog.css - 色猫咪博客 公共样式（白色简约像素风）
   ============================================================ */

/* ===== 全局重置 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Pixelify Sans', 'Courier New', monospace;
    background: #f5f5f0;
    color: #222;
    line-height: 1.8;
    image-rendering: pixelated;
    -webkit-font-smoothing: none;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    image-rendering: pixelated;
}

/* ===== 像素辅助类 ===== */
.pixel-border {
    border: 2px solid #222;
    box-shadow: 4px 4px 0 #222;
}
.pixel-border-light {
    border: 2px solid #aaa;
    box-shadow: 3px 3px 0 #aaa;
}

/* ===== 头部 ===== */
.blog-header {
    background: #fff;
    border-bottom: 3px solid #222;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 0 #222;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    padding: 0 16px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
}

.header-left img {
    width: 52px;
    height: 52px;
    border: 3px solid #222;
    box-shadow: 4px 4px 0 #222;
    background: #fff;
    padding: 2px;
}

.header-left .brand .name {
    font-size: 22px;
    font-weight: 700;
    color: #222;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.header-left .brand .sub {
    font-size: 14px;
    color: #888;
    letter-spacing: 2px;
    font-weight: 400;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.header-nav a {
    padding: 8px 18px;
    font-size: 16px;
    color: #444;
    font-weight: 600;
    border: 2px solid transparent;
    transition: 0.15s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.header-nav a:hover {
    background: #eee;
    border-color: #222;
    color: #000;
}

.header-nav a.active {
    background: #222;
    color: #fff;
    border-color: #222;
}

/* ===== 汉堡菜单 ===== */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    background: transparent;
    border: none;
}

.hamburger span {
    display: block;
    width: 28px;
    height: 3px;
    background: #222;
    border-radius: 0;
    transition: 0.25s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* ===== 页脚 ===== */
.blog-footer {
    background: #fff;
    border-top: 3px solid #222;
    padding: 20px;
    margin-top: 40px;
    box-shadow: 0 -4px 0 #222;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    padding: 0 16px;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
}

.footer-left img {
    width: 48px;
    height: 48px;
    border: 3px solid #222;
    box-shadow: 3px 3px 0 #222;
    background: #fff;
    padding: 2px;
}

.footer-left .brand-text .name {
    font-size: 18px;
    font-weight: 700;
    color: #222;
    text-transform: uppercase;
}

.footer-left .brand-text .sub {
    font-size: 13px;
    color: #888;
    letter-spacing: 1px;
}

.footer-center {
    color: #888;
    font-size: 15px;
}

.footer-center a {
    color: #222;
    font-weight: 700;
    border-bottom: 2px solid #222;
    padding-bottom: 1px;
}

.footer-center a:hover {
    background: #222;
    color: #fff;
    padding: 2px 6px;
    border-bottom: 2px solid #222;
}

.footer-right a i {
    font-size: 28px;
    color: #222;
    transition: 0.15s;
    border: 2px solid #222;
    padding: 6px 8px;
    background: #fff;
    box-shadow: 3px 3px 0 #222;
}

.footer-right a i:hover {
    background: #222;
    color: #fff;
    transform: translate(1px, 1px);
    box-shadow: 2px 2px 0 #222;
}

/* ===== 全局高亮 ===== */
.highlight {
    color: #222;
    font-weight: 700;
    background: #ddd;
    padding: 0 6px;
    border: 2px solid #222;
}

/* ===== 文章容器 ===== */
.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* ===== 文章头部 ===== */
.post-header {
    margin-bottom: 30px;
    border-bottom: 3px solid #222;
    padding-bottom: 20px;
}

.post-header .back-link {
    display: inline-block;
    color: #888;
    font-size: 14px;
    margin-bottom: 12px;
    font-weight: 600;
    border: 2px solid transparent;
    padding: 4px 10px;
    transition: 0.15s;
}

.post-header .back-link:hover {
    background: #222;
    color: #fff;
    border-color: #222;
}

.post-header h1 {
    font-size: 32px;
    color: #222;
    margin-bottom: 8px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.post-header .meta {
    font-size: 14px;
    color: #888;
    font-weight: 400;
}

/* ===== 文章正文 ===== */
.post-body {
    background: #fff;
    border: 3px solid #222;
    padding: 32px;
    box-shadow: 6px 6px 0 #222;
}

.post-body h2 {
    font-size: 22px;
    margin: 28px 0 14px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 3px solid #222;
    padding-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-body h2:first-child {
    margin-top: 0;
}

.post-body p {
    color: #333;
    font-size: 16px;
    margin-bottom: 14px;
}

.post-body ul,
.post-body ol {
    padding-left: 28px;
    color: #333;
    font-size: 16px;
    margin-bottom: 14px;
}

.post-body li {
    margin-bottom: 8px;
}

.post-body .highlight-box {
    padding: 16px 20px;
    border: 3px solid #222;
    margin: 16px 0;
    background: #f0f0eb;
    box-shadow: 4px 4px 0 #222;
}

.post-body .step-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 14px;
    border-bottom: 1px dashed #ddd;
    padding-bottom: 12px;
}

.post-body .step-number {
    display: inline-block;
    color: #fff;
    background: #222;
    width: 32px;
    height: 32px;
    text-align: center;
    line-height: 32px;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
    border: 2px solid #222;
    box-shadow: 3px 3px 0 #222;
}

/* ===== 按钮 ===== */
.btn-primary {
    display: inline-block;
    color: #fff;
    background: #222;
    padding: 14px 36px;
    font-weight: 700;
    font-size: 18px;
    transition: 0.15s ease;
    border: 3px solid #222;
    box-shadow: 4px 4px 0 #222;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Pixelify Sans', 'Courier New', monospace;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 #222;
    background: #000;
}

.btn-primary i {
    margin-right: 8px;
}

.btn-secondary {
    display: inline-block;
    background: #fff;
    color: #222;
    padding: 12px 28px;
    font-size: 15px;
    border: 3px solid #222;
    box-shadow: 4px 4px 0 #222;
    transition: 0.15s ease;
    font-family: 'Pixelify Sans', 'Courier New', monospace;
    font-weight: 600;
}

.btn-secondary:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 #222;
    background: #eee;
}

.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.flex-center { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 12px; }

/* ===== 关于页面 ===== */
.about-card {
    background: #fff;
    border: 3px solid #222;
    padding: 40px;
    text-align: center;
    box-shadow: 6px 6px 0 #222;
}

.about-card .avatar {
    width: 100px;
    height: 100px;
    margin: 0 auto 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #222;
    box-shadow: 4px 4px 0 #222;
}

.about-card .avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-card h1 {
    font-size: 30px;
    color: #222;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.about-card .subtitle {
    color: #888;
    font-size: 16px;
    margin-bottom: 20px;
    font-weight: 600;
    letter-spacing: 2px;
}

.about-card p {
    color: #444;
    font-size: 16px;
    max-width: 500px;
    margin: 0 auto 20px;
    line-height: 1.9;
}

.about-card .social-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.about-card .social-links a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border: 3px solid #222;
    background: #fff;
    color: #222;
    font-size: 15px;
    font-weight: 600;
    box-shadow: 4px 4px 0 #222;
    transition: 0.15s ease;
    font-family: 'Pixelify Sans', 'Courier New', monospace;
}

.about-card .social-links a:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 #222;
    background: #eee;
}

.about-card .social-links a i {
    font-size: 20px;
}

.about-card .back-link {
    display: inline-block;
    margin-top: 24px;
    color: #888;
    font-size: 14px;
    font-weight: 600;
    border: 2px solid transparent;
    padding: 4px 12px;
    transition: 0.15s;
}

.about-card .back-link:hover {
    background: #222;
    color: #fff;
    border-color: #222;
}

/* ===== 首页介绍 ===== */
.blog-intro {
    background: #fff;
    border: 3px solid #222;
    padding: 30px 24px;
    margin-bottom: 0;
    text-align: center;
    box-shadow: 6px 6px 0 #222;
}

.blog-intro h2 {
    font-size: 28px;
    color: #222;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.blog-intro h2 i {
    font-size: 28px;
}

.blog-intro p {
    color: #444;
    font-size: 16px;
    line-height: 2;
    margin-bottom: 6px;
}

.blog-intro .highlight {
    color: #222;
    font-weight: 700;
    background: #ddd;
    padding: 0 6px;
    border: 2px solid #222;
}

/* ===== 首页按钮 ===== */
.intro-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px;
    margin: 28px 0 40px 0;
    padding: 0;
}

.btn-intro {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 36px;
    font-weight: 700;
    font-size: 18px;
    text-decoration: none;
    transition: 0.15s ease;
    border: 3px solid #222;
    box-shadow: 4px 4px 0 #222;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Pixelify Sans', 'Courier New', monospace;
    cursor: pointer;
}

.btn-intro i {
    font-size: 20px;
}

.btn-visit {
    background: #222;
    color: #fff;
}

.btn-visit:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 #222;
    background: #000;
}

.btn-contact {
    background: #fff;
    color: #222;
}

.btn-contact:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 #222;
    background: #eee;
}

/* ===== 为什么喜欢 ===== */
.why-section {
    margin: 40px 0 50px 0;
    padding: 0;
}

.why-title {
    font-size: 28px;
    font-weight: 700;
    color: #222;
    text-align: center;
    margin-bottom: 30px;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-bottom: 3px solid #222;
    padding-bottom: 12px;
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 30px;
}

.why-card {
    background: #fff;
    border: 3px solid #222;
    overflow: hidden;
    transition: 0.15s ease;
    box-shadow: 4px 4px 0 #222;
}

.why-card:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 #222;
}

.why-image {
    width: 100%;
    aspect-ratio: 2 / 1;
    overflow: hidden;
    background: #eee;
    border-bottom: 3px solid #222;
}

.why-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.why-card-title {
    font-size: 20px;
    font-weight: 700;
    color: #222;
    padding: 16px 20px 6px 20px;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.why-card-desc {
    font-size: 15px;
    color: #555;
    line-height: 1.9;
    padding: 0 20px 20px 20px;
    margin: 0;
}

.why-footer {
    text-align: center;
    padding-top: 10px;
}

.why-footer p {
    font-size: 16px;
    color: #666;
    line-height: 1.9;
    max-width: 700px;
    margin: 0 auto;
    border-top: 2px dashed #ddd;
    padding-top: 20px;
}

/* ===== 统计 ===== */
.stats-section {
    background: #fff;
    border: 3px solid #222;
    padding: 40px 30px;
    margin: 0 0 40px 0;
    text-align: center;
    box-shadow: 6px 6px 0 #222;
}

.stats-title {
    font-size: 28px;
    font-weight: 700;
    color: #222;
    margin-bottom: 20px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.stats-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stats-number {
    font-size: 20px;
    color: #333;
    margin: 0;
}

.stats-number .highlight-num {
    color: #222;
    font-weight: 700;
    font-size: 28px;
    background: #ddd;
    padding: 0 8px;
    border: 2px solid #222;
}

.stats-number .highlight-name {
    color: #222;
    font-weight: 700;
    background: #ddd;
    padding: 0 8px;
    border: 2px solid #222;
}

.stats-note {
    font-size: 14px;
    color: #999;
    margin: 0;
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .header-nav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 80px;
        left: 0;
        right: 0;
        background: #fff;
        padding: 20px;
        border-bottom: 3px solid #222;
        gap: 4px;
        box-shadow: 0 8px 0 #222;
    }

    .header-nav.open {
        display: flex;
    }

    .header-nav a {
        padding: 12px 16px;
        width: 100%;
        text-align: center;
        border-radius: 0;
        font-size: 16px;
        border: 2px solid transparent;
    }

    .header-nav a.active {
        background: #222;
        color: #fff;
        border-color: #222;
    }

    .header-left .brand .name {
        font-size: 18px;
    }
    .header-left .brand .sub {
        font-size: 12px;
    }
    .header-left img {
        width: 44px;
        height: 44px;
    }

    .post-header h1 {
        font-size: 24px;
    }
    .post-body {
        padding: 20px;
    }
    .post-body h2 {
        font-size: 18px;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
        gap: 12px;
        padding: 0 10px;
    }
    .footer-left {
        justify-content: center;
    }
    .footer-left .brand-text .name {
        font-size: 16px;
    }
    .footer-left .brand-text .sub {
        font-size: 12px;
    }
    .footer-left img {
        width: 42px;
        height: 42px;
    }

    .about-card {
        padding: 30px 20px;
    }
    .about-card h1 {
        font-size: 24px;
    }
    .about-card .avatar {
        width: 80px;
        height: 80px;
    }

    .blog-container {
        padding: 30px 15px;
        max-width: 100%;
    }

    .intro-buttons {
        justify-content: center;
        gap: 14px;
        margin: 22px 0 30px 0;
    }
    .btn-intro {
        padding: 14px 24px;
        font-size: 15px;
    }
    .btn-intro i {
        font-size: 16px;
    }

    .why-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .why-title {
        font-size: 22px;
    }
    .why-card-title {
        font-size: 17px;
        padding: 14px 16px 4px 16px;
    }
    .why-card-desc {
        font-size: 14px;
        padding: 0 16px 16px 16px;
    }
    .why-footer p {
        font-size: 14px;
        padding: 0 10px;
    }
    .why-section {
        margin: 30px 0 35px 0;
    }

    .stats-section {
        padding: 30px 20px;
        margin: 0 0 30px 0;
    }
    .stats-title {
        font-size: 22px;
    }
    .stats-number {
        font-size: 17px;
    }
    .stats-number .highlight-num {
        font-size: 22px;
    }
    .stats-note {
        font-size: 13px;
    }

    .blog-intro {
        padding: 24px 16px;
    }
    .blog-intro h2 {
        font-size: 22px;
    }
    .blog-intro p {
        font-size: 15px;
    }
}



/* ===== 像素风格滚动条 ===== */
::-webkit-scrollbar {
    width: 12px;
    background: #f5f5f0;
}
::-webkit-scrollbar-track {
    background: #f5f5f0;
    border-left: 2px solid #222;
}
::-webkit-scrollbar-thumb {
    background: #222;
    border: 2px solid #f5f5f0;
    box-shadow: inset 0 0 0 2px #f5f5f0;
}
::-webkit-scrollbar-thumb:hover {
    background: #000;
}
