/* 海马加速器官网主题 — 深海青 + 琥珀强调色 */
:root {
    --hm-primary: #0f766e;
    --hm-primary-dark: #115e59;
    --hm-primary-light: #14b8a6;
    --hm-accent: #f59e0b;
    --hm-accent-dark: #d97706;
    --hm-bg: #f0fdfa;
    --hm-bg-alt: #ffffff;
    --hm-surface: #ffffff;
    --hm-text: #134e4a;
    --hm-text-muted: #5f7a78;
    --hm-border: rgba(15, 118, 110, 0.12);
    --hm-shadow: 0 4px 24px rgba(15, 118, 110, 0.08);
    --hm-radius: 14px;
    --hm-radius-sm: 10px;
    --hm-nav-h: 64px;
    --hm-transition: 0.25s ease;
    --hm-container: 1140px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body.hm-body,
.hm-body {
    font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", 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-primary-light);
}

/* —— 导航 —— */
.hm-nav {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--hm-border);
    padding: 0.5rem 0;
}

.hm-nav-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.hm-brand img {
    height: 40px;
    width: auto;
}

.hm-toggler {
    border: 1px solid var(--hm-border);
    border-radius: var(--hm-radius-sm);
    padding: 0.35rem 0.55rem;
}

.hm-nav-list {
    gap: 0.15rem;
}

.hm-nav-link {
    color: var(--hm-text) !important;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.45rem 0.85rem !important;
    border-radius: 8px;
    transition: background var(--hm-transition), color var(--hm-transition);
}

.hm-nav-link:hover,
.hm-nav-link:focus {
    color: var(--hm-primary) !important;
    background: rgba(15, 118, 110, 0.08);
}

.hm-nav .navbar-collapse {
    background: var(--hm-surface);
    border-radius: var(--hm-radius-sm);
    margin-top: 0.5rem;
    padding: 0.5rem;
    border: 1px solid var(--hm-border);
}

@media (min-width: 992px) {
    .hm-nav .navbar-collapse {
        background: transparent;
        border: none;
        margin-top: 0;
        padding: 0;
    }
}

/* —— 按钮 —— */
.hm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 999px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform var(--hm-transition), box-shadow var(--hm-transition), background var(--hm-transition);
    white-space: normal;
    text-align: center;
    line-height: 1.3;
}

.hm-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--hm-shadow);
}

.hm-btn--light {
    background: #fff;
    color: var(--hm-primary-dark);
    border-color: rgba(255, 255, 255, 0.3);
}

.hm-btn--accent {
    background: var(--hm-accent);
    color: #1c1917;
    border-color: var(--hm-accent);
}

.hm-btn--accent:hover {
    background: var(--hm-accent-dark);
    color: #fff;
}

.hm-btn--outline {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.55);
}

.hm-btn--outline:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.hm-btn--primary {
    background: linear-gradient(135deg, var(--hm-primary) 0%, var(--hm-primary-dark) 100%);
    color: #fff;
    border-color: transparent;
}

.hm-btn--primary:hover {
    color: #fff;
}

.hm-btn--block {
    width: 100%;
}

