/* =========================================================
   安在记 - 注册/下载页专用样式
   设计：复用主站温暖橙主题 + 移动优先
   ========================================================= */

:root {
    --primary-color: #F77B56;
    --primary-light: #FFA589;
    --primary-dark: #E55A3A;
    --secondary-color: #FFB799;
    --accent-color: #FFCEB8;

    --background-light: #FFF5F2;
    --background-warm: #FFF8F5;

    --text-dark: #3D2A24;
    --text-medium: #6B5045;
    --text-light: #9C857D;

    --white: #FFFFFF;
    --success: #4CAF50;
    --error: #F44336;

    --shadow-sm: 0 2px 12px rgba(247, 123, 86, 0.08);
    --shadow-md: 0 8px 30px rgba(247, 123, 86, 0.12);
    --shadow-lg: 0 20px 60px rgba(247, 123, 86, 0.18);

    --transition-fast: 0.25s ease;
    --transition-normal: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC",
                 "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--background-warm);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

/* ==================== 顶部 Logo 栏 ==================== */
.reg-topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 248, 245, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(247, 123, 86, 0.08);
}

.reg-topbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.reg-topbar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-color);
}

.reg-topbar-logo img {
    width: 36px;
    height: 36px;
}

.reg-topbar-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 30px;
    background: rgba(247, 123, 86, 0.08);
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition-fast);
}

.reg-topbar-back:hover {
    background: var(--primary-color);
    color: var(--white);
}

.reg-topbar-back svg {
    width: 14px;
    height: 14px;
}

/* ==================== 主体容器 ==================== */
.reg-wrap {
    min-height: calc(100vh - 64px);
    padding: 40px 24px 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reg-card {
    width: 100%;
    max-width: 460px;
    background: var(--white);
    border-radius: 24px;
    padding: 44px 36px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(247, 123, 86, 0.06);
    position: relative;
    overflow: hidden;
}

.reg-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
}

/* ==================== 表单头部 ==================== */
.reg-head {
    text-align: center;
    margin-bottom: 32px;
}

.reg-head-badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(247, 123, 86, 0.1);
    border-radius: 30px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 14px;
}

.reg-head h1 {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 8px;
    line-height: 1.3;
}

.reg-head p {
    font-size: 0.94rem;
    color: var(--text-medium);
}

/* ==================== 表单字段 ==================== */
.reg-form-group {
    margin-bottom: 20px;
}

.reg-label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-medium);
    margin-bottom: 8px;
    padding-left: 4px;
}

.reg-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--background-warm);
    border: 1.5px solid rgba(247, 123, 86, 0.12);
    border-radius: 14px;
    padding: 0 16px;
    transition: var(--transition-fast);
}

.reg-input-wrap:focus-within {
    border-color: var(--primary-color);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(247, 123, 86, 0.08);
}

.reg-input-icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-right: 12px;
    opacity: 0.5;
}

.reg-input {
    flex: 1;
    height: 50px;
    background: transparent;
    border: none;
    outline: none;
    font-size: 1rem;
    color: var(--text-dark);
    font-family: inherit;
}

.reg-input::placeholder {
    color: var(--text-light);
}

.reg-input[readonly] {
    color: var(--text-medium);
    cursor: not-allowed;
}

.reg-input-affix {
    flex-shrink: 0;
    margin-left: 8px;
}

/* 验证码发送按钮 */
.reg-sms-btn {
    flex-shrink: 0;
    height: 36px;
    padding: 0 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: var(--white);
    border: none;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    white-space: nowrap;
    margin-left: 8px;
}

.reg-sms-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(247, 123, 86, 0.3);
}

.reg-sms-btn:disabled {
    background: var(--accent-color);
    cursor: not-allowed;
    opacity: 0.7;
}

/* ==================== 协议勾选 ==================== */
.reg-agreement {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 22px 0;
    font-size: 0.85rem;
    color: var(--text-medium);
    line-height: 1.5;
}

.reg-agreement input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--accent-color);
    border-radius: 5px;
    flex-shrink: 0;
    margin-top: 2px;
    cursor: pointer;
    position: relative;
    transition: var(--transition-fast);
    background: var(--white);
}

