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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f7fa;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: #333;
}

.login-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    height: 100vh;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.15);
    padding: 24px 32px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    min-height: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid rgba(102, 126, 234, 0.1);
    margin: 0 auto;
    overflow: hidden;
}

.login-card h3 {
    margin-bottom: 8px;
    color: #333;
    font-size: 22px;
    font-weight: 600;
}

.login-card .text-muted {
    font-size: 14px;
    color: #999;
}

.input-group {
    transition: all 0.3s;
}

.input-group:focus-within {
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
    border-radius: 4px;
}

.input-group-text {
    background-color: #f8f9fa;
    border-color: #dee2e6;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: none;
}

.form-select:focus {
    border-color: #667eea;
    box-shadow: none;
}

#loginBtn {
    background-color: #667eea;
    border: none;
    transition: all 0.3s;
}

#loginBtn:hover {
    background-color: #7689f4;
}

#loginBtn:active {
    background-color: #5a6fd8;
}

#loginBtn:disabled {
    background-color: #d9d9d9;
    cursor: not-allowed;
}

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 16px;
    color: #666;
    font-size: 14px;
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.toast {
    position: fixed;
    bottom: 24px;
    left: 24px;
    padding: 12px 20px;
    background-color: #52c41a;
    color: white;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    font-size: 14px;
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
}

.toast.error {
    background-color: #f5222d;
}

@keyframes slideIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 适配不同屏幕尺寸 */
@media (max-width: 768px) {
    .login-card {
        padding: 20px;
        margin: 16px;
        max-width: 100%;
        min-height: auto;
        max-height: 95vh;
    }
    
    .login-card h3 {
        margin-bottom: 8px;
        font-size: 20px;
    }
    
    .mb-3 {
        margin-bottom: 12px !important;
    }
    
    .form-control,
    .form-select {
        padding: 8px 12px;
        font-size: 13px;
        min-height: 36px;
    }
    
    #loginBtn {
        padding: 8px;
        font-size: 14px;
        margin-top: 12px;
        min-height: 36px;
    }
}

@media (max-height: 500px) {
    .login-card {
        padding: 16px;
        margin: 8px;
        min-height: 380px;
    }
    
    .login-card h3 {
        margin-bottom: 6px;
        font-size: 18px;
    }
    
    .mb-3 {
        margin-bottom: 10px !important;
    }
    
    .form-label {
        font-size: 12px;
        margin-bottom: 4px;
    }
    
    .form-control,
    .form-select {
        padding: 6px 10px;
        font-size: 12px;
        min-height: 32px;
    }
    
    #loginBtn {
        padding: 6px;
        font-size: 13px;
        margin-top: 10px;
        min-height: 32px;
    }
}