.blog-container {
    max-width: 800px;
    margin: auto;
    padding: 20px;
    font-family: 'Inter', sans-serif;
}

.blog-heading {
    margin-bottom: 20px;
    font-weight: 600;
}

.blog-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.blog-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 12px 16px;
    border-bottom: 1px solid #e0e0e0;
    transition: background 0.2s ease;
}

.blog-item:hover {
    background: #f5f7fa;
}

.blog-link {
    color: #007bff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    flex: 1;
}

.blog-link:hover {
    text-decoration: underline;
}

.blog-date {
    font-size: 13px;
    color: #888;
    white-space: nowrap;
    margin-left: 10px;
}

.blog-title {
    margin-bottom: 10px;
    font-size: 24px;
    font-weight: 700;
}

.blog-content {
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 16px;
    color: #333;
}

/* BBCode Styles */
.blog-content img,
.blog-content video,
.blog-content audio {
    max-width: 100%;
    display: block;
    margin: 10px auto;
}

.blog-content img { height: auto; }
.blog-content blockquote {
    border-left: 4px solid #007bff;
    background: #f9f9f9;
    padding: 10px 15px;
    font-style: italic;
    margin: 15px 0;
    color: #555;
}

.blog-content h1 { font-size: 28px; margin: 20px 0 10px; }
.blog-content h2 { font-size: 22px; margin: 18px 0 8px; }
.blog-content h3 { font-size: 18px; margin: 15px 0 6px; }

.blog-content a {
    color: #007bff;
    text-decoration: underline;
}
.blog-content a:hover {
    color: #0056b3;
}

/* Pagination */
.pagination {
    margin-top: 20px;
    text-align: center;
}
.pagination a {
    display: inline-block;
    padding: 6px 12px;
    margin: 0 3px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    transition: background 0.2s ease, color 0.2s ease;
}
.pagination a.current {
    background: #007bff;
    color: white;
    border-color: #007bff;
}
.pagination a:hover:not(.current) {
    background: #007bff;
    color: #fff;
}

/* ========== BBCode Toolbar ========== */
.bbcode-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}
.bbcode-toolbar button {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}
.bbcode-toolbar button:hover {
    transform: translateY(-1px);
}

/* Màu nhóm nút */
.bb-bold, .bb-italic, .bb-underline { background: #007bff; }
.bb-bold:hover, .bb-italic:hover, .bb-underline:hover { background: #0056b3; }

.bb-heading { background: #6f42c1; }
.bb-heading:hover { background: #59359c; }

.bb-quote { background: #28a745; }
.bb-quote:hover { background: #1e7e34; }

.bb-media { background: #fd7e14; }
.bb-media:hover { background: #e06a00; }

/* Textarea */
#bbcodeText {
    width: 100%;
    padding: 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
}

/* Form inputs */
.form-group {
    margin-bottom: 15px;
}
.form-group label {
    font-weight: 500;
    margin-bottom: 5px;
    display: block;
}
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    font-size: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Inter', sans-serif;
}

/* Buttons chung */
.btn {
    display: inline-block;
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 5px;
    text-decoration: none;
    cursor: pointer;
    border: none;
}
.btn-primary {
    background: #007bff;
    color: #fff;
}
.btn-primary:hover {
    background: #0056b3;
}
.btn-secondary {
    background: #6c757d;
    color: #fff;
}
.btn-secondary:hover {
    background: #545b62;
}

/* Alert */
.alert {
    padding: 10px;
    background: #f8d7da;
    color: #721c24;
    border-radius: 4px;
    margin-bottom: 15px;
}

.btn-add-post {
    display: inline-block;
    background: #28a745;
    color: #fff;
    padding: 8px 14px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.3s ease, transform 0.2s ease;
}
.btn-add-post:hover {
    background: #1e7e34;
    transform: translateY(-2px);
}

.blog-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.blog-actions a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    color: #fff;
    transition: background 0.2s ease, transform 0.1s ease;
}

.btn-edit {
    background: #007bff;
}
.btn-edit:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

.btn-delete {
    background: #e74c3c;
}
.btn-delete:hover {
    background: #c0392b;
    transform: translateY(-1px);
}
