/**
 * 怪物掉落管理系统 - 登录页样式（统一设计系统，主色 var(--primary-color)）
 *
 * 兼容两种用法：
 *  1) 后台独立页（glytz/login.php、glytz/forgot_password.php）：
 *     <body> + 单个 .login-box（居中卡片），保持原样，布局不受破坏。
 *  2) 用户端双栏页（login.php / register.php / forgot_password.php）：
 *     <body class="auth-body"> + .auth-wrap（左 .auth-aside 品牌栏 + 右 .auth-main 表单），
 *     通过 .auth-main .login-box 覆盖为无边框卡片，融入右侧白底面板。
 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    background: #f0f2f5;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Microsoft YaHei', 'PingFang SC', Arial, sans-serif;
}
/* 用户端双栏页：body 改为纵向 flex，顶栏在上、双栏在中、页脚在下，与首页布局一致 */
body.auth-body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    align-items: stretch;
    justify-content: flex-start;
}

.login-box {
    width: 100%;
    max-width: 400px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.1);
    overflow: hidden;
}

.login-header {
    background: linear-gradient(135deg, #001529 0%, #003a70 100%);
    padding: 18px 28px;
    text-align: center;
}
.login-logo {
    font-size: 36px;
    margin-bottom: 8px;
}
.login-logo img {
    max-width: 200px;
    max-height: 64px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    display: block;
    margin: 0 auto;
}
.login-title {
    color: #fff;
    font-size: 20px;
    font-weight: 600;
}
.login-subtitle {
    color: rgba(255,255,255,0.6);
    font-size: 13px;
    margin-top: 4px;
}

.login-form { padding: 16px 24px; }

.form-item { margin-bottom: 8px; }
.form-item label {
    display: block;
    font-size: 14px;
    color: #595959;
    margin-bottom: 4px;
    font-weight: 500;
}
.form-item input {
    width: 100%;
    height: 36px;
    padding: 0 14px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    transition: all 0.2s;
    outline: none;
}
.form-item input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(22,119,255,0.2);
}

.login-btn {
    width: 100%;
    height: 38px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 6px;
}
.login-btn:hover { background: var(--primary-hover); }
.login-btn:active { background: #0958d9; }

.error-msg {
    background: #fff2f0;
    border: 1px solid #ffccc7;
    color: #cf1322;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.login-footer {
    text-align: center;
    padding: 0 28px 12px;
    color: #bfbfbf;
    font-size: 12px;
}

.login-link {
    text-align: center;
    margin-top: 6px;
    font-size: 13px;
    color: #8c8c8c;
}
.login-link a {
    color: var(--primary-color);
    text-decoration: none;
}
.login-link a:hover {
    text-decoration: underline;
}

.success-msg {
    background: #f6ffed;
    border: 1px solid #b7eb8f;
    color: #389e0d;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 验证码输入行 */
.code-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}
.code-row input {
    flex: 1;
    height: 36px;
    padding: 0 14px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    transition: all 0.2s;
    outline: none;
    letter-spacing: 2px;
}
.code-row input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(22,119,255,0.2);
}
.code-btn {
    flex-shrink: 0;
    width: 120px;
    height: 36px;
    padding: 0 12px;
    background: #fff;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.code-btn:hover {
    background: var(--primary-bg);
}
.code-btn.disabled {
    color: #999;
    border-color: #d9d9d9;
    background: #f5f5f5;
    cursor: not-allowed;
}

/* 登录失败错误提示 */
.login-error {
    background: #fff2f0;
    border: 1px solid #ffccc7;
    color: #cf1322;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 14px;
    text-align: center;
    line-height: 1.6;
    word-break: break-all;
}

/* 账号锁定提示 */
.login-lock {
    background: #fffbe6;
    border: 1px solid #ffe58f;
    color: #d48806;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 16px;
    text-align: center;
}

