/* 
 * Apple 官网同款字体栈 (zh-CN)
 * "SF Pro SC", "SF Pro Text", "SF Pro Icons", "PingFang SC", "Helvetica Neue", Helvetica, Arial, sans-serif
 */

/* 1. 全局基础设置：强制所有元素继承字体 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

/* 2. 核心字体栈定义：强制覆盖所有文本容器、表单元素及第三方组件 */
html, body, 
input, button, select, textarea, 
h1, h2, h3, h4, h5, h6, 
p, span, a, label,
.form-input,
.container-modern,
.modal-content,
.modal-title,
.layui-layer-content,
.layui-layer-title,
.alert {
    font-family: "SF Pro SC", "SF Pro Text", "SF Pro Icons", "PingFang SC", "Helvetica Neue", Helvetica, Arial, sans-serif !important;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 3. 针对 input 的特殊加固：强制继承并重置浏览器默认样式 */
/* 修正：仅针对文本类输入框应用 appearance: none，排除 checkbox */
input[type="text"], 
input[type="password"], 
input[type="email"], 
input[type="tel"], 
input[type="search"], 
.form-input {
    font-family: inherit !important;
    font-size: 15px !important;
    line-height: normal;
    letter-spacing: normal;
    -webkit-appearance: none; /* 消除 iOS/Safari 默认外观干扰 */
    appearance: none;
}

/* 恢复复选框（Checkbox）的默认外观 */
input[type="checkbox"] {
    -webkit-appearance: checkbox !important;
    appearance: checkbox !important;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* 4. 【核心修复】占位符（Placeholder）全内核强力字体覆盖 */
/* 必须分开写，因为浏览器遇到不认识的选择器会忽略整个规则块 */

/* Webkit (Chrome, Safari, Edge) */
input::-webkit-input-placeholder {
    font-family: "SF Pro SC", "PingFang SC", "Helvetica Neue", Helvetica, Arial, sans-serif !important;
    font-weight: 400 !important;
    color: #86868b !important;
}
.form-input::-webkit-input-placeholder {
    font-family: "SF Pro SC", "PingFang SC", "Helvetica Neue", Helvetica, Arial, sans-serif !important;
    font-weight: 400 !important;
    color: #86868b !important;
}

/* Firefox 19+ */
input::-moz-placeholder {
    font-family: "SF Pro SC", "PingFang SC", "Helvetica Neue", Helvetica, Arial, sans-serif !important;
    font-weight: 400 !important;
    color: #86868b !important;
    opacity: 1; /* Firefox 默认有透明度 */
}
.form-input::-moz-placeholder {
    font-family: "SF Pro SC", "PingFang SC", "Helvetica Neue", Helvetica, Arial, sans-serif !important;
    font-weight: 400 !important;
    color: #86868b !important;
    opacity: 1;
}

/* IE 10-11 */
input:-ms-input-placeholder {
    font-family: "SF Pro SC", "PingFang SC", "Helvetica Neue", Helvetica, Arial, sans-serif !important;
    font-weight: 400 !important;
    color: #86868b !important;
}
.form-input:-ms-input-placeholder {
    font-family: "SF Pro SC", "PingFang SC", "Helvetica Neue", Helvetica, Arial, sans-serif !important;
    font-weight: 400 !important;
    color: #86868b !important;
}

/* 标准伪元素 */
input::placeholder {
    font-family: "SF Pro SC", "PingFang SC", "Helvetica Neue", Helvetica, Arial, sans-serif !important;
    font-weight: 400 !important;
    color: #86868b !important;
}
.form-input::placeholder {
    font-family: "SF Pro SC", "PingFang SC", "Helvetica Neue", Helvetica, Arial, sans-serif !important;
    font-weight: 400 !important;
    color: #86868b !important;
}

/* 5. 恢复图标字体 (仅针对 Font Awesome 相关类名) */
.fa, .fab, .fas, .far, [class*="fa-"] {
    font-family: "Font Awesome 5 Free", "Font Awesome 5 Brands" !important;
}

/* --- 以下为原有的页面布局样式 --- */

body {
    min-height: 100vh;
    background-color: #f8f9fa;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px;
    color: #1d1d1f;
    position: relative;
}

.container-modern {
    width: 100%;
    max-width: 450px;
    border-radius: 12px;
    padding: 30px 25px;
}

.logo {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block !important;
}

h1 {
    font-size: 24px;
    font-weight: 600 !important; /* 标题保持加粗 */
    margin-bottom: 6px;
    text-align: center;
    color: #1d1d1f;
}

.subtitle {
    font-size: 15px;
    color: #6e6e73;
    text-align: center;
    margin-bottom: 25px;
    line-height: 1.4;
}

.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: none !important;
}

.form-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    transition: all 0.2s ease;
    background-color: #fff;
}

.form-input:focus {
    outline: none;
    border-color: #0078D4;
    box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.1);
}

