:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --background-color: #f4f6f7;
    --text-color: #2c3e50;
    --card-background: #ffffff;
}

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

body {
    font-family: 'Arial', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: var(--card-background);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

h1, h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
}

.card {
    background-color: var(--card-background);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

input, select, textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.3s ease;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn {
    display: inline-block;
    width: 100%;
    padding: 12px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

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

.btn-secondary {
    background-color: var(--secondary-color);
}

.btn-secondary:hover {
    background-color: #27ae60;
}

.alert {
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.table th, .table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

.table th {
    background-color: var(--primary-color);
    color: white;
}

.nav {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.nav a {
    text-decoration: none;
    padding: 10px 15px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.nav a:hover {
    background-color: #2980b9;
}

@media (max-width: 600px) {
    .container {
        width: 95%;
        padding: 10px;
    }
    
    .nav {
        flex-direction: column;
    }
    
    .nav a {
        margin-bottom: 10px;
        text-align: center;
    }
}

.notice {
    background-color: #e9ecef;
    border-left: 4px solid var(--primary-color);
    padding: 15px;
    margin-bottom: 20px;
}

.query-result {
    background-color: #e9ecef;
    padding: 15px;
    border-radius: 4px;
}

.image-preview {
    max-width: 200px;
    max-height: 200px;
    margin: 10px 0;
    border-radius: 4px;
}

.login-container {
    max-width: 400px;
    margin: 50px auto;
    background-color: var(--card-background);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.login-form {
    display: flex;
    flex-direction: column;
}

.login-form input {
    margin-bottom: 15px;
}

/* 侧边导航栏样式 */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background-color: var(--primary-color);
    color: white;
    padding: 20px 0;
    transition: width 0.3s ease;
}

.sidebar-logo {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.5em;
    font-weight: bold;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
}

.sidebar-nav li {
    margin-bottom: 10px;
}

.sidebar-nav a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    transition: background-color 0.3s ease;
}

.sidebar-nav a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar-nav a.active {
    background-color: rgba(255, 255, 255, 0.2);
}

.admin-content {
    flex-grow: 1;
    padding: 20px;
    background-color: var(--background-color);
    overflow-y: auto;
}

@media (max-width: 768px) {
    .admin-layout {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .sidebar-nav {
        display: flex;
        justify-content: space-around;
    }
    
    .sidebar-nav li {
        margin-bottom: 0;
    }
}
