/* ============================================================
   A PLUS - Comments Section & Reactions System (Glassmorphic)
   ============================================================ */

.comments-section {
    margin: 48px 0 24px;
    padding: clamp(20px, 3.5vw, 36px);
    background: var(--bg-card, rgba(22, 30, 49, 0.75));
    border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
    border-radius: 24px;
    box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    width: 100%;
    box-sizing: border-box;
    direction: rtl;
    text-align: right;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

[data-theme="light"] .comments-section {
    background: #FFFFFF;
    border-color: #E2E8F0;
    box-shadow: 0 14px 35px -8px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(15, 23, 42, 0.04);
}

/* Header */
.comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 26px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.08));
}

[data-theme="light"] .comments-header {
    border-bottom-color: #E2E8F0;
}

.comments-title-wrap {
    flex: 1;
    min-width: 240px;
}

.comments-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: clamp(1.25rem, 2.2vw, 1.55rem);
    font-weight: 800;
    color: var(--text-primary, #FFFFFF);
    margin: 0 0 6px 0;
    letter-spacing: -0.02em;
}

[data-theme="light"] .comments-title {
    color: #0F172A;
}

.comments-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    filter: drop-shadow(0 2px 8px rgba(99, 102, 241, 0.4));
}

.comments-count-badge {
    font-size: 0.82rem;
    padding: 3px 10px;
    border-radius: 9999px;
    background: rgba(99, 102, 241, 0.16);
    color: #818CF8;
    border: 1px solid rgba(99, 102, 241, 0.35);
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    line-height: 1.2;
}

[data-theme="light"] .comments-count-badge {
    background: rgba(99, 102, 241, 0.1);
    color: #4F46E5;
    border-color: rgba(99, 102, 241, 0.25);
}

.comments-subtitle {
    font-size: 0.88rem;
    color: var(--text-secondary, rgba(255, 255, 255, 0.7));
    line-height: 1.6;
    margin: 0;
}

[data-theme="light"] .comments-subtitle {
    color: #64748B;
}

/* User Identity Card */
.user-identity-card {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 9px 16px 9px 12px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.22);
    border-radius: 16px;
    flex-shrink: 0;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .user-identity-card {
    background: #F8FAFC;
    border-color: #E2E8F0;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.user-identity-card:hover {
    border-color: rgba(99, 102, 241, 0.45);
    transform: translateY(-1px);
}

.user-avatar,
.comment-avatar,
.comment-form-avatar {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    border-radius: 50% !important;
    color: #FFFFFF !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 800 !important;
    font-size: 1.1rem !important;
    line-height: 1 !important;
    text-align: center !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.22), inset 0 1px 1px rgba(255, 255, 255, 0.35) !important;
    flex-shrink: 0 !important;
    user-select: none;
}

.user-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: right;
}

.user-label {
    font-size: 0.72rem;
    color: var(--text-muted, rgba(255, 255, 255, 0.5));
    font-weight: 500;
}

[data-theme="light"] .user-label {
    color: #64748B;
}

.user-handle-name {
    font-weight: 700;
    font-size: 0.94rem;
    color: var(--text-primary, #FFFFFF);
    letter-spacing: -0.01em;
}

[data-theme="light"] .user-handle-name {
    color: #0F172A;
}

.user-fixed-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.68rem;
    color: #10B981;
    font-weight: 600;
}

[data-theme="light"] .user-fixed-tag {
    color: #059669;
}

/* Comment Form */
.comment-form {
    margin-bottom: 28px;
    position: relative;
}

