:root {
    --primary-color: #7b001c;
    --primary-hover: #5a0014;
    --primary-light: rgba(123, 0, 28, 0.1);
    --bg-color: #f8f9fa;
    --text-color: #212529;
    --border-color: #dee2e6;
    --card-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

/* Post Container */
.post-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Post Header */
.post-header {
    background: white;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

/* Post Content */
.post-content {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #333;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.375rem;
    margin: 1rem 0;
}

.post-content ul,
.post-content ol {
    padding-left: 1.5rem;
    margin: 1rem 0;
}

.post-content li {
    margin-bottom: 0.5rem;
}

/* Comments Section */
.comments-section {
    background: white;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    margin-top: 2rem;
}

.comment-thread {
    position: relative;
    padding-left: 0;
    margin-bottom: 0;
}

.comment-thread li {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
}

.comment-back-btn {
    background: var(--primary-light);
    color: var(--primary-color);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    margin-bottom: 1rem;
    cursor: pointer;
    font-size: 0.9rem;
}

.comment-back-btn:hover {
    background: var(--primary-color);
    color: white;
}

/* Comment Styling */
.comment-user {
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 0;
    transition: background-color 0.2s;
}

.comment-user:hover {
    background-color: rgba(248, 249, 250, 0.5);
}

.comment-user:last-child {
    border-bottom: none;
}

.user-head {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
}

.user-head a {
    display: flex;
    align-items: center;
    margin-right: 15px;
}


.user-head img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.user-head h4 {
    margin: 0 0 0 0.75rem;
    font-size: 0.95rem;
    flex: 1;
}

.user-head span {
    color: #6c757d;
    font-size: 0.85rem;
}

.user-head .flag-btn {
    background: none;
    border: none;
    color: #6c757d;
    padding: 0.25rem;
    margin-left: 0.5rem;
    cursor: pointer;
}

.user-head .flag-btn:hover {
    color: #dc3545;
}

.user-head .flag-btn.flagged {
    color: #dc3545;
}

.comment-users {
    margin-left: 60px;
}

/* Comment Content */
.comment-content {
    margin-bottom: 0.75rem;
    padding-left: 3rem;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #333;
}

/* Comment Meta */
.comment-meta {
    display: flex;
    align-items: center;
    padding-left: 3rem;
    font-size: 0.85rem;
}

.comment-meta a {
    color: #6c757d;
    text-decoration: none;
    margin-right: 1rem;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    transition: color 0.2s;
}

.comment-meta a:hover {
    color: var(--primary-color);
}

.comment-meta a i {
    margin-right: 0.25rem;
}

.comment-meta .like-btn.liked {
    color: #dc3545;
}

.comment-meta .like-btn.liked:hover {
    color: #c82333;
}

/* Comment Form */
.comment-field {
    padding-left: 3rem;
    margin-top: 1rem;
}

.comment-field form {
    position: relative;
}

.comment-field textarea {
    width: 100%;
    min-height: 100px;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 0.95rem;
    resize: vertical;
    transition: border-color 0.2s;
}

.comment-field textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem var(--primary-light);
}

.comment-action {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.5rem;
}

.comment-action button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 0.25rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.comment-action button:hover {
    background: var(--primary-hover);
}

.comment-action button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Comment Loader */
.comment-loader {
    text-align: center;
    padding: 1.5rem;
    color: #6c757d;
}

.comment-loader button {
    background: var(--primary-light);
    color: var(--primary-color);
    border: 1px solid var(--primary-light);
    padding: 0.5rem 1.5rem;
    border-radius: 0.25rem;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.comment-loader button:hover {
    background: var(--primary-color);
    color: white;
}

/* Thread Lines */
.thread-line {
    position: absolute;
    left: 20px;
    top: 60px;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.comment-user {
    position: relative;
}

.comment-user::before {
    content: '';
    position: absolute;
    left: 20px;
    top: -1px;
    bottom: 50%;
    width: 2px;
    background: var(--border-color);
}

.comment-user:first-child::before {
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    .post-container {
        padding: 0 1rem;
    }

    .comment-content,
    .comment-meta,
    .comment-field {
        /* padding-left: 2.5rem; */
    }

    .comment-user::before {
        left: 15px;
    }

    .user-head {
        flex-wrap: wrap;
    }

    .user-head span {
        /* margin-top: 0.25rem; */
        /* width: 100%; */
        /* margin-left: 3.25rem; */
    }
}

@media (max-width: 576px) {
    .comment-meta {
        flex-wrap: wrap;
    }

    .comment-meta a {
        margin-bottom: 0.5rem;
    }

    .comment-content,
    .comment-meta,
    .comment-field {
        /* padding-left: 0; */
    }

    .comment-user::before {
        display: none;
    }

    .user-head img {
        width: 36px;
        height: 36px;
    }
}

.post-header .btn,
.post-content .btn {
    background-color: transparent;
    border: 1px solid transparent;
    color: inherit;
    min-width: auto;
    height: auto;
    cursor: pointer !important;
}

.post-header {
    background: rgb(248, 244, 242);
    border: 1px solid #817f7f;
}

.btn-sm {
    padding: .25rem .5rem !important;
}

.follow-btn {
    border: 1px solid #5a0014 !important;
    width: auto !important
}

.la-2x {
    font-size: 2.5em;
    margin-left: 10px;
    margin-right: 10px;
}

.star-rating i,
.rate-user-btn i {
    color: #aa9106;
}