/* ==========================================================
   XAERISOFT UNIVERSE THEME - MILLION DOLLAR UI
   ========================================================== */

:root {
    /* Color Palette */
    --bg-dark: #090014;
    --bg-darker: #05000a;
    --neon-purple: #8A2EFF;
    --neon-purple-dim: rgba(138, 46, 255, 0.2);
    --neon-blue: #00D9FF;
    --neon-blue-dim: rgba(0, 217, 255, 0.2);
    --text-main: #FFFFFF;
    --text-muted: #A7A7A7;
    --gold-glow: #FFD700;
    --success-green: #00FF88;
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.02);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-highlight: rgba(255, 255, 255, 0.15);
    
    /* Layout */
    --border-radius-lg: 24px;
    --border-radius-md: 16px;
    --border-radius-sm: 12px;
    --transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    
    /* Typography */
    --font-ui: 'Plus Jakarta Sans', sans-serif;
    --font-data: 'Space Grotesk', sans-serif;
}

/* ==========================================================
   BASE & RESET
   ========================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-ui);
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    min-height: 100vh;
    selection-background: var(--neon-purple);
    selection-color: white;
}

/* Scrollbar Premium */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--neon-purple-dim); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--neon-purple); }

/* ==========================================================
   BACKGROUND UNIVERSE (Aurora, Stars, Grid)
   ========================================================== */
.universe-bg {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: -1; background: var(--bg-dark); overflow: hidden;
}

/* Grid Overlay (Linear/Vercel Vibe) */
.grid-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
}

.stars, .twinkling-stars {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: transparent url('https://www.transparenttextures.com/patterns/stardust.png') repeat top center;
}
.twinkling-stars { animation: twinkle 5s infinite alternate; opacity: 0.5; }

.aurora-blob {
    position: absolute; border-radius: 50%; filter: blur(100px);
    animation: floatBlob 15s infinite ease-in-out alternate;
    opacity: 0.4;
}
.blob-1 { width: 600px; height: 600px; background: var(--neon-purple); top: -200px; left: -100px; }
.blob-2 { width: 500px; height: 500px; background: var(--neon-blue); bottom: -150px; right: -100px; animation-delay: -5s; }
.blob-3 { width: 400px; height: 400px; background: rgba(0, 85, 255, 0.5); top: 40%; left: 40%; animation-delay: -10s; }

/* ==========================================================
   GLASSMORPHISM COMPONENTS
   ========================================================== */
