/* ===== CONTAINER ===== */
.container.article{
    max-width:850px;
    margin:40px auto;
    padding:0 15px;
}

/* ===== BREADCRUMB ===== */
.breadcrumb{
    font-size:14px;
    color:#888;
    margin-bottom:15px;
}

.breadcrumb a{
    color:#666;
    text-decoration:none;
}

.breadcrumb a:hover{
    text-decoration:underline;
}

/* ===== TITLE ===== */
.article-title{
    font-size:36px;
    font-weight:800;
    line-height:1.35;
    margin-bottom:15px;
    color:#111;
}

/* ===== META ===== */
.article-meta{
    font-size:14px;
    color:#777;
    margin-bottom:20px;
}

/* ===== ACTIONS ===== */
.article-actions{
    margin-bottom:20px;
}

.article-actions a{
    margin-right:15px;
    text-decoration:none;
    font-size:14px;
    color:#007bff;
}

.article-actions a:hover{
    text-decoration:underline;
}

/* ===== THUMBNAIL ===== */
.article-thumbnail{
    margin-bottom:25px;
}

.article-thumbnail img{
    width:100%;
    border-radius:12px;
}

/* ===== CONTENT ===== */
.article-content{
    font-size:18px;
    line-height:1.8;
    color:#222;
    word-wrap:break-word;
}

/* ===== PARAGRAPH ===== */
.article-content p{
margin: 0 0 1em;
    line-height: 160%;
    text-rendering: optimizeSpeed;
    word-break: break-word;
    
}

/* ===== HEADINGS ===== */
.article-content h1{
    font-size:30px;
    margin:30px 0 15px;
}

.article-content h2{
    font-size:24px;
    margin:25px 0 12px;
}

.article-content h3{
    font-size:20px;
    margin:20px 0 10px;
}

/* ===== LIST ===== */
.article-content ul,
.article-content ol{
    padding-left:20px;
    margin:15px 0;
}



/* ===== IMAGE ===== */
.article-content img{
    max-width:100%;
    border-radius:12px;
    display:block;
    margin:20px auto;
}

/* ===== VIDEO ===== */
.article-content iframe{
    width:100%;
    height:420px;
    border-radius:10px;
    margin:20px 0;
}

/* ===== LINK ===== */
.article-content a{
    color:#007bff;
    text-decoration:none;
}

.article-content a:hover{
    text-decoration:underline;
}

/* ===== BLOCKQUOTE ===== */
.article-content blockquote{
    border-left:4px solid #007bff;
    padding-left:15px;
    color:#555;
    margin:20px 0;
    font-style:italic;
}

/* ===== CODE ===== */
.article-content pre{
    background:#111;
    color:#0f0;
    padding:15px;
    border-radius:8px;
    overflow:auto;
    font-size:14px;
}

/* inline code */
.article-content code{
    background:#f1f1f1;
    padding:2px 6px;
    border-radius:5px;
    font-size:14px;
}

/* ===== TABLE ===== */
.article-content table{
    width:100%;
    border-collapse:collapse;
    margin:20px 0;
}

.article-content th,
.article-content td{
    border:1px solid #ddd;
    padding:10px;
    text-align:left;
}

.article-content th{
    background:#f5f5f5;
}

/* ===== HR ===== */
.article-content hr{
    border:none;
    border-top:1px solid #ddd;
    margin:30px 0;
}

/* ===== SELECTION ===== */
::selection{
    background:#007bff;
    color:#fff;
}

/* ===== RESPONSIVE ===== */
@media(max-width:768px){

    .container.article{
        margin:20px auto;
    }

    .article-title{
        font-size:26px;
    }

    .article-content{
        font-size:16px;
    }

    .article-content iframe{
        height:220px;
    }
}

/* === Form tổng thể === */
.container.article {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    
    color: #333;
}

.container.article h1 {
    font-size: 2em;
    margin-bottom: 20px;
    color: #111;
}

/* === Thông báo === */
.error {
    color: #e74c3c;
    font-weight: 600;
    background: #fdecea;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
}
.success {
    color: #27ae60;
    font-weight: 600;
    background: #eafaf1;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
}

/* === Form inputs & labels === */
.form_dangbai label {
    display: block;
    margin-top: 15px;
    margin-bottom: 5px;
    font-weight: 600;
}
.form_dangbai input[type="text"],
.form_dangbai select,
.form_dangbai textarea {
    width: 100%;
    padding: 10px 12px;
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form_dangbai input[type="text"]:focus,
.form_dangbai select:focus,
.form_dangbai textarea:focus {
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52,152,219,0.3);
    outline: none;
}

/* === Thumbnail === */
.form_dangbai img {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-top: 5px;
    max-height: 150px;
}

/* === Editor & Preview layout === */
.form_dangbai > div {
    display: flex;
    gap: 20px;
    margin-top: 10px;
    flex-wrap: wrap;
}
#content {
    flex: 1;
    min-height: 400px;
    
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 10px;
    resize: vertical;
}
#preview {
    flex: 1;
    min-height: 400px;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 15px;
    background: #fefefe;
    overflow-y: auto;
    box-shadow: inset 0 1px 4px rgba(0,0,0,0.05);
}

/* === Block wrapper === */
.block-wrapper {
    border: 1px dashed #ddd;
    padding: 8px 8px 8px 8px;
    margin: 8px 0;
    position: relative;
    background: #fafafa;
    border-radius: 8px;
    transition: background 0.2s, border-color 0.2s;
}
.block-wrapper:hover {
    background: #f0f8ff;
    border-color: #3498db;
}
.block-wrapper.dragging { opacity:0.5; }

/* === Block toolbar === */
.block-toolbar {
    position: absolute;
    top: 5px;
    right: 5px;
    display: flex;
    gap: 5px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 3px 6px;
    border-radius: 6px;
    z-index: 10;
}
.block-toolbar button {
    background: transparent;
    border: none;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    padding: 0 4px;
    transition: transform 0.1s;
}
.block-toolbar button:hover {
    transform: scale(1.2);
}

/* === Image inside block === */
.block-wrapper img {
    max-width: 100%;
    border-radius: 6px;
    margin: 5px 0;
    cursor: grab;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.block-wrapper figcaption {
    font-size: 0.9em;
    color: #555;
    text-align: center;
    margin-top: 3px;
    font-style: italic;
}

/* === Buttons === */
.form_dangbai button[type="submit"] {
    margin-top: 20px;
    padding: 12px 25px;
    background: #3498db;
    color: #fff;
    font-size: 1em;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}
.form_dangbai button[type="submit"]:hover {
    background: #2980b9;
    transform: scale(1.02);
}

/* === Responsive === */
@media screen and (max-width: 900px){
    .form_dangbai > div { flex-direction: column; }
    #preview, #content { min-height: 300px; }
}