.comment-form-inner {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.comment-form-avatar {
    margin-top: 4px;
}

.comment-input-wrap {
    flex: 1;
    min-width: 0;
    background: var(--bg-primary, #0A0E1A);
    border: 1.5px solid var(--border, rgba(255, 255, 255, 0.12));
    border-radius: 18px;
    padding: 14px 16px 12px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .comment-input-wrap {
    background: #F8FAFC;
    border-color: #CBD5E1;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.04);
}

.comment-input-wrap:focus-within {
    border-color: #6366F1;
    box-shadow: 0 0 0 3.5px rgba(99, 102, 241, 0.2), inset 0 1px 2px rgba(0, 0, 0, 0.04);
    background: var(--bg-card, rgba(22, 30, 49, 0.9));
}

[data-theme="light"] .comment-input-wrap:focus-within {
    background: #FFFFFF;
    border-color: #4F46E5;
    box-shadow: 0 0 0 3.5px rgba(79, 70, 229, 0.14);
}

.comment-textarea {
    width: 100% !important;
    display: block !important;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    color: var(--text-primary, #FFFFFF) !important;
    font-family: inherit !important;
    font-size: 0.96rem !important;
    line-height: 1.7 !important;
    resize: none !important;
    min-height: 80px !important;
    max-height: 320px !important;
    overflow-y: auto !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    margin: 0 !important;
}

[data-theme="light"] .comment-textarea {
    color: #0F172A !important;
}

.comment-textarea::placeholder {
    color: var(--text-muted, rgba(255, 255, 255, 0.45));
    font-size: 0.92rem;
}

[data-theme="light"] .comment-textarea::placeholder {
    color: #94A3B8;
}

.comment-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border, rgba(255, 255, 255, 0.08));
    flex-wrap: wrap;
}

[data-theme="light"] .comment-form-footer {
    border-top-color: #E2E8F0;
}

.comment-char-counter {
    font-size: 0.78rem;
    color: var(--text-muted, rgba(255, 255, 255, 0.5));
    font-weight: 500;
    transition: color 0.2s ease;
}

[data-theme="light"] .comment-char-counter {
    color: #64748B;
}

.comment-form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.comment-shortcut-hint {
    font-size: 0.74rem;
    color: var(--text-muted, rgba(255, 255, 255, 0.4));
    user-select: none;
}

[data-theme="light"] .comment-shortcut-hint {
    color: #94A3B8;
}

.comment-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 22px;
    border-radius: 9999px;
    border: none;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: #FFFFFF;
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
    user-select: none;
}

.comment-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
    filter: brightness(1.06);
}

.comment-submit-btn:active:not(:disabled) {
    transform: translateY(0) scale(0.98);
}

.comment-submit-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.comment-form-msg {
    margin-top: 12px;
    padding: 11px 18px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    animation: toastFadeIn 0.3s ease;
}