.glass-nav {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem 5%; background: rgba(9, 0, 20, 0.5);
    backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky; top: 0; z-index: 100;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.interactive-card { transition: var(--transition); }
.interactive-card:hover {
    transform: translateY(-5px);
    border-color: var(--glass-highlight);
    box-shadow: 0 40px 80px rgba(138, 46, 255, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* ==========================================================
   TYPOGRAPHY & UTILITIES
   ========================================================== */
.logo { display: flex; align-items: center; gap: 8px; font-size: 1.5rem; font-weight: 800; letter-spacing: 1px; }
.logo i { color: var(--neon-blue); font-size: 1.8rem; }
.logo-text { background: linear-gradient(90deg, #FFFFFF, var(--text-muted)); -webkit-background-clip: text; color: transparent; }

.gradient-text {
    background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
    -webkit-background-clip: text; color: transparent; font-weight: bold;
}

.hidden { display: none !important; }
.container { max-width: 1200px; margin: 0 auto; padding: 2rem; position: relative; z-index: 10; }

/* ==========================================================
   HERO SECTION
   ========================================================== */
.hero-section { text-align: center; padding: 5rem 0 3rem; animation: slideUpFade 0.8s ease forwards; }

.badge-pill {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 16px; border-radius: 50px; background: var(--glass-bg);
    border: 1px solid var(--neon-purple-dim); color: var(--neon-blue);
    font-size: 0.85rem; font-weight: 600; margin-bottom: 2rem; text-transform: uppercase; letter-spacing: 1px;
}

.hero-title { font-size: 4.5rem; font-weight: 800; line-height: 1.1; margin-bottom: 1.5rem; letter-spacing: -1px; }
.hero-subtitle { font-size: 1.2rem; color: var(--text-muted); max-width: 600px; margin: 0 auto 4rem; line-height: 1.6; }

/* ==========================================================
   SEARCH SYSTEM (Apple-like)
   ========================================================== */
.search-container {
    display: flex; justify-content: center; align-items: center;
    gap: 3rem; margin-bottom: 4rem; position: relative;
}

.search-box { width: 400px; padding: 1.5rem; text-align: left; position: relative; }
.search-box label {
    display: flex; align-items: center; gap: 6px; font-size: 0.9rem;
    color: var(--text-muted); margin-bottom: 12px; font-weight: 500;
}

.input-wrapper {
    position: relative; background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border); border-radius: var(--border-radius-sm);
    transition: var(--transition); display: flex; align-items: center; padding: 0 15px;
}
.input-wrapper:focus-within {
    border-color: var(--neon-purple); box-shadow: 0 0 20px var(--neon-purple-dim);
}

.search-icon { color: var(--text-muted); font-size: 1.2rem; }
.search-box input {
    width: 100%; padding: 16px 12px; background: transparent; border: none;
    color: white; font-size: 1.1rem; outline: none; font-weight: 500;
}
.search-box input::placeholder { color: rgba(255,255,255,0.2); }

/* Autocomplete Premium */
.suggestion-list {
    position: absolute; top: calc(100% + 10px); left: 0; width: 100%;
    background: rgba(15, 8, 30, 0.95); backdrop-filter: blur(20px);
    border: 1px solid var(--neon-purple-dim); border-radius: var(--border-radius-sm);
    z-index: 50; max-height: 250px; overflow-y: auto; display: none;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5); padding: 8px;
}
.suggestion-list div {
    padding: 12px 16px; cursor: pointer; border-radius: 8px;
    display: flex; align-items: center; gap: 12px;
    transition: var(--transition); font-size: 1.1rem; font-weight: 500;
}
.suggestion-list div:hover { background: var(--neon-purple-dim); padding-left: 20px; }

/* VS Badge Dramatis */
.vs-badge {
    position: relative; display: flex; justify-content: center; align-items: center;
}
.vs-ring {
    width: 60px; height: 60px; border-radius: 50%;
    background: linear-gradient(135deg, var(--neon-purple), var(--neon-blue));
    display: flex; justify-content: center; align-items: center;
    font-weight: 800; font-size: 1.2rem;
    box-shadow: 0 0 30px var(--neon-purple-dim);
    animation: pulse 2s infinite; z-index: 2;
}
.vs-ring::before {
    content: ''; position: absolute; width: 100%; height: 100%;
    background: var(--bg-dark); border-radius: 50%; transform: scale(0.85); z-index: -1;
}

/* ==========================================================
   BUTTONS
   ========================================================== */
button { cursor: pointer; border: none; outline: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; transition: var(--transition); }

.nav-btn {
    background: transparent; color: var(--text-muted); font-size: 0.95rem; padding: 8px 16px; border-radius: 50px;
}
.nav-btn:hover { background: var(--glass-bg); color: var(--text-main); }

.btn-primary {
    background: linear-gradient(135deg, var(--neon-purple), var(--neon-blue));
    color: white; padding: 16px 32px; border-radius: 50px; font-size: 1.1rem;
    box-shadow: 0 10px 20px rgba(138, 46, 255, 0.3);
}
.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 217, 255, 0.4);
}

.btn-secondary {
    background: var(--glass-bg); border: 1px solid var(--glass-border);
    color: white; padding: 16px 32px; border-radius: 50px; font-size: 1.1rem;
    backdrop-filter: blur(10px);
}
.btn-secondary:hover { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.2); }

.icon-btn {
    width: 45px; height: 45px; border-radius: 50%;
    background: var(--glass-bg); border: 1px solid var(--glass-border);
    color: var(--text-muted); font-size: 1.2rem;
}
.icon-btn:hover { background: var(--neon-purple-dim); color: var(--neon-blue); border-color: var(--neon-purple); transform: translateY(-3px); }

/* ==========================================================
   LOADER ANIMATION
   ========================================================== */
.loading-container { text-align: center; padding: 10rem 0; }
.ai-scanner {
    width: 100px; height: 100px; border: 2px dashed var(--neon-blue);
    border-radius: 50%; margin: 0 auto 2rem; position: relative;
    animation: spin 4s linear infinite;
}
.scanner-line {
    position: absolute; top: 0; left: 50%; width: 2px; height: 50%;
    background: var(--neon-blue); transform-origin: bottom center;
    box-shadow: 0 0 15px var(--neon-blue); animation: scan 1.5s ease-in-out infinite alternate;
}
.loading-container p { font-size: 1.2rem; font-family: var(--font-data); letter-spacing: 2px; }