.login-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0 20px;
    font-size: 13px;
}

.remember-login {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
    color: #6e6e73;
}

.remember-checkbox {
    width: 16px;
    height: 16px;
    accent-color: #0078D4;
    cursor: pointer;
}

.forgot-password {
    color: #0078D4;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
}

.forgot-password:hover {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.login-btn, .submit-btn {
    width: 100%;
    padding: 13px;
    background-color: #0078D4;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 120, 212, 0.2);
}

.login-btn:hover, .submit-btn:hover {
    background-color: #0063b1;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 120, 212, 0.25);
}

.register-link, .login-link {
    margin-top: 18px;
    text-align: center;
    font-size: 13px;
    color: #6e6e73;
}

.register-link a, .login-link a {
    color: #0078D4;
    text-decoration: none;
    font-weight: 500;
}

.register-link a:hover, .login-link a:hover {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.register-container {
    padding: 25px 20px !important;
}

.register-title {
    font-size: 22px !important;
    margin-bottom: 4px !important;
}

.register-subtitle {
    font-size: 14px !important;
    margin-bottom: 20px !important;
}

.register-form-group {
    margin-bottom: 14px !important;
}

.register-form-input {
    padding: 10px 12px !important;
    font-size: 14px !important;
}

.compact-agreement {
    margin-bottom: 16px !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
}

.compact-agreement-checkbox {
    width: 14px !important;
    height: 14px !important;
    margin-right: 6px !important;
    margin-top: 1px !important;
}

.compact-submit-btn {
    padding: 11px !important;
    font-size: 14px !important;
}

.compact-login-link {
    margin-top: 15px !important;
    font-size: 12px !important;
}

.verify-code-group-vertical {
    display: flex;
    flex-direction: column;
    gap: 8px !important;
    margin-bottom: 15px !important;
}

.verify-code-input-full {
    width: 100%;
}

.verify-code-img-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 2px;
    margin-top: 2px;
}

/* 桌面/平板 超大验证码 */
.verify-code-img {
    width: 100%;
    height: 70px;
    border-radius: 8px;
    cursor: pointer;
    object-fit: contain;
    border: none !important;
    background-color: transparent !important;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.verify-code-img:hover {
    box-shadow: 0 2px 8px rgba(0, 120, 212, 0.15);
}

.refresh-code-text {
    font-size: 12px;
    color: #0078D4;
    text-align: right;
    cursor: pointer;
    flex-grow: 1;
    padding: 0 5px;
    margin-top: 2px;
}

.refresh-code-text:hover {
    text-decoration: underline;
}

.verify-code-form-group {
    margin-bottom: 20px !important;
    padding: 5px 0;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    width: 100%;
    max-width: 400px;
    background-color: #fff;
    border-radius: 12px;
    padding: 25px 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-title {
    font-size: 20px;
    font-weight: 600 !important;
    color: #1d1d1f;
}

.modal-close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #f8f9fa;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6e6e73;
    font-size: 18px;
}

.agreement {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    font-size: 13px;
    color: #6e6e73;
    line-height: 1.5;
}

.agreement-checkbox {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    margin-top: 2px;
    accent-color: #0078D4;
    cursor: pointer;
}

.agreement a {
    color: #0078D4;
    text-decoration: none;
    font-weight: 500;
}

.bd-masthead .container .row {
    display: none;
}

@media (max-width: 480px) {
    .register-container {
        padding: 20px 15px !important;
    }
    
    .verify-code-group-vertical {
        gap: 6px !important;
    }
    
    .verify-code-img-container {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 0;
        margin-top: 2px;
    }
    
    /* 手机端正常大小 */
    .verify-code-img {
        width: 100%;
        height: 65px;
        margin: 0 auto;
        object-fit: contain;
        border: none !important;
        background-color: transparent !important;
    }
    
    .verify-code-img:hover {
        box-shadow: 0 2px 6px rgba(0, 120, 212, 0.15);
    }
    
    .refresh-code-text {
        text-align: center;
        padding: 0;
        margin-top: 2px;
    }
    
    .logo {
        width: 50px;
        height: 50px;
        margin-bottom: 15px;
    }

    .verify-code-form-group {
        margin-bottom: 18px !important;
    }
}

/* 社交登录图标样式恢复 */
.social-login {
    margin-top: 20px;
    text-align: center;
    border-top: 1px solid #eee;
    padding-top: 15px;
}
.social-login-title {
    font-size: 13px;
    color: #999;
    margin-bottom: 12px;
    font-weight: 400;
}
.social-login-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
}
.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    transition: transform 0.2s;
    cursor: pointer;
}
.social-icon:hover { transform: scale(1.1); color: #fff; }
.social-qq { background-color: #12b7f5; }
.social-wx { background-color: #07c160; }
.social-alipay { background-color: #1677ff; }
.social-douyin { background-color: #ffffff; border: 1px solid #eee; }
.social-douyin img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 50% !important;
}
