/* ===================================
   GATSK 博客 - 小米橙色科技风格
   =================================== */

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

body {
    font-family: 'MiSans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: #ffffff;
    color: #1a1a2e;
    line-height: 1.8;
    min-height: 100vh;
    display: block;
}

/* 小米字体 MiSans 引入 */
@font-face {
    font-family: 'MiSans';
    src: url('https://cdn.jsdelivr.net/gh/nicekid1/cdn@main/cdn/fonts/MiSans-Regular.woff2') format('woff2'),
         url('https://cdn.jsdelivr.net/gh/nicekid1/cdn@main/cdn/fonts/MiSans-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'MiSans';
    src: url('https://cdn.jsdelivr.net/gh/nicekid1/cdn@main/cdn/fonts/MiSans-Bold.woff2') format('woff2'),
         url('https://cdn.jsdelivr.net/gh/nicekid1/cdn@main/cdn/fonts/MiSans-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'MiSans';
    src: url('https://cdn.jsdelivr.net/gh/nicekid1/cdn@main/cdn/fonts/MiSans-Semibold.woff2') format('woff2'),
         url('https://cdn.jsdelivr.net/gh/nicekid1/cdn@main/cdn/fonts/MiSans-Semibold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

/* === 顶部标题区 === */
.site-header {
    width: 100%;
    text-align: center;
    padding: 52px 20px 26px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-bottom: 3px solid #FF6900;
}

.site-header .logo-text {
    display: block;
    font-size: 34px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    letter-spacing: 2px;
}

/* === 横向导航栏 === */
.site-nav {
    width: 100%;
    text-align: center;
    background: #1e1e2f;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.site-nav ul {
    list-style: none;
    display: inline-flex;
    justify-content: center;
    gap: 0;
    margin: 0 auto;
}

.site-nav ul li a {
    display: block;
    padding: 15px 34px;
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
    position: relative;
    transition: color 0.3s, background 0.3s;
}

.site-nav ul li a:hover,
.site-nav ul li a.active {
    color: #fff;
    background: rgba(255,105,0,0.12);
}

.site-nav ul li a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    width: 60%;
    height: 2px;
    background: #FF6900;
    border-radius: 1px;
}

/* === 主内容区 === */
.content-area {
    max-width: 860px;
    margin: 0 auto;
    padding: 60px 20px;
}

/* === 首页 Banner === */
.content-area h1 {
    font-size: 40px;
    font-weight: 700;
    color: #1a1a2e;
    letter-spacing: -0.5px;
    margin-bottom: 12px;
}

.content-area .subtitle {
    font-size: 17px;
    color: #FF6900;
    margin-bottom: 30px;
    font-weight: 600;
    letter-spacing: 3px;
}

.content-area .tags {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.content-area .tag {
    background: linear-gradient(135deg, #FF6900, #FF8C38);
    color: #fff;
    padding: 6px 18px;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 500;
}

.content-area .tag.gray {
    background: #f0f0f0;
    color: #666;
}

.content-area p {
    font-size: 16px;
    color: #555;
    max-width: 680px;
    margin: 0 auto 18px;
    line-height: 1.9;
}

/* === 分割线 === */
.content-area hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, #FF6900, #FF8C38, #FF6900);
    margin: 50px 0;
    border-radius: 1px;
}

/* === 快速链接 === */
.content-area .section-title {
    font-size: 12px;
    font-weight: 600;
    color: #FF6900;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 28px;
    text-align: center;
}

.content-area .tutorial-list {
    list-style: none;
    text-align: center;
}

.content-area .tutorial-item {
    padding: 24px 0;
    border-bottom: 1px solid #f0f0f0;
}

.content-area .tutorial-item:last-child {
    border-bottom: none;
}

.content-area .tutorial-item h2 {
    font-size: 19px;
    font-weight: 600;
    margin-bottom: 6px;
}

.content-area .tutorial-item h2 a {
    color: #1a1a2e;
    text-decoration: none;
    transition: color 0.3s;
}

.content-area .tutorial-item h2 a:hover {
    color: #FF6900;
}

.content-area .tutorial-item .desc {
    font-size: 14px;
    color: #888;
    line-height: 1.7;
}

/* === 教程方格 === */
.tutorial-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.tutorial-card {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #eee;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.tutorial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 35px rgba(255,105,0,0.12);
    border-color: #FF6900;
}

.card-cover {
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #f5f5f5;
}

.card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s;
}

.tutorial-card:hover .card-cover img {
    transform: scale(1.05);
}

.card-title {
    padding: 16px 18px 6px;
    font-size: 15px;
    font-weight: 600;
    color: #1a1a2e;
    line-height: 1.5;
}

.card-meta {
    padding: 0 18px 16px;
    font-size: 12px;
    color: #bbb;
}

/* === 案例卡片 === */
.case-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 14px;
    padding: 36px;
    margin-bottom: 28px;
    transition: box-shadow 0.3s, border-color 0.3s;
}

.case-card:hover {
    box-shadow: 0 10px 28px rgba(255,105,0,0.1);
    border-color: #FF6900;
}

.case-card h2 {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 14px;
}

.case-card p {
    font-size: 15px;
    color: #666;
    margin-bottom: 22px;
    max-width: none;
    text-align: left;
}

.case-card .btn {
    display: inline-block;
    background: linear-gradient(135deg, #FF6900, #FF8C38);
    color: #fff;
    padding: 12px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

.case-card .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255,105,0,0.3);
}

/* === 联系页面 === */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    margin-top: 30px;
}

.contact-item {
    text-align: center;
    padding: 36px 20px;
    border: 1px solid #eee;
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.contact-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(255,105,0,0.1);
    border-color: #FF6900;
}

.contact-item img {
    width: 170px;
    height: 170px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 12px;
}

.contact-item h3 {
    font-size: 15px;
    color: #1a1a2e;
    font-weight: 700;
    margin: 0;
}

.contact-item p {
    font-size: 13px;
    color: #888;
    margin: 4px 0 0;
}

/* === 放大弹窗 === */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.lightbox.show {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 80vh;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.lightbox .lightbox-name {
    color: #fff;
    font-size: 16px;
    margin-top: 20px;
    font-weight: 600;
}

.lightbox .lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 36px;
    cursor: pointer;
    line-height: 1;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.lightbox .lightbox-close:hover {
    opacity: 1;
}

.lightbox .lightbox-hint {
    color: #999;
    font-size: 13px;
    margin-top: 12px;
}

/* === 底部 === */
.site-footer {
    border-top: none;
    padding: 36px 20px;
    text-align: center;
    font-size: 13px;
    color: #999;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.site-footer a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    transition: color 0.2s;
}

.site-footer a:hover {
    color: #FF6900;
}

/* === 响应式 === */
@media (max-width: 768px) {
    .site-header {
        padding: 36px 20px 20px;
    }
    .site-header .logo-text {
        font-size: 26px;
    }
    .site-nav ul li a {
        padding: 14px 18px;
        font-size: 13px;
    }
    .site-nav ul li a.active::after {
        display: none;
    }
    .content-area {
        padding: 40px 20px;
    }
    .content-area h1 {
        font-size: 28px;
    }
    .contact-grid {
        grid-template-columns: 1fr;
    }
    .tutorial-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    .contact-item img {
        width: 150px;
        height: 150px;
    }
}

@media (max-width: 480px) {
    .site-header .logo-text {
        font-size: 22px;
    }
    .site-nav ul li a {
        padding: 12px 14px;
        font-size: 12px;
    }
    .content-area h1 {
        font-size: 24px;
    }
    .tutorial-grid {
        grid-template-columns: 1fr;
    }
    .content-area p {
        font-size: 15px;
    }
    .case-card {
        padding: 24px;
    }
}
