/* ==========================================================
   SOVEREIGN ENGINE V4 CORE - DATABASE READY
   ========================================================== */

/* 🎯 1. VARIABLE CONTROL (Neutral SKOP) */
:root {
    /* Kita biarkan kosong/neutral supaya Firestore boleh ambil alih sepenuhnya */
    --p-bg: #ffffff;
    --p-text: #0f172a;
    --p-accent: #3b82f6;
    --p-card-bg: rgba(255, 255, 255, 0.9);
    --p-card-border: rgba(0, 0, 0, 0.1);
    --font-main: 'Plus Jakarta Sans', sans-serif;
}

/* 🎯 2. RESET & BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

/* 🎯 3. STRUCTURE ADAPTATION */
body:not(.dashboard-body) {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* PENTING: Gunakan variable tanpa !important supaya JS boleh override */
    background-color: var(--p-bg); 
    color: var(--p-text);
    font-family: var(--font-main);
    transition: background 0.5s ease, color 0.5s ease;
    padding: 80px 20px 60px;
}

/* 🎯 4. PROFILE CARD CORE */
.profile-card {
    background: var(--p-card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--p-card-border);
    border-radius: 32px;
    padding: 60px 25px 40px;
    width: 100%;
    max-width: 420px;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    animation: fadeInUp 0.8s ease-out forwards;
}

/* 🎯 5. AVATAR & BADGE */
.avatar-container {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 20px;
    border: 4px solid var(--p-card-border);
    overflow: hidden;
    background: rgba(255,255,255,0.1);
}

.avatar-container img { width: 100%; height: 100%; object-fit: cover; }

.badge {
    position: absolute; top: -15px; left: 50%;
    transform: translateX(-50%); padding: 6px 16px;
    border-radius: 50px; font-size: 10px; font-weight: 800;
    text-transform: uppercase;
}

.badge.Sovereign {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #0f172a;
}

.badge.Verified { background: #3b82f6; color: #ffffff; }

/* 🎯 6. TEXT ELEMENTS */
#name-display {
    font-size: 1.8rem; font-weight: 800; margin-bottom: 8px;
    color: var(--p-text);
}

#bio-display {
    font-size: 0.95rem; opacity: 0.8; line-height: 1.5;
    margin-bottom: 25px; color: var(--p-text);
}

/* 🎯 7. SOCIAL & LINKS */
.social-container {
    display: flex; justify-content: center; gap: 15px; margin-bottom: 30px;
}

.social-link img { width: 32px; height: 32px; transition: 0.3s; }
.social-link:hover img { transform: scale(1.2); }

.link-btn {
    background: var(--p-card-bg);
    border: 1px solid var(--p-card-border);
    color: var(--p-text) !important;
    padding: 16px; border-radius: 18px;
    text-decoration: none; font-weight: 700;
    transition: 0.3s ease; display: block; margin-bottom: 12px;
}

.link-btn:hover {
    border-color: var(--p-accent);
    transform: translateY(-2px);
    background: var(--p-accent);
    color: #ffffff !important;
}

/* 🎯 8. BUTTONS */
.share-action-btn {
    background: var(--p-accent); color: white; border: none;
    padding: 10px 20px; border-radius: 50px; font-size: 11px;
    font-weight: 800; cursor: pointer; margin-bottom: 25px;
}

.report-btn, .claim-text-btn {
    background: none; border: none; color: var(--p-text);
    opacity: 0.3; font-size: 10px; font-weight: 700; cursor: pointer;
}

/* 🎯 9. ANIMATION LIBRARY (Zass Ready) */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

/* Matrix Rain Animation */
.anim-matrix {
    background: #000000 !important;
    position: relative;
}

.anim-matrix::before {
    content: "10110100101011010101101001010110101011010101101001010110101011010101101001010";
    position: fixed;
    top: -50px;
    left: 0;
    width: 100vw;
    word-break: break-all;
    color: #22c55e;
    opacity: 0.15;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    line-height: 1;
    animation: rainZass 8s linear infinite;
    z-index: 0;
    pointer-events: none;
}

@keyframes rainZass {
    from { transform: translateY(0); }
    to { transform: translateY(100vh); }
}

/* Pastikan card tak tenggelam */
.anim-matrix .profile-card {
    position: relative;
    z-index: 10;
}
/* Aurora Animation */
.anim-aurora {
    background: linear-gradient(270deg, #020617, #064e3b, #020617);
    background-size: 600% 600%;
    animation: auroraBG 10s ease infinite;
}
@keyframes auroraBG { 0%{background-position:0% 50%} 50%{background-position:100% 50%} 100%{background-position:0% 50%} }

/* Gaban/Sovereign Black Animation */
.anim-gaban .profile-card {
    border: 2px solid var(--p-accent) !important;
    box-shadow: 0 0 20px var(--p-accent);
    animation: pulseGaban 2s infinite;
}
@keyframes pulseGaban { 0% { opacity: 1; } 50% { opacity: 0.7; } 100% { opacity: 1; } }