/* —— Hero —— */
.hm-hero {
    background: linear-gradient(145deg, var(--hm-primary-dark) 0%, var(--hm-primary) 45%, #2dd4bf 100%);
    color: #fff;
    padding: clamp(3rem, 8vw, 5.5rem) 0 clamp(3rem, 6vw, 4.5rem);
    position: relative;
    overflow: hidden;
}

.hm-hero::after {
    content: "";
    position: absolute;
    right: -10%;
    top: -20%;
    width: 50%;
    height: 140%;
    background: radial-gradient(ellipse, rgba(255, 255, 255, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.hm-hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

@media (min-width: 992px) {
    .hm-hero-grid {
        grid-template-columns: 1.05fr 0.95fr;
        gap: 3rem;
    }
}

.hm-badge {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.35rem 0.85rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    margin-bottom: 1rem;
}

.hm-hero-title {
    font-size: clamp(1.75rem, 4.5vw, 2.75rem);
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 1rem;
    letter-spacing: -0.02em;
}

.hm-hero-lead {
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    opacity: 0.92;
    margin: 0 0 1.5rem;
    max-width: 36em;
}

.hm-hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.hm-hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.hm-hero-img {
    width: 100%;
    max-width: 320px;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.2));
}

/* —— 简介条 —— */
.hm-intro {
    padding: 2.5rem 0;
}

.hm-intro-panel {
    background: var(--hm-surface);
    border: 1px solid var(--hm-border);
    border-radius: var(--hm-radius);
    padding: clamp(1.25rem, 3vw, 2rem);
    box-shadow: var(--hm-shadow);
}

.hm-intro-panel p {
    margin: 0 0 1rem;
    color: var(--hm-text-muted);
    font-size: 0.98rem;
}

.hm-intro-panel p:last-child {
    margin-bottom: 0;
}

/* —— 通用区块 —— */
.hm-section {
    padding: clamp(2.5rem, 6vw, 4rem) 0;
}

.hm-section--alt {
    background: var(--hm-bg-alt);
}

.hm-section-head {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 2rem;
}

.hm-section-title {
    font-size: clamp(1.35rem, 3vw, 1.85rem);
    font-weight: 700;
    color: var(--hm-primary-dark);
    margin: 0 0 0.5rem;
    line-height: 1.3;
}

.hm-section-title--sm {
    font-size: clamp(1.15rem, 2.5vw, 1.45rem);
}

.hm-section-desc {
    color: var(--hm-text-muted);
    margin: 0;
    font-size: 0.98rem;
}

.hm-mb-0 {
    margin-bottom: 0 !important;
}

.hm-muted {
    color: var(--hm-text-muted);
    font-size: 0.88rem;
    margin: 0;
}

/* —— 卡片 —— */
.hm-card {
    background: var(--hm-surface);
    border: 1px solid var(--hm-border);
    border-radius: var(--hm-radius);
    padding: 1.35rem;
    box-shadow: var(--hm-shadow);
    overflow: hidden;
    word-wrap: break-word;
}

.hm-feature-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

@media (min-width: 768px) {
    .hm-feature-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.hm-card--feature {
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hm-card--feature h3 {
    font-size: 1.1rem;
    margin: 0 0 0.5rem;
    color: var(--hm-primary-dark);
}

.hm-card--feature p {
    margin: 0;
    font-size: 0.92rem;
    color: var(--hm-text-muted);
    flex: 1;
}

.hm-card-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.15), rgba(15, 118, 110, 0.08));
    color: var(--hm-primary);
    font-size: 1.35rem;
    margin-bottom: 1rem;
    flex-shrink: 0;
}

/* —— 统计 —— */
.hm-stats {
    background: linear-gradient(90deg, var(--hm-primary-dark), var(--hm-primary));
    color: #fff;
    padding: 2.5rem 0;
}

.hm-stats-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .hm-stats-row {
        grid-template-columns: repeat(4, 1fr);
    }
}

.hm-stat {
    text-align: center;
    padding: 0.5rem;
    border-right: none;
}

@media (min-width: 768px) {
    .hm-stat:not(:last-child) {
        border-right: 1px solid rgba(255, 255, 255, 0.2);
    }
}

.hm-stat strong {
    display: block;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

.hm-stat span {
    font-size: 0.9rem;
    opacity: 0.88;
}

/* —— 下载 —— */
.hm-download-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    max-width: 900px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .hm-download-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.hm-card--download {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.5rem;
}

.hm-dl-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.hm-dl-head h3 {
    font-size: 1.1rem;
    margin: 0 0 0.2rem;
    color: var(--hm-primary-dark);
}

.hm-dl-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: #fff;
}

.hm-dl-icon--win {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.hm-dl-icon--android {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.hm-dl-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem;
    flex: 1;
    font-size: 0.9rem;
    color: var(--hm-text-muted);
}

.hm-dl-list li {
    position: relative;
    padding-left: 1.1rem;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.hm-dl-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--hm-primary-light);
    font-weight: bold;
}

.hm-download-note {
    text-align: center;
    font-size: 0.85rem;
    color: var(--hm-text-muted);
    margin: 1.5rem auto 0;
    max-width: 720px;
    padding: 0 0.5rem;
}

