/* =============================================
   登录 / 注册 页面共享样式
   auth-form.css
   ============================================= */

/* ===== 外层容器 ===== */
.register {
    width: 80%;
    margin: 10px auto;
    display: flex;
    align-items: start;
    justify-content: start;
    padding: 0;
    background: linear-gradient(135deg, #fff8f5 0%, #fff 50%, #f5f8ff 100%);
}

/* ===== 主卡片 ===== */
.register__content {
    width: 100%;
    display: flex;
    align-items: stretch;
    justify-content: center;
    height: 670px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* ===== 左侧品牌区 ===== */
.register-left {
    flex: 0 0 38%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #ff0000 0%, #ff7c4d 60%, #ffa07a 100%);
    padding: 48px 32px;
    position: relative;
    overflow: hidden;
}

.register-left::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
}

.register-left::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -40px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
}

.register-imgWrapper {
    position: relative;
    z-index: 1;
    text-align: center;
    color: #fff;
}

.register-imgWrapper img {
    width: 100%;
    max-width: 200px;
    height: auto;
    display: block;
    margin: 0 auto 20px;
    filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.15));
}

.register-imgWrapper h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 8px;
    color: #fff;
}

.register-imgWrapper p {
    font-size: 12px;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.6;
}

/* ===== 右侧表单区 ===== */
.register-right {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.register-formWrapper {
    width: 100%;
    margin:0 40px;
}

.register-title {
    font-size: 22px;
    font-weight: 700;
    color: #1D2026;
    margin-bottom: 6px;
    line-height: 1.3;
}

.register-subtitle {
    font-size: 13px;
    color: #8C94A3;
    margin-bottom: 28px;
}

/* ===== 通用表单样式 ===== */
.login-form .form-group { margin-bottom: 18px; }
.reg-form .form-group { margin-bottom: 16px; }

/* 表单容器宽度与三方登录一致 */
.login-form,
.reg-form {
    width: 100%;
    padding: 0 10px;
    box-sizing: border-box;
}

.login-form .form-field label,
.reg-form .form-field label {
    font-size: 13px;
    font-weight: 500;
    color: #1D2026;
    margin-bottom: 6px;
    display: block;
}

.login-form .form-field .field-wrapper,
.reg-form .field-wrapper {
    position: relative;
}

.login-form .form-field input {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1.5px solid #E9EAF0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
}

.reg-form .field-wrapper input {
    width: 100%;
    height: 44px;
    padding: 0 40px 0 14px;
    border: 1.5px solid #E9EAF0;
    border-radius: 8px;
    font-size: 14px;
    color: #1D2026;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
}

.login-form .form-field input:focus,
.reg-form .field-wrapper input:focus {
    border-color: #ff0000;
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 102, 54, 0.08);
}

