.comments-section {
    margin-top: 40px;
    padding: 22px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    background: var(--bg-main);
}

.comments-section h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.35em;
    margin: 0 0 20px;
    color: var(--text-primary);
}

.comments-section h2 span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 9px;
    border-radius: 999px;
    background: rgba(0, 123, 255, 0.12);
    color: var(--accent-blue);
    font-size: 0.8rem;
}

.comment {
    background-color: var(--bg-surface);
    padding: 15px;
    margin-bottom: 15px;
    margin-left: calc(min(var(--comment-level, 0), 4) * 24px);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.9em;
    color: var(--text-secondary);
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.comment-author {
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
}

.comment-owner-badge {
    color: var(--accent-yellow);
}

.comment-content {
    margin-bottom: 10px;
}

.reply-btn, .edit-comment-btn, .delete-comment-btn {
    display: inline-block;
    padding: 6px 12px;
    margin-right: 10px;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.2s, color 0.2s;
}

.comment-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.review-state-btn {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(253, 185, 19, .12);
    color: var(--accent-yellow);
    border: 1px solid rgba(253, 185, 19, .35);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
}

.review-reference {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 10px;
    padding: 5px 9px;
    border-radius: 18px;
    background: rgba(253, 185, 19, .09);
    color: var(--accent-yellow);
    font-size: .82rem;
}

.review-state {
    padding: 2px 7px;
    border-radius: 12px;
    background: rgba(255, 160, 0, .17);
}

.review-state.resolved {
    color: #36d98c;
    background: rgba(54, 217, 140, .14);
}

.review-controls {
    border: 1px solid var(--border-color);
    border-radius: 9px;
    padding: 11px;
}

#review_fields {
    display: flex;
    gap: 10px;
    margin-top: 9px;
}

#review_fields[hidden] {
    display: none;
}

#review_fields select,
#review_fields input {
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: 7px;
    background: var(--bg-main);
    color: var(--text-primary);
}

@media (max-width: 620px) {
    #review_fields { flex-direction: column; }
    .comments-section { padding: 14px; }
    .comment { margin-left: calc(min(var(--comment-level, 0), 2) * 12px); }
    #comment-form button { width: 100%; }
}

.reply-btn:hover, .edit-comment-btn:hover {
    background-color: var(--accent-blue-light);
    color: var(--text-white);
}

.delete-comment-btn {
    border-color: var(--accent-red);
    color: var(--accent-red);
}

.delete-comment-btn:hover {
    background-color: var(--accent-red);
    color: var(--text-white);
}

#comment-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 18px;
}

#comment-form textarea {
    min-height: 100px;
    resize: vertical;
}

#comment-form button {
    align-self: flex-start;
    padding: 10px 20px;
}

.edit-textarea {
    width: 100%;
    min-height: 60px;
    background-color: var(--bg-main);
    color: var(--text-primary);
    border: 1px solid var(--accent-blue);
    padding: 8px;
    resize: vertical;
}

.author-meta-box { display: flex; align-items: center; gap: 12px; cursor: pointer; transition: 0.2s; }
        .author-meta-box:hover .author-name { color: var(--accent-yellow); }
        .author-avatar-small { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border-color); flex-shrink: 0; }
        .author-avatar-small.no-avatar { display: flex; align-items: center; justify-content: center; background: linear-gradient(to bottom, #FDB913 33.3%, #006A44 33.3%, #006A44 66.6%, #C1272D 66.6%); color: white; font-weight: bold; font-size: 14px; border: none; }
        .author-text-info { display: flex; flex-direction: column; line-height: 1.2; }
        .author-name { font-size: 0.95em; color: var(--accent-blue); font-weight: 700; }
        .author-handle { font-size: 0.8em; color: var(--text-secondary); }

        /* Vartotojo profilio popup modalas */
        .user-popup-modal { display: none; position: fixed; z-index: 10005; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); justify-content: center; align-items: center; backdrop-filter: blur(3px); color: #fff; }
        .user-popup-card { width: 350px; background: var(--bg-surface); border-radius: 16px; border: 1px solid var(--border-color); overflow: hidden; position: relative; box-shadow: 0 15px 35px rgba(0,0,0,0.5); animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); text-align: center;}
        @keyframes popIn { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
        .upop-close { position: absolute; top: 15px; right: 15px; color: #fff; background: rgba(0,0,0,0.5); width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; font-weight: bold; z-index: 10; transition: 0.2s;}
        .upop-close:hover { background: var(--accent-red); }
        .upop-cover { height: 110px; background-size: cover; background-position: center; background-color: #222; }
        .upop-body { padding: 20px; display: flex; flex-direction: column; align-items: center; }
        .upop-avatar-wrapper { margin-top: -65px; border: 5px solid var(--bg-surface); border-radius: 50%; width: 90px; height: 90px; background: var(--bg-main); margin-bottom: 10px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
        .upop-avatar-wrapper img { width: 100%; height: 100%; object-fit: cover; }
        .upop-name { font-size: 1.3em; color: var(--text-primary); margin: 0 0 5px 0; font-weight: 700;}
        .upop-username { font-size: 0.9em; color: var(--text-secondary); display: block; margin-bottom: 15px;}
        .upop-bio { font-size: 0.9em; color: var(--text-primary); margin-bottom: 25px; line-height: 1.5; max-height: 80px; overflow-y: auto;}
        .upop-btn { width: 100%; padding: 12px; border-radius: 8px; text-decoration: none; text-align: center; font-weight: 600; display: block; background: var(--accent-blue); color: #fff; border: none; cursor: pointer; }
        .lvl-badge { font-size: 0.5em; background: var(--accent-yellow); color: #000; padding: 3px 10px; border-radius: 6px; font-weight: 900; vertical-align: middle; margin-left: 5px; }