/* —— 安全 —— */
.hm-security-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 576px) {
    .hm-security-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .hm-security-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.hm-card--security {
    text-align: center;
    height: 100%;
    padding: 1.25rem 1rem;
}

.hm-card--security i {
    font-size: 1.75rem;
    color: var(--hm-primary);
    margin-bottom: 0.75rem;
}

.hm-card--security h3 {
    font-size: 1rem;
    margin: 0 0 0.5rem;
    color: var(--hm-primary-dark);
}

.hm-card--security p {
    margin: 0;
    font-size: 0.88rem;
    color: var(--hm-text-muted);
    line-height: 1.55;
}

/* —— 知识贴士 —— */
.hm-knowledge {
    padding: 2rem 0;
    background: linear-gradient(180deg, var(--hm-bg) 0%, rgba(20, 184, 166, 0.06) 100%);
}

.hm-knowledge-inner {
    border: 1px solid var(--hm-border);
    border-radius: var(--hm-radius);
    background: var(--hm-surface);
    padding: clamp(1.25rem, 3vw, 2rem);
}

.hm-knowledge-cols {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 1rem;
}

@media (min-width: 768px) {
    .hm-knowledge-cols {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

.hm-knowledge-cols h4 {
    font-size: 1rem;
    margin: 0 0 0.5rem;
    color: var(--hm-primary-dark);
}

.hm-knowledge-cols p {
    margin: 0;
    font-size: 0.92rem;
    color: var(--hm-text-muted);
}

/* —— FAQ —— */
.hm-faq-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .hm-faq-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.hm-card--faq {
    height: 100%;
    padding: 1.25rem;
}

.hm-card--faq h3 {
    font-size: 1rem;
    margin: 0 0 0.5rem;
    color: var(--hm-primary-dark);
    line-height: 1.4;
}

.hm-card--faq p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--hm-text-muted);
}

/* —— 文章 —— */
.hm-article-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.hm-link-more {
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.hm-article-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
}

@media (min-width: 768px) {
    .hm-article-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
}

@media (min-width: 1200px) {
    .hm-article-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

.hm-card--article {
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.hm-article-thumb-wrap {
    display: block;
    overflow: hidden;
    border-bottom: 1px solid var(--hm-border);
}

.hm-article-thumb {
    width: 100%;
    height: 110px;
    object-fit: cover;
}

.hm-article-body {
    padding: 0.75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.hm-article-meta {
    font-size: 0.75rem;
    color: var(--hm-text-muted);
    margin-bottom: 0.35rem;
}

.hm-card--article 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-card--article h3 a {
    color: var(--hm-text);
}

.hm-card--article h3 a:hover {
    color: var(--hm-primary);
}

/* —— 页脚 —— */
.hm-footer {
    background: var(--hm-primary-dark);
    color: rgba(255, 255, 255, 0.85);
    padding: 2.5rem 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: 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .hm-footer-grid {
        grid-template-columns: 1.4fr repeat(3, 1fr);
    }
}

.hm-footer-brand p {
    font-size: 0.9rem;
    margin: 0.75rem 0 0;
    opacity: 0.8;
    line-height: 1.6;
}

.hm-footer h5 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 0.75rem;
    color: #fff;
}

.hm-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.hm-footer-links li {
    margin-bottom: 0.4rem;
}

.hm-friend {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 1.25rem;
    margin-bottom: 1.25rem;
}

.hm-friend-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
}

.hm-footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 1rem;
    font-size: 0.85rem;
}

.hm-footer-bottom p {
    margin: 0 0 0.35rem;
}

/* —— 列表页 / 内页 —— */
.hm-page {
    padding: 2rem 0 3rem;
    min-height: 50vh;
}

.hm-page-header {
    margin-bottom: 1.5rem;
}

.hm-page-header h1 {
    font-size: clamp(1.25rem, 3vw, 1.6rem);
    color: var(--hm-primary-dark);
    margin: 0 0 0.35rem;
}

.hm-page-header p {
    margin: 0;
    color: var(--hm-text-muted);
    font-size: 0.95rem;
}

.hm-panel {
    background: var(--hm-surface);
    border: 1px solid var(--hm-border);
    border-radius: var(--hm-radius);
    box-shadow: var(--hm-shadow);
    overflow: hidden;
}

.hm-panel-body {
    padding: 1.25rem;
}

.hm-sidebar-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--hm-primary-dark);
    margin: 0 0 0.75rem;
}