.comment-form-msg.ok {
    background: rgba(16, 185, 129, 0.15);
    color: #10B981;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

[data-theme="light"] .comment-form-msg.ok {
    background: #ECFDF5;
    color: #047857;
    border-color: #A7F3D0;
}

.comment-form-msg.err {
    background: rgba(239, 68, 68, 0.15);
    color: #EF4444;
    border: 1px solid rgba(239, 68, 68, 0.35);
}

[data-theme="light"] .comment-form-msg.err {
    background: #FEF2F2;
    color: #B91C1C;
    border-color: #FECACA;
}

@keyframes toastFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Comments List Area */
.comments-list-wrap {
    width: 100%;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comment-card {
    background: var(--bg-card, rgba(22, 30, 49, 0.55));
    border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
    border-radius: 20px;
    padding: 18px 20px;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    position: relative;
}

[data-theme="light"] .comment-card {
    background: #FFFFFF;
    border-color: #E2E8F0;
    box-shadow: 0 3px 14px rgba(15, 23, 42, 0.04);
}

.comment-card.is-author {
    border-inline-start: 3.5px solid #10B981;
}

.comment-card:hover {
    border-color: rgba(99, 102, 241, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .comment-card:hover {
    border-color: #CBD5E1;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.07);
}

.comment-card-highlight {
    animation: commentCardFlash 2.5s ease;
}

@keyframes commentCardFlash {
    0% {
        background: rgba(16, 185, 129, 0.2);
        border-color: #10B981;
        box-shadow: 0 0 25px rgba(16, 185, 129, 0.35);
    }
    100% {
        background: var(--bg-card, rgba(22, 30, 49, 0.55));
    }
}

.comment-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.comment-author-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.comment-author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: right;
}

.comment-author-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.94rem;
    color: var(--text-primary, #FFFFFF);
    letter-spacing: -0.01em;
}

[data-theme="light"] .comment-author-name {
    color: #0F172A;
}

.author-badge-you {
    font-size: 0.7rem;
    padding: 2px 7px;
    border-radius: 9999px;
    background: rgba(16, 185, 129, 0.16);
    color: #10B981;
    border: 1px solid rgba(16, 185, 129, 0.4);
    font-weight: 700;
}

[data-theme="light"] .author-badge-you {
    background: #ECFDF5;
    color: #047857;
    border-color: #A7F3D0;
}

.comment-time-wrap {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.76rem;
    color: var(--text-muted, rgba(255, 255, 255, 0.5));
}

[data-theme="light"] .comment-time-wrap {
    color: #64748B;
}

.comment-time-icon {
    font-size: 0.72rem;
    opacity: 0.7;
}

.comment-delete-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 9999px;
    border: 1px solid rgba(239, 68, 68, 0.25);
    background: rgba(239, 68, 68, 0.08);
    color: #EF4444;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.comment-delete-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.45);
    transform: translateY(-1px);
}

.comment-body {
    margin-bottom: 14px;
    line-height: 1.8;
    font-size: 0.96rem;
    color: var(--text-primary, #FFFFFF);
    word-break: break-word;
    white-space: pre-wrap;
}

[data-theme="light"] .comment-body {
    color: #1E293B;
}

.comment-card-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border, rgba(255, 255, 255, 0.06));
}

[data-theme="light"] .comment-card-footer {
    border-top-color: #F1F5F9;
}

.comment-reactions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.reaction-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 9999px;
    border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
    background: var(--bg-card, rgba(22, 30, 49, 0.6));
    color: var(--text-secondary, rgba(255, 255, 255, 0.75));
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

[data-theme="light"] .reaction-btn {
    background: #F8FAFC;
    border-color: #E2E8F0;
    color: #475569;
}

.reaction-btn:hover {
    background: var(--bg-card-hover, rgba(30, 42, 69, 0.9));
    color: var(--text-primary, #FFFFFF);
    border-color: rgba(99, 102, 241, 0.35);
    transform: translateY(-1px);
}

[data-theme="light"] .reaction-btn:hover {
    background: #F1F5F9;
    color: #0F172A;
    border-color: #CBD5E1;
}

/* Active Reaction: Like (Dark) */
.reaction-btn.active.reaction-like {
    background: rgba(59, 130, 246, 0.18);
    border-color: #3B82F6;
    color: #93C5FD;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.3);
}

/* Active Reaction: Like (Light) */
[data-theme="light"] .reaction-btn.active.reaction-like {
    background: #EFF6FF;
    border-color: #2563EB;
    color: #1D4ED8;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
}

.reaction-btn.active.reaction-like .reaction-icon {
    animation: reactionPop 0.35s ease;
}

/* Active Reaction: Dislike (Dark) */
.reaction-btn.active.reaction-dislike {
    background: rgba(239, 68, 68, 0.16);
    border-color: #EF4444;
    color: #FCA5A5;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.25);
}

/* Active Reaction: Dislike (Light) */
[data-theme="light"] .reaction-btn.active.reaction-dislike {
    background: #FEF2F2;
    border-color: #DC2626;
    color: #B91C1C;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.15);
}

.reaction-btn.active.reaction-dislike .reaction-icon {
    animation: reactionPop 0.35s ease;
}

@keyframes reactionPop {
    0% { transform: scale(1); }
    40% { transform: scale(1.35) rotate(-8deg); }
    100% { transform: scale(1) rotate(0); }
}

.reaction-count {
    font-weight: 700;
    font-size: 0.82rem;
    min-width: 14px;
    text-align: center;
}

/* Offline Notice & Retry Chip */
.comments-offline-notice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    border-radius: 14px;
    background: rgba(245, 158, 11, 0.12);
    color: #F59E0B;
    border: 1px solid rgba(245, 158, 11, 0.35);
    font-size: 0.88rem;
    margin-bottom: 18px;
    flex-wrap: wrap;
    animation: toastFadeIn 0.3s ease;
}

[data-theme="light"] .comments-offline-notice {
    background: #FFFBEB;
    border-color: #FDE68A;
    color: #B45309;
}

.offline-notice-content {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.offline-retry-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 9999px;
    border: 1px solid rgba(245, 158, 11, 0.4);
    background: rgba(245, 158, 11, 0.18);
    color: #F59E0B;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

[data-theme="light"] .offline-retry-btn {
    background: #FEF3C7;
    border-color: #FCD34D;
    color: #92400E;
}

.offline-retry-btn:hover {
    background: rgba(245, 158, 11, 0.3);
    transform: translateY(-1px);
}

/* Loading & Empty States */
.comments-loading,
.comments-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
    text-align: center;
    color: var(--text-muted, rgba(255, 255, 255, 0.5));
    gap: 10px;
}

.comments-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(99, 102, 241, 0.2);
    border-top-color: #6366F1;
    border-radius: 50%;
    animation: spinComment 0.8s linear infinite;
}

@keyframes spinComment {
    to { transform: rotate(360deg); }
}

