/**
 * GameDB - Comments Module
 */

/* Section */
.comments-section {
    margin-top: 40px;
    padding: 30px;
    border-radius: 20px;
}

/* List */
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Single comment */
.comment-item {
    display: flex;
    flex-direction: column;
    padding: 20px;
    border-radius: 16px;
    background: rgba(255,255,255,0.7);
    border: 1px solid rgba(99,102,241,0.08);
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.comment-item:hover {
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* Avatar */
.comment-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    flex-shrink: 0;
    background: linear-gradient(135deg,#6366f1,#ec4899);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 18px;
    overflow: hidden;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Content */
.comment-content {
    flex: 1;
    min-width: 0;
}

/* Header */
.comment-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.comment-author {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    text-decoration: none;
}

.comment-author:hover {
    color: #6366f1;
}

.comment-date {
    font-size: 12px;
    color: #94a3b8;
}

/* Badges */
.comment-badge {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.comment-badge.author {
    background: rgba(99,102,241,0.1);
    color: #6366f1;
}

.comment-badge.moderator {
    background: rgba(16,185,129,0.1);
    color: #10b981;
}

/* Text */
.comment-text {
    font-size: 14px;
    line-height: 1.7;
    color: #475569;
    margin-bottom: 12px;
    word-break: break-word;
}

/* Actions */
.comment-actions {
    display: flex;
    gap: 14px;
    align-items: center;
}

.comment-action {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    color: #94a3b8;
    padding: 4px 6px;
    border-radius: 6px;
    transition: color 0.2s ease, background 0.2s ease;
}

.comment-action:hover {
    color: #6366f1;
    background: rgba(99,102,241,0.06);
}

.comment-action.liked {
    color: #ef4444;
}

.comment-action .count {
    font-weight: 600;
}

/* Replies - nested comments */
.comment-replies {
    margin-top: 16px;
    margin-left: 20px;
    padding-left: 24px;
    border-left: 2px solid rgba(99,102,241,0.15);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comment-replies .comment-item {
    background: rgba(99,102,241,0.03);
    border: 1px solid rgba(99,102,241,0.1);
}

.comment-replies .comment-avatar {
    width: 36px;
    height: 36px;
    font-size: 14px;
}

.comment-replies .comment-author {
    font-size: 13px;
}

.comment-replies .comment-date {
    font-size: 11px;
}

.comment-replies .comment-text {
    font-size: 13px;
}

.comment-replies .comment-action {
    font-size: 12px;
    padding: 3px 6px;
}

/* Nested replies (replies to replies) - deeper nesting */
.comment-replies .comment-replies {
    margin-left: 20px;
    padding-left: 20px;
    border-left: 2px solid rgba(99,102,241,0.12);
}

.comment-replies .comment-replies .comment-item {
    background: rgba(99,102,241,0.02);
    border: 1px solid rgba(99,102,241,0.08);
}

.comment-replies .comment-replies .comment-avatar {
    width: 32px;
    height: 32px;
    font-size: 12px;
}

/* Empty */
.comments-empty {
    text-align: center;
    padding: 40px;
    color: #94a3b8;
}

/* Mobile */
@media (max-width: 768px) {
    .comments-section {
        padding: 20px;
    }

    .comment-item {
        padding: 16px;
        gap: 12px;
    }

    .comment-avatar {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .comment-replies {
        padding-left: 16px;
    }
}
