/* 导入现代字体 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f5f5f5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: 
        radial-gradient(circle at 10% 20%, rgba(102, 126, 234, 0.8) 0%, transparent 20%),
        radial-gradient(circle at 90% 30%, rgba(118, 75, 162, 0.7) 0%, transparent 25%),
        radial-gradient(circle at 50% 80%, rgba(124, 58, 237, 0.6) 0%, transparent 20%),
        linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-size: 200% 200%, 200% 200%, 200% 200%, 200% 200%;
    animation: 
        gradientShift 15s ease infinite,
        backgroundPulse 8s ease-in-out infinite;
    position: relative;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 25px 25px, rgba(255, 255, 255, 0.15) 2%, transparent 0%),
        radial-gradient(circle at 75px 75px, rgba(255, 255, 255, 0.15) 2%, transparent 0%);
    background-size: 100px 100px;
    pointer-events: none;
    opacity: 0.6;
}

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

@keyframes backgroundPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.95; }
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
    perspective: 1000px;
}

.login-box {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    transform: translateZ(20px);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-30px) translateZ(0);
    }
    to {
        opacity: 1;
        transform: translateY(0) translateZ(20px);
    }
}

.login-box h2 {
    text-align: center;
    margin-bottom: 35px;
    color: #2d3748;
    font-size: 28px;
    font-weight: 700;
    position: relative;
}

.login-box h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.form-group {
    margin-bottom: 24px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #4a5568;
    font-weight: 500;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input {
    width: 100%;
    padding: 16px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: rgba(255, 255, 255, 0.8);
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
    transform: translateY(-1px);
    background-color: white;
}

.form-group input::placeholder {
    color: #a0aec0;
    font-weight: 400;
}

.login-button {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

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

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

.login-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.login-button:active {
    transform: translateY(0);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.error-message {
    margin-top: 20px;
    padding: 12px;
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    color: #dc2626;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    display: none;
    position: relative;
    overflow: hidden;
}

.error-message::before {
    content: '⚠️';
    margin-right: 8px;
}

.error-message.show {
    display: block;
    animation: slideDown 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 添加一些装饰元素 */
.decorative-element {
    position: absolute;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(102, 126, 234, 0.1);
    z-index: -1;
}

.decorative-element.top {
    top: -50px;
    right: -50px;
    animation: pulse 3s ease-in-out infinite;
}

.decorative-element.bottom {
    bottom: -50px;
    left: -50px;
    animation: pulse 3s ease-in-out infinite 1s;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 0.5;
    }
}

/* 响应式设计 */
@media (max-width: 480px) {
    .login-container {
        padding: 15px;
    }
    
    .login-box {
        padding: 30px 20px;
        border-radius: 12px;
    }
    
    .login-box h2 {
        font-size: 24px;
        margin-bottom: 25px;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-group input {
        padding: 14px 12px;
        border-radius: 8px;
    }
    
    .login-button {
        padding: 14px;
        border-radius: 8px;
    }
    
    .error-message {
        margin-top: 15px;
        padding: 10px;
    }
}