
/* ====================================================================
 * 登录页 - 深色玻璃拟态自适应主题
 * 借鉴 text/preview.html 视觉风格
 * 保留 #loginForm/#username/#password/#errorMsg 让 login.js 零感知
 * ==================================================================== */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg: #061426;
    --panel: rgba(255, 255, 255, 0.075);
    --line: rgba(255, 255, 255, 0.13);
    --text: #eef7ff;
    --muted: #93a9c8;
    --blue: #1677ff;
    --cyan: #18e1ff;
    --gold: #f6c85f;
    --red: #ff5c7a;
    --shadow: 0 28px 88px rgba(0, 0, 0, 0.35);
}

body {
    min-height: 100vh;
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at 12% 7%, rgba(24, 225, 255, 0.23), transparent 28%),
        radial-gradient(circle at 88% 2%, rgba(22, 119, 255, 0.23), transparent 30%),
        radial-gradient(circle at 52% 100%, rgba(246, 200, 95, 0.08), transparent 32%),
        linear-gradient(135deg, #030916 0%, #061426 52%, #0d213d 100%);
    overflow-x: hidden;
}

/* 网格底纹 */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 34px 34px;
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.95), transparent 90%);
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.95), transparent 90%);
}

/* ==================== 登录页容器 ==================== */
.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px;
}

.login-card {
    width: min(1080px, 100%);
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
    border: 1px solid var(--line);
    border-radius: 28px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
    -webkit-backdrop-filter: blur(22px);
    backdrop-filter: blur(22px);
    box-shadow: var(--shadow);
}

/* ==================== 左侧品牌区 ==================== */
.login-hero {
    padding: 44px;
    position: relative;
    overflow: hidden;
}

.login-hero::after {
    content: "";
    position: absolute;
    width: 360px;
    height: 360px;
    right: -120px;
    top: -120px;
    background: radial-gradient(circle, rgba(24, 225, 255, 0.25), transparent 66%);
    pointer-events: none;
}

.login-logo {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #031022;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 0.5px;
    box-shadow: 0 16px 40px rgba(24, 225, 255, 0.18);
    position: relative;
    z-index: 1;
}

.eyebrow {
    margin-top: 28px;
    color: var(--cyan);
    font-size: 13px;
    letter-spacing: 0.08em;
    font-weight: 800;
    position: relative;
    z-index: 1;
}

.login-hero h1 {
    margin-top: 12px;
    font-size: 38px;
    line-height: 1.18;
    letter-spacing: -0.5px;
    position: relative;
    z-index: 1;
}

.login-hero p {
    margin-top: 18px;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.75;
    max-width: 650px;
    position: relative;
    z-index: 1;
}

.login-points {
    margin-top: 28px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.point {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.055);
}

.point b {
    display: block;
    margin-bottom: 6px;
    color: #fff;
    font-size: 14px;
}

.point span {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

/* ==================== 右侧表单区 ==================== */
.login-form {
    padding: 44px;
    border-left: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.18);
}

.login-form h2 {
    font-size: 24px;
    line-height: 1.3;
    margin-bottom: 8px;
}

.hint {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
    margin-bottom: 26px;
}

.field {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #cfe4ff;
    font-weight: 700;
    font-size: 13px;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]::placeholder,
input[type="password"]::placeholder {
    color: var(--muted);
}

input[type="text"]:focus,
input[type="password"]:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(24, 225, 255, 0.13);
}

/* ==================== 错误提示（JS 控制 display 显隐） ==================== */
.error-msg {
    min-height: 22px;
    margin: 10px 0 4px;
    color: #ffb4c2;
    font-size: 13px;
    line-height: 1.5;
    display: none;
}

/* ==================== 登录按钮 ==================== */
.login-btn {
    width: 100%;
    border: 0;
    border-radius: 12px;
    padding: 13px 16px;
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    font-size: 15px;
    transition: transform 0.18s ease, filter 0.18s ease;
    margin-top: 6px;
}

.login-btn.primary {
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    color: #031022;
    box-shadow: 0 12px 32px rgba(24, 225, 255, 0.18);
}

.login-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
}

.login-btn:active {
    transform: translateY(0);
}

/* ==================== 提示框 ==================== */
.notice {
    margin-top: 16px;
    border: 1px solid rgba(246, 200, 95, 0.22);
    border-radius: 12px;
    padding: 12px 14px;
    background: rgba(246, 200, 95, 0.07);
    color: #ffe8b0;
    font-size: 13px;
    line-height: 1.7;
}

/* ==================== 响应式自适应 ==================== */
@media (max-width: 1080px) {
    .login-card {
        grid-template-columns: 1fr;
    }

    .login-form {
        border-left: none;
        border-top: 1px solid var(--line);
    }
}

@media (max-width: 720px) {
    .login-page {
        padding: 16px;
    }

    .login-hero,
    .login-form {
        padding: 28px;
    }

    .login-hero h1 {
        font-size: 26px;
    }

    .login-points {
        grid-template-columns: 1fr;
    }

    .login-card {
        border-radius: 20px;
    }
}