.empty-icon {
    font-size: 2.6rem;
    margin-bottom: 4px;
    filter: drop-shadow(0 4px 12px rgba(99, 102, 241, 0.3));
    animation: floatEmpty 3s ease-in-out infinite;
}

@keyframes floatEmpty {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.empty-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary, #FFFFFF);
    margin: 0;
}

[data-theme="light"] .empty-title {
    color: #0F172A;
}

.empty-sub {
    font-size: 0.88rem;
    color: var(--text-secondary, rgba(255, 255, 255, 0.65));
    max-width: 440px;
    line-height: 1.6;
    margin: 0;
}

[data-theme="light"] .empty-sub {
    color: #64748B;
}

/* Mobile responsive layout */
@media (max-width: 640px) {
    .comments-section {
        padding: 18px 14px;
        margin: 32px 0 16px;
        border-radius: 18px;
    }

    .comments-header {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    .comments-title-wrap {
        min-width: 0;
    }

    .user-identity-card {
        width: 100%;
        box-sizing: border-box;
        justify-content: flex-start;
        border-radius: 14px;
    }

    .comment-form-inner {
        flex-direction: column;
        gap: 10px;
    }

    .comment-form-avatar {
        display: none;
    }

    .comment-shortcut-hint {
        display: none;
    }

    .comment-form-footer {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
    }

    .comment-submit-btn {
        padding: 8px 18px;
        font-size: 0.88rem;
    }

    .comment-card {
        padding: 15px 14px;
        border-radius: 16px;
    }

    .comment-card-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
    }

    .comment-author-wrap {
        display: flex;
        align-items: center;
        gap: 10px;
        min-width: 0;
    }

    .reaction-btn {
        padding: 5px 11px;
        font-size: 0.8rem;
    }
}

/* User Identity Setup Card (Unclaimed state) */
.user-setup-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(99, 102, 241, 0.08);
    border: 1.5px dashed rgba(99, 102, 241, 0.35);
    border-radius: 18px;
    flex-shrink: 0;
    transition: all 0.25s ease;
    width: 100%;
    max-width: 480px;
    box-sizing: border-box;
}

[data-theme="light"] .user-setup-card {
    background: #F8FAFC;
    border-color: #CBD5E1;
    border-style: solid;
}

.user-setup-card.has-error {
    border-color: #EF4444;
    animation: shakeCard 0.4s ease;
}

@keyframes shakeCard {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-4px); }
    40%, 80% { transform: translateX(4px); }
}

.user-setup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.user-setup-title {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text-primary, #FFFFFF);
}

[data-theme="light"] .user-setup-title {
    color: #0F172A;
}

.user-setup-hint {
    font-size: 0.72rem;
    color: var(--text-muted, rgba(255, 255, 255, 0.55));
}

[data-theme="light"] .user-setup-hint {
    color: #64748B;
}

.user-setup-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.user-setup-input-wrap {
    position: relative;
    flex: 1;
    min-width: 180px;
    display: flex;
    align-items: center;
}

