/* 登录页面 - 重新设计 */

/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
    overflow: hidden;
}

/* 动态背景效果 */
.bg-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.bg-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.bg-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.particle {
    position: absolute;
    background: rgba(56, 189, 248, 0.3);
    border-radius: 50%;
    animation: float 20s infinite linear;
}

@keyframes float {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) scale(1);
        opacity: 0;
    }
}

/* 登录容器添加z-index确保在背景之上 */
.login-container {
    position: relative;
    z-index: 1;
    backdrop-filter: blur(10px);
}

/* 美化提示框样式 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1000;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
    border-left: 4px solid #1e88e5;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-success {
    border-left-color: #4caf50;
}

.toast-error {
    border-left-color: #f44336;
}

.toast-warning {
    border-left-color: #ff9800;
}

.toast-info {
    border-left-color: #1e88e5;
}

.toast-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast-success .toast-icon {
    background: rgba(76, 175, 80, 0.1);
    color: #4caf50;
}

.toast-error .toast-icon {
    background: rgba(244, 67, 54, 0.1);
    color: #f44336;
}

.toast-warning .toast-icon {
    background: rgba(255, 152, 0, 0.1);
    color: #ff9800;
}

.toast-info .toast-icon {
    background: rgba(30, 136, 229, 0.1);
    color: #1e88e5;
}

.toast-icon i {
    font-size: 16px;
}

.toast-content {
    flex-grow: 1;
    min-width: 0;
}

.toast-message {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.toast-close:hover {
    background: #f0f0f0;
    color: #666;
}

/* 登录容器 */
.login-container {
    width: 100%;
    max-width: 400px;
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #38bdf8, #0ea5e9);
}

/* 登录头部 */
.login-header {
    margin-bottom: 2rem;
}

.logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.4);
    transition: all 0.3s ease;
}

.logo:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 16px rgba(56, 189, 248, 0.5);
}

.logo img {
    width: 60%;
    height: 60%;
    object-fit: contain;
}

.login-title {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.login-subtitle {
    font-size: 1rem;
    color: #94a3b8;
}

/* 表单 */
.form {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 8px;
    font-size: 1rem;
    background: rgba(15, 23, 42, 0.6);
    color: #f1f5f9;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1);
}

/* 验证码按钮 */
.code-btn {
    width: 100%;
    padding: 0.875rem;
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.75rem;
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.2);
}

/* 验证码按钮响应式优化 */
@media (max-width: 480px) {
    .code-btn {
        padding: 0.75rem;
        font-size: 0.85rem;
        margin-top: 0.5rem;
    }
}

.code-btn:hover {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    box-shadow: 0 6px 16px rgba(56, 189, 248, 0.3);
    transform: translateY(-2px);
}

.code-btn:disabled {
    background: #475569;
    color: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* 表单选项 */
.form-options {
    margin-bottom: 1.5rem;
    text-align: left;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: #94a3b8;
}

.checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #38bdf8;
}

/* 登录按钮 */
.login-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.2);
}

.login-btn:hover {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    box-shadow: 0 6px 16px rgba(56, 189, 248, 0.3);
    transform: translateY(-2px);
}

/* 登录页脚 */
.login-footer {
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: #94a3b8;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .login-container {
        padding: 1.5rem;
    }
    
    .logo {
        width: 64px;
        height: 64px;
        margin-bottom: 1rem;
    }
    
    .login-title {
        font-size: 1.5rem;
    }
    
    .form-control {
        padding: 0.75rem 0.875rem;
        font-size: 0.9rem;
    }
    
    .code-btn {
        padding: 0.75rem;
        font-size: 0.85rem;
    }
    
    .login-btn {
        padding: 0.875rem;
        font-size: 1rem;
    }
}
