/* 河马加速器 - 官网主题 */
:root {
    --hm-primary: #0f766e;
    --hm-primary-dark: #115e59;
    --hm-accent: #ea580c;
    --hm-accent-hover: #c2410c;
    --hm-bg: #f0fdfa;
    --hm-surface: #ffffff;
    --hm-text: #134e4a;
    --hm-text-muted: #5f7a78;
    --hm-border: #99d5cf;
    --hm-radius: 12px;
    --hm-radius-lg: 20px;
    --hm-shadow: 0 4px 24px rgba(15, 118, 110, 0.08);
    --hm-transition: 0.25s ease;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.hm-page {
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--hm-text);
    line-height: 1.65;
    background: var(--hm-bg);
    margin: 0;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--hm-primary);
    text-decoration: none;
    transition: color var(--hm-transition);
}

a:hover {
    color: var(--hm-accent);
}

/* 导航 */
.hm-nav {
    background: var(--hm-surface);
    border-bottom: 1px solid var(--hm-border);
    padding: 0.65rem 0;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.hm-nav .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23134e4a' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.hm-nav-brand img {
    height: 42px;
    width: auto;
}

.hm-nav-list .nav-link {
    color: var(--hm-text) !important;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.45rem 0.85rem !important;
    border-radius: 8px;
}

.hm-nav-list .nav-link:hover {
    color: var(--hm-primary) !important;
    background: rgba(15, 118, 110, 0.08);
}

.hm-nav-toggler {
    border-color: var(--hm-border);
    padding: 0.35rem 0.55rem;
}

.hm-nav .navbar-collapse {
    background: var(--hm-surface);
}

/* 英雄区 */
.hm-hero {
    background: linear-gradient(160deg, var(--hm-primary-dark) 0%, var(--hm-primary) 45%, #14b8a6 100%);
    color: #fff;
    padding: 4rem 0 4.5rem;
    position: relative;
    overflow: hidden;
}

.hm-hero::after {
    content: "";
    position: absolute;
    right: -10%;
    top: -20%;
    width: 50%;
    height: 140%;
    background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, transparent 70%);
    pointer-events: none;
}

.hm-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hm-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.35);
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 0.8rem;
    margin-bottom: 1rem;
    letter-spacing: 0.02em;
}

.hm-hero-title {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 1rem;
}

.hm-hero-lead {
    font-size: 1.05rem;
    opacity: 0.92;
    margin-bottom: 1.75rem;
    max-width: 540px;
}

.hm-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.hm-hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hm-hero-img {
    max-width: 280px;
    border-radius: var(--hm-radius-lg);
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
}

/* 按钮 */
.hm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.35rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    border: 2px solid transparent;
    transition: transform var(--hm-transition), box-shadow var(--hm-transition), background var(--hm-transition);
    white-space: nowrap;
}

.hm-btn:hover {
    transform: translateY(-2px);
    color: inherit;
}

.hm-btn-light {
    background: #fff;
    color: var(--hm-primary-dark);
}

.hm-btn-primary {
    background: var(--hm-accent);
    color: #fff;
    border-color: var(--hm-accent);
}

.hm-btn-primary:hover {
    background: var(--hm-accent-hover);
    color: #fff;
}

.hm-btn-accent {
    background: #fff;
    color: var(--hm-accent);
    border-color: #fff;
}

.hm-btn-ghost {
    background: transparent;
    color: #fff;
    border-color: rgba(255,255,255,0.6);
}

.hm-btn-ghost:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

.hm-btn-block {
    width: 100%;
}

/* 通用区块 */
.hm-section {
    padding: 4rem 0;
}

.hm-section-head {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 2.5rem;
}

.hm-section-head h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    margin: 0 0 0.75rem;
    color: var(--hm-primary-dark);
}

.hm-section-head p {
    color: var(--hm-text-muted);
    margin: 0;
}

/* 特点 */
.hm-features {
    background: var(--hm-surface);
}

.hm-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.hm-feature-item {
    background: var(--hm-bg);
    border: 1px solid var(--hm-border);
    border-radius: var(--hm-radius);
    padding: 1.75rem 1.5rem;
    transition: border-color var(--hm-transition), box-shadow var(--hm-transition);
}

.hm-feature-item:hover {
    border-color: var(--hm-primary);
    box-shadow: var(--hm-shadow);
}

.hm-feature-num {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--hm-accent);
    opacity: 0.85;
    line-height: 1;
    margin-bottom: 0.75rem;
}

.hm-feature-item h3 {
    font-size: 1.15rem;
    margin: 0 0 0.5rem;
}

.hm-feature-item p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--hm-text-muted);
}

/* 数据条 */
.hm-stats {
    background: var(--hm-primary-dark);
    color: #fff;
    padding: 2.5rem 0;
}

.hm-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    text-align: center;
}

.hm-stat strong {
    display: block;
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 700;
    line-height: 1.2;
}

.hm-stat span {
    font-size: 0.9rem;
    opacity: 0.85;
}

