﻿/* ===== 全局 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'PingFang SC', Roboto, system-ui, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #0b0e1a; /* 备用背景 */
    overflow: hidden;
    position: relative;
}

/* ===== 动态渐变背景 ===== */
.bg-animated {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(-45deg, #0f0c29, #302b63, #24243e, #1a1a2e);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    z-index: 0;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 装饰光晕 */
.bg-animated::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.03) 0%, transparent 60%),
                radial-gradient(circle at 70% 80%, rgba(123, 104, 238, 0.08) 0%, transparent 50%);
    animation: glowPulse 8s ease-in-out infinite alternate;
}

@keyframes glowPulse {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.1); opacity: 1; }
}

/* ===== 登录卡片容器 ===== */
.login-wrapper {
    width: 100%;
    max-width: 440px;
    z-index: 1;
    position: relative;
}

.login-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 40px;
    padding: 45px 35px 40px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5),
                inset 0 1px 0 rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: transform 0.3s ease;
}

.login-card:hover {
    transform: translateY(-5px);
}

/* ===== 品牌图标 ===== */
.brand-icon {
    font-size: 3.2rem;
    text-align: center;
    margin-bottom: 5px;
    filter: drop-shadow(0 8px 20px rgba(123, 104, 238, 0.3));
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

/* ===== 标题 ===== */
.header {
    text-align: center;
    margin-bottom: 30px;
}

.title {
    display: block;
    font-size: 1.5rem !important;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.5;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.title br {
    display: none;
}

.sub-title {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 3px;
    margin-top: 6px;
    font-weight: 300;
    text-transform: uppercase;
}

/* ===== 输入框 ===== */
.input-group {
    margin-bottom: 30px;
}

.inputBox {
    position: relative;
    margin-bottom: 28px;
}

.input-field {
    width: 100%;
    padding: 16px 20px 8px 20px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 16px;
    outline: none;
    color: #ffffff;
    transition: all 0.3s;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.2);
}

.input-field:focus {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.3), 0 0 0 2px rgba(123, 104, 238, 0.3);
}

.input-field:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px rgba(30, 30, 60, 0.9) inset !important;
    -webkit-text-fill-color: #fff !important;
}

.inputBox label {
    position: absolute;
    left: 20px;
    top: 16px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.95rem;
    pointer-events: none;
    transition: 0.25s ease all;
    font-weight: 300;
}

.input-field:focus ~ label,
.input-field:not(:placeholder-shown) ~ label {
    top: -6px;
    left: 16px;
    font-size: 0.7rem;
    color: #a78bfa;
    background: rgba(0,0,0,0.4);
    padding: 2px 10px;
    border-radius: 20px;
}

/* 输入框底部流光线条 */
.input-line {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #a78bfa, #7c3aed);
    transition: all 0.4s ease;
    border-radius: 2px;
}

.input-field:focus ~ .input-line {
    width: 100%;
    left: 0;
}

/* ===== 按钮组 ===== */
.button-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 10px;
    margin-top: 10px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    background: transparent;
    color: #fff;
    min-width: 80px;
    flex: 1 0 auto;
    max-width: 140px;
    letter-spacing: 0.5px;
    text-decoration: none;
    backdrop-filter: blur(4px);
}

/* 登录主按钮 */
.btn-primary {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.4);
    color: #fff;
    flex: 2 1 120px;
}
.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 40px rgba(124, 58, 237, 0.6);
}

/* 注册按钮 */
.btn-outline {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
}
.btn-outline:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
}

/* 文字链接（忘记密码、帮助） */
.btn-link {
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
    box-shadow: none;
    min-width: auto;
    flex: 0 1 auto;
    padding: 8px 16px;
    font-size: 0.85rem;
}
.btn-link:hover {
    color: #a78bfa;
    text-decoration: underline;
    background: rgba(255,255,255,0.05);
}

/* 微信按钮 */
.btn-wechat {
    background: #07c160;
    color: #fff;
    box-shadow: 0 8px 25px rgba(7, 193, 96, 0.3);
    flex: 1 1 100%;
    max-width: 100%;
}
.btn-wechat:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(7, 193, 96, 0.5);
}

/* ===== 响应式 ===== */
@media (max-width: 480px) {
    .login-card {
        padding: 30px 20px 28px;
        border-radius: 28px;
    }
    .title {
        font-size: 1.2rem !important;
    }
    .brand-icon {
        font-size: 2.6rem;
    }
    .btn {
        font-size: 0.85rem;
        padding: 10px 16px;
        min-width: 60px;
        flex: 1 1 45%;
    }
    .btn-link {
        flex: 0 1 auto;
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    .btn-primary {
        flex: 2 1 100%;
    }
}

@media (max-width: 380px) {
    .login-card {
        padding: 24px 15px 20px;
    }
    .input-field {
        font-size: 0.9rem;
        padding: 14px 16px 6px 16px;
    }
    .inputBox label {
        font-size: 0.85rem;
        top: 14px;
        left: 16px;
    }
}