.user-setup-input {
    width: 100%;
    background: var(--bg-primary, #0A0E1A);
    border: 1px solid var(--border, rgba(255, 255, 255, 0.15));
    border-radius: 12px;
    padding: 8px 12px 8px 115px;
    color: var(--text-primary, #FFFFFF);
    font-family: inherit;
    font-size: 0.88rem;
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

[data-theme="light"] .user-setup-input {
    background: #FFFFFF;
    border-color: #CBD5E1;
    color: #0F172A;
}

.user-setup-input:focus {
    border-color: #6366F1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

[data-theme="light"] .user-setup-input:focus {
    border-color: #4F46E5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.user-setup-suggest-btn {
    position: absolute;
    left: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 8px;
    border: none;
    background: rgba(99, 102, 241, 0.15);
    color: #818CF8;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    white-space: nowrap;
}

[data-theme="light"] .user-setup-suggest-btn {
    background: rgba(99, 102, 241, 0.1);
    color: #4F46E5;
}

.user-setup-suggest-btn:hover {
    background: rgba(99, 102, 241, 0.25);
    transform: translateY(-1px);
}

.user-setup-claim-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #6366F1 0%, #4F46E5 100%);
    color: #FFFFFF;
    font-weight: 700;
    font-size: 0.84rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 3px 10px rgba(99, 102, 241, 0.3);
    user-select: none;
    white-space: nowrap;
}

.user-setup-claim-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(99, 102, 241, 0.4);
    filter: brightness(1.08);
}

.user-setup-claim-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.user-setup-status {
    font-size: 0.78rem;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 8px;
    animation: toastFadeIn 0.25s ease;
}

.user-setup-status.err {
    background: rgba(239, 68, 68, 0.12);
    color: #EF4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

[data-theme="light"] .user-setup-status.err {
    background: #FEF2F2;
    color: #DC2626;
    border-color: #FECACA;
}

.user-setup-status.ok {
    background: rgba(16, 185, 129, 0.12);
    color: #10B981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

[data-theme="light"] .user-setup-status.ok {
    background: #ECFDF5;
    color: #047857;
    border-color: #A7F3D0;
}

/* Reply Action Button on Card */
.reply-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 9999px;
    border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
    background: var(--bg-card, rgba(22, 30, 49, 0.6));
    color: var(--text-secondary, rgba(255, 255, 255, 0.75));
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

[data-theme="light"] .reply-toggle-btn {
    background: #F8FAFC;
    border-color: #E2E8F0;
    color: #475569;
}

.reply-toggle-btn:hover {
    background: var(--bg-card-hover, rgba(30, 42, 69, 0.9));
    color: var(--text-primary, #FFFFFF);
    border-color: rgba(99, 102, 241, 0.35);
    transform: translateY(-1px);
}

[data-theme="light"] .reply-toggle-btn:hover {
    background: #F1F5F9;
    color: #0F172A;
    border-color: #CBD5E1;
}

.reply-toggle-btn.active {
    background: rgba(99, 102, 241, 0.18);
    border-color: #6366F1;
    color: #818CF8;
}

[data-theme="light"] .reply-toggle-btn.active {
    background: #EEF2FF;
    border-color: #6366F1;
    color: #4F46E5;
}

.reply-count {
    font-size: 0.8rem;
    font-weight: 700;
    color: inherit;
}

/* Inline Reply Composer */
.comment-reply-composer {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed var(--border, rgba(255, 255, 255, 0.1));
    animation: replySlideDown 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] .comment-reply-composer {
    border-top-color: #E2E8F0;
}

@keyframes replySlideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.reply-composer-inner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.reply-avatar-sm {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    max-width: 32px !important;
    max-height: 32px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #FFFFFF !important;
    font-weight: 800 !important;
    font-size: 0.95rem !important;
    flex-shrink: 0 !important;
    margin-top: 2px;
}

.reply-input-wrap {
    flex: 1;
    min-width: 0;
    background: var(--bg-primary, #0A0E1A);
    border: 1.5px solid var(--border, rgba(255, 255, 255, 0.12));
    border-radius: 14px;
    padding: 10px 12px 8px;
    transition: all 0.2s ease;
}

[data-theme="light"] .reply-input-wrap {
    background: #F8FAFC;
    border-color: #CBD5E1;
}

.reply-input-wrap:focus-within {
    border-color: #6366F1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
    background: var(--bg-card, rgba(22, 30, 49, 0.8));
}

[data-theme="light"] .reply-input-wrap:focus-within {
    background: #FFFFFF;
    border-color: #4F46E5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.reply-textarea {
    width: 100% !important;
    display: block !important;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    color: var(--text-primary, #FFFFFF) !important;
    font-family: inherit !important;
    font-size: 0.9rem !important;
    line-height: 1.6 !important;
    resize: none !important;
    min-height: 52px !important;
    max-height: 200px !important;
    overflow-y: auto !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    margin: 0 !important;
}

[data-theme="light"] .reply-textarea {
    color: #0F172A !important;
}

.reply-textarea::placeholder {
    color: var(--text-muted, rgba(255, 255, 255, 0.45));
    font-size: 0.86rem;
}

[data-theme="light"] .reply-textarea::placeholder {
    color: #94A3B8;
}

.reply-composer-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border, rgba(255, 255, 255, 0.06));
}

[data-theme="light"] .reply-composer-actions {
    border-top-color: #F1F5F9;
}

.reply-cancel-btn {
    padding: 5px 12px;
    border-radius: 9999px;
    border: none;
    background: transparent;
    color: var(--text-muted, rgba(255, 255, 255, 0.6));
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

[data-theme="light"] .reply-cancel-btn {
    color: #64748B;
}

.reply-cancel-btn:hover {
    color: var(--text-primary, #FFFFFF);
    background: rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .reply-cancel-btn:hover {
    color: #0F172A;
    background: #E2E8F0;
}

.reply-send-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border-radius: 9999px;
    border: none;
    background: linear-gradient(135deg, #6366F1 0%, #4F46E5 100%);
    color: #FFFFFF;
    font-weight: 700;
    font-size: 0.84rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.reply-send-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    filter: brightness(1.08);
}

.reply-send-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.reply-composer-msg {
    margin-top: 8px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    text-align: center;
}

.reply-composer-msg.err {
    background: rgba(239, 68, 68, 0.15);
    color: #EF4444;
}

[data-theme="light"] .reply-composer-msg.err {
    background: #FEF2F2;
    color: #DC2626;
}

/* Threaded / Nested Replies Container */
.comment-replies-list {
    margin-top: 14px;
    padding-inline-start: 22px;
    border-inline-start: 2.5px solid rgba(99, 102, 241, 0.28);
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
}

[data-theme="light"] .comment-replies-list {
    border-inline-start-color: rgba(99, 102, 241, 0.2);
}

/* Nested Reply Card */
.reply-card {
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--border, rgba(255, 255, 255, 0.06));
    border-radius: 16px;
    padding: 12px 14px;
    position: relative;
    transition: all 0.2s ease;
}

[data-theme="light"] .reply-card {
    background: #F8FAFC;
    border-color: #E2E8F0;
}

.reply-card.is-author {
    border-inline-start: 3px solid #10B981;
}

.reply-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .reply-card:hover {
    background: #F1F5F9;
    border-color: #CBD5E1;
}

.reply-card-highlight {
    animation: replyCardFlash 2.5s ease;
}

@keyframes replyCardFlash {
    0% {
        background: rgba(99, 102, 241, 0.22);
        border-color: #6366F1;
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.35);
    }
    100% {
        background: rgba(255, 255, 255, 0.035);
    }
}

.reply-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.reply-author-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.reply-avatar {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    max-width: 32px !important;
    max-height: 32px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #FFFFFF !important;
    font-weight: 800 !important;
    font-size: 0.95rem !important;
    flex-shrink: 0 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2) !important;
}

.reply-author-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.reply-author-name {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text-primary, #FFFFFF);
}

[data-theme="light"] .reply-author-name {
    color: #0F172A;
}

.reply-time-wrap {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.72rem;
    color: var(--text-muted, rgba(255, 255, 255, 0.5));
}

[data-theme="light"] .reply-time-wrap {
    color: #64748B;
}

.reply-delete-btn {
    padding: 3px 9px !important;
    font-size: 0.72rem !important;
}

.reply-body {
    margin-bottom: 8px;
    line-height: 1.7;
    font-size: 0.9rem;
    color: var(--text-primary, #FFFFFF);
    word-break: break-word;
    white-space: pre-wrap;
}

[data-theme="light"] .reply-body {
    color: #1E293B;
}

.reply-card-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 6px;
    border-top: 1px solid var(--border, rgba(255, 255, 255, 0.04));
}

[data-theme="light"] .reply-card-footer {
    border-top-color: #F1F5F9;
}

.reply-reactions .reaction-btn {
    padding: 4px 10px;
    font-size: 0.78rem;
    gap: 4px;
}

.reply-to-author-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 9999px;
    border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
    background: transparent;
    color: var(--text-muted, rgba(255, 255, 255, 0.65));
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

[data-theme="light"] .reply-to-author-btn {
    color: #64748B;
    border-color: #E2E8F0;
}

.reply-to-author-btn:hover {
    color: #818CF8;
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
}

[data-theme="light"] .reply-to-author-btn:hover {
    color: #4F46E5;
    background: #EEF2FF;
    border-color: #C7D2FE;
}

/* Mobile responsive updates */
@media (max-width: 640px) {
    .user-setup-card {
        max-width: 100%;
        padding: 12px;
    }
    .user-setup-controls {
        flex-direction: column;
        align-items: stretch;
    }
    .user-setup-claim-btn {
        width: 100%;
        justify-content: center;
    }
    .comment-replies-list {
        padding-inline-start: 12px;
        margin-top: 10px;
        gap: 8px;
    }
    .reply-card {
        padding: 10px 10px;
        border-radius: 12px;
    }
    .reply-avatar {
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
        min-height: 28px !important;
        max-width: 28px !important;
        max-height: 28px !important;
        font-size: 0.85rem !important;
    }
    .reply-composer-inner {
        flex-direction: column;
        gap: 8px;
    }
    .reply-avatar-sm {
        display: none !important;
    }
}
