/* ====== 基础样式 ====== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Roboto', 'Open Sans', system-ui, sans-serif;
}
:root {
    --primary: #bf1c3f;
    --primary-hover: #a00707;
    --secondary: #f9fafb;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --border: #e5e7eb;
    --login-container-bg: #ffffff;
    --login-container-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --danger: #e53935; /* 危险操作颜色 */
    --danger-hover: #c62828; /* 危险操作悬停颜色 */
}
/* ====== end 基础样式 ====== */


/* ====== 页面样式 ====== */
.login-container img {
    width: 149px;
    height: 75px;
    margin-bottom: 30px;
}
body {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: 100vh;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.login-container {
    background: var(--login-container-bg);
    border-radius: 12px;
    box-shadow: var(--login-container-shadow);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 80px 200px;
    border-top: 4px solid var(--primary);
}
.login-container:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}
.login-container .form-field {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}
.login-container .form-field label {
    font-size: medium;
    color: var(--text-primary);
    margin-bottom: 16px;   /* label 与输入框之间的间距（关键：避免贴太近） */
    font-weight: 500;
}
.login-container .form-field input {
    margin-bottom: 20px;
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: small;
    transition: border-color 0.3s;
}
.login-container .form-field input:focus {
    border-color: var(--danger);
    outline: none;
    box-shadow: 0 0 0 2px rgba(230, 47, 47, 0.2);
}
.login-container button {
    display: block;
    margin: auto;
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: large;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}
.login-container button:hover {
    background: var(--primary-hover);
}
.login-container .wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 80px;
    margin-bottom: 10px;
}
.login-container .wrapper a {
    text-decoration: none;
    color: #4a6cf7;
}
/* ------ 验证码样式 ------ */
.captcha-field {
    display: flex;
    gap: 10px;
    width: 100%;
}

.captcha-field input {
    flex: 1;
    min-width: 0;
}

.captcha-image-wrapper {
    position: relative;
    cursor: pointer;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--secondary);
    flex-shrink: 0;
    height: 40px;           /* 新增：固定高度，消除下方空隙 */
    line-height: 0;         /* 新增：消除图片底部间隙（行内元素特性） */
}

.captcha-image {
    display: block;         /* 改为 block 消除底部间隙 */
    width: 120px !important;
    height: 40px !important;
    background-color: #e5e7eb;
}

.captcha-refresh-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    font-size: 12px;
    height: 40px;           /* 确保遮罩层高度一致 */
}

.captcha-image-wrapper:hover .captcha-refresh-overlay {
    opacity: 1;
}
/* ------ end 验证码样式 ------ */

/* ------ 消息提示样式 ------ */
.messages {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}
.messages li {
    padding: 12px 16px;
    margin-bottom: 10px;
    border-radius: 6px;
    font-size: 14px;
}
.messages .success { background-color: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.messages .error { background-color: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.messages .warning { background-color: #fff3cd; color: #856404; border: 1px solid #ffeaa7; }
.messages .info { background-color: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }

/* 登录标签切换样式 */
.login-tabs {
    display: flex;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 20px;
}

.tab-item {
    flex: 1;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    color: #666;
    font-size: 15px;
    transition: all 0.3s;
    position: relative;
}

.tab-item:hover {
    color: #333;
}

.tab-item.active {
    color: #4a6cf7;
    font-weight: 500;
}

.tab-item.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #4a6cf7;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.wechat-loading {
    color: #999;
    font-size: 14px;
}
/* ------ end 消息提示样式 ------ */

/* ------ 微信登录容器样式 ------ */
.web_qrcode_type_iframe {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
#wechat_qr {
    min-height: 230px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
#wechat_qr iframe {
    width: 100%;
    height: 230px;
    border: none;
}
/* ------ end 微信登录容器样式 ------ */
/* ====== end 页面样式 ====== */