/* --- RELATIVITY ENGINE: AUTO-SENSOR GLASS V13.8 --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;800&family=JetBrains+Mono:wght@500;700&display=swap');

:root {
    --hud-bg: rgba(5, 10, 20, 0.95); 
    --hud-border: 1px solid rgba(255, 255, 255, 0.1);
    --hud-accent: #06b6d4; 
    --hud-text: #f8fafc;
    
    --card-w-pc: 300px; /* Diperkecil sedikit biar muat banyak */
    --card-w-mobile: 85vw;
    --gap: 20px;
}

#modalRelativity, #modalRelativity * { 
    box-sizing: border-box; 
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

#modalRelativity {
    display: none; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: radial-gradient(circle at center, #1e293b 0%, #020617 100%); /* Background diperbaiki */
    z-index: 2147483647; 
    font-family: 'Inter', sans-serif; color: var(--hud-text);
    overflow: hidden;
    pointer-events: auto; 
    transition: background 0.3s, backdrop-filter 0.3s;
}

/* --- CONTAINER UTAMA --- */
.nexus-container {
    display: flex; flex-direction: column; height: 100%; width: 100%;
    position: relative; overflow: hidden;
}

/* --- HEADER --- */
.nexus-header {
    height: 60px; display: flex; align-items: center; justify-content: space-between;
    padding: 0 15px; 
    background: rgba(15, 23, 42, 0.95); 
    border-bottom: 1px solid rgba(255,255,255,0.1);
    z-index: 50; /* Z-index tinggi biar gak ketutup */
}

.brand-title { 
    font-family: 'JetBrains Mono', monospace; 
    font-weight: 800; font-size: 1.1rem; color: var(--hud-accent); 
    text-shadow: 0 0 15px rgba(6, 182, 212, 0.4); display: flex; align-items: center; gap: 5px;
}

.nexus-select {
    background: #0f172a; border: 1px solid var(--hud-accent); color: var(--hud-accent);
    padding: 5px 10px; border-radius: 6px; font-size: 0.75rem; font-weight: 700; cursor: pointer;
}

.btn-lock-toggle {
    background: #1e293b; border: 1px solid var(--hud-accent); color: var(--hud-accent);
    width: 35px; height: 35px; border-radius: 8px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}

.close-btn { 
    background: transparent; border: 1px solid #ef4444; color: #ef4444; 
    width: 35px; height: 35px; border-radius: 50%; font-weight: bold; font-size: 1.2rem;
    display: flex; align-items: center; justify-content: center; cursor: pointer;
}

/* --- [BARU] STATISTIK AREA (YANG KEMARIN HILANG) --- */
.nexus-top-stats {
    display: flex; gap: 10px; padding: 10px 15px;
    background: rgba(0,0,0,0.2); border-bottom: 1px dashed rgba(255,255,255,0.1);
    min-height: 70px;
}

.stat-box {
    flex: 1; 
    background: rgba(255,255,255,0.03); 
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 8px; padding: 8px; text-align: center;
    display: flex; flex-direction: column; justify-content: center;
}

.sb-label { font-size: 0.6rem; color: #94a3b8; margin-bottom: 2px; text-transform: uppercase; }
.sb-val { font-size: 0.9rem; font-weight: 900; color: white; }

/* --- [BARU] CHART AREA (YANG KEMARIN NABRAK) --- */
.nexus-chart-area {
    height: 120px; width: 100%; position: relative; 
    border-bottom: 1px solid rgba(255,255,255,0.05);
    margin-bottom: 5px;
}
#nexus-svg-line { width: 100%; height: 100%; }

/* --- STAGE KARTU --- */
.nexus-stage {
    flex: 1; position: relative; overflow: hidden;
    display: flex; align-items: center; width: 100%;
    perspective: 1000px;
}

.deck-track {
    display: flex; gap: var(--gap); padding-left: 50%; /* Start tengah */
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: transform; align-items: center;
}

/* --- KARTU (DIPERBAIKI) --- */
.analysis-card {
    min-width: var(--card-w-pc); max-width: var(--card-w-pc); 
    height: 380px; /* Tinggi Fix biar tidak kepanjangan */
    background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid rgba(255,255,255,0.1); 
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-radius: 16px; 
    display: flex; flex-direction: column; 
    opacity: 0.5; transform: scale(0.9); 
    transition: all 0.4s ease; 
    position: relative; z-index: 10;
}

.analysis-card.active {
    opacity: 1; transform: scale(1);
    border-color: var(--hud-accent); 
    box-shadow: 0 0 40px rgba(6, 182, 212, 0.15); 
    z-index: 20;
}

.card-header { 
    display: flex; justify-content: space-between; align-items: center;
    background: rgba(15, 23, 42, 0.8); padding: 12px 15px; 
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.card-title { color: #facc15; font-weight: 800; font-size: 0.85rem; letter-spacing: 1px; }
.card-icon { font-size: 1.2rem; }

.card-body { 
    flex: 1; overflow-y: auto; color: var(--hud-text); 
    font-size: 0.85rem; line-height: 1.5; padding: 15px; 
}

/* --- FOOTER --- */
.nexus-footer { 
    height: 60px; display: flex; align-items: center; justify-content: center; 
    background: rgba(15, 23, 42, 0.95); 
    border-top: 1px solid rgba(255,255,255,0.1);
    z-index: 50;
}

.nav-dot { 
    width: 6px; height: 6px; 
    margin: 0 4px;          
    background: #334155; 
    border-radius: 50%; 
    transition: 0.3s; cursor: pointer; 
}

.nav-dot.active { 
    background: var(--hud-accent); 
    transform: scale(1.5); 
    box-shadow: 0 0 8px var(--hud-accent); 
}

/* --- OVERLAY LOCK (VIP) --- */
#nexus-lock-overlay {
    position: absolute; top:0; left:0; width:100%; height:100%;
    background: rgba(15,23,42,0.9); z-index: 9999;
    display: none; align-items: center; justify-content: center;
    flex-direction: column; backdrop-filter: blur(10px);
}

/* --- RESPONSIVE MOBILE --- */
@media (max-width: 600px) {
    .nexus-top-stats { gap: 5px; padding: 10px; }
    .stat-box { padding: 5px; }
    .sb-val { font-size: 0.8rem; }
    
    .analysis-card { 
        min-width: var(--card-w-mobile); 
        max-width: var(--card-w-mobile); 
        height: 55vh; /* Sesuaikan tinggi di HP */
    }
    
    .brand-title span { display: none; } /* Sembunyikan 'TRADER' di HP kecil */
}