/* ===========================
   基础变量（颜色/阴影/尺寸）- 移动优先
   =========================== */
:root {
    --bg: linear-gradient(135deg, #191a2b 0%, #25274d 100%);
    --card-bg: rgba(36,34,67,0.93);
    --card-border: rgba(189,196,255,0.15);
    --text: #f5f6fa;
    --muted: #94a3b8;
    --accent: #8b5cf6;
    --accent2: #00f5ff;
    --radius: 20px;
    --shadow: 0 12px 36px rgba(50,30,130,0.16),0 1.5px 6px #0002;
    /* 手机端专用变量 */
    --mobile-padding: 12px;
    --mobile-gap: 14px;
    --mobile-font-base: 15px;
    --mobile-radius: 16px;
}

/* ===========================
   基础样式
   =========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    font-family: 'Segoe UI', 'Roboto', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    color: var(--text);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

/* ===========================
   背景动线
   =========================== */
.bg-lines {
    position: fixed;
    inset: 0;
    z-index: -1;
    opacity: 0.32;
    pointer-events: none;
}

/* ===========================
   容器布局
   =========================== */
.wrap {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: var(--mobile-padding);
    padding-top: 24px;
    padding-bottom: 40px;
    box-sizing: border-box;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===========================
   返回按钮
   =========================== */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    margin-bottom: 20px;
    background: rgba(139,92,246,0.15);
    border: 1px solid var(--card-border);
    border-radius: var(--mobile-radius);
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    backdrop-filter: blur(12px);
    align-self: flex-start;
}

.back-btn:hover {
    background: rgba(139,92,246,0.25);
    transform: translateX(-2px);
}

.back-btn:active {
    transform: translateX(0) scale(0.98);
}

/* ===========================
   LOGO区域
   =========================== */
.logo {
    width: 100%;
    padding: 16px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.logo a {
    display: inline-block;
    transition: transform 0.3s;
}

.logo img {
    height: 60px;
    width: auto;
    display: block;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(139,92,246,0.3);
    transition: transform 0.3s, box-shadow 0.3s;
}

.logo a:hover img {
    transform: scale(1.05);
    box-shadow: 0 6px 24px rgba(139,92,246,0.5);
}

/* ===========================
   登录主区域
   =========================== */
.login_main {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex: 1;
}

/* 登录窗口 */
.window {
    width: 100%;
    max-width: 420px;
    padding: 28px;
    margin: 0 auto;
}

.card {
    background: var(--card-bg);
    border: 1.5px solid var(--card-border);
    border-radius: var(--mobile-radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
    transition: all 0.3s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 48px rgba(139,92,246,0.3);
}

/* 标题 */
.tit1 {
    text-align: center;
    margin-bottom: 24px;
}

.tit1 h1 {
    font-size: clamp(24px, 6vw, 28px);
    margin-bottom: 8px;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.subtitle {
    color: var(--muted);
    font-size: 14px;
    margin-top: 4px;
}

/* 输入区域 */
.into_box {
    width: 100%;
}

.into {
    margin-bottom: 18px;
}

.into label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text);
    font-weight: 500;
}

.into input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1.5px solid var(--card-border);
    background: rgba(255,255,255,0.05);
    color: var(--text);
    font-size: 15px;
    transition: all 0.3s;
    box-sizing: border-box;
}

.into input::placeholder {
    color: var(--muted);
    opacity: 0.6;
}

.into input:focus {
    border-color: var(--accent);
    outline: none;
    background: rgba(255,255,255,0.08);
    box-shadow: 0 0 0 3px rgba(139,92,246,0.2);
}

/* 用户协议 */
.agree-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 16px;
    line-height: 1.6;
    cursor: pointer;
}

.agree-label input[type="checkbox"] {
    margin-top: 2px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent);
    flex-shrink: 0;
}

.agree-label .text_ln {
    flex: 1;
}

.agree-label .link {
    color: var(--accent2);
    text-decoration: none;
    transition: color 0.2s;
}

.agree-label .link:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* 提示消息 */
.message {
    min-height: 24px;
    margin-bottom: 16px;
    font-size: 13px;
    padding: 10px 14px;
    border-radius: 10px;
    line-height: 1.5;
    transition: all 0.3s;
    display: block;
}

.message:empty {
    display: none;
}

/* 错误消息 */
.message.error,
.pop_info div {
    color: #ff6b6b;
    background: rgba(255,107,107,0.1);
    border: 1px solid rgba(255,107,107,0.3);
}

/* 成功消息 */
.message.success {
    color: #51cf66;
    background: rgba(81,207,102,0.1);
    border: 1px solid rgba(81,207,102,0.3);
}

.pop_info {
    margin: 0;
}

.pop_info div {
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    color: inherit;
}

/* 按钮样式 */
button {
    width: 100%;
    padding: 14px 20px;
    border-radius: var(--mobile-radius);
    font-size: 16px;
    font-weight: 600;
    margin-top: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* 登录按钮 */
.login_btn {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: #fff;
    box-shadow: 0 4px 20px rgba(139,92,246,0.4);
}

.login_btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(139,92,246,0.5);
    background: linear-gradient(135deg, #9d6af7, #1affff);
}

.login_btn:not(:disabled):active {
    transform: translateY(0) scale(0.98);
}

.login_btn:disabled {
    background: rgba(148,163,184,0.3);
    color: var(--muted);
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.6;
}

/* 注册按钮 */
.register_btn {
    background: rgba(255,255,255,0.08);
    color: var(--text);
    border: 1px solid var(--card-border);
}

.register_btn:hover {
    background: rgba(255,255,255,0.12);
    border-color: var(--accent);
    transform: translateY(-1px);
}

.register_btn:active {
    transform: translateY(0) scale(0.98);
}

.btn-icon {
    font-size: 18px;
}

/* 底部 */
.page-footer {
    display: block;
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--card-border);
}

.page-footer p,a {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

/* ===========================
   移动端优化
   =========================== */
@media (max-width: 480px) {
    .wrap {
        padding: 10px;
        padding-top: 20px;
        padding-bottom: 32px;
    }

    .logo img {
        height: 50px;
    }

    .window {
        padding: 20px;
        border-radius: 14px;
    }

    .tit1 h1 {
        font-size: 22px;
    }

    .into input {
        padding: 12px 14px;
        font-size: 14px;
    }

    button {
        font-size: 15px;
        padding: 12px 18px;
        min-height: 46px;
    }

    .back-btn {
        padding: 8px 14px;
        font-size: 13px;
    }
}

/* 超小屏优化 */
@media (max-width: 375px) {
    .wrap {
        padding: 8px;
    }

    .window {
        padding: 16px;
    }

    .into {
        margin-bottom: 16px;
    }
}

/* 安全区域适配 */
@supports (padding: max(0px)) {
    .wrap {
        padding-left: max(12px, env(safe-area-inset-left));
        padding-right: max(12px, env(safe-area-inset-right));
        padding-bottom: max(40px, env(safe-area-inset-bottom));
    }
}

/* ========== 全局移动端兼容增强 ========== */
html, body {
    overscroll-behavior-y: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

a {
    -webkit-tap-highlight-color: transparent;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}