/* ==========================================================
   DASHBOARD RESULT SECTION
   ========================================================== */
.dashboard-section { animation: slideUpFade 0.6s ease forwards; }

.actions-bar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem 2rem !important; margin-bottom: 2rem; border-radius: 50px;
}
.action-group { display: flex; gap: 12px; }
.small-btn { padding: 10px 20px; font-size: 0.9rem; }

/* AI Summary Card */
.summary-card { position: relative; padding: 3rem; text-align: center; margin-bottom: 3rem; overflow: hidden; }
.animated-border::before {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: conic-gradient(transparent, var(--neon-purple), transparent 30%);
    animation: rotate 4s linear infinite; z-index: -1;
}
.animated-border::after {
    content: ''; position: absolute; inset: 2px; background: rgba(10, 5, 20, 0.9);
    border-radius: calc(var(--border-radius-lg) - 2px); z-index: -1; backdrop-filter: blur(20px);
}
.ai-header { display: flex; flex-direction: column; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.ai-icon-box {
    width: 60px; height: 60px; background: rgba(0, 217, 255, 0.1); border: 1px solid var(--neon-blue);
    border-radius: 16px; display: flex; justify-content: center; align-items: center;
    font-size: 2rem; color: var(--neon-blue);
}
.ai-text { font-size: 1.1rem; line-height: 1.8; color: var(--text-muted); max-width: 800px; margin: 0 auto; }
.winner-reveal { margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--glass-border); }
.overall-winner { font-size: 2rem; font-weight: 800; color: var(--gold-glow); text-shadow: 0 0 20px rgba(255, 215, 0, 0.4); }
.overall-winner strong { color: white; } /* Highlight JS strong tag */

/* ==========================================================
   COMPARISON GRID (Styling the JS Output)
   ========================================================== */
.category-title {
    grid-column: 1 / -1; font-size: 0.9rem; font-weight: 700; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 3px; margin: 3rem 0 1rem;
    display: flex; align-items: center; gap: 1rem;
}
.category-title::before, .category-title::after {
    content: ''; height: 1px; flex: 1; background: var(--glass-border);
}

.data-row {
    display: grid; grid-template-columns: 1fr 180px 1fr; align-items: center; gap: 2rem;
    margin-bottom: 1rem; background: var(--glass-bg); padding: 1.5rem 2rem;
    border-radius: var(--border-radius-md); border: 1px solid transparent;
    transition: var(--transition);
}
.data-row:hover { border-color: var(--glass-highlight); background: rgba(255,255,255,0.04); transform: scale(1.01); }

