/*
 * 门户（public site）设计系统：首页 / 使用帮助 / 登录注册。
 *
 * 依赖 tokens.css 提供的设计令牌与基础背景，这里只补充门户组件样式。
 */

a { text-decoration: none; }

.hidden { display: none !important; }

/* ===== 顶部导航 ===== */
.site-header {
    position: relative;
    z-index: 1200;
    padding: 18px 0 0;
}

.site-nav {
    width: var(--ae-width);
    margin: 0 auto;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border: 1px solid var(--ae-border);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--ae-shadow);
    backdrop-filter: blur(14px);
    position: relative;
    z-index: 1201;
}

.site-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: var(--ae-text);
}

.site-brand img { width: 42px; height: 42px; object-fit: contain; display: block; }

.site-brand-copy { display: flex; flex-direction: column; gap: 2px; }
.site-brand-copy strong { font-size: 1rem; font-weight: 700; }
.site-brand-copy span { font-size: 0.86rem; color: var(--ae-muted); }

.site-nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
    flex-wrap: wrap;
}

.site-nav-link {
    padding: 10px 16px;
    border-radius: 999px;
    color: #334155;
    font-weight: 600;
    transition: color 0.2s ease, background 0.2s ease;
}

.site-nav-link:hover,
.site-nav-link.active {
    color: var(--ae-primary-dark);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.10), rgba(14, 165, 233, 0.08));
}

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

/* ===== 主题切换 ===== */
.theme-toggle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--ae-border);
    background: var(--ae-bg);
    color: var(--ae-fg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.1rem;
}

.theme-toggle:hover {
    background: var(--ae-surface-1);
    border-color: var(--ae-accent);
    color: var(--ae-accent);
    transform: scale(1.05);
}

.theme-toggle:active {
    transform: scale(0.95);
}

/* ===== 网站公告 ===== */
.site-announcement-entry { position: relative; z-index: 1203; }

.announcement-trigger {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(191, 219, 254, 0.95);
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.95), rgba(255, 255, 255, 0.96));
    color: var(--ae-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.08);
    transition: all 0.2s ease;
    font-size: 1.15rem;
}

.announcement-trigger:hover { border-color: rgba(147, 197, 253, 0.95); color: var(--ae-primary-dark); }
.announcement-trigger.is-open { background: linear-gradient(135deg, rgba(219, 234, 254, 0.95), rgba(239, 246, 255, 0.96)); }

.announcement-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 320px;
    border-radius: 14px;
    border: 1px solid var(--ae-border);
    background: #fff;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.announcement-dropdown-header {
    padding: 12px 16px;
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--ae-primary-dark);
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.8), rgba(255, 255, 255, 0.9));
    border-bottom: 1px solid var(--ae-border);
}

.announcement-dropdown-body {
    padding: 14px 16px;
    font-size: 0.9rem;
    line-height: 1.65;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 300px;
    overflow-y: auto;
}

/* ===== 账号入口 ===== */
.site-account-entry { position: relative; min-width: 140px; z-index: 1202; }

.account-trigger {
    padding: 10px 14px;
    border-radius: 18px;
    border: 1px solid rgba(191, 219, 254, 0.95);
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.95), rgba(255, 255, 255, 0.96));
    color: var(--ae-text);
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.08);
    transition: all 0.2s ease;
    font: inherit;
    text-align: left;
}

.account-trigger:hover { border-color: rgba(147, 197, 253, 0.95); }
.account-trigger.is-open .account-arrow { transform: rotate(180deg); }
.account-trigger > .bi-person-circle { font-size: 1.3rem; color: var(--ae-primary); }

.account-info { display: flex; flex-direction: column; gap: 1px; }
.account-info strong { font-size: 0.9rem; }
.account-info span { font-size: 0.78rem; color: var(--ae-muted); }

.account-arrow { font-size: 0.7rem; color: var(--ae-muted); margin-left: auto; transition: transform 0.2s ease; }


