/* =========================================================
   淘宝卡盟 - 前端样式（科技蓝 · 电商风 · 自适应）
   ========================================================= */
:root {
    --primary: #2563eb;
    --primary-deep: #1d4ed8;
    --sky: #0ea5e9;
    --navy: #0b1a33;
    --navy-2: #10254a;
    --text: #1e293b;
    --text-light: #64748b;
    --bg-soft: #f5f8ff;
    --line: #e2e8f0;
    --radius: 14px;
    --shadow: 0 10px 30px rgba(15, 42, 90, .10);
    --shadow-lg: 0 18px 50px rgba(15, 42, 90, .16);
    --grad: linear-gradient(90deg, #2563eb, #0ea5e9);
    --grad-cta: linear-gradient(90deg, #ff7a18, #ff3d6b);
    --maxw: 1200px;
    --header-h: 68px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
                 "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    background: #fff;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ============ 顶部导航 ============ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-h);
    background: rgba(11, 26, 51, .92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.header-inner {
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo { display: flex; align-items: center; flex-shrink: 0; }
.logo img { height: 42px; width: auto; }
.logo-text {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 1px;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.main-nav { display: flex; gap: 6px; }
.nav-link {
    padding: 8px 16px;
    color: rgba(255, 255, 255, .82);
    font-size: 15px;
    border-radius: 8px;
    transition: all .2s ease;
}
.nav-link:hover { color: #fff; background: rgba(255, 255, 255, .10); }
.nav-link.active { color: #fff; background: rgba(37, 99, 235, .55); }

.header-right { display: flex; align-items: center; gap: 12px; }

.btn-enter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 22px;
    border-radius: 999px;
    background: var(--grad-cta);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 6px 18px rgba(255, 61, 107, .35);
    transition: all .25s ease;
    white-space: nowrap;
}
.btn-enter:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(255, 61, 107, .45); }

/* 汉堡按钮 */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 9px;
    border: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, .08);
    cursor: pointer;
}
.nav-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    border-radius: 2px;
    background: #fff;
    transition: all .25s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ 海报轮播 ============ */
.hero { position: relative; background: var(--navy); overflow: hidden; }
.hero-slider { position: relative; height: clamp(300px, 38vw, 540px); }
.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .8s ease;
    z-index: 1;
}
.hero-slide.active { opacity: 1; z-index: 2; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; }
.hero-slide a { display: block; width: 100%; height: 100%; }

/* 默认海报（未上传时） */
.hero-default {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    text-align: center;
    padding: 0 20px;
    background: radial-gradient(ellipse at 30% 20%, #14448f 0%, #0b1a33 60%);
}
.hero-default h1 {
    font-size: clamp(28px, 5vw, 52px);
    color: #fff;
    letter-spacing: 2px;
}
.hero-default p { color: rgba(255, 255, 255, .75); font-size: clamp(14px, 2vw, 18px); max-width: 640px; }
.btn-hero { font-size: 16px; padding: 12px 34px; }

/* 圆点 */
.hero-dots {
    position: absolute;
    bottom: 18px;
    left: 0;
    right: 0;
    z-index: 5;
    display: flex;
    justify-content: center;
    gap: 8px;
}
.hero-dots span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .45);
    cursor: pointer;
    transition: all .25s ease;
}
.hero-dots span.active { background: #fff; width: 26px; border-radius: 6px; }

/* 左右箭头 */
.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 6;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(11, 26, 51, .45);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    transition: all .25s ease;
    backdrop-filter: blur(4px);
}
.hero-arrow:hover { background: rgba(37, 99, 235, .85); }
.hero-arrow.prev { left: 18px; }
.hero-arrow.next { right: 18px; }

/* ============ 通用区块 ============ */
.section { padding: 64px 0; }
.articles { background: #fff; }
.links { background: var(--bg-soft); }

.section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 30px;
}
.section-head h2 {
    font-size: 26px;
    font-weight: 800;
    position: relative;
    padding-left: 16px;
    color: var(--navy);
}
.section-head h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 22px;
    border-radius: 3px;
    background: var(--grad);
}
.section-head p { color: var(--text-light); font-size: 14px; }
.section-head .more { color: var(--primary); font-size: 14px; }
.section-head .more:hover { text-decoration: underline; }

.empty-tip { padding: 30px; text-align: center; color: var(--text-light); background: #fff; border: 1px dashed var(--line); border-radius: var(--radius); }

/* ============ 文章卡片 ============ */
.article-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}
.article-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all .28s ease;
    display: flex;
    flex-direction: column;
}
.article-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}
.article-body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.article-card h3 {
    font-size: 16px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 48px;
    color: var(--navy);
    transition: color .2s;
}
.article-card:hover h3 { color: var(--primary); }
.article-summary {
    margin-top: 10px;
    color: var(--text-light);
    font-size: 13px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}
.article-meta {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}
.article-meta .date { color: var(--text-light); }
.article-meta .read-more { color: var(--primary); font-weight: 600; }

/* ============ 友情链接 ============ */
.links-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.link-item {
    padding: 8px 20px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--text-light);
    font-size: 14px;
    transition: all .2s ease;
}
.link-item:hover {
    color: #fff;
    border-color: transparent;
    background: var(--grad);
    box-shadow: 0 6px 16px rgba(37, 99, 235, .3);
}