/* 图形验证码行 */
.captcha-row {
    margin-bottom: 20px;
}
.captcha-label {
    display: block;
    font-size: 14px;
    color: #595959;
    margin-bottom: 8px;
    font-weight: 500;
}
.captcha-input-wrap {
    display: flex;
    gap: 10px;
    align-items: center;
}
.captcha-input-wrap input {
    flex: 1;
    height: 42px;
    padding: 0 14px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    transition: all 0.2s;
    outline: none;
    letter-spacing: 2px;
    text-transform: uppercase;
}
.captcha-input-wrap input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(22,119,255,0.2);
}
.captcha-input-wrap img {
    height: 42px;
    width: 120px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    cursor: pointer;
    flex-shrink: 0;
    transition: opacity 0.2s;
}
.captcha-input-wrap img:hover {
    border-color: var(--primary-color);
}

/* 用户名实时检测提示 */
.username-tip {
    margin-top: 6px;
    font-size: 12px;
    min-height: 16px;
    line-height: 1.4;
    transition: all 0.2s;
}
.username-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}
.username-row input {
    flex: 1;
}
.check-btn {
    flex-shrink: 0;
    width: 90px;
    height: 36px;
    padding: 0 12px;
    background: #fff;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.check-btn:hover {
    background: var(--primary-bg);
}
.check-btn:disabled {
    color: #999;
    border-color: #d9d9d9;
    background: #f5f5f5;
    cursor: not-allowed;
}
.username-tip-err {
    color: #cf1322;
}
.username-tip-ok {
    color: #389e0d;
}
.username-tip-loading {
    color: var(--primary-color);
}
.username-tip .tip-loading::before,
.email-tip .tip-loading::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    border: 1.5px solid var(--primary-color);
    border-top-color: transparent;
    border-radius: 50%;
    animation: tipSpin 0.8s linear infinite;
    vertical-align: -1px;
    margin-right: 4px;
}
@keyframes tipSpin {
    to { transform: rotate(360deg); }
}

/* QQ 邮箱实时检测行 */
.email-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}
.email-row input {
    flex: 1;
}
.email-tip {
    margin-top: 6px;
    font-size: 12px;
    min-height: 16px;
    line-height: 1.4;
    transition: all 0.2s;
}
.email-tip-err {
    color: #cf1322;
}
.email-tip-ok {
    color: #389e0d;
}
.email-tip-loading {
    color: var(--primary-color);
}

/* 移动端响应式适配 */
@media (max-width: 480px) {
    .login-box { width: 100%; }
    .login-form { padding: 24px 20px; }
    .form-item input { font-size: 15px; }
    .login-btn { font-size: 15px; }
}

/* ============================================================
 * 用户端宽屏双栏布局（登录/注册/找回密码）
 * 仅在 <body class="auth-body"> 内、存在 .auth-wrap 时生效
 * ============================================================ */
.auth-wrap { display: flex; flex: 1 1 auto; min-height: 0; width: 100%; }