.hm-sidebar .hm-panel {
    margin-bottom: 1rem;
}

.hm-sidebar .hm-panel-body {
    padding: 1rem 1.15rem;
}

/* 列表 */
.listbox .e2 {
    margin: 0;
    padding: 0;
}

.listbox .e2 li {
    border-bottom: 1px solid var(--hm-border) !important;
    padding-bottom: 1rem !important;
    margin-bottom: 1rem !important;
}

.listbox .e2 li:last-child {
    border-bottom: none !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.z52555thumb-list,
.z52555thumb-related {
    width: 100%;
    height: 84px;
    object-fit: cover;
    border-radius: var(--hm-radius-sm);
    border: 1px solid var(--hm-border);
}

.z52555thumb-side {
    width: 100%;
    height: 54px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--hm-border);
}

.z52555thumb-cover {
    max-width: 100%;
    width: 100%;
    height: auto;
    max-height: 280px;
    object-fit: cover;
    border-radius: var(--hm-radius-sm);
    border: 1px solid var(--hm-border);
}

.z52555article-content {
    overflow-wrap: break-word;
    word-break: break-word;
}

.z52555article-content img {
    max-width: 100%;
    height: auto;
}

/* 分页 */
.pagebar .pagelist {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagebar .pagelist li {
    display: inline-flex;
    margin: 0;
}

/* —— 移动端 —— */
@media (max-width: 991px) {
    .hm-hero-cta {
        flex-direction: column;
    }

    .hm-hero-cta .hm-btn {
        width: 100%;
    }

    .hm-stat:nth-child(odd) {
        border-right: 1px solid rgba(255, 255, 255, 0.15);
    }

    .hm-stat:nth-child(2),
    .hm-stat:nth-child(4) {
        border-right: none;
    }
}

@media (max-width: 767px) {
    .hm-nav {
        padding: 0.4rem 0;
    }

    .hm-nav .navbar-collapse {
        max-height: 70vh;
        overflow-y: auto;
    }

    .hm-nav-link {
        padding: 0.5rem 0.35rem !important;
        font-size: 0.92rem;
    }

    .hm-card {
        padding: 1.1rem;
    }

    .hm-card--download {
        padding: 1.15rem;
    }

    .hm-dl-head {
        flex-direction: column;
        text-align: center;
    }

    .hm-article-grid {
        grid-template-columns: 1fr;
    }

    .hm-article-thumb {
        height: 140px;
    }

    .hm-footer-grid {
        text-align: center;
    }

    .hm-friend-links {
        justify-content: center;
    }

    .z52555thumb-list,
    .z52555thumb-related {
        height: 72px !important;
    }

    .z52555thumb-side {
        height: 50px !important;
    }

    .z52555thumb-cover {
        max-height: 200px;
    }

    .listbox .e2 li h2.h5 {
        font-size: 1rem;
        line-height: 1.35;
    }

    .listbox .e2 li p {
        font-size: 0.88rem;
    }

    .hm-panel-body {
        padding: 1rem;
    }
}

@media (max-width: 575px) {
    .hm-stats-row {
        gap: 1rem;
    }

    .hm-stat strong {
        font-size: 1.35rem;
    }

    .z52555thumb-list,
    .z52555thumb-related {
        height: 64px !important;
    }

    .pagebar .pagelist {
        gap: 0.35rem;
        font-size: 0.9rem;
    }
}

/* Bootstrap 容器对齐 */
.container {
    max-width: var(--hm-container);
    padding-left: 1rem;
    padding-right: 1rem;
}

/* 内页卡片统一边框，防止溢出 */
.hm-page .card,
.hm-page .hm-panel {
    border: 1px solid var(--hm-border);
    border-radius: var(--hm-radius);
    overflow: hidden;
}

.hm-page .card-body {
    padding: 1.25rem;
}

.hm-page .row {
    --bs-gutter-x: 1rem;
}