/* ============ 底部 ============ */
.site-footer {
    background: var(--navy);
    color: rgba(255, 255, 255, .7);
    padding-top: 48px;
}
.footer-main { padding-bottom: 30px; }
.footer-about { max-width: 720px; }
.footer-logo {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 12px;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.footer-about p { font-size: 14px; line-height: 1.8; }
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .10);
    padding: 18px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    justify-content: space-between;
    font-size: 13px;
}
.footer-bottom .icp a { color: rgba(255, 255, 255, .6); }
.footer-bottom .icp a:hover { color: #fff; }

/* ============ 回到顶部 ============ */
.back-top {
    position: fixed;
    right: 22px;
    bottom: 26px;
    z-index: 90;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 12px;
    background: var(--grad);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: all .3s ease;
}
.back-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-top:hover { transform: translateY(-3px); }

/* ============ 文章详情页 ============ */
.breadcrumb { font-size: 13px; color: var(--text-light); margin-bottom: 18px; }
.breadcrumb a { color: var(--primary); }
.breadcrumb a:hover { text-decoration: underline; }

.article-detail .container { max-width: 860px; }

.article-content {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 36px 40px;
    box-shadow: var(--shadow);
}
.article-content h1 { font-size: 26px; color: var(--navy); line-height: 1.45; }
.article-info {
    margin: 14px 0 24px;
    padding-bottom: 18px;
    border-bottom: 1px dashed var(--line);
    color: var(--text-light);
    font-size: 13px;
}
.content-body { font-size: 15.5px; line-height: 1.9; color: var(--text); }
.content-body h1, .content-body h2, .content-body h3, .content-body h4 { color: var(--navy); margin: 22px 0 12px; }
.content-body h3 { font-size: 19px; }
.content-body p { margin: 12px 0; }
.content-body img { border-radius: 10px; margin: 14px 0; }
.content-body a { color: var(--primary); }
.content-body ul, .content-body ol { padding-left: 22px; margin: 12px 0; }
.content-body blockquote {
    border-left: 4px solid var(--sky);
    background: var(--bg-soft);
    padding: 12px 16px;
    border-radius: 0 8px 8px 0;
    margin: 14px 0;
    color: var(--text-light);
}

.article-pager {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    margin-top: 22px;
}
.pager-item {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 13px;
    color: var(--text-light);
    max-width: 48%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: all .2s;
}
.pager-item:hover { border-color: var(--primary); color: var(--primary); }
.pager-item.right { margin-left: auto; }
.back-home { margin-top: 22px; text-align: center; }
.back-home a { color: var(--primary); font-size: 14px; }

/* ============ 文章列表页 ============ */
.list-articles { display: flex; flex-direction: column; gap: 14px; }
.list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px 24px;
    transition: all .22s ease;
}
.list-item:hover { border-color: transparent; box-shadow: var(--shadow-lg); transform: translateX(4px); }
.list-main { flex: 1; min-width: 0; }
.list-main h3 { font-size: 17px; color: var(--navy); transition: color .2s; }
.list-item:hover .list-main h3 { color: var(--primary); }
.list-main p { margin-top: 6px; color: var(--text-light); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.list-side .date { font-size: 13px; color: var(--text-light); }
.list-side .go { font-size: 13px; color: var(--primary); font-weight: 600; }

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin-top: 30px;
}
.pagination a {
    padding: 8px 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--primary);
    font-size: 14px;
    transition: all .2s;
}
.pagination a:hover { background: var(--grad); color: #fff; border-color: transparent; }
.page-info { color: var(--text-light); font-size: 14px; }

/* ============ 响应式 ============ */
@media (max-width: 992px) {
    .article-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 860px) {
    .main-nav {
        position: fixed;
        top: var(--header-h);
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--navy-2);
        padding: 12px 16px 18px;
        gap: 2px;
        transform: translateY(-12px);
        opacity: 0;
        visibility: hidden;
        transition: all .28s ease;
        border-bottom: 1px solid rgba(255, 255, 255, .08);
        box-shadow: 0 20px 40px rgba(0, 0, 0, .35);
    }
    .main-nav.open { transform: translateY(0); opacity: 1; visibility: visible; }
    .nav-link { padding: 12px 16px; font-size: 15px; }
    .nav-toggle { display: flex; }
    .section { padding: 48px 0; }
    .article-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
    :root { --header-h: 60px; }
    .logo-text { font-size: 18px; }
    .logo img { height: 34px; }
    .btn-enter { padding: 8px 16px; font-size: 13px; }
    .hero-slider { height: 230px; }
    .hero-arrow { width: 36px; height: 36px; font-size: 14px; }
    .hero-arrow.prev { left: 10px; }
    .hero-arrow.next { right: 10px; }
    .section { padding: 38px 0; }
    .section-head h2 { font-size: 21px; }
    .article-grid { grid-template-columns: 1fr; gap: 16px; }
    .article-content { padding: 24px 18px; }
    .article-content h1 { font-size: 21px; }
    .list-item { flex-direction: column; align-items: flex-start; gap: 8px; padding: 16px; }
    .list-side { flex-direction: row; align-items: center; gap: 12px; }
    .pager-item { max-width: 100%; width: 100%; }
    .back-top { right: 14px; bottom: 18px; }
}