.reg-agreement input[type="checkbox"]:checked {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.reg-agreement input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid var(--white);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.reg-agreement a {
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

.reg-agreement a:hover {
    border-bottom-color: var(--primary-color);
}

/* ==================== 提交按钮 ==================== */
.reg-submit {
    width: 100%;
    height: 52px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: var(--white);
    border: none;
    border-radius: 14px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-normal);
    box-shadow: 0 8px 20px rgba(247, 123, 86, 0.3);
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
}

.reg-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(247, 123, 86, 0.4);
}

.reg-submit:active:not(:disabled) {
    transform: translateY(0);
}

.reg-submit:disabled {
    background: var(--accent-color);
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.7;
}

.reg-submit svg {
    width: 18px;
    height: 18px;
}

/* ==================== 底部说明 ==================== */
.reg-footer-tip {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px dashed rgba(247, 123, 86, 0.15);
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.7;
}

.reg-footer-tip a {
    color: var(--primary-color);
    font-weight: 600;
}

/* ==================== 提示 Toast ==================== */
.reg-toast {
    position: fixed;
    top: 30%;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: rgba(61, 42, 36, 0.92);
    color: var(--white);
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 0.92rem;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-normal);
    z-index: 9999;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    max-width: 80%;
    text-align: center;
}

.reg-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.reg-toast.success { background: rgba(76, 175, 80, 0.95); }
.reg-toast.error {
    background: rgba(244, 67, 54, 0.98);
    box-shadow: 0 12px 36px rgba(244, 67, 54, 0.35);
    padding: 14px 28px;
    font-weight: 600;
}
.reg-toast.error::before {
    content: '⚠️ ';
    margin-right: 6px;
}

/* =========================================================
   下载页特有样式
   ========================================================= */

.dl-wrap {
    min-height: calc(100vh - 64px);
    background: linear-gradient(160deg,
                  var(--background-warm) 0%,
                  #FFE8E0 60%,
                  var(--background-light) 100%);
    padding: 50px 24px 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.dl-wrap::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -15%;
    width: 60%;
    height: 120%;
    background: radial-gradient(ellipse, rgba(247, 123, 86, 0.1) 0%, transparent 60%);
    pointer-events: none;
}

.dl-wrap::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -10%;
    width: 50%;
    height: 100%;
    background: radial-gradient(ellipse, rgba(255, 166, 137, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

.dl-inner {
    width: 100%;
    max-width: 720px;
    position: relative;
    z-index: 1;
}

.dl-success {
    text-align: center;
    background: var(--white);
    border-radius: 24px;
    padding: 40px 32px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(247, 123, 86, 0.06);
}

.dl-success-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--success), #66BB6A);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 24px rgba(76, 175, 80, 0.3);
    animation: dlPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes dlPop {
    0% { transform: scale(0); }
    100% { transform: scale(1); }
}

.dl-success-icon svg {
    width: 36px;
    height: 36px;
    color: var(--white);
}

.dl-success h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.dl-success p {
    font-size: 0.95rem;
    color: var(--text-medium);
}

.dl-title {
    text-align: center;
    margin-bottom: 30px;
}

.dl-title-badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(247, 123, 86, 0.12);
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 14px;
}

.dl-title h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 10px;
    line-height: 1.3;
}

.dl-title p {
    font-size: 1rem;
    color: var(--text-medium);
}

.dl-title p strong {
    color: var(--primary-color);
}

.dl-platforms {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 28px;
}

