/**
 * 现代化登录页面样式
 * 渠道合作登录 - 高端大气版本
 */

/* ==================== 全局重置与基础样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow-x: hidden;
}

/* ==================== 登录页背景容器 ==================== */
.modern-login-wrapper {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(135deg, #0c0e1a 0%, #1a1c2e 30%, #2d1b4e 60%, #1a1c2e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* ==================== 动态粒子背景 ==================== */
.particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.3);
    animation: float-particle linear infinite;
}

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

/* ==================== 光晕效果 ==================== */
.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 1;
    animation: orb-float 8s ease-in-out infinite;
}

.glow-orb-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.4), transparent);
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.glow-orb-2 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.3), transparent);
    bottom: -80px;
    left: -80px;
    animation-delay: -3s;
}

.glow-orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.3), transparent);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -5s;
}

@keyframes orb-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -30px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(20px, 30px) scale(1.02); }
}

/* ==================== 网格背景 ==================== */
.grid-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(99, 102, 241, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.05) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: 1;
}

/* ==================== 主登录卡片 ==================== */
.login-card-container {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
    padding: 40px;
}

/* ==================== 左侧品牌展示区 ==================== */
.brand-section {
    max-width: 500px;
    color: #fff;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 40px;
}

.brand-logo-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: bold;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.4);
}

.brand-logo-text {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #c7d2fe, #e9d5ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-title {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #c7d2fe 50%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.8;
    margin-bottom: 40px;
}

.brand-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.brand-feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.brand-feature-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateX(8px);
}

.feature-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(168, 85, 247, 0.2));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.feature-text {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.8);
}

/* ==================== 右侧登录表单区 ==================== */
.login-form-section {
    width: 440px;
}

.login-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 48px 40px;
    box-shadow: 
        0 32px 64px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset,
        0 1px 0 rgba(255, 255, 255, 0.1) inset;
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.login-card-header {
    text-align: center;
    margin-bottom: 36px;
}

.login-card-title {
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
}

.login-card-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.45);
}

/* ==================== 表单输入框样式 ==================== */
.form-group {
    margin-bottom: 22px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.3);
    transition: color 0.3s ease;
    z-index: 2;
}

.form-input {
    width: 100%;
    height: 52px;
    padding: 0 16px 0 48px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    font-size: 15px;
    color: #fff;
    outline: none;
    transition: all 0.3s ease;
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.form-input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.form-input:focus + .input-icon,
.form-input:focus ~ .input-icon {
    color: #6366f1;
}

/* ==================== 密码显示切换 ==================== */
.password-toggle {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    font-size: 18px;
    padding: 4px;
    transition: color 0.3s ease;
    z-index: 2;
}

.password-toggle:hover {
    color: rgba(255, 255, 255, 0.6);
}

/* ==================== 登录按钮 ==================== */
.login-btn {
    width: 100%;
    height: 54px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 8px;
    letter-spacing: 1px;
}

.login-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;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.4);
}

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

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

/* ==================== 底部链接 ==================== */
.login-footer-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-link {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #a855f7;
}

/* ==================== 已登录状态卡片 ==================== */
.logged-in-card {
    text-align: center;
    padding: 20px 0;
}

.logged-in-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    border-radius: 50%;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #fff;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.3);
}

.logged-in-welcome {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
}

.logged-in-username {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 32px;
}

.logged-in-username span {
    color: #a855f7;
    font-weight: 500;
}

.dashboard-btn {
    display: inline-block;
    padding: 14px 48px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    margin-bottom: 16px;
}

.dashboard-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.4);
    color: #fff;
}

.logout-btn {
    display: block;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.35);
    text-decoration: none;
    transition: color 0.3s ease;
}

.logout-btn:hover {
    color: #f87171;
}

/* ==================== 装饰线条 ==================== */
.decoration-line {
    position: absolute;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.3), transparent);
    z-index: 2;
}

.decoration-line-1 {
    width: 200px;
    height: 1px;
    top: 20%;
    left: 10%;
    animation: line-move 12s ease-in-out infinite;
}

.decoration-line-2 {
    width: 150px;
    height: 1px;
    bottom: 25%;
    right: 15%;
    animation: line-move 10s ease-in-out infinite reverse;
}

@keyframes line-move {
    0%, 100% { transform: translateX(0); opacity: 0.3; }
    50% { transform: translateX(100px); opacity: 0.8; }
}

/* ==================== 浮动装饰元素 ==================== */
.floating-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.shape {
    position: absolute;
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 12px;
    animation: shape-float 15s ease-in-out infinite;
}

.shape-1 {
    width: 80px;
    height: 80px;
    top: 15%;
    left: 8%;
    transform: rotate(45deg);
    animation-delay: 0s;
}

.shape-2 {
    width: 60px;
    height: 60px;
    top: 70%;
    right: 12%;
    border-radius: 50%;
    animation-delay: -4s;
}

.shape-3 {
    width: 100px;
    height: 100px;
    bottom: 15%;
    left: 15%;
    border-radius: 20px;
    animation-delay: -8s;
}

.shape-4 {
    width: 50px;
    height: 50px;
    top: 30%;
    right: 25%;
    transform: rotate(30deg);
    animation-delay: -2s;
}

@keyframes shape-float {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.3; }
    25% { transform: translateY(-20px) rotate(5deg); opacity: 0.6; }
    50% { transform: translateY(10px) rotate(-3deg); opacity: 0.4; }
    75% { transform: translateY(-15px) rotate(2deg); opacity: 0.5; }
}

/* ==================== 响应式适配 ==================== */
@media (max-width: 1200px) {
    .login-card-container {
        flex-direction: column;
        gap: 40px;
    }
    
    .brand-section {
        text-align: center;
        max-width: 400px;
    }
    
    .brand-logo {
        justify-content: center;
    }
    
    .brand-features {
        align-items: center;
    }
    
    .brand-title {
        font-size: 32px;
    }
}

@media (max-width: 768px) {
    .login-form-section {
        width: 100%;
        max-width: 400px;
    }
    
    .login-card {
        padding: 36px 28px;
    }
    
    .brand-section {
        display: none;
    }
    
    .login-card-container {
        padding: 20px;
    }
}

/* ==================== 加载动画 ==================== */
.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ==================== 输入框自动填充样式修复 ==================== */
.form-input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px rgba(99, 102, 241, 0.1) inset !important;
    -webkit-text-fill-color: #fff !important;
    border-color: rgba(99, 102, 241, 0.3) !important;
}

/* ==================== 滚动条美化 ==================== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.4);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.6);
}
