/* 登录页专属 CSS 变量 */
:root {
    --text-dim: rgba(0, 0, 0, 0.5);
    --input-bg: rgba(255, 255, 255, 0.5);
    --input-focus: rgba(255, 255, 255, 0.8);
    --btn-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --btn-shadow: 0 8px 20px rgba(118, 75, 162, 0.3);
}

/* 兼容 theme.js 的双重暗黑选择器 */
html.dark-mode, [data-theme="dark"] {
    --text-dim: rgba(255, 255, 255, 0.5);
    --input-bg: rgba(0, 0, 0, 0.2);
    --input-focus: rgba(0, 0, 0, 0.4);
    --btn-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --btn-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
}

/* 针对登录页的 body 布局重写 (继承 common.css 基础属性) */
body {
    display: flex; 
    align-items: center; 
    justify-content: center;
    overflow: hidden; /* 登录页专属：锁死滚动条 */
}

/* 氛围感背景光晕 */
.bg-circles { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.bg-circles div { position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.6; transition: all 0.8s ease; }
.bg-circles div:nth-child(1) { width: 300px; height: 300px; top: -50px; left: -50px; background: rgba(255, 200, 220, 0.4); }
.bg-circles div:nth-child(2) { width: 400px; height: 400px; bottom: -100px; right: -50px; background: rgba(150, 200, 255, 0.4); }
html.dark-mode .bg-circles div:nth-child(1),
[data-theme="dark"] .bg-circles div:nth-child(1) { background: rgba(255, 100, 150, 0.15); }
html.dark-mode .bg-circles div:nth-child(2),
[data-theme="dark"] .bg-circles div:nth-child(2) { background: rgba(100, 150, 255, 0.15); }

/* 液态玻璃登录面板 */
.glass-panel {
    width: 90%; max-width: 400px;
    background: var(--glass-bg);
    backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
    border-radius: 24px; padding: 40px 30px;
    box-shadow: var(--glass-shadow);
    display: flex; flex-direction: column; align-items: center;
    animation: popIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transition: all 0.5s ease;
}

@keyframes popIn {
    0% { opacity: 0; transform: translateY(20px) scale(0.95); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.avatar {
    width: 85px; height: 85px; border-radius: 50%;
    border: 3px solid var(--glass-border);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px; transition: transform 0.4s ease;
}
.avatar:hover { transform: rotate(360deg); }

.title { font-size: 22px; font-weight: 700; margin-bottom: 30px; letter-spacing: 1px;}

/* 表单输入区 */
.form-group { width: 100%; margin-bottom: 20px; position: relative; }

.input-icon {
    position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
    color: var(--text-dim); font-size: 16px; z-index: 2; transition: 0.3s;
}

.form-control {
    width: 100%; height: 50px;
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 0 20px 0 45px;
    font-size: 15px; color: var(--text-main); outline: none;
    transition: all 0.3s ease;
}
.form-control::placeholder { color: var(--text-dim); }
.form-control:focus {
    background: var(--input-focus); border-color: rgba(255,255,255,0.8);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}
html.dark-mode .form-control:focus,
[data-theme="dark"] .form-control:focus { border-color: rgba(255,255,255,0.3); box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.2); }
.form-control:focus + .input-icon { color: #007aff; }

.captcha-group { display: flex; gap: 10px; align-items: center; }
.captcha-group .form-control { flex: 1; }
.captcha-canvas-container {
    height: 50px; width: 110px; border-radius: 16px; overflow: hidden;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.85) !important; 
    cursor: pointer; flex-shrink: 0;
    transition: 0.2s; box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}
.captcha-canvas-container:active { transform: scale(0.95); }

/* 辅助选项 */
.options {
    width: 100%; display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 25px; font-size: 13px; color: var(--text-main); opacity: 0.8;
}

.checkbox-label { display: flex; align-items: center; cursor: pointer; user-select: none; }
.checkbox-label input { display: none; }
.checkmark {
    width: 18px; height: 18px; background: var(--input-bg);
    border: 1px solid var(--glass-border); border-radius: 6px; margin-right: 8px;
    display: flex; justify-content: center; align-items: center; transition: 0.2s;
}
.checkbox-label input:checked ~ .checkmark { background: #007aff; border-color: #007aff; }
.checkbox-label input:checked ~ .checkmark::after {
    content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900;
    color: white; font-size: 10px;
}

.submit-btn {
    width: 100%; height: 50px;
    background: var(--btn-gradient);
    border: none; border-radius: 16px;
    color: white; font-size: 16px; font-weight: 600; letter-spacing: 2px;
    cursor: pointer; transition: all 0.3s ease;
    box-shadow: var(--btn-shadow);
}
.submit-btn:hover { transform: translateY(-2px); filter: brightness(1.1); }
.submit-btn:active { transform: scale(0.98); }

/* 高级弹窗 */
.custom-toast {
    position: fixed; top: -100px; left: 50%; transform: translateX(-50%);
    background: var(--glass-bg);
    backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    padding: 14px 24px; border-radius: 50px;
    display: flex; align-items: center; gap: 12px;
    box-shadow: var(--glass-shadow);
    opacity: 0; pointer-events: none; z-index: 9999;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: var(--text-main); font-weight: 600; font-size: 14px;
}
.custom-toast.show { top: 40px; opacity: 1; }
.toast-icon.success { color: #34c759; font-size: 18px; }
.toast-icon.error { color: #ff3b30; font-size: 18px; }
.toast-icon.loading { color: #007aff; font-size: 18px; animation: spin 1s linear infinite; }
@keyframes spin { 100% { transform: rotate(360deg); } }