/* ============================================
   现代化登录界面样式 - Premium Login UI
   ============================================ */

/* === 全局重置 === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    overflow: hidden;
    background: #0f0c29;
}

/* === 动态渐变背景 === */
.bg-gradient {
    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: -2;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* === 粒子动画层 === */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: float linear infinite;
}

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

/* === 主容器 === */
.wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}

.wpn {
    width: 100%;
    max-width: 440px;
    perspective: 1000px;
}

/* === 毛玻璃登录卡片 === */
.form-data {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    padding: 45px 45px 40px;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.3),
        0 0 100px rgba(99, 102, 241, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    animation: cardEntry 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(30px);
}

@keyframes cardEntry {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === 标题区域 === */
.title-container {
    text-align: center;
    margin-bottom: 30px;
}

.system-title {
    color: #fff;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 3px;
    text-shadow: 0 2px 15px rgba(99, 102, 241, 0.4);
    margin-bottom: 8px;
    background: linear-gradient(135deg, #fff 0%, rgba(199, 210, 255, 0.9) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.system-subtitle {
    color: rgba(255, 255, 255, 0.35);
    font-size: 10px;
    letter-spacing: 5px;
    font-weight: 400;
    text-transform: uppercase;
}

/* === 选项卡切换 === */
.change-login {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    position: relative;
}

.change-login p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    cursor: pointer;
    padding: 8px 24px;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.change-login p:hover {
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.05);
}

.change-login p.on {
    color: #fff;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.5), rgba(168, 85, 247, 0.5));
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
}

/* === 表单样式 === */
.form1, .form2 {
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.p-input {
    position: relative;
    margin-bottom: 22px;
    width: 100%;
}

.p-input label {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 2;
}

.p-input input {
    width: 100%;
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: #fff;
    font-size: 15px;
    outline: none;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.p-input input:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(99, 102, 241, 0.7);
    box-shadow: 0 0 25px rgba(99, 102, 241, 0.25);
}

.p-input input:focus + label,
.p-input input:not(:placeholder-shown) + label {
    top: -8px;
    left: 12px;
    font-size: 11px;
    color: rgba(99, 102, 241, 0.95);
    background: rgba(30, 27, 60, 0.9);
    padding: 2px 8px;
    border-radius: 6px;
    z-index: 3;
}

.p-input input::placeholder {
    color: transparent;
}

/* === 错误提示 === */
.tel-warn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #ff6b6b;
    font-size: 13px;
    margin-bottom: 18px;
    padding: 10px 14px;
    background: rgba(255, 107, 107, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(255, 107, 107, 0.3);
    animation: shake 0.5s ease;
    text-align: center;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.tel-warn.hide {
    display: none;
}

.tel-warn i {
    font-size: 16px;
}

/* === 忘记密码链接 === */
.r-forget {
    text-align: right;
    margin-bottom: 22px;
    padding: 0 2px;
}

.r-forget a {
    color: rgba(255, 255, 255, 0.45);
    font-size: 12px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.r-forget a:hover {
    color: rgba(99, 102, 241, 0.9);
}

/* === 登录按钮 === */
.lang-btn {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    letter-spacing: 2px;
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.lang-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.lang-btn:hover::before {
    left: 100%;
}

.lang-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(99, 102, 241, 0.5);
}

.lang-btn:active {
    transform: translateY(-1px);
}

.lang-btn.off {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
    box-shadow: none;
}

.lang-btn.off:hover {
    transform: none;
    box-shadow: none;
}

.lang-btn.off::before {
    display: none;
}

/* === 二维码区域 === */
.form2 {
    text-align: center;
    padding: 15px 0;
}

.form2 img {
    width: 200px;
    height: 200px;
    border-radius: 14px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.form2 img:hover {
    transform: scale(1.03);
}

.form2 p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    margin-top: 18px;
}

/* === 底部版权 === */
.right {
    text-align: center;
    color: rgba(255, 255, 255, 0.25);
    font-size: 11px;
    margin-top: 25px;
    letter-spacing: 0.5px;
}

/* === 隐藏类 === */
.hide {
    display: none !important;
}

/* === 响应式设计 === */
@media screen and (max-width: 768px) {
    .wpn {
        max-width: 100%;
    }
    
    .form-data {
        padding: 40px 30px 30px;
        border-radius: 20px;
    }
    
    .system-title {
        font-size: 24px;
        letter-spacing: 2px;
    }
    
    .system-subtitle {
        font-size: 9px;
        letter-spacing: 4px;
    }
    
    .change-login {
        gap: 15px;
    }
    
    .change-login p {
        padding: 7px 20px;
        font-size: 13px;
    }
    
    .p-input input {
        padding: 15px 16px;
        font-size: 14px;
    }
    
    .lang-btn {
        padding: 15px;
        font-size: 15px;
    }
}

@media screen and (max-width: 480px) {
    .form-data {
        padding: 35px 25px 25px;
        border-radius: 16px;
    }
    
    .system-title {
        font-size: 22px;
        letter-spacing: 2px;
    }
    
    .system-subtitle {
        font-size: 8px;
        letter-spacing: 3px;
    }
    
    .form2 img {
        width: 170px;
        height: 170px;
    }
}

/* === 加载动画 === */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0f0c29;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loader {
    width: 45px;
    height: 45px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* === 装饰性光晕 === */
.glow-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.25;
    z-index: -1;
    animation: orbFloat 20s ease-in-out infinite;
}

.glow-orb-1 {
    width: 350px;
    height: 350px;
    background: #6366f1;
    top: -80px;
    right: -80px;
}

.glow-orb-2 {
    width: 280px;
    height: 280px;
    background: #a855f7;
    bottom: -40px;
    left: -40px;
    animation-delay: -10s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
}
