/* 用户管理系统样式表 */

/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    line-height: 1.6;
    padding: 20px;
    transition: all 0.3s ease;
}

.container {
    max-width: 900px;
    margin: 30px auto;
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* 主标题样式 */
.main-title {
    color: #1890ff;
    text-align: center;
    margin-bottom: 30px;
    font-size: 32px;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    position: relative;
    padding-bottom: 15px;
}

.main-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    height: 3px;
    width: 80px;
    background-color: #1890ff;
    border-radius: 3px;
    transform: translateX(-50%);
}

/* 标题样式 */
h2 {
    color: #1890ff;
    margin-bottom: 20px;
    font-weight: 600;
    position: relative;
    padding-bottom: 10px;
}

h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 50px;
    background-color: #1890ff;
    border-radius: 3px;
}

/* 表单样式 */
.login-form, .user-management {
    margin-bottom: 30px;
    animation: fadeIn 0.5s ease;
}

.login-form {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
}

.login-card {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: 30px;
    width: 100%;
    max-width: 400px;
    transition: all 0.3s ease;
}

.login-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}

.login-header {
    text-align: center;
    margin-bottom: 25px;
}

.login-icon {
    font-size: 48px;
    color: #1890ff;
    margin-bottom: 15px;
    display: block;
}

.user-management {
    display: none;
}

.form-group {
    margin-bottom: 20px;
}

.input-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    position: relative;
}

input {
    width: 100%;
    padding: 12px 15px;
    margin: 8px 0;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

input:focus {
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
    outline: none;
}

/* 按钮样式 */
button {
    background-color: #1890ff;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    margin: 5px 5px 5px 0;
    font-weight: 500;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

button:hover {
    background-color: #40a9ff;
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.4);
    transform: translateY(-2px);
}

button:active {
    background-color: #096dd9;
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-delete {
    background-color: #ff4d4f;
}

.btn-delete:hover {
    background-color: #ff7875;
    box-shadow: 0 2px 8px rgba(255, 77, 79, 0.3);
}

.btn-edit {
    background-color: #52c41a;
}

.btn-edit:hover {
    background-color: #73d13d;
    box-shadow: 0 2px 8px rgba(82, 196, 26, 0.3);
}

.btn-save {
    background-color: #faad14;
}

.btn-save:hover {
    background-color: #ffc53d;
    box-shadow: 0 2px 8px rgba(250, 173, 20, 0.3);
}

/* 表格样式 */
.table-container {
    position: relative;
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border-radius: 8px;
    overflow: hidden;
    animation: fadeIn 0.6s ease;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e8e8e8;
    transition: all 0.2s ease;
}

th {
    background-color: #f0f7ff;
    color: #1890ff;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
}

tr:hover {
    background-color: #f5f5f5;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

tr:last-child td {
    border-bottom: none;
}

tr {
    transition: all 0.2s ease;
}

/* 消息提示样式 */
.message-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    padding: 12px 20px;
    border-radius: 4px;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s ease;
    transition: all 0.3s ease;
}

.message-info {
    background-color: #1890ff;
}

.message-success {
    background-color: #52c41a;
}

.message-error {
    background-color: #ff4d4f;
}

.message-hide {
    opacity: 0;
    transform: translateX(100%);
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}

/* 页脚样式 */
.footer {
    text-align: center;
    margin-top: 30px;
    padding: 15px 0;
    color: #888;
    font-size: 14px;
}

/* 分隔线 */
.divider {
    margin: 30px 0;
    border: 0;
    height: 1px;
    background-color: #e8e8e8;
}

/* 密码修改区域 */
.password-section {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    border-left: 4px solid #1890ff;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.password-section:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.password-section h3 {
    color: #1890ff;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.password-section h3:before {
    content: '\f023';
    font-family: 'Font Awesome 5 Free';
    margin-right: 10px;
    font-weight: 900;
    font-size: 16px;
}

.password-section input {
    margin-right: 10px;
    margin-bottom: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 20px;
        margin: 15px auto;
    }
    
    table {
        display: block;
        overflow-x: auto;
    }
    
    input, button {
        width: 100%;
        max-width: none;
        margin: 5px 0;
    }
    
    .password-section input {
        margin-right: 0;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.user-actions {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.edit-input {
    margin: 0;
    padding: 5px 10px;
}

/* 加载动画 */
.loader {
    display: none;
    border: 3px solid #f3f3f3;
    border-radius: 50%;
    border-top: 3px solid #1890ff;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

.batch-add-section {
    margin-top: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
    border-left: 4px solid #1890ff;
}

.batch-add-section h4 {
    color: #1890ff;
    margin-bottom: 10px;
    font-size: 16px;
}

.hint-text {
    color: #888;
    font-size: 12px;
    margin-bottom: 8px;
}

textarea#batchUsernames {
    width: 100%;
    padding: 10px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    resize: vertical;
    margin-bottom: 10px;
    font-family: inherit;
}

textarea#batchUsernames:focus {
    border-color: #1890ff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.btn-delete:hover {
    background-color: #ff7875;
    box-shadow: 0 2px 8px rgba(255, 77, 79, 0.3);
}

.btn-edit {
    background-color: #52c41a;
}

.btn-edit:hover {
    background-color: #73d13d;
    box-shadow: 0 2px 8px rgba(82, 196, 26, 0.3);
}

.btn-save {
    background-color: #faad14;
}

.btn-save:hover {
    background-color: #ffc53d;
    box-shadow: 0 2px 8px rgba(250, 173, 20, 0.3);
}

/* 表格样式 */
.table-container {
    position: relative;
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border-radius: 8px;
    overflow: hidden;
    animation: fadeIn 0.6s ease;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e8e8e8;
    transition: all 0.2s ease;
}

th {
    background-color: #f0f7ff;
    color: #1890ff;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
}

tr:hover {
    background-color: #f5f5f5;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

tr:last-child td {
    border-bottom: none;
}

tr {
    transition: all 0.2s ease;
}

/* 消息提示样式 */
.message-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    padding: 12px 20px;
    border-radius: 4px;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s ease;
    transition: all 0.3s ease;
}

.message-info {
    background-color: #1890ff;
}

.message-success {
    background-color: #52c41a;
}

.message-error {
    background-color: #ff4d4f;
}

.message-hide {
    opacity: 0;
    transform: translateX(100%);
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}

/* 页脚样式 */
.footer {
    text-align: center;
    margin-top: 30px;
    padding: 15px 0;
    color: #888;
    font-size: 14px;
}

/* 分隔线 */
.divider {
    margin: 30px 0;
    border: 0;
    height: 1px;
    background-color: #e8e8e8;
}

/* 密码修改区域 */
.password-section {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    border-left: 4px solid #1890ff;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.password-section:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.password-section h3 {
    color: #1890ff;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.password-section h3:before {
    content: '\f023';
    font-family: 'Font Awesome 5 Free';
    margin-right: 10px;
    font-weight: 900;
    font-size: 16px;
}

.password-section input {
    margin-right: 10px;
    margin-bottom: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 20px;
        margin: 15px auto;
    }
    
    table {
        display: block;
        overflow-x: auto;
    }
    
    input, button {
        width: 100%;
        max-width: none;
        margin: 5px 0;
    }
    
    .password-section input {
        margin-right: 0;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.user-actions {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.edit-input {
    margin: 0;
    padding: 5px 10px;
}

/* 加载动画 */
.loader {
    display: none;
    border: 3px solid #f3f3f3;
    border-radius: 50%;
    border-top: 3px solid #1890ff;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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