/* 门户首页 —— 聚合各端入口（2B 平台 / 消费者端 / 饮水机端 / 模拟界面） */

:root {
    --pt-bg: #f6f8fc;
    --pt-ink: #0f172a;
    --pt-ink-weak: #64748b;
    --pt-line: #e6eaf1;
    --pt-card: #ffffff;
    --pt-radius: 16px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--pt-bg);
    color: var(--pt-ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
}

.portal {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

/* 背景光斑 */
.portal::before,
.portal::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: .55;
    z-index: 0;
    pointer-events: none;
}
.portal::before {
    width: 520px; height: 520px;
    top: -180px; right: -120px;
    background: radial-gradient(circle, #dbeafe, transparent 70%);
}
.portal::after {
    width: 460px; height: 460px;
    top: 140px; left: -180px;
    background: radial-gradient(circle, #ede9fe, transparent 70%);
}

.portal-header,
.portal-hero,
.portal-grid,
.portal-footer { position: relative; z-index: 1; }

.portal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 28px;
    max-width: 1180px;
    margin: 0 auto;
    width: 100%;
}

.portal-brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
    width: 40px; height: 40px;
    border-radius: 11px;
    background: linear-gradient(135deg, #2563eb, #0891b2);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; font-weight: 700;
    box-shadow: 0 6px 18px rgba(37, 99, 235, .35);
}
.brand-text strong { display: block; font-size: 16px; letter-spacing: .3px; }
.brand-text small { color: var(--pt-ink-weak); font-size: 12px; letter-spacing: .4px; }

.portal-header-note {
    font-size: 12px;
    color: var(--pt-ink-weak);
    border: 1px solid var(--pt-line);
    background: rgba(255, 255, 255, .7);
    padding: 6px 12px;
    border-radius: 999px;
}

.portal-hero {
    text-align: center;
    padding: 44px 20px 34px;
    max-width: 720px;
    margin: 0 auto;
}
.portal-hero h1 {
    font-size: 34px;
    line-height: 1.25;
    margin: 0 0 14px;
    letter-spacing: -.5px;
}
.portal-hero h1 b {
    background: linear-gradient(120deg, #2563eb, #7c3aed);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.portal-hero p { color: var(--pt-ink-weak); font-size: 15px; margin: 0; }

.portal-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 20px;
    max-width: 1180px;
    margin: 0 auto;
    padding: 8px 28px 40px;
    width: 100%;
}

.portal-card {
    background: var(--pt-card);
    border: 1px solid var(--pt-line);
    border-radius: var(--pt-radius);
    padding: 22px 20px;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    position: relative;
    overflow: hidden;
}
.portal-card::after {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: var(--accent);
    opacity: 0;
    transition: opacity .18s ease;
}
.portal-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 40px rgba(15, 23, 42, .10);
    border-color: var(--accent-weak);
}
.portal-card:hover::after { opacity: 1; }

.card-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; }
.card-icon {
    width: 46px; height: 46px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    color: var(--accent);
    background: var(--accent-soft);
}
.card-icon svg { width: 24px; height: 24px; }
.card-badge {
    font-size: 11px;
    color: var(--accent);
    background: var(--accent-soft);
    padding: 3px 9px;
    border-radius: 999px;
    font-weight: 500;
}
.portal-card h2 { font-size: 16px; margin: 0 0 8px; font-weight: 600; }
.portal-card p { font-size: 12.5px; color: var(--pt-ink-weak); line-height: 1.65; margin: 0 0 18px; flex: 1; }

.card-foot { display: flex; align-items: center; justify-content: space-between; }
.card-addr {
    font-family: ui-monospace, "SF Mono", "Menlo", "Consolas", monospace;
    font-size: 11px;
    color: var(--pt-ink-weak);
    background: #f1f5f9;
    padding: 3px 8px;
    border-radius: 6px;
    max-width: 60%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.card-enter {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--accent);
}
.card-enter svg { width: 15px; height: 15px; transition: transform .18s ease; }
.portal-card:hover .card-enter svg { transform: translateX(3px); }

