/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    color: #333;
}

/* 登录页面样式 */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 30px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.login-container h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

button {
    width: 100%;
    padding: 12px;
    background-color: #4CAF50;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
}

button:hover {
    background-color: #45a049;
}

.error {
    color: red;
    text-align: center;
    margin-top: 10px;
}

/* 后台管理页面样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    background-color: #333;
    color: #fff;
    padding: 15px 0;
    margin-bottom: 30px;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 24px;
}

.header .logout {
    color: #fff;
    text-decoration: none;
    padding: 8px 16px;
    background-color: #f44336;
    border-radius: 4px;
}

.header .logout:hover {
    background-color: #da190b;
}

.nav {
    background-color: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.nav ul {
    list-style: none;
    display: flex;
}

.nav ul li {
    margin-right: 20px;
}

.nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    padding: 8px 16px;
    border-radius: 4px;
}

.nav ul li a:hover,
.nav ul li a.active {
    background-color: #4CAF50;
    color: #fff;
}

/* 内容区域样式 */
.content {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.content h2 {
    margin-bottom: 20px;
    color: #333;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table th,
table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

table th {
    background-color: #f2f2f2;
    font-weight: bold;
}

table tr:hover {
    background-color: #f5f5f5;
}

/* 按钮样式 */
.btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background-color: #4CAF50;
    color: #fff;
}

.btn-primary:hover {
    background-color: #45a049;
}

.btn-danger {
    background-color: #f44336;
    color: #fff;
}

.btn-danger:hover {
    background-color: #da190b;
}

.btn-warning {
    background-color: #ff9800;
    color: #fff;
}

.btn-warning:hover {
    background-color: #e68a00;
}

/* 表单样式 */
.form {
    max-width: 600px;
    margin: 0 auto;
}

.form .form-group {
    margin-bottom: 20px;
}

.form .form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form .form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.form button {
    width: auto;
    padding: 10px 20px;
}

/* 消息提示样式 */
.message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 批量操作样式 */
.batch-actions {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.batch-actions input {
    margin-right: 10px;
}

.batch-actions button {
    margin-right: 10px;
    width: auto;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav ul {
        flex-direction: column;
    }
    
    .nav ul li {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    table {
        font-size: 14px;
    }
    
    table th,
    table td {
        padding: 8px;
    }
}