/* Dramatic VS Header (Targeting First Child created by JS) */
.comparison-grid .data-row:first-child {
    background: transparent !important; border: none !important; padding: 2rem 0; margin-bottom: 2rem;
}
.comparison-grid .data-row:first-child h2 {
    font-size: 3.5rem; font-weight: 800; letter-spacing: -1px; margin-top: 10px;
    background: linear-gradient(to bottom, #FFFFFF, #888); -webkit-background-clip: text; color: transparent;
}
.comparison-grid .data-row:first-child .data-label {
    font-size: 2rem; color: var(--neon-purple); font-weight: 800;
    text-shadow: 0 0 20px var(--neon-purple-dim);
}
.comparison-grid .data-row:first-child .val-a, 
.comparison-grid .data-row:first-child .val-b { font-size: 4rem; } /* Flag size */

.data-label { text-align: center; font-size: 0.95rem; font-weight: 500; color: var(--text-muted); }

.val-a, .val-b { font-family: var(--font-data); font-size: 1.3rem; font-weight: 600; display: flex; flex-direction: column; }
.val-a { text-align: right; align-items: flex-end; }
.val-b { text-align: left; align-items: flex-start; }

/* The Counter Class from JS */
.counter { color: var(--text-main); }

/* Winner Styling */
.winner { color: var(--success-green); }
.winner .counter { color: var(--success-green); text-shadow: 0 0 15px rgba(0, 255, 136, 0.4); font-size: 1.5rem; font-weight: 700; }
.val-a.winner::before { content: '🏆 Winner'; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px; color: var(--gold-glow); margin-bottom: 5px; background: rgba(255, 215, 0, 0.1); padding: 2px 8px; border-radius: 4px;}
.val-b.winner::before { content: 'Winner 🏆'; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px; color: var(--gold-glow); margin-bottom: 5px; background: rgba(255, 215, 0, 0.1); padding: 2px 8px; border-radius: 4px;}

/* We need to hide the JS injected 🏆 so it doesn't duplicate our premium CSS one, 
   but since JS directly concatenates, we will just style it to blend nicely. */

/* Animated Data Bars */
.bar-container {
    width: 100%; max-width: 250px; height: 6px; background: rgba(255,255,255,0.05);
    border-radius: 10px; margin-top: 12px; overflow: hidden;
}
.val-a .bar-container { display: flex; justify-content: flex-end; }
.bar-fill {
    height: 100%; border-radius: 10px;
    background: linear-gradient(90deg, var(--neon-purple), var(--neon-blue));
    box-shadow: 0 0 10px var(--neon-blue-dim); transition: width 1.5s cubic-bezier(0.25, 1, 0.5, 1);
}

/* ==========================================================
   FUN FACTS SECTION
   ========================================================== */
.fun-facts-container { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 4rem; }
.fun-fact-card { padding: 2.5rem; position: relative; overflow: hidden; }
.fun-fact-card h3 {
    font-size: 1.2rem; color: var(--neon-blue); margin-bottom: 1.5rem;
    display: flex; align-items: center; gap: 10px;
}
.fun-fact-card ul { list-style: none; }
.fun-fact-card li {
    margin-bottom: 1rem; color: var(--text-muted); line-height: 1.6; font-size: 0.95rem;
    position: relative; padding-left: 20px;
}
.fun-fact-card li::before {
    content: '✦'; position: absolute; left: 0; color: var(--neon-purple); font-size: 0.8rem;
}

/* ==========================================================
   KEYFRAMES & ANIMATIONS
   ========================================================== */
@keyframes floatBlob {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, -50px) scale(1.1); }
}
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes scan { 0% { transform: rotate(0deg); } 100% { transform: rotate(180deg); } }
@keyframes spin { 100% { transform: rotate(360deg); } }
@keyframes rotate { 100% { transform: rotate(360deg); } }
@keyframes twinkle { 0% { opacity: 0.3; } 100% { opacity: 0.8; } }
@keyframes slideUpFade { 
    from { opacity: 0; transform: translateY(40px); } 
    to { opacity: 1; transform: translateY(0); } 
}
.pulse-glow { animation: pulse 2s infinite; }

/* ==========================================================
   RESPONSIVE (Mobile & Tablet)
   ========================================================== */
@media (max-width: 992px) {
    .hero-title { font-size: 3.5rem; }
    .search-container { flex-direction: column; gap: 1.5rem; margin-bottom: 2rem; }
    .search-box { width: 100%; max-width: 500px; }
    .vs-badge { margin: 1rem 0; }
    .comparison-grid .data-row:first-child h2 { font-size: 2.5rem; }
    .fun-facts-container { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .glass-nav { padding: 1rem 1.5rem; flex-direction: column; gap: 1rem; }
    .hero-title { font-size: 2.8rem; }
    .data-row { grid-template-columns: 1fr; text-align: center; gap: 0.8rem; padding: 1.5rem 1rem; }
    .val-a { text-align: center; align-items: center; }
    .val-b { text-align: center; align-items: center; }
    .val-a .bar-container { justify-content: center; }
    .data-label { order: -1; margin-bottom: 0.5rem; font-size: 0.85rem; background: rgba(255,255,255,0.05); padding: 4px 12px; border-radius: 50px; display: inline-block; }
    .comparison-grid .data-row:first-child { flex-direction: column; display: flex; gap: 1rem; }
    .actions-bar { flex-direction: column; gap: 1rem; border-radius: var(--border-radius-md); }
    .summary-card { padding: 2rem 1rem; }
}

/* ==========================================================
   PRINT STYLES (Memastikan fitur Print JS tidak rusak)
   ========================================================== */
@media print {
    body { background: white !important; color: black !important; }
    .universe-bg, .glass-nav, .actions-bar, .hero-section { display: none !important; }
    .glass-card { background: white !important; border: 1px solid #ddd !important; box-shadow: none !important; filter: none !important; backdrop-filter: none !important; }
    .gradient-text, .overall-winner { color: black !important; -webkit-text-fill-color: black !important; }
    .data-row { background: #f9f9f9 !important; border: 1px solid #eee !important; break-inside: avoid; }
    .bar-fill { background: #333 !important; box-shadow: none !important; }
}
 