* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
    margin: 0;
}

/* 背景装饰 */
.background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('/images/background.svg') no-repeat center center;
    background-size: cover;
    opacity: 0.1;
}

/* 主容器 */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

.login-container {
    background: rgba(255, 255, 255, 0.95);
    padding: 50px 40px;
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 420px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* 渐变装饰 */
.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb, #f5576c);
    background-size: 400% 100%;
    animation: gradientShift 8s ease infinite;
}

.login-header {
    margin-bottom: 40px;
}

.login-header h2 {
    color: #333;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-header p {
    color: #666;
    font-size: 16px;
    margin: 0;
}

.form-group {
    margin-bottom: 24px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.password-container {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #666;
    font-size: 18px;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #667eea;
}

.forgot-password {
    text-align: right;
    margin-bottom: 12px;
}

.forgot-password-link {
    font-size: 13px;
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-password-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 30px;
}

.btn {
    width: 100%;
    padding: 16px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.btn-primary::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-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.2);
}

.btn-secondary:active {
    transform: translateY(0);
}

.error-message {
    color: #e74c3c;
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
    padding: 12px;
    background: rgba(231, 76, 60, 0.1);
    border-radius: 8px;
    border-left: 4px solid #e74c3c;
}

.footer {
    margin-top: 30px;
    text-align: center;
    font-size: 14px;
    color: #999;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .login-container {
        padding: 40px 30px;
        margin: 20px;
    }
    
    .login-header h2 {
        font-size: 24px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.login-container {
    animation: fadeIn 0.6s ease-out;
}

.form-group input {
    animation: fadeIn 0.6s ease-out 0.1s both;
}

.form-group:nth-child(2) input {
    animation-delay: 0.2s;
}

.btn {
    animation: fadeIn 0.6s ease-out 0.3s both;
}