/* 各入口强调色 */
.accent-blue   { --accent: #2563eb; --accent-soft: #eff6ff; --accent-weak: #bfdbfe; }
.accent-green  { --accent: #16a34a; --accent-soft: #f0fdf4; --accent-weak: #bbf7d0; }
.accent-cyan   { --accent: #0891b2; --accent-soft: #ecfeff; --accent-weak: #a5f3fc; }
.accent-violet { --accent: #7c3aed; --accent-soft: #f5f3ff; --accent-weak: #ddd6fe; }
.accent-amber  { --accent: #d97706; --accent-soft: #fffbeb; --accent-weak: #fde68a; }

.portal-footer {
    text-align: center;
    padding: 20px;
    font-size: 12px;
    color: #94a3b8;
    margin-top: auto;
}

/* ---------- 演示账号 ---------- */

.portal-accounts {
    max-width: 1180px;
    margin: 0 auto;
    padding: 6px 28px 48px;
    width: 100%;
}

.accounts-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}
.accounts-head-title { display: flex; align-items: baseline; gap: 12px; }
.accounts-head h2 { font-size: 15px; margin: 0; font-weight: 600; }
.accounts-sub { font-size: 12px; color: var(--pt-ink-weak); }
.accounts-tip {
    font-size: 11.5px;
    color: var(--pt-ink-weak);
    border: 1px solid var(--pt-line);
    background: rgba(255, 255, 255, .7);
    padding: 4px 12px;
    border-radius: 999px;
}

.accounts-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.account-panel {
    background: rgba(255, 255, 255, .85);
    border: 1px solid var(--pt-line);
    border-radius: 14px;
    padding: 18px;
    position: relative;
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    animation: account-in .5s cubic-bezier(.22, .61, .36, 1) both;
}
.account-panel::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-weak));
}
.account-panel:nth-child(2) { animation-delay: .08s; }
.account-panel:nth-child(3) { animation-delay: .16s; }
.account-panel:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(15, 23, 42, .09);
    border-color: var(--accent-weak);
}

@keyframes account-in {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

.account-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.account-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    background: var(--accent-soft);
    flex: 0 0 auto;
}
.account-icon svg { width: 20px; height: 20px; }
.account-head-text { flex: 1 1 auto; min-width: 0; }
.account-name { display: block; font-size: 13.5px; font-weight: 600; }
.account-note { display: block; font-size: 11.5px; color: var(--pt-ink-weak); margin-top: 2px; }
.account-enter {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    padding: 4px 10px;
    border-radius: 8px;
    background: var(--accent-soft);
    transition: gap .18s ease, background .18s ease;
    flex: 0 0 auto;
}
.account-enter svg { width: 14px; height: 14px; }
.account-enter:hover { gap: 7px; }

.account-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.account-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.account-label { font-size: 12.5px; color: var(--pt-ink-weak); }
.account-value {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
    border: 1px solid var(--pt-line);
    background: #f8fafc;
    padding: 3px 8px;
    border-radius: 7px;
    cursor: pointer;
    color: var(--pt-ink);
    transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.account-value code {
    font-family: ui-monospace, "SF Mono", "Menlo", "Consolas", monospace;
    font-size: 11.5px;
    color: inherit;
}
.account-value .copy-ico,
.account-value .copy-ok {
    display: inline-flex;
    align-items: center;
    color: var(--pt-ink-weak);
}
.account-value .copy-ico svg,
.account-value .copy-ok svg { width: 13px; height: 13px; }
.account-value .copy-ok { display: none; color: #16a34a; }
.account-value:hover {
    border-color: var(--accent-weak);
    background: var(--accent-soft);
    color: var(--accent);
}
.account-value:hover .copy-ico { color: var(--accent); }
.account-value.copied {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #16a34a;
}
.account-value.copied .copy-ico { display: none; }
.account-value.copied .copy-ok { display: inline-flex; }

/* 复制提示 toast */
.copy-toast-host {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
}
.copy-toast {
    background: #0f172a;
    color: #fff;
    font-size: 12.5px;
    padding: 9px 16px;
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .25);
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .18s ease, transform .18s ease;
}
.copy-toast.show { opacity: 1; transform: translateY(0); }

/* 响应式 */
@media (max-width: 1024px) {
    .portal-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .accounts-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
    .portal-hero h1 { font-size: 26px; }
    .portal-grid { grid-template-columns: minmax(0, 1fr); padding: 8px 18px 32px; }
    .portal-accounts { padding: 6px 18px 40px; }
    .accounts-head { flex-direction: column; align-items: flex-start; gap: 8px; }
    .portal-header { padding: 14px 18px; }
    .portal-header-note { display: none; }
}