/* ===== 账号下拉菜单 ===== */
.account-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    padding: 8px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid var(--ae-border);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
    z-index: 1300;
}

.dropdown-user-info { padding: 12px 14px; }
.dropdown-username { font-weight: 700; font-size: 0.95rem; }
.dropdown-role { font-size: 0.82rem; color: var(--ae-muted); margin-top: 2px; }

.account-dropdown .dropdown-divider { height: 1px; background: var(--ae-border); margin: 4px 0; }

.account-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 12px;
    color: var(--ae-text);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.15s ease;
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    font: inherit;
    cursor: pointer;
}

.account-dropdown .dropdown-item:hover { background: rgba(37, 99, 235, 0.06); color: var(--ae-primary); }

/* ===== 页面容器 ===== */
.page-shell { width: var(--ae-width); margin: 0 auto; padding: 28px 0 64px; }

/* ===== 区块通用 ===== */
.section-kicker {
    color: var(--ae-primary-dark);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.section-header-center { text-align: center; margin-bottom: 36px; }
.section-header-center h2 { font-size: 1.7rem; font-weight: 800; margin: 8px 0; }
.section-header-center p { color: var(--ae-muted); margin: 0; }

.section-panel {
    padding: 34px;
    border-radius: 26px;
    border: 1px solid var(--ae-border);
    background: var(--ae-panel);
    box-shadow: var(--ae-shadow);
    margin-bottom: 28px;
}

.btn-primary { background: var(--ae-primary); border-color: var(--ae-primary); }
.btn-primary:hover, .btn-primary:focus { background: var(--ae-primary-dark); border-color: var(--ae-primary-dark); }

/* ===== 首页 Hero ===== */
.hero-section {
    padding: 72px 40px 64px;
    border-radius: 28px;
    background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 52%, #38bdf8 100%);
    color: #fff;
    text-align: center;
    margin-bottom: 40px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
}

.hero-content { max-width: 820px; margin: 0 auto; }

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #dbeafe;
    font-weight: 600;
    font-size: 0.9rem;
}

.hero-title { font-size: clamp(2.1rem, 4.6vw, 3.4rem); font-weight: 800; line-height: 1.12; margin: 24px 0 16px; letter-spacing: -0.02em; }
.hero-desc { max-width: 660px; margin: 0 auto 32px; color: rgba(226, 232, 240, 0.9); font-size: 1.06rem; line-height: 1.7; }
.hero-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.hero-actions .btn { border-radius: 999px; padding: 12px 28px; font-weight: 600; }

/* ===== 首页产品卡片 ===== */
.products-section { padding: 12px 0 44px; }
.products-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }

.product-card {
    display: flex;
    flex-direction: column;
    padding: 30px;
    border-radius: 26px;
    border: 1px solid var(--ae-border);
    border-top: 4px solid var(--ae-primary);
    background: var(--ae-panel);
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.07);
}

.product-card-loneact { border-top-color: #0ea5e9; }

.product-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }

