/* --- GLOBAL DESIGN SYSTEM --- */
:root { 
    --primary: #111827; 
    --bg: #ffffff; 
    --surface: #f9fafb; 
    --border: #e2e8f0; 
    --text-main: #374151; 
    --text-muted: #64748b;
    --author-bg: #eff6ff; 
    --author-text: #1d4ed8; 
    --heart-red: #ef4444;
}

/* Base Reset & Anti-Bold Fix */
* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
    font-family: 'Inter', sans-serif; 
    -webkit-font-smoothing: antialiased; 
    -moz-osx-font-smoothing: grayscale; 
}

body { background: var(--bg); color: var(--text-main); line-height: 1.6; }

/* --- NAVIGATION --- */
nav { 
    background: #fff; 
    border-bottom: 1px solid var(--border); 
    padding: 15px 5%; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    position: sticky; 
    top: 0; 
    z-index: 1000; 
}

.logo { font-size: 1.4rem; font-weight: 800; text-decoration: none; color: #000; }
.nav-links a { margin-left: 20px; text-decoration: none; color: var(--text-main); font-weight: 600; font-size: 0.9rem; }

/* --- POST CONTENT --- */
.container { max-width: 750px; margin: 40px auto; padding: 0 20px; }
.post-header-wrap { margin-bottom: 30px; }
.post-title { font-size: 2.4rem; font-weight: 800; line-height: 1.2; margin-bottom: 10px; color: var(--primary); }

/* Updated Meta Details to include Like/View Icons */
.post-meta-details { 
    font-size: 0.9rem; 
    color: var(--text-muted); 
    font-weight: 400; 
    margin-bottom: 30px; 
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.main-img { width: 100%; border-radius: 12px; margin-bottom: 30px; }
.post-body { font-size: 1.1rem; color: var(--text-main); margin-bottom: 60px; line-height: 1.7; }

/* --- LIKE BUTTON --- */
.like-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0;
}

.like-action-btn:hover, .like-action-btn.liked {
    color: var(--heart-red);
}

.like-action-btn i {
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.like-action-btn.liked i {
    transform: scale(1.15);
}

/* --- DISCUSSION SECTION --- */
.discussion-header { 
    border-top: 2px solid var(--border); 
    padding-top: 40px; 
    margin-bottom: 30px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

.input-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px; margin-bottom: 40px; }
textarea { 
    width: 100%; 
    height: 100px; 
    padding: 15px; 
    border: 1px solid var(--border); 
    border-radius: 8px; 
    resize: none; 
    font-size: 1rem; 
    margin-bottom: 12px; 
    outline: none; 
    color: var(--text-main);
}
.btn-black { background: var(--primary); color: #fff; padding: 10px 22px; border: none; border-radius: 6px; font-weight: 700; cursor: pointer; transition: 0.2s; }
.btn-black:hover { opacity: 0.85; }

/* --- COMMENT LAYOUT --- */
.comment-node { display: flex; gap: 15px; margin-bottom: 25px; align-items: flex-start; }
.avatar-column { flex-shrink: 0; width: 45px; }
.avatar { 
    width: 45px; 
    height: 45px; 
    border-radius: 50%; 
    object-fit: cover; 
    background: #eee; 
    display: block;
    border: 1px solid var(--border);
}

.node-content { flex: 1; min-width: 0; }
.bubble { 
    background: var(--surface); 
    padding: 12px 18px; 
    border-radius: 0 16px 16px 16px; 
    border: 1px solid var(--border); 
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.node-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; flex-wrap: wrap; }
.username { font-weight: 600; color: #1a1a1a; font-size: 0.95rem; }
.badge-author { 
    background: var(--author-bg); 
    color: var(--author-text); 
    font-size: 0.65rem; 
    font-weight: 700; 
    padding: 1px 6px; 
    border-radius: 3px; 
    text-transform: uppercase;
}

.date { font-size: 0.8rem; color: var(--text-muted); font-weight: 400; }
.node-text { font-size: 0.95rem; color: var(--text-main); line-height: 1.55; font-weight: 400; word-wrap: break-word; }
.node-actions { display: flex; gap: 15px; margin-top: 8px; padding-left: 5px; }
.act-btn { background: none; border: none; font-size: 0.8rem; font-weight: 500; color: var(--text-muted); cursor: pointer; transition: color 0.2s; }
.act-btn:hover { color: var(--primary); }
.del-text { color: #ef4444; }

/* --- REPLIES & SCROLL --- */
.nested-replies { 
    margin-left: 20px; 
    padding-left: 20px; 
    border-left: 2px solid var(--border); 
    margin-top: 15px;
    overflow: hidden;
}

#load-more-sentinel { padding: 30px; text-align: center; }
#loader-status { 
    color: var(--text-muted); 
    font-size: 0.85rem; 
    font-weight: 600; 
    background: var(--surface); 
    display: inline-block; 
    padding: 8px 20px; 
    border-radius: 20px; 
    border: 1px solid var(--border);
}

/* --- ANIMATIONS --- */
.fade-in { animation: ghostFade 0.5s ease-out; }
@keyframes ghostFade {
    from { opacity: 0; transform: translateY(-10px); background-color: #fff9c4; }
    to { opacity: 1; transform: translateY(0); background-color: transparent; }
}
