@charset "utf-8";
/* CSS Document */
/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 0px solid #ddd;
}

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

.logo img {
    height: 50px;
    width: auto;
}

.logo h1 {
    color: #2c3e50;
    font-size: 24px;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 8px 20px;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

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

.btn-primary {
    background-color: #2ecc71;
}

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

.btn-danger {
    background-color: #e74c3c;
}

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

.btn-success {
    background-color: #2ecc71;
}

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

.btn-warning {
    background-color: #f39c12;
}

.btn-warning:hover {
    background-color: #d35400;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

/* 搜索区域 */
.search-container {
    text-align: center;
    padding: 60px 0;
}

.search-container h2 {
    font-size: 36px;
    margin-bottom: 10px;
    color: #2c3e50;
}

.search-container p {
    color: #7f8c8d;
    margin-bottom: 30px;
}

.search-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    gap: 10px;
}

.search-form input {
    flex: 1;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.search-btn {
    padding: 15px 30px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

/* 词条卡片 */
.entries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.entry-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.entry-card:hover {
    transform: translateY(-5px);
}

.entry-card h4 {
    margin-bottom: 10px;
}

.entry-card h4 a {
    color: #2c3e50;
    text-decoration: none;
}

.entry-card h4 a:hover {
    color: #3498db;
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 30px 0;
    margin-top: 50px;
    border-top: 0px solid #ddd;
    color: #7f8c8d;
}

/* 认证页面 */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.auth-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.auth-box h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #666;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.auth-link {
    text-align: center;
    margin-top: 20px;
}

/* 仪表板 */
.dashboard,
.admin-dashboard {
    padding: 30px 0;
}

.admin-nav {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ddd;
}

.admin-nav a {
    padding: 8px 20px;
    background-color: #ecf0f1;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
}

.admin-nav a.active {
    background-color: #3498db;
    color: white;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.stat-card h3 {
    font-size: 36px;
    color: #3498db;
    margin-bottom: 10px;
}

/* 表格 */
.entries-table,
.admin-table {
    width: 100%;
    background: white;
    border-collapse: collapse;
    margin-top: 20px;
}

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

.entries-table th,
.admin-table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.entries-table tr:hover,
.admin-table tr:hover {
    background-color: #f8f9fa;
}

/* 徽章 */
.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

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

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

.badge-warning {
    background-color: #fff3cd;
    color: #856404;
}

.badge-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

.status-badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-approved {
    background-color: #d4edda;
    color: #155724;
}

.status-rejected {
    background-color: #f8d7da;
    color: #721c24;
}

.status-expired {
    background-color: #e2e3e5;
    color: #383d41;
}

/* 提醒框 */
.alert {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.alert.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 30px;
}

.pagination a {
    padding: 8px 12px;
    background-color: white;
    border: 1px solid #ddd;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
}

.pagination a.active {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

.pagination a:hover:not(.active) {
    background-color: #f8f9fa;
}

/* 词条内容 */
.entry-view {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    margin: 30px 0;
}

.entry-meta {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
    color: #666;
    font-size: 14px;
}

.entry-content {
    line-height: 1.8;
    font-size: 16px;
}

.entry-content img {
    max-width: 100%;
    height: auto;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    margin: 20px 0 10px;
    color: #2c3e50;
}

.entry-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .entries-grid {
        grid-template-columns: 1fr;
    }
    
    .entry-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .admin-nav {
        flex-wrap: wrap;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .entries-table,
    .admin-table {
        display: block;
        overflow-x: auto;
    }
}
