/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* 登录页面样式 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 450px;
    overflow: hidden;
}

.login-header {
    background: linear-gradient(135deg, #4a00e0 0%, #8e2de2 100%);
    color: white;
    padding: 30px 20px;
    text-align: center;
}

.login-header i {
    font-size: 3rem;
    margin-bottom: 15px;
}

.login-header h2 {
    font-weight: 500;
    font-size: 1.8rem;
}

.login-form {
    padding: 30px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    border-color: #6a11cb;
    outline: none;
    box-shadow: 0 0 0 3px rgba(106, 17, 203, 0.1);
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #4a00e0 0%, #8e2de2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(138, 43, 226, 0.4);
}

.message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}

.login-footer {
    text-align: center;
    padding: 20px;
    color: #777;
    border-top: 1px solid #eee;
    font-size: 0.9rem;
}

/* 后台管理样式 */
.admin-header {
    background: linear-gradient(135deg, #1a2a6c 0%, #2c3e50 100%);
    color: white;
    padding: 0 30px;
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-left i {
    font-size: 1.8rem;
}

.header-left h1 {
    font-weight: 500;
    font-size: 1.5rem;
}

.header-right a {
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 6px;
    transition: background 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-home {
    background: rgba(255, 255, 255, 0.15);
}

.btn-logout {
    background: rgba(231, 76, 60, 0.8);
    margin-left: 10px;
}

.header-right a:hover {
    background: rgba(255, 255, 255, 0.25);
}

.admin-container {
    display: flex;
    min-height: calc(100vh - 70px);
}

.admin-sidebar {
    width: 250px;
    background: #2c3e50;
    color: white;
    padding: 20px 0;
}

.admin-sidebar ul {
    list-style: none;
}

.admin-sidebar li {
    padding: 15px 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.3s;
}

.admin-sidebar li:hover {
    background: rgba(255, 255, 255, 0.1);
}

.admin-sidebar li.active {
    background: #1a2a6c;
    border-left: 4px solid #4a00e0;
}

.admin-sidebar i {
    width: 24px;
    text-align: center;
}

.admin-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
}

p {
    margin-bottom: 25px;
    color: #666;
}

.form-container {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.form-container h3 {
    margin-bottom: 20px;
    color: #4a00e0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.table-container {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background: #f8f9fa;
    color: #555;
    font-weight: 600;
}

tr:hover {
    background: #f8f9ff;
}

.btn-primary {
    background: linear-gradient(135deg, #4a00e0 0%, #8e2de2 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(138, 43, 226, 0.4);
}

.btn-danger {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-edit {
    background: #3498db;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-right: 5px;
}

.btn-edit:hover {
    background: #2980b9;
}

.btn-danger:hover {
    background: #c0392b;
}

.action-cell {
    display: flex;
}

.security-status {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.security-status i {
    font-size: 2.5rem;
    color: #4a00e0;
}

#password-status {
    font-weight: 600;
}

#status-text {
    color: #e74c3c;
}

.security-tips {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05);
    margin-top: 30px;
}

.security-tips h3 {
    margin-bottom: 15px;
    color: #4a00e0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.security-tips ul {
    padding-left: 25px;
}

.security-tips li {
    margin-bottom: 10px;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.8rem;
    cursor: pointer;
    color: #777;
    transition: color 0.3s;
}

.close-modal:hover {
    color: #333;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .admin-container {
        flex-direction: column;
    }
    
    .admin-sidebar {
        width: 100%;
        padding: 0;
    }
    
    .admin-sidebar ul {
        display: flex;
        overflow-x: auto;
    }
    
    .admin-sidebar li {
        padding: 15px 20px;
        white-space: nowrap;
    }
}