.product-icon {
    width: 56px;
    height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: linear-gradient(135deg, #eef2ff, #dbeafe);
    color: #1d4ed8;
    font-size: 1.45rem;
    flex: 0 0 auto;
}

.product-card-loneact .product-icon { background: linear-gradient(135deg, #e0f2fe, #eef2ff); color: #0284c7; }

.product-name { font-size: 1.35rem; font-weight: 800; margin: 0; }
.product-tagline { color: var(--ae-muted); font-size: 0.9rem; margin-top: 4px; }
.product-desc { color: #475569; line-height: 1.7; margin: 0 0 18px; }

.product-meta { display: grid; gap: 10px; margin-bottom: 18px; }
.product-meta-row { display: flex; gap: 12px; font-size: 0.92rem; color: #475569; }
.product-meta-label { flex: 0 0 60px; font-weight: 700; color: var(--ae-primary-dark); }

.product-points { margin: 0 0 22px; padding-left: 20px; color: #475569; line-height: 1.75; }

.product-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; }


/* ===== 共享基础 ===== */
.foundation-band {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 30px;
    padding: 38px;
    border-radius: 26px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.97), rgba(29, 78, 216, 0.95));
    color: #fff;
    margin: 12px 0 44px;
    box-shadow: 0 22px 52px rgba(15, 23, 42, 0.2);
}

.foundation-copy h2 { font-size: 1.7rem; font-weight: 800; margin: 8px 0 12px; }
.foundation-copy p { color: rgba(226, 232, 240, 0.9); line-height: 1.7; margin: 0; }
.foundation-band .section-kicker { color: #93c5fd; }

.foundation-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.foundation-list li { display: flex; gap: 12px; padding: 16px; border-radius: 18px; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.12); }
.foundation-list i { font-size: 1.3rem; color: #bfdbfe; }
.foundation-list strong { display: block; font-size: 0.96rem; }
.foundation-list span { display: block; font-size: 0.85rem; color: rgba(226, 232, 240, 0.8); margin-top: 3px; }

/* ===== 为什么选择 ===== */
.features-section { padding: 8px 0 40px; }
.features-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }

.feature-card { padding: 26px; border-radius: 24px; border: 1px solid var(--ae-border); background: var(--ae-panel); box-shadow: 0 16px 36px rgba(15, 23, 42, 0.06); transition: transform 0.22s ease, box-shadow 0.22s ease; }
.feature-card:hover { transform: translateY(-4px); box-shadow: 0 22px 48px rgba(15, 23, 42, 0.12); }

.feature-icon { width: 52px; height: 52px; display: inline-flex; align-items: center; justify-content: center; border-radius: 16px; background: linear-gradient(135deg, #eef2ff, #dbeafe); color: #1d4ed8; font-size: 1.3rem; margin-bottom: 16px; }
.feature-card h3 { font-size: 1.06rem; font-weight: 700; margin: 0 0 8px; }
.feature-card p { color: var(--ae-muted); margin: 0; line-height: 1.65; }

/* ===== 行动号召 ===== */
.cta-section { padding: 56px 40px; border-radius: 28px; background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%); color: #fff; text-align: center; margin: 12px 0 20px; box-shadow: 0 22px 48px rgba(37, 99, 235, 0.22); }
.cta-content { max-width: 620px; margin: 0 auto; }
.cta-content h2 { font-size: 1.7rem; font-weight: 800; margin: 0 0 12px; }
.cta-content p { color: rgba(224, 231, 255, 0.9); margin: 0 0 28px; }
.cta-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.cta-actions .btn { border-radius: 999px; padding: 12px 28px; font-weight: 600; }

/* ===== 页脚 ===== */
.site-footer { width: var(--ae-width); margin: 0 auto; padding: 24px 0 40px; }
.site-footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 24px; border: 1px solid var(--ae-border); border-radius: 22px; background: rgba(255, 255, 255, 0.9); box-shadow: var(--ae-shadow); }
.site-footer-brand { display: flex; align-items: center; gap: 14px; }
.site-footer-brand img { width: 40px; height: 40px; object-fit: contain; }
.site-footer-brand strong { display: block; font-size: 0.98rem; }
.site-footer-brand p { margin: 2px 0 0; color: var(--ae-muted); font-size: 0.86rem; }
.site-footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer-links a { color: var(--ae-muted); font-size: 0.9rem; font-weight: 500; }
.site-footer-links a:hover { color: var(--ae-primary); }
.site-footer-copy { text-align: center; color: var(--ae-muted); font-size: 0.82rem; margin-top: 18px; }

/* ===== 使用帮助 ===== */
.docs-hero {
    padding: 40px;
    border-radius: 28px;
    background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 58%, #38bdf8 100%);
    color: #fff;
    margin-bottom: 28px;
    box-shadow: 0 22px 52px rgba(15, 23, 42, 0.18);
}

.docs-hero .section-kicker { color: #93c5fd; }
.docs-hero-title { font-size: clamp(1.9rem, 3.6vw, 2.6rem); font-weight: 800; margin: 10px 0 12px; }
.docs-hero-desc { max-width: 760px; color: rgba(226, 232, 240, 0.92); line-height: 1.7; margin: 0 0 22px; }
.docs-jump-nav { display: flex; gap: 8px; flex-wrap: wrap; }

.docs-grid { display: grid; gap: 18px; }
.docs-grid-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.docs-grid-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.download-card, .info-card, .scenario-card, .faq-item {
    padding: 24px;
    border-radius: 22px;
    border: 1px solid var(--ae-border);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.95));
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.download-card { display: flex; flex-direction: column; }

.download-icon, .info-icon {
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: linear-gradient(135deg, #dbeafe, #eef2ff);
    color: #1d4ed8;
    font-size: 1.25rem;
    margin-bottom: 16px;
}

.download-title { font-size: 1.12rem; font-weight: 800; }
.download-desc { margin-top: 8px; color: #475569; line-height: 1.7; }
.download-note { margin-top: 10px; color: var(--ae-muted); font-size: 0.95rem; line-height: 1.7; }
.download-hint { margin-top: 8px; color: var(--ae-muted); font-size: 0.85rem; }
.download-card .btn { align-self: flex-start; margin-top: 16px; }

.info-card h3 { margin: 0 0 10px; font-size: 1.06rem; font-weight: 700; }
.info-card p { margin: 0; color: var(--ae-muted); line-height: 1.7; }

.scenario-card { display: flex; flex-direction: column; }
.scenario-title { font-weight: 700; margin-bottom: 14px; }
.method-list { margin: 0; padding-left: 20px; color: #475569; line-height: 1.7; }
.method-list li + li { margin-top: 10px; }

.faq-list { display: grid; gap: 16px; }
.faq-item summary { cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-question { font-weight: 700; color: var(--ae-text); }
.faq-question::after { content: "+"; float: right; color: var(--ae-primary); font-size: 1.15rem; }
.faq-item[open] { border-color: #bfdbfe; }
.faq-item[open] .faq-question::after { content: "−"; }
.faq-answer { margin-top: 10px; color: var(--ae-muted); line-height: 1.7; }


html { scroll-behavior: smooth; }

/* ===== 登录 / 注册 ===== */
.auth-page { display: flex; align-items: center; justify-content: center; min-height: calc(100vh - 260px); padding: 40px 16px; }
.auth-container { width: 100%; max-width: 420px; }

.auth-brand { text-align: center; margin-bottom: 26px; }
.auth-brand img { width: 58px; height: 58px; object-fit: contain; margin-bottom: 16px; }
.auth-brand h1 { font-size: 1.5rem; font-weight: 800; margin: 0 0 8px; }
.auth-brand p { color: var(--ae-muted); font-size: 0.95rem; margin: 0; }

.auth-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 16px; background: rgba(241, 245, 249, 0.9); border: 1px solid var(--ae-border); margin-bottom: 24px; }

.auth-tab { flex: 1; padding: 10px; border: none; border-radius: 12px; background: transparent; font-weight: 600; color: var(--ae-muted); cursor: pointer; transition: all 0.2s ease; }
.auth-tab.active { background: #fff; color: var(--ae-primary); box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08); }

.auth-panel { padding: 28px; border-radius: 24px; background: var(--ae-panel); border: 1px solid var(--ae-border); box-shadow: var(--ae-shadow); }
.auth-panel-heading { display: flex; flex-direction: column; gap: 3px; margin-bottom: 22px; }
.auth-panel-heading strong { font-size: 1.08rem; }
.auth-panel-heading span { color: var(--ae-muted); font-size: 0.86rem; }

.form-field { margin-bottom: 16px; }
.auth-panel .form-control { border-radius: 12px; padding: 10px 14px; }

.password-field { position: relative; }
.password-field .form-control { padding-right: 46px; }
.password-toggle { position: absolute; top: 50%; right: 8px; display: grid; width: 34px; height: 34px; place-items: center; padding: 0; color: var(--ae-muted); background: transparent; border: 0; border-radius: 9px; transform: translateY(-50%); }
.password-toggle:hover { color: var(--ae-primary); background: #eff6ff; }

.auth-panel .btn { border-radius: 12px; padding: 10px; font-weight: 600; margin-top: 8px; }

.auth-footer { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; margin-top: 24px; }
.auth-footer a { color: var(--ae-muted); font-size: 0.9rem; }
.auth-footer a:hover { color: var(--ae-primary); }

/* ===== 响应式 ===== */
@media (max-width: 1200px) {
    .features-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .docs-grid-four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 992px) {
    .site-nav { width: calc(100% - 24px); padding: 16px; flex-wrap: wrap; }
    .site-nav-links { justify-content: flex-start; width: 100%; order: 3; }
    .site-nav-right { margin-left: auto; }
    .page-shell, .site-footer { width: calc(100% - 24px); }

    .products-grid { grid-template-columns: 1fr; }
    .foundation-band { grid-template-columns: 1fr; }
    .docs-grid-two { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .site-nav { gap: 10px; padding: 12px; border-radius: 20px; }
    .site-brand { flex: 1; min-width: 0; gap: 10px; }
    .site-brand img { width: 38px; height: 38px; }
    .site-brand-copy span { display: none; }
    .site-nav-right { width: auto; margin-left: auto; gap: 8px; }
    .site-account-entry { min-width: 0; }
    .account-trigger { padding: 8px 10px; border-radius: 14px; }
    .account-info { display: none; }
    .account-arrow { margin-left: 0; }
    .announcement-trigger { width: 38px; height: 38px; }
    .site-nav-links { flex: 1 0 100%; order: 3; width: 100%; justify-content: center; gap: 4px; }
    .site-nav-link { padding: 9px 12px; }
    .announcement-dropdown { width: 280px; }

    .page-shell { padding-top: 20px; }
    .hero-section { padding: 48px 22px 40px; }
    .hero-actions .btn { width: 100%; }
    .products-section { padding: 4px 0 28px; }
    .product-card { padding: 24px; }
    .foundation-band { padding: 26px; }
    .foundation-list { grid-template-columns: 1fr; }
    .features-grid { grid-template-columns: 1fr; }
    .cta-section { padding: 40px 22px; }
    .section-panel { padding: 22px; }
    .docs-hero { padding: 26px; }
    .docs-grid-four { grid-template-columns: 1fr; }
    .docs-jump-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .site-footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 560px) {
    .auth-page { align-items: flex-start; min-height: auto; padding-top: 28px; }
    .auth-panel { padding: 22px; border-radius: 20px; }
    .auth-brand img { width: 52px; height: 52px; }
}

/* ===== 产品主题色（由 layout 在 body[data-product] 注入 --product-theme） ===== */
.products-grid-single { grid-template-columns: minmax(0, 720px); justify-content: center; }

.site-nav-link:hover,
.site-nav-link.active { color: var(--product-theme); }

.product-card { border-top-color: var(--product-theme); }
.product-icon,
.product-meta-label,
.section-kicker,
.feature-icon,
.download-icon,
.info-icon { color: var(--product-theme); }

.btn-primary { background: var(--product-theme); border-color: var(--product-theme); }
.btn-primary:hover, .btn-primary:focus { background: var(--product-theme); border-color: var(--product-theme); filter: brightness(0.92); }
.btn-outline-primary { color: var(--product-theme); border-color: var(--product-theme); }
.btn-outline-primary:hover, .btn-outline-primary:focus { color: #fff; background: var(--product-theme); border-color: var(--product-theme); }

.hero-section { background: linear-gradient(135deg, #0f172a 0%, var(--product-theme) 52%, #38bdf8 100%); }
.docs-hero { background: linear-gradient(135deg, #0f172a 0%, var(--product-theme) 58%, #38bdf8 100%); }
.cta-section { background: linear-gradient(135deg, #1e3a8a 0%, var(--product-theme) 100%); }
