/* =========================================================================
 * Najibul Truth System - Frontend Truth Badge & Seals CSS
 * Version: 2.0.0
 * Zero Theme Breaking: Five-Layer Protection, Fit-Content Shrink Wrap, 0ms Delay
 * ========================================================================= */

.nts-master-badge-wrap {
    display: block !important;
    width: fit-content !important;
    min-width: min-content !important;
    max-width: 100% !important;
    margin: 20px 0 !important;
    box-sizing: border-box !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    -webkit-font-smoothing: antialiased;
}

@media (max-width: 640px) {
    .nts-master-badge-wrap {
        width: 100% !important;
    }
}

.nts-badge-body {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    padding: 10px 16px !important;
    border-radius: 14px !important;
    box-sizing: border-box !important;
    flex-wrap: nowrap !important;
    transition: all 0.3s ease;
}

.nts-badge-left {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    min-width: 0 !important;
}

.nts-badge-right {
    display: inline-flex !important;
    align-items: center !important;
    flex-shrink: 0 !important;
}

/* Emblem container */
.nts-seal-emblem {
    width: 34px !important;
    height: 34px !important;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

.nts-badge-verified-title {
    font-size: 14px !important;
    font-weight: 900 !important;
    letter-spacing: -0.2px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.nts-btn-view-cert-compact {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 6px 12px !important;
    font-size: 11.5px !important;
    font-weight: 800 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35) !important;
    transition: all 0.2s ease !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}
.nts-btn-view-cert-compact:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.45) !important;
}

@media (max-width: 480px) {
    .nts-badge-body {
        padding: 8px 12px !important;
        gap: 8px !important;
    }
    .nts-badge-verified-title {
        font-size: 12.5px !important;
    }
    .nts-btn-view-cert-compact {
        padding: 5px 9px !important;
        font-size: 10.5px !important;
    }
    .nts-seal-emblem {
        width: 30px !important;
        height: 30px !important;
    }
    .nts-seal-emblem svg {
        width: 17px !important;
        height: 17px !important;
    }
}

/* Content */
.nts-badge-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-grow: 1;
}

.nts-badge-top-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.nts-badge-verified-title {
    font-size: 15px;
    font-weight: 900;
    letter-spacing: -0.2px;
}

.nts-pill-cpt {
    background: rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 10px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 8px;
    letter-spacing: 0.5px;
}

.nts-pill-rank {
    background: rgba(56, 189, 248, 0.12);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 8px;
}

.nts-pill-guardian {
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 8px;
}

.nts-pill-sniper {
    background: rgba(239, 68, 68, 0.14);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.35);
    font-size: 11px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 8px;
}

.nts-badge-bottom-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #94a3b8;
}

.nts-cert-tag code {
    background: rgba(0, 0, 0, 0.35);
    padding: 2px 6px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 11px;
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Certificate Trigger Button */
.nts-btn-view-cert {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff !important;
    border: none;
    border-radius: 10px;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
    transition: all 0.2s ease;
    white-space: nowrap;
}
.nts-btn-view-cert:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

/* =========================================================================
 * THEME 1: 24K ROYAL GOLD (Sovereign Supreme)
 * ========================================================================= */
.nts-theme-royal_gold .nts-badge-body {
    background: linear-gradient(135deg, #090d16 0%, #151d2e 50%, #090d16 100%);
    border: 1px solid rgba(245, 158, 11, 0.45);
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.7), 0 0 20px rgba(245, 158, 11, 0.12);
}
.nts-theme-royal_gold .nts-seal-emblem {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.1));
    border: 1px solid rgba(245, 158, 11, 0.4);
}
.nts-theme-royal_gold .nts-badge-verified-title {
    color: #fbbf24;
}
.nts-theme-royal_gold .nts-btn-view-cert {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

/* =========================================================================
 * THEME 2: CYBER EMERALD MATRIX
 * ========================================================================= */
.nts-theme-cyber_emerald .nts-badge-body {
    background: linear-gradient(135deg, #04120e 0%, #09261d 50%, #04120e 100%);
    border: 1px solid rgba(16, 185, 129, 0.5);
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.7), 0 0 25px rgba(16, 185, 129, 0.18);
}
.nts-theme-cyber_emerald .nts-seal-emblem {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(5, 150, 105, 0.1));
    border: 1px solid rgba(16, 185, 129, 0.5);
}
.nts-theme-cyber_emerald .nts-badge-verified-title {
    color: #34d399;
}
.nts-theme-cyber_emerald .nts-btn-view-cert {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

/* =========================================================================
 * THEME 3: COSMIC NEON PULSE (Cyan & Violet Gradient)
 * ========================================================================= */
.nts-theme-neon_pulse .nts-badge-body {
    background: linear-gradient(135deg, #0b0d1e 0%, #131433 50%, #0b0d1e 100%);
    border: 1px solid rgba(168, 85, 247, 0.4);
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.7), 0 0 25px rgba(168, 85, 247, 0.2);
}
.nts-theme-neon_pulse .nts-seal-emblem {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(168, 85, 247, 0.2));
    border: 1px solid rgba(6, 182, 212, 0.4);
}
.nts-theme-neon_pulse .nts-badge-verified-title {
    background: linear-gradient(90deg, #38bdf8, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.nts-theme-neon_pulse .nts-btn-view-cert {
    background: linear-gradient(135deg, #06b6d4, #8b5cf6);
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.35);
}

/* =========================================================================
 * THEME 4: MINIMALIST OBSIDIAN GLASS
 * ========================================================================= */
.nts-theme-minimal_obsidian .nts-badge-body {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
}
.nts-theme-minimal_obsidian .nts-seal-emblem {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.16);
}
.nts-theme-minimal_obsidian .nts-badge-verified-title {
    color: #f8fafc;
}
.nts-theme-minimal_obsidian .nts-btn-view-cert {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: none;
}
.nts-theme-minimal_obsidian .nts-btn-view-cert:hover {
    background: #334155;
}