/* 下载 */
.hm-download {
    background: linear-gradient(180deg, var(--hm-bg) 0%, #e6fffa 100%);
}

.hm-download-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    align-items: stretch;
}

.hm-dl-card {
    background: var(--hm-surface);
    border: 1px solid var(--hm-border);
    border-radius: var(--hm-radius);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    position: relative;
    min-height: 0;
    overflow: hidden;
}

.hm-dl-card-highlight {
    border-color: var(--hm-accent);
    box-shadow: 0 8px 32px rgba(234, 88, 12, 0.12);
}

.hm-dl-tag {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--hm-accent);
    color: #fff;
    font-size: 0.7rem;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    font-weight: 600;
}

.hm-dl-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: #fff;
}

.hm-dl-pc { background: #0369a1; }
.hm-dl-mobile { background: #16a34a; }
.hm-dl-app { background: var(--hm-primary); }

.hm-dl-card h3 {
    font-size: 1.1rem;
    margin: 0 0 0.5rem;
}

.hm-dl-card > p {
    font-size: 0.9rem;
    color: var(--hm-text-muted);
    margin: 0 0 1rem;
    flex-grow: 0;
}

.hm-dl-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem;
    font-size: 0.88rem;
    color: var(--hm-text-muted);
}

.hm-dl-list li {
    padding: 0.25rem 0 0.25rem 1.1rem;
    position: relative;
}

.hm-dl-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--hm-accent);
}

.hm-dl-card .hm-btn {
    margin-top: auto;
}

/* 安全 */
.hm-security {
    background: var(--hm-surface);
}

.hm-security-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.hm-sec-card {
    border: 1px solid var(--hm-border);
    border-radius: var(--hm-radius);
    padding: 1.5rem 1.25rem;
    text-align: center;
    background: var(--hm-bg);
    height: 100%;
}

.hm-sec-card i {
    font-size: 1.75rem;
    color: var(--hm-primary);
    margin-bottom: 0.75rem;
}

.hm-sec-card h3 {
    font-size: 1rem;
    margin: 0 0 0.5rem;
}

.hm-sec-card p {
    font-size: 0.88rem;
    color: var(--hm-text-muted);
    margin: 0;
}

/* 知识 */
.hm-knowledge {
    background: var(--hm-primary-dark);
    color: #fff;
}

.hm-knowledge-wrap {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 2rem;
    align-items: start;
}

.hm-knowledge-text h2 {
    font-size: 1.5rem;
    margin: 0 0 1rem;
}

.hm-knowledge-text p {
    opacity: 0.9;
    margin: 0 0 1rem;
    font-size: 0.95rem;
}

.hm-knowledge-aside {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--hm-radius);
    padding: 1.5rem;
}

.hm-knowledge-aside h3 {
    font-size: 1.1rem;
    margin: 0 0 1rem;
}

.hm-knowledge-aside ul {
    margin: 0;
    padding-left: 1.2rem;
    font-size: 0.92rem;
    opacity: 0.92;
}

.hm-knowledge-aside li {
    margin-bottom: 0.4rem;
}

/* FAQ */
.hm-faq {
    background: var(--hm-bg);
}

.hm-faq-grid {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.hm-faq-item {
    background: var(--hm-surface);
    border: 1px solid var(--hm-border);
    border-radius: var(--hm-radius);
    padding: 0 1.25rem;
    overflow: hidden;
}

.hm-faq-item summary {
    padding: 1rem 0;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    color: var(--hm-primary-dark);
}

.hm-faq-item summary::-webkit-details-marker {
    display: none;
}

.hm-faq-item summary::after {
    content: "+";
    float: right;
    font-weight: 400;
    color: var(--hm-accent);
}

.hm-faq-item[open] summary::after {
    content: "−";
}

.hm-faq-item p {
    padding: 0 0 1rem;
    margin: 0;
    font-size: 0.92rem;
    color: var(--hm-text-muted);
    border-top: 1px solid var(--hm-border);
    padding-top: 0.75rem;
}

/* 文章 */
.hm-articles {
    background: var(--hm-surface);
}

.hm-articles-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.hm-articles-head h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--hm-primary-dark);
}

.hm-link-more {
    font-weight: 600;
    font-size: 0.95rem;
}

.hm-article-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}

.hm-article-card {
    border: 1px solid var(--hm-border);
    border-radius: var(--hm-radius);
    overflow: hidden;
    background: var(--hm-bg);
    transition: box-shadow var(--hm-transition);
    min-width: 0;
}

.hm-article-card:hover {
    box-shadow: var(--hm-shadow);
}

