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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
}

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

/* 顶部导航 */
header {
    background: #2c3e50;
    color: white;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    align-items: center;
    gap: 30px;
}

.logo {
    font-size: 1.5rem;
    white-space: nowrap;
}

nav {
    display: flex;
    gap: 20px;
    flex: 1;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background 0.3s;
}

nav a:hover, nav a.active {
    background: #34495e;
}

.upload-btn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    white-space: nowrap;
}

.upload-btn:hover {
    background: #2ecc71;
}

/* 上传/编辑面板 */
.upload-panel {
    background: white;
    padding: 30px;
    border-radius: 10px;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.upload-panel h2 {
    margin-bottom: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

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

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

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

.cancel-btn {
    background: #95a5a6;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin-left: 10px;
}

.cancel-btn:hover {
    background: #7f8c8d;
}

.status {
    margin-top: 15px;
    padding: 10px;
    border-radius: 5px;
    display: none;
}

.status.success {
    background: #d4edda;
    color: #155724;
    display: block;
}

.status.error {
    background: #f8d7da;
    color: #721c24;
    display: block;
}

/* 文章网格 */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.article-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

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

.article-card .card-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.article-card h3 {
    margin-bottom: 10px;
    font-size: 1.1rem;
    word-break: break-word;
}

.article-card .meta {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 0.85rem;
    color: #666;
}

.article-card .category-tag {
    background: #3498db;
    color: white;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 0.75rem;
}

.article-card .category-tag.tech { background: #9b59b6; }
.article-card .category-tag.knowledge { background: #e67e22; }
.article-card .category-tag.backup { background: #1abc9c; }

.article-card .tags {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.article-card .tag {
    background: #ecf0f1;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.75rem;
    color: #555;
}

.article-card .card-footer {
    padding: 15px 20px;
    background: #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.article-card .actions {
    display: flex;
    gap: 8px;
}

.article-card .view-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9rem;
}

.article-card .view-btn:hover {
    background: #2980b9;
}

.article-card .edit-btn {
    background: #f39c12;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
}

.article-card .edit-btn:hover {
    background: #e67e22;
}

.article-card .delete-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
}

.article-card .delete-btn:hover {
    background: #c0392b;
}

.article-card .date {
    color: #666;
    font-size: 0.85rem;
}

/* 配置按钮 */
.config-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #2c3e50;
    color: white;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.config-fab:hover {
    background: #34495e;
}

/* 模态框 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    width: 400px;
    max-width: 90%;
}

.hidden {
    display: none !important;
}

/* 响应式 */
@media (max-width: 768px) {
    header .container {
        flex-wrap: wrap;
        gap: 10px;
    }

    nav {
        order: 3;
        width: 100%;
        justify-content: center;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }
}
