/**
 * SiteStats Pro - 登录页面样式
 * Modern & Elegant Design
 */

/* ========== CSS变量 ========== */
:root {
    --login-primary: #4F46E5;
    --login-primary-hover: #4338CA;
    --login-accent: #06B6D4;
    --login-bg-dark: #0F172A;
    --login-bg-medium: #1E293B;
    --login-text: #F8FAFC;
    --login-text-muted: #94A3B8;
    --login-border: #334155;
    --login-success: #10B981;
    --login-danger: #EF4444;
}

/* ========== 登录页面基础 ========== */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--login-bg-dark);
    position: relative;
    overflow: hidden;
}

/* 动态背景效果 */
.login-page::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(79, 70, 229, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(6, 182, 212, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(79, 70, 229, 0.1) 0%, transparent 40%);
    animation: bgMove 20s ease-in-out infinite;
}

@keyframes bgMove {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(5deg); }
}

/* 浮动粒子 */
.login-page::after {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(255,255,255,0.03) 1px, transparent 1px),
        radial-gradient(circle at 80% 70%, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 60px 60px, 80px 80px;
    animation: floatParticles 60s linear infinite;
}

@keyframes floatParticles {
    0% { transform: translate(0, 0); }
    100% { transform: translate(30px, 30px); }
}

/* ========== 登录容器 ========== */
.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
    position: relative;
    z-index: 10;
}

/* ========== 登录卡片 ========== */
.login-box {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--login-border);
    border-radius: 24px;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    overflow: hidden;
}

/* ========== 登录头部 ========== */
.login-header {
    padding: 48px 40px 36px;
    text-align: center;
    background: linear-gradient(180deg, rgba(79, 70, 229, 0.1) 0%, transparent 100%);
}

.login-header .logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    font-size: 26px;
    font-weight: 700;
    color: var(--login-text);
    margin-bottom: 12px;
}

.login-header .logo-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--login-primary) 0%, var(--login-accent) 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.4);
}

.login-header .subtitle {
    font-size: 14px;
    color: var(--login-text-muted);
    font-weight: 400;
}

/* ========== 登录表单 ========== */
.login-form {
    padding: 0 40px 40px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form .form-label {
    display: block;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 500;
    color: var(--login-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 输入框样式 */
.login-form .form-input,
.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--login-border);
    border-radius: 12px;
    font-size: 15px;
    color: var(--login-text);
    transition: all 0.3s ease;
}

.login-form .form-input::placeholder,
.login-form input::placeholder {
    color: rgba(148, 163, 184, 0.5);
}

.login-form .form-input:focus,
.login-form input:focus {
    outline: none;
    border-color: var(--login-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2), 0 0 20px rgba(79, 70, 229, 0.1);
    background: rgba(15, 23, 42, 0.8);
}

/* 记住我 */
.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--login-text-muted);
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--login-primary);
    cursor: pointer;
    border-radius: 4px;
}

/* 登录按钮 */
.btn-login {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--login-primary) 0%, #6366F1 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-login::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;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.5);
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:active {
    transform: translateY(0);
}

/* ========== 登录底部 ========== */
.login-footer {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid var(--login-border);
    margin-top: 24px;
}

.login-footer p {
    color: var(--login-text-muted);
    font-size: 14px;
}

.login-footer a {
    color: var(--login-accent);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease;
}

.login-footer a:hover {
    color: var(--login-text);
    text-decoration: underline;
}

/* 登录提示信息 */
.login-info {
    padding: 16px 40px;
    background: rgba(15, 23, 42, 0.4);
    border-top: 1px solid var(--login-border);
    text-align: center;
}

.login-info p {
    font-size: 12px;
    color: var(--login-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.login-info p::before {
    content: 'ℹ️';
}

/* ========== 提示框 ========== */
.alert {
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-error {
    background: rgba(239, 68, 68, 0.15);
    color: #FCA5A5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.alert-error::before {
    content: '✕';
    font-weight: bold;
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    color: #6EE7B7;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.alert-success::before {
    content: '✓';
    font-weight: bold;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #FCD34D;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.alert-warning::before {
    content: '⚠';
}

/* ========== 注册页面 ========== */
.login-box.register .login-header {
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.1) 0%, transparent 100%);
}

.login-box.register .btn-login {
    background: linear-gradient(135deg, var(--login-success) 0%, #059669 100%);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.login-box.register .btn-login:hover {
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.5);
}

/* ========== 响应式 ========== */
@media (max-width: 480px) {
    .login-header {
        padding: 36px 24px 28px;
    }
    
    .login-header .logo {
        font-size: 22px;
    }
    
    .login-header .logo-icon {
        width: 44px;
        height: 44px;
        font-size: 24px;
        border-radius: 12px;
    }
    
    .login-form {
        padding: 0 24px 32px;
    }
    
    .login-info {
        padding: 14px 24px;
    }
    
    .login-footer {
        padding-top: 20px;
    }
}

/* ========== 品牌展示 ========== */
.brand-showcase {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--login-border);
}

.brand-showcase p {
    font-size: 11px;
    color: rgba(148, 163, 184, 0.6);
    letter-spacing: 2px;
    text-transform: uppercase;
}