.hm-article-thumb {
    display: block;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.hm-article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hm-article-body {
    padding: 0.75rem;
}

.hm-article-meta {
    font-size: 0.75rem;
    color: var(--hm-text-muted);
    display: block;
    margin-bottom: 0.35rem;
}

.hm-article-body h3 {
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hm-article-body h3 a {
    color: var(--hm-text);
}

.hm-article-body h3 a:hover {
    color: var(--hm-primary);
}

/* 页脚 */
.hm-footer {
    background: #0c4a44;
    color: rgba(255,255,255,0.85);
    padding: 3rem 0 1.5rem;
}

.hm-footer a {
    color: rgba(255,255,255,0.75);
}

.hm-footer a:hover {
    color: #fff;
}

.hm-footer-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.hm-footer-brand p {
    font-size: 0.9rem;
    margin: 0.75rem 0 0;
    opacity: 0.8;
    max-width: 280px;
}

.hm-footer-col h4 {
    font-size: 0.95rem;
    margin: 0 0 1rem;
    color: #fff;
}

.hm-footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.hm-footer-col li {
    margin-bottom: 0.45rem;
    font-size: 0.88rem;
}

.hm-footer-links h4 {
    font-size: 0.95rem;
    margin: 0 0 0.75rem;
    color: #fff;
}

.hm-friend-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
}

.hm-footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.15);
    padding-top: 1.25rem;
    text-align: center;
    font-size: 0.85rem;
}

.hm-footer-bottom p {
    margin: 0.35rem 0;
}

/* ========== 列表页 / 内页 ========== */
body.hm-inner {
    background: var(--hm-bg);
}

.hm-inner-main {
    padding: 2.5rem 0 3rem;
}

.hm-inner-header {
    margin-bottom: 1.5rem;
}

.hm-inner-header h1 {
    font-size: clamp(1.35rem, 3vw, 1.75rem);
    color: var(--hm-primary-dark);
    margin: 0 0 0.5rem;
}

.hm-inner-header p {
    color: var(--hm-text-muted);
    margin: 0;
}

.hm-panel {
    background: var(--hm-surface);
    border: 1px solid var(--hm-border);
    border-radius: var(--hm-radius);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
    overflow: hidden;
}

.hm-panel h2,
.hm-panel h3 {
    color: var(--hm-primary-dark);
}

.hm-list-item {
    border-bottom: 1px solid var(--hm-border);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.hm-list-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.hm-list-item h2 {
    font-size: 1.05rem;
    margin: 0 0 0.35rem;
    line-height: 1.35;
}

.hm-list-item h2 a {
    color: var(--hm-text);
}

.hm-list-item h2 a:hover {
    color: var(--hm-primary);
}

.hm-thumb-list,
.hm-thumb-related {
    width: 100%;
    height: 84px;
    object-fit: cover;
    border-radius: 8px;
}

.hm-thumb-side {
    width: 100%;
    height: 54px;
    object-fit: cover;
    border-radius: 6px;
}

.hm-thumb-cover {
    max-width: 100%;
    width: 100%;
    height: auto;
    max-height: 320px;
    object-fit: cover;
    border-radius: var(--hm-radius);
}

.z67a5barticle-content {
    line-height: 1.8;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.z67a5barticle-content img {
    max-width: 100%;
    height: auto;
}

.z67a5bmeta-tags .z67a5btagitem a {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: var(--hm-bg);
    border: 1px solid var(--hm-border);
    border-radius: 6px;
    font-size: 0.85rem;
    margin: 0.2rem;
}

.pagebar .pagelist,
.zzpages .pagelist {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagebar .pagelist li {
    display: inline-flex;
}

/* 响应式 */
@media (max-width: 1199px) {
    .hm-article-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 991px) {
    .hm-hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hm-hero-lead {
        margin-left: auto;
        margin-right: auto;
    }

    .hm-hero-actions {
        justify-content: center;
    }

    .hm-feature-grid,
    .hm-download-grid,
    .hm-security-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hm-stats-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .hm-knowledge-wrap {
        grid-template-columns: 1fr;
    }

    .hm-article-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .hm-footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 767px) {
    .hm-section {
        padding: 2.75rem 0;
    }

    .hm-hero {
        padding: 2.5rem 0 3rem;
    }

    .hm-hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hm-hero-actions .hm-btn {
        width: 100%;
    }

    .hm-feature-grid,
    .hm-download-grid,
    .hm-security-grid {
        grid-template-columns: 1fr;
    }

    .hm-stats-row {
        grid-template-columns: 1fr 1fr;
    }

    .hm-article-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hm-footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hm-footer-brand p {
        max-width: none;
    }

    .hm-friend-list {
        justify-content: center;
    }

    .hm-nav .navbar-collapse {
        margin-top: 0.5rem;
        padding: 0.75rem;
        border: 1px solid var(--hm-border);
        border-radius: var(--hm-radius);
        max-height: 70vh;
        overflow-y: auto;
    }

    .hm-dl-card {
        padding: 1.25rem;
    }

    .hm-thumb-list,
    .hm-thumb-related {
        height: 72px;
    }

    .hm-thumb-cover {
        max-height: 200px;
    }
}

@media (max-width: 575px) {
    .hm-stats-row {
        grid-template-columns: 1fr;
    }

    .hm-article-grid {
        grid-template-columns: 1fr;
    }

    .hm-articles-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .hm-panel {
        padding: 1rem;
    }

    .hm-thumb-list,
    .hm-thumb-related {
        height: 64px;
    }

    .hm-thumb-side {
        height: 46px;
    }
}