.login-form .form-field input::placeholder { color: #A1A5B7; }
.reg-form .field-wrapper input::placeholder { color: #A1A5B7; }

.reg-form .field-wrapper input.is-valid { border-color: #22C55E; }
.reg-form .field-wrapper input.is-invalid { border-color: #EF4444; }

/* ===== 表单图标 ===== */
.field-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 6px;
}

.field-icon .icon-status {
    width: 18px;
    height: 18px;
    display: none;
}

.field-icon .icon-status.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== 发送验证码按钮 ===== */
.send-code-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    font-weight: 600;
    color: #ff0000;
    cursor: pointer;
    white-space: nowrap;
    border: none;
    background: none;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.send-code-btn:hover { background: rgba(255, 102, 54, 0.06); }
.send-code-btn:disabled {
    color: #A1A5B7;
    cursor: not-allowed;
}

/* ===== 记住 / 忘记 ===== */
.remember-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 10px;
}

.remember-row .form-check {
    display: flex;
    align-items: center;
    gap: 6px;
}

.remember-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.remember-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #ff0000;
}

.remember-label span {
    font-size: 13px;
    color: #6E7485;
    user-select: none;
}

.remember-row .form-check p { margin: 0; font-size: 13px; color: #6E7485; }
.forgot-link { font-size: 13px; color: #ff0000; text-decoration: none; }
.forgot-link:hover { text-decoration: underline; }

/* ===== 表单提示 ===== */
.reg-form .field-hint {
    font-size: 12px;
    margin-top: 4px;
    display: none;
}

.reg-form .field-hint.error { color: #EF4444; display: block; }
.reg-form .field-hint.success { color: #22C55E; display: block; }

/* ===== 错误提示 ===== */
.error-msg {
    color: #EF4444;
    font-size: 13px;
    margin-bottom: 14px;
    display: none;
    padding: 10px 14px;
    background: #FEF2F2;
    border: 1px solid #FEE2E2;
    border-radius: 8px;
}

/* ===== 协议勾选 ===== */
.reg-form .terms-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 18px;
}

.reg-form .terms-row input[type="checkbox"] {
    width: 17px;
    height: 17px;
    margin-top: 1px;
    accent-color: #ff0000;
    cursor: pointer;
    flex-shrink: 0;
}

.reg-form .terms-row label {
    font-size: 12px;
    color: #6E7485;
    cursor: pointer;
    line-height: 1.5;
}

.reg-form .terms-row label a {
    color: #ff0000;
    text-decoration: none;
    font-weight: 500;
}

.reg-form .terms-row label a:hover { text-decoration: underline; }

/* ===== 提交按钮 ===== */
.submit-btn {
    width: 100%;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #ff0000;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
    box-shadow: 0 2px 8px rgba(255, 102, 54, 0.25);
}

.submit-btn:hover {
    background: #e85a2c;
    box-shadow: 0 4px 16px rgba(255, 102, 54, 0.35);
    transform: translateY(-1px);
}

.submit-btn:active { transform: translateY(0); }

.submit-btn:disabled {
    background: #ccc;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

/* ===== Tab 切换 ===== */
.back-home-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #8C94A3;
    text-decoration: none;
    transition: color 0.2s;
}

.back-home-link:hover {
    color: #ff0000;
}

.login-tabs {
    display: flex;
    border-bottom: 2px solid #E9EAF0;
    margin-bottom: 24px;
    gap: 0;
}

.login-tab {
    flex: 1;
    text-align: center;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #8C94A3;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    white-space: nowrap;
}

.login-tab:hover { color: #ff0000; }
.login-tab.active {
    color: #ff0000;
    border-bottom-color: #ff0000;
}

/* ===== 三方登录 ===== */
.form-signup { margin-top: 24px; }

.form-signup__label {
    text-align: center;
    color: #8C94A3;
    font-size: 12px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 10px;
}

.form-signup__label::before,
.form-signup__label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #E9EAF0;
}

.form-signup__wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding: 0 10px;
}

/* 强制禁用 .form-signup__wrapper 内所有 :before 伪元素（main.css icon-common 的背景图标），
   三个按钮改用内联 SVG，与无 :before 的 wechat 保持一致 */
.form-signup__wrapper .social-medaia-box-btn::before {
    content: none !important;
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
    width: 0 !important;
    height: 0 !important;
    background: none !important;
    position: static !important;
    opacity: 0 !important;
}

.social-medaia-box-btn {
    min-width: 0;
    flex: 1;
    padding: 9px 10px;
    border: 1.5px solid #E9EAF0;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    color: #4e5566;
    text-decoration: none;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    overflow: hidden;
}

.social-medaia-box-btn:hover {
    border-color: #ff0000;
    color: #ff0000;
    background: #ffeee8;
}

.social-medaia-box-btn svg { flex-shrink: 0; }

/* ===== 底部链接 ===== */
.register-bottom-link {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: #6E7485;
}

.register-bottom-link a {
    color: #ff0000;
    font-weight: 600;
    text-decoration: none;
    margin-left: 4px;
}

.register-bottom-link a:hover { text-decoration: underline; }

/* ===== Cookie Consent Banner ===== */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10001;
    background: #fff;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
    border-top: 1px solid #E9EAF0;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.cookie-consent-banner.show {
    transform: translateY(0);
}

.cookie-consent-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 20px 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.cookie-consent-icon {
    flex-shrink: 0;
    margin-top: 2px;
}

.cookie-consent-text {
    flex: 1;
    min-width: 0;
}

.cookie-consent-title {
    font-size: 15px;
    font-weight: 700;
    color: #1D2026;
    margin: 0 0 6px;
}

.cookie-consent-desc {
    font-size: 13px;
    color: #6E7485;
    margin: 0;
    line-height: 1.6;
}

.cookie-consent-desc a {
    color: #ff0000;
    text-decoration: none;
}

.cookie-consent-desc a:hover {
    text-decoration: underline;
}

.cookie-consent-actions {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.cookie-btn {
    padding: 9px 18px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    border: 1.5px solid #e0e0e0;
    background: #f5f5f5;
    color: #333333;
}

.cookie-btn-accept {
    background: #f5f5f5;
    color: #333333;
    border-color: #e0e0e0;
}

.cookie-btn-accept:hover {
    background: #ff0000;
    border-color: #ff0000;
    color: #ffffff;
}

.cookie-btn-reject {
    background: #f5f5f5;
    color: #333333;
    border-color: #e0e0e0;
}

.cookie-btn-reject:hover {
    background: #ff0000;
    border-color: #ff0000;
    color: #ffffff;
}

.cookie-btn-customize {
    background: #f5f5f5;
    color: #333333;
    border-color: #e0e0e0;
}

.cookie-btn-customize:hover {
    background: #ff0000;
    border-color: #ff0000;
    color: #ffffff;
}

.cookie-consent-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 16px;
    color: #8C94A3;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}

.cookie-consent-close:hover {
    color: #1D2026;
    background: #F5F7FA;
}

.cookie-category-list {
    margin-top: 14px;
    border: 1px solid #E9EAF0;
    border-radius: 8px;
    overflow: hidden;
}

.cookie-category-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    font-size: 13px;
    color: #1D2026;
    border-bottom: 1px solid #E9EAF0;
    cursor: pointer;
}

.cookie-category-item:last-child {
    border-bottom: none;
}

.cookie-category-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #ff0000;
    cursor: pointer;
    flex-shrink: 0;
}

.cookie-category-item input[type="checkbox"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.cookie-category-item span {
    font-weight: 500;
    min-width: 180px;
}

.cookie-category-item em {
    font-style: normal;
    color: #8C94A3;
    font-size: 12px;
}

@media (max-width: 768px) {
    .cookie-consent-inner {
        flex-direction: column;
        padding: 16px;
        gap: 12px;
    }

    .cookie-consent-actions {
        justify-content: flex-start;
        width: 100%;
    }

    .cookie-consent-close {
        top: 8px;
        right: 12px;
    }

    .cookie-category-item span {
        min-width: 140px;
    }

    .cookie-category-item em {
        display: none;
    }
}

/* ===== Cookie Consent Banner - shop 主题 ===== */
.cookie-consent-banner--shop .cookie-consent-desc a { color: #ff0000; }
.cookie-consent-banner--shop .cookie-btn-accept {
    background: #f5f5f5;
    border-color: #e0e0e0;
    color: #333333;
}
.cookie-consent-banner--shop .cookie-btn-accept:hover {
    background: #ff0000;
    border-color: #ff0000;
    color: #ffffff;
}
.cookie-consent-banner--shop .cookie-btn-reject:hover {
    background: #ff0000;
    border-color: #ff0000;
    color: #ffffff;
}
.cookie-consent-banner--shop .cookie-btn-customize {
    color: #333333;
    border-color: #e0e0e0;
    background: #f5f5f5;
}
.cookie-consent-banner--shop .cookie-btn-customize:hover {
    background: #ff0000;
    border-color: #ff0000;
    color: #ffffff;
}
.cookie-consent-banner--shop .cookie-category-item input[type="checkbox"] {
    accent-color: #ff0000;
}

/* ===== 移动端适配 ===== */
@media (max-width: 640px) {
    .register-left { display: none; }

    .register__content {
        width: min(95vw, 480px);
        min-height: auto;
        border-radius: 12px;
        background: #fff;
    }

    .register-right { padding: 36px 0; }
    .register-formWrapper { max-width: 100%; }

    /* 移动端表单和三方的间距调整为0 */
    .login-form,
    .reg-form {
        padding: 0;
    }

    .form-signup__label,
    .form-signup__wrapper,
    .remember-row {
        padding: 0;
    }

    /* 三方登录：三列均分，避免 main.css 的 170px 固定宽导致换行错乱 */
    .form-signup__wrapper {
        gap: 8px;
    }

    .form-signup__wrapper .social-medaia-box-btn {
        flex: 1 1 0;
        min-width: 0;
        font-size: 11px;
        padding: 8px 6px;
        background: #fff;
        border: 1.5px solid #E9EAF0;
        color: #1D2026;
    }

    .form-signup__wrapper .social-medaia-box-btn:hover {
        border-color: #ff0000;
        color: #ff0000;
        background: #fff;
    }
}

/* ===== 图形验证码弹窗 ===== */
#captcha-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    z-index: 99990;
    display: flex;
    align-items: center;
    justify-content: center;
}
#captcha-modal {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    width: 380px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    position: relative;
}
#captcha-modal .captcha-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
#captcha-modal .captcha-modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    padding: 0;
    line-height: 1;
    font-size: 20px;
    transition: color 0.2s;
}
#captcha-modal .captcha-modal-close:hover {
    color: #333;
}
#captcha-modal .captcha-img-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 16px;
}
#captcha-modal .captcha-img-row img {
    flex: 1;
    height: 44px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
}
#captcha-modal .captcha-img-row .captcha-refresh {
    width: 36px;
    height: 36px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: background 0.2s, border-color 0.2s;
    flex-shrink: 0;
}
#captcha-modal .captcha-img-row .captcha-refresh:hover {
    background: #f0f0f0;
    border-color: #ccc;
}
#captcha-modal .captcha-input-row input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
#captcha-modal .captcha-input-row input:focus {
    border-color: #ff0000;
}
#captcha-modal .captcha-error {
    color: #ef4444;
    font-size: 13px;
    margin-top: 6px;
    min-height: 18px;
}
#captcha-modal .captcha-submit-btn {
    width: 100%;
    margin-top: 16px;
    padding: 11px;
    background: #ff0000;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}
#captcha-modal .captcha-submit-btn:hover {
    background: #e55a2b;
}
#captcha-modal .captcha-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}