.dl-platform-card {
    background: var(--white);
    border-radius: 22px;
    padding: 32px 24px;
    text-align: center;
    box-shadow: var(--shadow-md);
    border: 2px solid transparent;
    transition: var(--transition-normal);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.dl-platform-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.dl-platform-card.recommended {
    border-color: var(--primary-color);
    background: linear-gradient(180deg, var(--white) 0%, rgba(255, 167, 137, 0.05) 100%);
}

.dl-platform-card.recommended::before {
    content: '为您推荐';
    position: absolute;
    top: 16px;
    right: -32px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: var(--white);
    padding: 4px 36px;
    font-size: 0.75rem;
    font-weight: 700;
    transform: rotate(45deg);
    letter-spacing: 1px;
}

.dl-platform-icon {
    width: 88px;
    height: 88px;
    margin-bottom: 18px;
    border-radius: 22px;
    background: linear-gradient(145deg, var(--primary-color), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 24px rgba(247, 123, 86, 0.25);
}

.dl-platform-icon img {
    width: 48px;
    height: 48px;
    filter: brightness(0) invert(1);
}

.dl-platform-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.dl-platform-card .dl-version {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 18px;
}

.dl-platform-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 46px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: var(--white);
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.96rem;
    transition: var(--transition-fast);
    box-shadow: 0 6px 16px rgba(247, 123, 86, 0.25);
}

.dl-platform-card:hover .dl-platform-btn {
    box-shadow: 0 10px 22px rgba(247, 123, 86, 0.35);
}

.dl-platform-btn svg {
    width: 16px;
    height: 16px;
}

.dl-meta {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 24px;
    text-align: center;
    border: 1px solid rgba(247, 123, 86, 0.08);
}

.dl-meta p {
    font-size: 0.88rem;
    color: var(--text-medium);
    line-height: 1.7;
}

.dl-meta strong {
    color: var(--primary-color);
}

.dl-steps {
    background: var(--white);
    border-radius: 22px;
    padding: 28px 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

.dl-steps h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 18px;
    text-align: center;
}

.dl-step {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    padding: 12px 0;
}

.dl-step:last-child {
    margin-bottom: 0;
}

.dl-step-num {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.92rem;
}

.dl-step-text {
    flex: 1;
    font-size: 0.92rem;
    color: var(--text-medium);
    line-height: 1.6;
    padding-top: 4px;
}

.dl-step-text strong {
    color: var(--text-dark);
    display: block;
    margin-bottom: 2px;
}

/* ==================== 微信环境提示 ==================== */
.wx-mask {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    z-index: 9998;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 20px;
}

.wx-mask.show {
    display: flex;
    animation: wxFade 0.3s ease;
}

@keyframes wxFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.wx-tip {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 16px;
    padding: 22px 28px;
    margin: 0 20px;
    max-width: 320px;
    position: relative;
    animation: wxSlideDown 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes wxSlideDown {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.wx-tip-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    width: 28px;
    height: 28px;
}

.wx-tip h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
    padding-right: 24px;
}

.wx-tip p {
    font-size: 0.88rem;
    color: var(--text-medium);
    line-height: 1.6;
}

.wx-tip-arrow {
    position: absolute;
    top: -10px;
    right: 24px;
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-bottom: 12px solid rgba(255, 255, 255, 0.98);
}

.wx-finger {
    position: absolute;
    top: -40px;
    right: 36px;
    font-size: 2rem;
    animation: wxBounce 1.5s ease-in-out infinite;
}

@keyframes wxBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* 微信右上角浮窗提示（顶部条） */
.wx-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #07C160, #06AD56);
    color: var(--white);
    padding: 12px 16px;
    z-index: 9997;
    display: none;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 16px rgba(7, 193, 96, 0.3);
    font-size: 0.88rem;
    animation: wxBannerIn 0.4s ease;
}

@keyframes wxBannerIn {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

.wx-banner-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.wx-banner-text {
    flex: 1;
    line-height: 1.4;
}

.wx-banner-close {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

/* ==================== Footer ==================== */
.reg-footer {
    text-align: center;
    padding: 24px 16px;
    font-size: 0.82rem;
    color: var(--text-light);
}

.reg-footer p {
    margin: 4px 0;
}

.reg-footer a {
    color: var(--text-medium);
    margin: 0 6px;
}

/* ==================== 响应式 ==================== */
@media (max-width: 768px) {
    .reg-topbar-inner {
        padding: 0 16px;
    }

    .reg-wrap {
        padding: 24px 16px 40px;
    }

    .reg-card {
        padding: 32px 24px;
        border-radius: 20px;
    }

    .reg-head h1 {
        font-size: 1.4rem;
    }

    .reg-input {
        font-size: 0.96rem;
    }

    .reg-sms-btn {
        font-size: 0.82rem;
        padding: 0 12px;
    }

    .dl-wrap {
        padding: 30px 16px 40px;
    }

    .dl-success {
        padding: 30px 24px;
    }

    .dl-success h2 {
        font-size: 1.3rem;
    }

    .dl-title h1 {
        font-size: 1.6rem;
    }

    .dl-platforms {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .dl-platform-card {
        padding: 24px 20px;
    }
}

@media (max-width: 360px) {
    .reg-card {
        padding: 26px 18px;
    }
    .reg-head h1 {
        font-size: 1.25rem;
    }
    .reg-sms-btn {
        padding: 0 8px;
        font-size: 0.78rem;
    }
}
