.comments-section {
    max-width: 1200px;
    margin: 1.5rem auto 3rem;
    padding: 0 0.5rem;
}

.comments-accordion {
    background: #050505;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: none;
}

.comments-accordion-trigger {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 1rem 1.25rem;
    background: #050505;
    color: #f5f5f5;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.comments-accordion-trigger::-webkit-details-marker {
    display: none;
}

.comments-accordion-trigger::marker {
    font-size: 0;
}

.comments-accordion-trigger:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.35);
    outline-offset: -3px;
}

.comments-accordion-title {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.05rem;
    font-weight: 700;
}

.comments-accordion-icon {
    margin-left: auto;
    color: rgba(245, 245, 245, 0.72);
    transition: transform 0.2s ease, color 0.2s ease;
}

.comments-accordion[open] .comments-accordion-icon {
    transform: rotate(180deg);
    color: rgba(245, 245, 245, 0.72);
}

.comments-card {
    background: #050505;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.25rem 1.25rem 1.75rem;
}

.comments-count {
    margin-left: 0.4rem;
    -webkit-text-fill-color: #f5f5f5;
    color: #f5f5f5;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 600;
}

.comment-reply-context[hidden] {
    display: none;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    margin-bottom: 1.25rem;
}

.comment-reply-context {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    background: #050505;
    color: rgba(245, 245, 245, 0.78);
    font-size: 0.88rem;
    padding: 0.55rem 0.7rem;
}

.comment-form-row {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.comment-input,
.comment-textarea {
    width: 100%;
    background: #050505;
    color: #f5f5f5;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 0.65rem 0.85rem;
    font-family: 'Poppins', sans-serif;
    font-size: 0.92rem;
    transition: border-color 0.2s ease;
    outline: none;
    resize: vertical;
}

.comment-textarea {
    min-height: 90px;
    line-height: 1.5;
}

.comment-input:focus,
.comment-textarea:focus {
    border-color: rgba(255, 255, 255, 0.24);
    box-shadow: none;
}

.comment-meta-row {
    display: flex;
    justify-content: flex-end;
}

.comment-word-count {
    font-size: 0.75rem;
    color: rgba(245, 245, 245, 0.5);
}

.comment-word-count.over-limit,
.comment-form-status.is-error {
    color: #ff6b6b;
    font-weight: 600;
}

.comment-captcha-row {
    display: flex;
    justify-content: center;
    min-height: 80px;
}

.comment-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.comment-form-status {
    font-size: 0.85rem;
    color: rgba(245, 245, 245, 0.6);
}

.comment-form-status.is-success {
    color: #6bff9c;
}

.comment-submit-btn {
    background: #1f1f1f;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.15s ease, opacity 0.2s ease;
}

.comment-submit-btn:hover:not(:disabled) {
    background: #2a2a2a;
}

.comment-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.comments-empty {
    text-align: center;
    padding: 1.25rem;
    color: rgba(245, 245, 245, 0.5);
    font-size: 0.9rem;
    background: #000000;
    border-radius: 6px;
    border: 1px dashed rgba(255, 255, 255, 0.07);
}

.comment-thread {
    --comment-depth: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.comment-replies {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-left: clamp(1rem, 4vw, 2.2rem);
    padding-left: clamp(0.7rem, 2vw, 1rem);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.comment-replies .comment-replies {
    margin-left: clamp(0.8rem, 3vw, 1.6rem);
}

.comment-thread[data-comment-depth="3"] .comment-replies {
    margin-left: 0.8rem;
    padding-left: 0.75rem;
}

.comment-item {
    display: flex;
    gap: 0.5rem;
    padding: 0.6rem 0.65rem;
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.comment-item:hover {
    border-color: rgba(255, 255, 255, 0.12);
    background: #050505;
}

.comment-item.is-reply {
    border-color: rgba(255, 255, 255, 0.05);
}

.comment-avatar {
    flex: 0 0 26px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #1f1f1f;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
}

.comment-body {
    flex: 1;
    min-width: 0;
}

.comment-head {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.18rem;
    flex-wrap: wrap;
}

.comment-username {
    font-weight: 600;
    color: #f5f5f5;
    font-size: 0.78rem;
}

.comment-time {
    font-size: 0.65rem;
    color: rgba(245, 245, 245, 0.45);
}

.comment-text {
    color: rgba(245, 245, 245, 0.88);
    font-size: 0.78rem;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.comment-actions {
    display: flex;
    gap: 0.45rem;
    margin-top: 0.35rem;
}

.comment-reply-cancel,
.comment-reply-btn,
.comment-delete-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(245, 245, 245, 0.72);
    padding: 0.25rem 0.55rem;
    border-radius: 5px;
    font: inherit;
    font-size: 0.65rem;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.comment-reply-cancel:hover,
.comment-reply-btn:hover,
.comment-delete-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.comment-delete-btn {
    color: #ff6b6b;
    border-color: rgba(255, 107, 107, 0.35);
}

.comment-delete-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .comments-section {
        margin: 1rem auto 2rem;
    }

    .comments-card {
        padding: 1rem;
    }

    .comment-form {
        padding: 0.85rem;
    }

    .comment-form-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .comment-submit-btn {
        width: 100%;
        justify-content: center;
    }

    .comment-avatar {
        flex-basis: 24px;
        width: 24px;
        height: 24px;
        font-size: 0.65rem;
    }

    .comment-replies {
        margin-left: 0.65rem;
        padding-left: 0.65rem;
    }

    .comment-replies .comment-replies,
    .comment-thread[data-comment-depth="3"] .comment-replies {
        margin-left: 0.4rem;
        padding-left: 0.5rem;
    }
}
