@charset "utf-8";
/* 鸿蒙天尊 · 移动端登录/注册页 */

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
html { min-height: 100%; }

body {
    position: relative;
    width: 100%;
    max-width: 480px;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    background:
        linear-gradient(rgba(148, 163, 184, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.025) 1px, transparent 1px),
        radial-gradient(circle at 12% 8%, rgba(99, 102, 241, 0.22), transparent 42%),
        radial-gradient(circle at 88% 92%, rgba(34, 211, 238, 0.16), transparent 40%),
        linear-gradient(160deg, #0b1020 0%, #111827 55%, #0b1020 100%);
    background-size: 28px 28px, 28px 28px, auto, auto, auto;
    box-shadow: 0 0 72px rgba(0, 0, 0, 0.45);
    color: #e5e7eb;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}
body.modal-open { overflow: hidden; }

/* 图标定义不占布局空间 */
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.page {
    position: relative;
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 32px 18px 20px;
    overflow: hidden;
}
.page::before,
.page::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(6px);
    pointer-events: none;
    z-index: 0;
}
.page::before {
    width: 220px;
    height: 220px;
    top: -70px;
    right: -70px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.34), transparent 68%);
    animation: float-a 8s ease-in-out infinite;
}
.page::after {
    width: 200px;
    height: 200px;
    bottom: -60px;
    left: -70px;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.24), transparent 68%);
    animation: float-b 10s ease-in-out infinite;
}
@keyframes float-a {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-18px, 22px); }
}
@keyframes float-b {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(20px, -18px); }
}

.auth-card {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 28px 20px 26px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 20px;
    background: rgba(17, 24, 39, 0.8);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 20px 52px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}
.auth-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 24px;
    right: 24px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, transparent, #818cf8 25%, #22d3ee 75%, transparent);
    opacity: 0.85;
}

/* 品牌区：大字 + 大图标，无图片 */
.brand { text-align: center; margin-bottom: 22px; }
.brand-icon {
    width: 68px;
    height: 68px;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 48%, #22d3ee 100%);
    box-shadow: 0 0 0 6px rgba(99, 102, 241, 0.12), 0 0 0 12px rgba(34, 211, 238, 0.05), 0 14px 32px rgba(99, 102, 241, 0.4);
}
.brand-icon svg {
    width: 42px;
    height: 42px;
    fill: none;
    stroke: #fff;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.brand-title {
    margin: 0;
    font-size: 36px;
    font-weight: 800;
    letter-spacing: 7px;
    text-indent: 7px;
    line-height: 1.2;
    background: linear-gradient(90deg, #f8fafc 0%, #c7d2fe 45%, #67e8f9 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 4px 14px rgba(99, 102, 241, 0.28));
}
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
    .brand-title { color: #f8fafc; }
}
.brand-sub {
    margin: 8px 0 0;
    font-size: 12px;
    letter-spacing: 3px;
    text-indent: 3px;
    color: #94a3b8;
}
.brand-divider {
    position: relative;
    width: 70%;
    height: 1px;
    margin: 14px auto 12px;
    background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.28), transparent);
}
.brand-divider::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 5px;
    height: 5px;
    border-radius: 1px;
    transform: translate(-50%, -50%) rotate(45deg);
    background: #818cf8;
    box-shadow: 0 0 10px rgba(129, 140, 248, 0.8);
}
.brand-chips {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}
.brand-chips span {
    padding: 4px 9px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.035);
    color: #94a3b8;
    font-size: 10px;
    letter-spacing: 0.5px;
}
.brand-chips span:first-child {
    border-color: rgba(129, 140, 248, 0.3);
    background: rgba(99, 102, 241, 0.1);
    color: #c7d2fe;
}

/* Tab 切换 */
.tabs {
    position: relative;
    display: flex;
    margin-bottom: 22px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}
.tab {
    position: relative;
    isolation: isolate;
    flex: 1;
    padding: 12px 0 13px;
    border: 0;
    background: transparent;
    color: #94a3b8;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 2px;
    font-family: inherit;
    cursor: pointer;
    transition: color 0.2s ease;
}
.tab.is-active { color: #f8fafc; }
.tab.is-active::before {
    content: "";
    position: absolute;
    inset: 2px 14px 4px;
    z-index: -1;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.16), rgba(34, 211, 238, 0.08));
}
.tab-indicator {
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 50%;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, #6366f1, #22d3ee);
    transition: transform 0.25s ease;
}
.tabs[data-active="register"] .tab-indicator { transform: translateX(100%); }