.auth-aside {
    flex: 0 0 46%;
    max-width: 620px;
    background: linear-gradient(135deg, #0b1f3a 0%, #103a70 55%, var(--primary-color) 100%);
    color: #fff;
    padding: 28px 44px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    position: relative;
    overflow: hidden;
}
.auth-aside::after {
    content: "";
    position: absolute;
    right: -120px; top: -120px;
    width: 360px; height: 360px;
    background: radial-gradient(circle, rgba(255,255,255,.12), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.auth-aside .brand { display: flex; flex-direction: column; align-items: flex-start; text-align: left; gap: 0; position: relative; z-index: 1; margin-bottom: 60px; }
.auth-aside .brand-logo {
    width: auto; height: auto;
    display: flex; align-items: center; justify-content: center;
    font-size: 30px; flex: none;
}
.auth-aside .brand-logo img { max-width: 160px; max-height: 160px; width: auto; height: auto; display: block; }
/* 标题 + 副标题：在左侧区域居中 */
.auth-aside .brand-titles { align-self: stretch; text-align: center; margin-top: 0; }
.auth-aside .brand-name { font-size: 24px; font-weight: 700; line-height: 1.3; }
.auth-aside .brand-sub { font-size: 14px; color: rgba(255,255,255,.65); margin-top: 12px; }

.auth-aside .features { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 20px; position: relative; z-index: 1; }
/* 背景框居中于左侧区域、文字居中于框内 */
.auth-aside .features li { display: flex; flex-direction: row; align-items: center; justify-content: center; text-align: center; gap: 8px; font-size: 13px; font-weight: 600; line-height: 1.45; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: 10px; padding: 10px 14px; }
.auth-aside .features .ico { flex: none; width: 26px; height: 26px; border-radius: 8px; background: rgba(255,255,255,.16); display: flex; align-items: center; justify-content: center; font-size: 14px; }
/* 每条文案采用不同颜色字体 */
.auth-aside .features li:nth-child(1) { color: #7ee0ff; }
.auth-aside .features li:nth-child(2) { color: #8df0b0; }
.auth-aside .features li:nth-child(3) { color: #ffd28a; }
.auth-aside .features li:nth-child(4) { color: #d3a8ff; }
.auth-aside .features li:nth-child(5) { color: #ff9eb5; }

.auth-aside .aside-foot {
    margin-top: 16px; padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,.14);
    font-size: 12px; color: rgba(255,255,255,.55);
    text-align: center;
    position: relative; z-index: 1;
}

.auth-main { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; padding: 20px 22px; background: #fff; }

/* 双栏模式下，表单卡片融入右侧白底面板 */
.auth-main .login-box {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    max-width: 440px;
    margin: 0;
}
.auth-main .login-header {
    background: none;
    padding: 0;
    text-align: left;
    margin-bottom: 12px;
}
.auth-main .login-title { color: var(--text-primary); font-size: 22px; font-weight: 700; }
.auth-main .login-subtitle { color: #8a97a8; font-size: 14px; margin-top: 6px; }
.auth-main .login-form { padding: 0; }

/* 移动端：单栏，隐藏品牌栏 */
@media (max-width: 900px) {
    .auth-aside { display: none; }
    .auth-main { padding: 32px 16px; }
    .auth-main .login-box { max-width: 100%; }
}
@media (max-width: 480px) {
    .auth-main { padding: 24px 14px; }
}

/* ===== 后台找回密码页覆盖样式 ===== */
body.glytz-forgot .login-box { max-width: 560px; }
body.glytz-forgot .login-header { padding: 20px 36px; }
body.glytz-forgot .login-logo { font-size: 28px; margin-bottom: 4px; }
body.glytz-forgot .login-logo img { max-width: 180px; max-height: 60px; width: auto; height: auto; object-fit: contain; }
body.glytz-forgot .login-title { font-size: 18px; }
body.glytz-forgot .login-subtitle { margin-top: 2px; }
body.glytz-forgot .login-form { padding: 24px 36px; }
body.glytz-forgot .form-item { margin-bottom: 14px; }
body.glytz-forgot .form-item label { margin-bottom: 6px; font-size: 13px; }
body.glytz-forgot .form-item input { height: 38px; }
body.glytz-forgot .code-row input { height: 38px; }
body.glytz-forgot .code-btn { height: 38px; }
body.glytz-forgot .login-btn { height: 40px; margin-top: 2px; }
body.glytz-forgot .error-msg, body.glytz-forgot .success-msg { padding: 8px 12px; margin-bottom: 12px; }
body.glytz-forgot .login-link { margin-top: 14px; text-align: center; }
body.glytz-forgot .login-link a { color: #fa8c16; text-decoration: none; }
body.glytz-forgot .login-footer { padding: 0 40px 20px; }
@media (max-width: 480px) {
    body.glytz-forgot .login-form { padding: 18px 16px; }
    body.glytz-forgot .login-header { padding: 18px 20px; }
}

/* ===== 前台登录页 logo 覆盖 ===== */
.auth-body .login-logo img { max-width: 180px; max-height: 60px; width: auto; height: auto; object-fit: contain; }
