/* 登录页面样式 */
:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --error-color: #ef4444;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --background: #f8fafc;
    --card-background: #ffffff;
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* 背景动画 */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 20s infinite ease-in-out;
}

.circle-1 {
    width: 300px;
    height: 300px;
    top: -150px;
    left: -150px;
    animation-delay: 0s;
}

.circle-2 {
    width: 200px;
    height: 200px;
    bottom: -100px;
    right: -100px;
    animation-delay: 5s;
}

.circle-3 {
    width: 150px;
    height: 150px;
    top: 50%;
    right: -75px;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-50px) scale(1.1);
    }
}

/* 登录容器 */
.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 登录框 */
.login-box {
    background: var(--card-background);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    padding: 40px;
    backdrop-filter: blur(10px);
}

/* 头部 */
.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.logo {
    font-size: 4rem;
    margin-bottom: 16px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.login-header h1 {
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-weight: 700;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* 表单 */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.icon {
    font-size: 1.2rem;
}

.form-group input[type="text"],
.form-group input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* 复选框 */
.checkbox-group {
    margin-top: -8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.checkbox-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* 错误信息 */
.error-message {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid var(--error-color);
    border-radius: 8px;
    color: var(--error-color);
    font-size: 0.9rem;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.error-icon {
    font-size: 1.2rem;
}

/* 登录按钮 */
.btn-login {
    width: 100%;
    padding: 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-login:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login:disabled {
    background: var(--text-secondary);
    cursor: not-allowed;
    transform: none;
}

.btn-loading {
    display: flex;
    align-items: center;
    gap: 8px;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 页脚 */
.login-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.login-footer p {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .login-box {
        padding: 28px;
    }

    .login-header h1 {
        font-size: 1.5rem;
    }

    .logo {
        font-size: 3rem;
    }

    .btn-login {
        padding: 14px;
        font-size: 1rem;
    }
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
    .login-box {
        background: rgba(30, 41, 59, 0.95);
    }

    .login-header h1 {
        color: white;
    }

    .form-group label {
        color: white;
    }

    .form-group input {
        background: rgba(15, 23, 42, 0.5);
        color: white;
        border-color: rgba(100, 116, 139, 0.3);
    }

    .form-group input:focus {
        background: rgba(15, 23, 42, 0.7);
    }

    .login-footer {
        border-top-color: rgba(100, 116, 139, 0.3);
    }
}

