:root {
    --max-width: 1100px;
    --accent: #1f6feb;
    --muted: #6b7280;
}

.post-page {
    max-width: var(--max-width);
    margin: 40px auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 32px;
    padding: 0 20px; 
    font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
    color: #111827;
}

.post-article {
    background: #fff;
    padding: 32px; 
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
    overflow: hidden; 
}

.post-header .post-title {
    font-size: 2.25rem; 
    margin: 0 0 12px 0;
    line-height: 1.2;
    font-weight: 700;
}

.post-meta {
    color: var(--muted);
    font-size: 0.95rem;
    margin: 0 0 24px 0;
}

.post-content ul, .post-content ol {
    margin: 0 0 20px 24px;
    padding: 0;
}

.post-content li {
    margin-bottom: 8px;
    line-height: 1.7;
    color: #374151;
}

.post-feature img {
    width: 100%;
    height: auto;
    max-height: 450px; 
    border-radius: 6px;
    margin-bottom: 24px;
    object-fit: cover;
}

.post-content p {
    margin: 0 0 20px 0;
    line-height: 1.8; 
    color: #374151;
}

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: .9em;
    word-break: break-word; 
}

pre {
    background: #0b1220;
    color: #e6eef8;
    padding: 20px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 24px 0;
    line-height: 1.5;
}

blockquote {
    border-left: 4px solid #1f6feb;
    padding-left: 16px;
    color: #555;
    margin: 0 0 24px 0;
    font-style: italic;
}

.post-actions{display:flex;gap:12px;margin-top:18px}
.like-btn,.share-btn{background:#fff;border:1px solid #e6e9ef;padding:8px 12px;border-radius:8px;cursor:pointer;font-weight:600}
.like-btn .count{margin-left:8px;color:var(--accent);font-weight:700}

.comments{margin-top:28px}
.comments h2{font-size:1.1rem;margin:0 0 10px 0}
.comment-list{list-style:none;padding:0;margin:0 0 12px 0}
.comment-list li{padding:10px 12px;border-radius:8px;background:#f8fafc;margin-bottom:8px;border:1px solid #eef2f7}

.comment-form label{display:block;font-size:0.9rem;color:var(--muted);margin-bottom:6px}
.comment-form textarea{width:100%;padding:10px;border-radius:6px;border:1px solid #e6e9ef;resize:vertical}
.comment-form button{margin-top:8px;padding:8px 12px;background:var(--accent);color:#fff;border:none;border-radius:6px;cursor:pointer}


.other-posts{position:sticky;top:125px;align-self:start;}
.other-posts h3{margin-top:0}
.other-posts-cards{display:flex;flex-direction:column;gap:18px;margin-top:10px}
.other-post-card{display:flex;align-items:flex-start;background:#fff;border-radius:8px;box-shadow:0 2px 8px rgba(15,23,42,0.06);padding:12px;transition:box-shadow .2s;}
.other-post-card:hover{box-shadow:0 6px 18px rgba(15,23,42,0.12);}
.other-post-card a{display:flex;align-items:flex-start;text-decoration:none;color:#0f172a;width:100%}
.other-post-card-img{width:64px;height:64px;object-fit:cover;border-radius:6px;margin-right:16px;flex-shrink:0;}
.other-post-card-content{flex:1;display:flex;flex-direction:column;}
.other-post-card-title{font-weight:600;font-size:1.05rem;margin-bottom:4px;}
.other-post-card-meta{display:flex; justify-content: space-between; font-size:.92rem;color:#6b7280;width: 90%;}
.other-post-card-likes i,.other-post-card-views i{color:#666;}
.other-post-card-views i{margin-left:12px;}

@media (max-width:900px){
    .post-page{grid-template-columns:1fr;}
    .other-posts{position:static;}
}

.muted{color:var(--muted)}
.lead{font-size:1.05rem;color:#111827}

.like-btn {
    background: #f0f0f0;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #333;
}

.like-btn:hover {
    background: #e0e0e0;
}

.like-btn.liked {
    background: #ffecec; 
    color: #e74c3c;     
    cursor: default;
}

.like-btn i {
    margin-right: 5px;
}


.comments {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.comment-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    background: #3498db;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.comment-body {
    flex: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.comment-author {
    color: #333;
}

.comment-date {
    color: #999;
    font-size: 0.8rem;
}

.comment-input {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}