/* =========================
   POST CLEAN VERSION
========================= */

.post {
    background: #fff;
    border-radius: 18px;
    padding: 22px;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 15px 40px rgba(0,0,0,0.05);
}

/* TITLE */
.post-title {
    font-size: 24px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 10px;
}

/* META */
.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: #888;
}

.post-meta span::after {
    content: "•";
    margin: 0 6px;
}
.post-meta span:last-child::after {
    content: "";
}

/* PROGRESS */
.reading-progress {
    position: sticky;
    top: 52px;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, #2563eb, #60a5fa);
    margin-top: 12px;
    border-radius: 2px;
}

/* DIVIDER */
.post-divider {
    height: 1px;
    background: #eee;
    margin: 16px 0;
}

/* CONTENT */
.post-content {
    font-size: 16px;
    line-height: 1.8;
    color: #222;
}

/* 🔥 FIX SPACING CHUẨN */
.post-content p {
    margin: 0;
    line-height: 1.8;
}

.post-content p + p {
    margin-top: 4px;
}

/* HEADINGS */
.post-content h2 {
    font-size: 20px;
    margin: 24px 0 10px;
}

.post-content h3 {
    font-size: 17px;
    margin: 20px 0 8px;
}

/* IMAGE */
.post-content img {
    max-width: 100%;
    border-radius: 12px;
    margin: 18px 0;
}

/* BLOCKQUOTE */
.post-content blockquote {
    border-left: 4px solid #2563eb;
    padding-left: 14px;
    color: #555;
    margin: 18px 0;
    font-style: italic;
}

/* CODE */
.post-content pre {
    background: #0d1117;
    color: #c9d1d9;
    padding: 16px;
    border-radius: 10px;
    overflow-x: auto;
    margin: 20px 0;
}

.post-content code {
    font-family: Consolas, monospace;
    font-size: 14px;
}

/* SELECTION */
::selection {
    background: #2563eb;
    color: #fff;
}

/* MOBILE */
@media (max-width: 768px) {
    .post {
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .post-title {
        font-size: 21px;
    }
    .post-content {
    margin: -11px;
    padding: -5px;
}
}


/* nền xám chấm */
.editor-box {
    background: repeating-linear-gradient(
        45deg,
        #eee,
        #eee 2px,
        #e5e5e5 2px,
        #e5e5e5 4px
    );
    padding: 10px;
    border: 1px solid #ccc;
}

/* toolbar */
.editor-toolbar {
    margin-bottom: 6px;
}

.editor-toolbar button {
    background: #fff;
    border: 1px solid #ccc;
    padding: 4px 6px;
    margin-right: 3px;
    font-size: 13px;
    cursor: pointer;
}

.editor-toolbar button:hover {
    background: #dbeafe;
}

/* vùng editor */
.editor-area {
    background: #fff;
    border: 1px solid #ccc;
}

/* nội dung */
#editor {
    min-height: 320px;
    padding: 10px;
}

/* tắt style mặc định của quill */
.ql-toolbar {
    display: none !important;
}

.ql-container {
    border: none !important;
}

.bb-toolbar {
    background:#eee;
    padding:6px;
    border:1px solid #ccc;
}

.bb-toolbar button {
    margin:2px;
    padding:4px 6px;
    cursor:pointer;
}

#editor {
    width:100%;
    height:300px;
    font-family: monospace;
    padding:10px;
}

#previewBox {
    margin-top:15px;
    padding:10px;
    background:#fff;
    border:1px solid #ddd;
}
/* QUOTE */
blockquote {
    border-left: 4px solid #2563eb;
    padding: 10px 14px;
    background: #f9fafb;
    margin: 15px 0;
    border-radius: 6px;
}

/* SPOILER */
.spoiler {
    margin: 10px 0;
}
.spoiler-btn {
    background: #111;
    color: #fff;
    padding: 6px 10px;
    cursor: pointer;
    border-radius: 6px;
    font-size: 13px;
}
.spoiler-content {
    display: none;
    padding: 10px;
    border: 1px solid #ddd;
    margin-top: 6px;
    border-radius: 6px;
    background: #fff;
}
.spoiler-content.show {
    display: block;
}

/* VIDEO */
.video iframe {
    width: 100%;
    height: 400px;
    border-radius: 10px;
}

/* MENTION */
.mention {
    color: #2563eb;
    font-weight: 500;
}

/* IMG */
.post-content img {
    max-width: 100%;
    border-radius: 10px;
}