/* =========================================================================
 * THEME 5: COMPACT PILL
 * ========================================================================= */
.nts-theme-compact_pill .nts-badge-body {
    background: linear-gradient(90deg, #0f172a, #1e293b);
    border: 1px solid rgba(16, 185, 129, 0.4);
    border-radius: 9999px;
    padding: 6px 14px;
    gap: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
.nts-theme-compact_pill .nts-seal-emblem {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: none;
    border: none;
}
.nts-theme-compact_pill .nts-badge-verified-title {
    font-size: 13px;
    color: #34d399;
}
.nts-theme-compact_pill .nts-badge-bottom-row {
    display: none;
}
.nts-theme-compact_pill .nts-btn-view-cert {
    padding: 4px 10px;
    font-size: 11px;
    border-radius: 9999px;
}

/* =========================================================================
 * DOPAMINE ANIMATIONS
 * ========================================================================= */
.nts-anim-dopamine_pulse .nts-seal-emblem {
    animation: ntsDopaminePulse 3s ease-in-out infinite;
}
@keyframes ntsDopaminePulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 0px transparent); }
    50% { transform: scale(1.08); filter: drop-shadow(0 0 8px rgba(245,158,11,0.5)); }
}

.nts-anim-gentle_glow .nts-seal-emblem {
    animation: ntsGentleGlow 4s ease-in-out infinite;
}
@keyframes ntsGentleGlow {
    0%, 100% { opacity: 0.9; }
    50% { opacity: 1; filter: drop-shadow(0 0 5px rgba(56,189,248,0.4)); }
}

/* Alerts (Revision Needed / Pending) */
.nts-alert-revision .nts-badge-body {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 5px solid #f59e0b;
    color: #92400e;
}
.nts-alert-pending .nts-badge-body {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-left: 4px solid #10b981;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.1);
    color: #065f46;
}
.nts-btn-edit-action {
    background: #ffffff;
    color: #0284c7 !important;
    border: 1px solid #0284c7;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
}

/* =========================================================================
 * CRYPTOGRAPHIC CERTIFICATE MODAL
 * ========================================================================= */
.nts-cert-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}
.nts-cert-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(8px);
}
.nts-cert-card {
    position: relative;
    z-index: 2;
    background: #090d16;
    border: 2px solid rgba(245, 158, 11, 0.4);
    border-radius: 20px;
    padding: 28px;
    max-width: 580px;
    width: 100%;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.9), 0 0 30px rgba(245, 158, 11, 0.2);
    color: #f1f5f9;
}
.nts-cert-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: #94a3b8;
    font-size: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.nts-cert-close:hover { color: #ffffff; background: rgba(255, 255, 255, 0.16); }
.nts-modal-header { text-align: center; margin-bottom: 20px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); padding-bottom: 16px; }
.nts-modal-seal { font-size: 38px; margin-bottom: 6px; }
.nts-modal-header h3 { margin: 0; font-size: 16px; font-weight: 900; color: #fbbf24; letter-spacing: 0.5px; }
.nts-modal-header p { margin: 4px 0 0 0; font-size: 11px; color: #94a3b8; }
.nts-modal-body { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.nts-modal-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; gap: 12px; }
.nts-m-label { color: #94a3b8; font-weight: 600; }
.nts-m-val { color: #ffffff; text-align: right; }
.nts-m-code { background: rgba(0,0,0,0.4); padding: 3px 8px; border-radius: 6px; font-family: monospace; color: #fbbf24; border: 1px solid rgba(245,158,11,0.3); }
.nts-m-hash { font-size: 10px; font-family: monospace; color: #38bdf8; word-break: break-all; text-align: right; max-width: 60%; }
.nts-modal-footer { border-top: 1px solid rgba(255, 255, 255, 0.08); padding-top: 16px; display: flex; justify-content: space-between; align-items: center; }
.nts-stamp { font-size: 11px; font-weight: 900; color: #34d399; letter-spacing: 0.5px; }
.nts-watermark { font-size: 10px; color: #64748b; font-weight: 700; letter-spacing: 0.5px; }

/* Comment Author Crowns */
.nts-comment-crown {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 8px;
    vertical-align: middle;
    margin-left: 6px;
}
.nts-crown-gold { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.35); }
.nts-crown-emerald { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.35); }
.nts-crown-cyan { background: rgba(6, 182, 212, 0.15); color: #38bdf8; border: 1px solid rgba(6, 182, 212, 0.35); }