/* 表单 */
.auth-panel { display: none; }
.auth-panel.is-active { display: block; }
.field {
    display: flex;
    align-items: center;
    gap: 11px;
    height: 50px;
    padding: 0 13px;
    margin-bottom: 13px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field:focus-within {
    border-color: rgba(129, 140, 248, 0.75);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.14);
}
.field-icon {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    fill: none;
    stroke: #64748b;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke 0.2s ease;
}
.field:focus-within .field-icon { stroke: #a5b4fc; }
.field input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #f1f5f9;
    font-size: 15px;
    font-family: inherit;
}
.field input::placeholder { color: #64748b; }

/* 注册密码强度提示 */
.strength-wrap {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: -3px 2px 12px;
}
.strength-bars { display: flex; gap: 4px; }
.strength-bars i {
    display: block;
    width: 26px;
    height: 3px;
    border-radius: 3px;
    background: rgba(148, 163, 184, 0.2);
    transition: background 0.25s ease;
}
.strength-wrap[data-level="1"] .strength-bars i.is-on { background: #f87171; }
.strength-wrap[data-level="2"] .strength-bars i.is-on { background: #fbbf24; }
.strength-wrap[data-level="3"] .strength-bars i.is-on { background: #34d399; }
.strength-text { font-size: 11px; color: #64748b; }

.field-toggle {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #64748b;
    cursor: pointer;
}
.field-toggle svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* 记住账号 */
.form-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 2px 2px 12px;
    font-size: 12px;
    color: #94a3b8;
}
.mini-check, .agreement-row {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}
.mini-check { gap: 7px; }
.mini-check input, .agreement-row input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}
.mini-box {
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.03);
    position: relative;
}
.mini-check input:checked + .mini-box {
    border-color: #818cf8;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}
.mini-check input:checked + .mini-box::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.meta-note { color: #64748b; letter-spacing: 0.5px; }

/* 协议勾选 */
.agreement-row {
    gap: 8px;
    align-items: flex-start;
    margin: 2px 2px 12px;
    line-height: 18px;
}
.checkbox-box {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    margin-top: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(148, 163, 184, 0.45);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.03);
}
.checkbox-box svg {
    width: 12px;
    height: 12px;
    fill: none;
    stroke: #fff;
    stroke-width: 2.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0;
}
.agreement-row input:checked + .checkbox-box {
    border-color: #818cf8;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}
.agreement-row input:checked + .checkbox-box svg { opacity: 1; }
.agreement-text { font-size: 12px; color: #94a3b8; }
.agreement-text a { color: #a5b4fc; text-decoration: none; }

.tishi {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 18px;
    margin: -2px 2px 11px;
    color: #f87171;
    font-size: 12px;
    line-height: 18px;
}
.tishi-icon {
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.primary-btn {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 48px;
    margin-top: 2px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(100deg, #6366f1 0%, #8b5cf6 52%, #22d3ee 100%);
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 2px;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 12px 26px rgba(99, 102, 241, 0.28);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.primary-btn::after {
    content: "";
    position: absolute;
    top: 0;
    left: -70%;
    width: 45%;
    height: 100%;
    pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.24), transparent);
    transform: skewX(-20deg);
    animation: btn-shine 4.5s ease-in-out infinite;
}
@keyframes btn-shine {
    0%, 60% { left: -70%; }
    100% { left: 130%; }
}
.primary-btn:active { transform: scale(0.985); filter: brightness(1.06); }

@media (prefers-reduced-motion: reduce) {
    .page::before, .page::after, .primary-btn::after { animation: none; }
}

/* 页脚：最底部、低对比度小字 */
.site-footer {
    flex-shrink: 0;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(148, 163, 184, 0.08);
    text-align: center;
    color: #64748b;
    font-size: 10px;
    line-height: 1.7;
    opacity: 0.72;
}
.site-footer p { margin: 0; }
.site-footer a { color: inherit; text-decoration: none; }
.footer-links { margin-top: 2px !important; }

/* 协议弹窗：移动端底部抽屉 */
.agreement-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: flex-end;
    justify-content: center;
}
.agreement-modal.is-open { display: flex; }
.agreement-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.74);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}
.agreement-sheet {
    position: relative;
    width: 100%;
    max-width: 480px;
    max-height: 86vh;
    max-height: 86dvh;
    display: flex;
    flex-direction: column;
    border-radius: 20px 20px 0 0;
    background: #111827;
    box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.5);
    animation: sheet-in 0.24s ease-out;
}
@keyframes sheet-in {
    from { transform: translateY(24px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.agreement-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}
.agreement-head h2 { margin: 0; font-size: 16px; color: #f1f5f9; font-weight: 700; }
.close-btn {
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    color: #94a3b8;
    cursor: pointer;
}
.close-btn svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}
.doc-tabs {
    display: flex;
    padding: 0 18px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}
.doc-tab {
    flex: 1;
    padding: 13px 0;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: #94a3b8;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
}
.doc-tab.is-active { color: #e0e7ff; border-bottom-color: #818cf8; }
.agreement-body {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px 18px 22px;
}
.doc { display: none; }
.doc.is-active { display: block; }
.doc-meta {
    margin: 0 0 14px;
    padding-bottom: 12px;
    border-bottom: 1px dashed rgba(148, 163, 184, 0.16);
    color: #64748b;
    font-size: 11px;
    line-height: 1.6;
}
.doc h3 {
    margin: 16px 0 6px;
    color: #c7d2fe;
    font-size: 13px;
    font-weight: 700;
}
.doc p {
    margin: 0;
    color: #9ca3af;
    font-size: 12px;
    line-height: 1.85;
    text-align: justify;
}
.agreement-foot {
    padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}
.sheet-btn {
    width: 100%;
    height: 42px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(100deg, #6366f1, #8b5cf6);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
}
