/* --- ARTHAVA ECOSYSTEM: MONOLITH v104.0 - FULL MASTER WITH WALLET FIX --- */
:root {
    --void-ink: #050505;
    --ether-mist: #111111;
    --illuminated-gold: #F2D280; 
    --void-gold: #C5A059;
    --blood-rust: #AA3333;
    --neon-blue: #00F3FF;
    --pump-green: #00FF9D;
    
    --font-header: 'Cinzel', serif;
    --font-tech: 'Courier Prime', monospace;
    --font-body: 'EB Garamond', serif;
}

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
    user-select: none; 
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

body, html {
    background-color: var(--void-ink);
    color: var(--illuminated-gold);
    font-family: var(--font-body);
    width: 100%; overflow-x: hidden;
    line-height: 1.6; font-size: 1.05rem; margin: 0;
}

/* Allow clicks on interactive elements */
a, button, .tab-link, .pulse-button, .contract-btn {
    user-select: auto;
    -webkit-user-select: auto;
}

/* --- FX LAYERS --- */
.scanlines {
    position: fixed; inset: 0; z-index: 900; pointer-events: none; opacity: 0.12;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), 
                linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 3px, 3px 100%;
}
#particles-js { position: fixed; inset: 0; z-index: 1; pointer-events: none; }
.fog-overlay {
    position: fixed; inset: 0; z-index: 5; pointer-events: none;
    background: url('assets/misty_kashmir_overlay.png'); 
    background-size: cover; opacity: 0.15; animation: fogMove 60s linear infinite;
}
@keyframes fogMove { 0% { background-position: 0 0; } 100% { background-position: 100% 100%; } }

/* --- GLOBAL ASSET RULES --- */
img {
    display: block;
    width: auto;
    max-width: 420px !important;
    max-height: 420px !important;
    margin: 20px auto !important;
    border: 2px solid var(--neon-blue);
    border-radius: 4px;
    box-shadow: 0 0 25px rgba(0, 243, 255, 0.15);
    position: relative; z-index: 20;
    transition: transform 0.3s ease;
    object-fit: contain;
}
img::after {
    content: "";
    position: absolute;
    inset: 0;
    background: url('assets/logo.jpg') center/contain no-repeat;
    opacity: 0.12;
    pointer-events: none;
    z-index: 21;
}

video {
    display: block;
    width: 100%;
    max-width: 560px !important;
    aspect-ratio: 16 / 9 !important;
    margin: 20px auto !important;
    border: 2px solid var(--neon-blue);
    border-radius: 4px;
    box-shadow: 0 0 25px rgba(0, 243, 255, 0.15);
    position: relative; z-index: 20;
    transition: transform 0.3s ease;
}

img:hover, video:hover {
    transform: scale(1.02);
    box-shadow: 0 0 50px var(--neon-blue);
}

/* --- SHAPE OVERRIDES --- */
.asset-hero { max-width: 420px !important; max-height: 420px !important; }
.asset-avatar { width: 220px !important; height: 220px !important; border-radius: 50% !important; border-color: var(--illuminated-gold) !important; aspect-ratio: 1/1; object-fit: cover; }
.asset-icon { max-width: 80px !important; max-height: 80px !important; border: none !important; box-shadow: none !important; margin: 0 !important; }
.asset-coin { max-width: 140px !important; max-height: 140px !important; display: inline-block !important; margin: 15px !important; border: none !important; box-shadow: none !important; filter: drop-shadow(0 0 10px rgba(242,210,128,0.5)); }
.asset-qr { max-width: 150px !important; max-height: 150px !important; border-width: 3px !important; margin-top: 20px !important; }

/* Floating Animation */
.floating { animation: float 6s ease-in-out infinite; }
@keyframes float { 0% { transform: translateY(0px); } 50% { transform: translateY(-15px); } }

/* --- FLOATING RUMMAGE (RIGHT SIDE) --- */
.floating-rummage {
    position: fixed !important;
    top: 50% !important;
    right: 20px !important;
    transform: translateY(-50%);
    z-index: 999;
    width: 140px;
    animation: float 7s ease-in-out infinite, glow 3s infinite alternate;
    pointer-events: none;
    opacity: 0.85;
}
@keyframes glow { 0% { filter: drop-shadow(0 0 8px var(--neon-blue)); } 100% { filter: drop-shadow(0 0 25px var(--neon-blue)); } }

/* --- HEADER & WALLET BUTTON (FULLY FIXED) --- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: #000;
    border-bottom: 2px solid #222;
    z-index: 1000;
    box-shadow: 0 0 40px rgba(0,243,255,0.1);
}

.header-nav a { 
    font-family: var(--font-header);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--neon-blue);
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 1px;
    transition: 0.3s;
    margin: 0 15px;
}
.header-nav a:hover,
.header-nav a.active-link {
    color: var(--illuminated-gold);
    text-shadow: 0 0 20px var(--neon-blue);
}

.wallet-wrapper {
    position: relative;
}

.connect-btn {
    background: transparent;
    color: var(--neon-blue);
    border: 2px solid var(--neon-blue);
    padding: 10px 25px;
    font-family: var(--font-header);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: not-allowed;
    transition: all 0.4s ease;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.3);
    opacity: 1;
}

.connect-btn:hover {
    opacity: 1;
    box-shadow: 0 0 30px var(--neon-blue), 0 0 60px var(--illuminated-gold);
    transform: scale(1.05);
}

.coming-soon-badge {
    position: absolute;
    top: -12px;
    right: 0;
    background: #000;
    border: 1px solid var(--illuminated-gold);
    color: var(--illuminated-gold);
    font-family: var(--font-tech);
    font-size: 0.65rem;
    padding: 4px 8px;
    animation: badgeBlink 1.5s infinite;
}
@keyframes badgeBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* --- MARQUEE --- */
.marquee-container { 
    position: relative; top: 100px; width: 100%; height: 35px;
    background: #000000; z-index: 500; 
    overflow: hidden; display: flex; align-items: center;
    justify-content: center;
    text-align: center;
}
.marquee-content { 
    display: inline-block; white-space: nowrap; animation: scrollLeft 60s linear infinite; 
    font-family: var(--font-tech); color: var(--neon-blue); font-weight: 900; letter-spacing: 2px; font-size: 0.9rem; 
}
@keyframes scrollLeft { from { transform: translateX(100%); } to { transform: translateX(-100%); } }

/* --- SECTIONS --- */
.codex-hero { min-height: 80vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 100px 20px 40px; }
.codex-section { padding: 40px 20px; max-width: 1400px; margin: 0 auto; border-bottom: 1px solid var(--illuminated-gold); }
.glass-panel { background: rgba(8, 8, 8, 0.95); border: 1px solid rgba(242, 210, 128, 0.2); padding: 30px; box-shadow: 0 0 30px rgba(0,0,0,0.8); }

/* --- TYPOGRAPHY --- */
h1 { font-family: var(--font-header); font-size: 2.5rem; color: var(--illuminated-gold); text-shadow: 0 0 40px rgba(242, 210, 128, 0.5); margin-bottom: 20px; text-align: center; }
h2 { font-family: var(--font-header); font-size: 1.8rem; color: var(--neon-blue); text-shadow: 0 0 25px var(--neon-blue); text-align: center; border-bottom: 1px solid #444; padding-bottom: 10px; margin-bottom: 20px; }
p { text-align: left; }
.text-cyan { color: var(--neon-blue) !important; text-shadow: 0 0 10px var(--neon-blue); }
.text-red { color: var(--blood-rust) !important; text-shadow: 0 0 10px var(--blood-rust); }
.text-gold { color: var(--illuminated-gold) !important; text-shadow: 0 0 10px var(--illuminated-gold); }
.center-text { text-align: center !important; }

/* --- NARRATIVE BLOCKS --- */
.narrative-block {
    max-width: 900px; margin: 20px auto; text-align: left; padding: 30px;
    background: rgba(0,0,0,0.98);
    border-left: 5px solid var(--blood-rust);
    box-shadow: 0 0 50px rgba(0,0,0,0.9); font-size: 1.15rem; color: var(--void-gold);
}
.ancient-verse { background: rgba(5,5,5,0.98); border: 2px solid var(--illuminated-gold); padding: 30px; margin: 20px auto; max-width: 800px; font-family: var(--font-body); font-size: 1.3rem; text-align: center; font-style: italic; color: var(--illuminated-gold); }

/* --- GRIDS --- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: center; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 30px; align-items: center; }

/* --- BUTTONS & TABS --- */
.protocol-tabs { display: flex; justify-content: center; gap: 20px; margin-bottom: 20px; flex-wrap: wrap; }
.tab-content { display: none; padding: 20px; border: 1px solid var(--illuminated-gold); background: rgba(0,0,0,0.9); margin-top: 15px; text-align: left; color: var(--void-gold); }
.tab-link { background: transparent; border: 2px solid var(--neon-blue); color: var(--neon-blue); padding: 10px 20px; cursor: pointer; font-family: var(--font-header); transition: 0.3s; margin: 0 5px; font-weight: 700; letter-spacing: 2px; }
.tab-link:hover, .tab-link.active { background: var(--neon-blue); color: #000; box-shadow: 0 0 30px var(--neon-blue); transform: scale(1.05); }

.pulse-button, .contract-btn {
    display: inline-block; padding: 10px 30px; background: transparent; 
    border: 2px solid var(--neon-blue); color: var(--neon-blue);
    font-family: var(--font-header); font-weight: 700; text-decoration: none;
    transition: 0.4s; letter-spacing: 3px; margin-top: 10px;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.2);
}
.pulse-button:hover, .contract-btn:hover { background: var(--neon-blue); color: #000; box-shadow: 0 0 50px var(--neon-blue); transform: scale(1.05); }
.contract-btn { border-color: var(--pump-green); color: var(--pump-green); }
.contract-btn:hover { background: var(--pump-green); color: #000; box-shadow: 0 0 50px var(--pump-green); }

/* --- TERMINAL --- */
.ai-terminal { 
    width: 100%; 
    max-width: 900px; 
    margin: 20px auto; 
    background: #000; 
    border: 2px solid var(--neon-blue); 
    padding: 30px; 
    font-family: var(--font-tech); 
    text-align: left; 
    box-shadow: 0 0 30px rgba(0,243,255,0.15); 
    border-radius: 8px; 
}
.chat-window { 
    height: 300px; 
    overflow-y: auto; 
    border-bottom: 1px solid #333; 
    margin-bottom: 20px; 
    padding: 20px; 
    color: var(--illuminated-gold); 
    background: rgba(0,0,0,0.6); 
}
.chat-input { 
    width: calc(100% - 110px); 
    background: #111; 
    border: 1px solid var(--neon-blue); 
    color: var(--illuminated-gold); 
    padding: 15px; 
    font-family: var(--font-tech); 
    outline: none; 
    font-size: 1rem; 
    display: inline-block; 
    vertical-align: middle; 
}

/* --- FOOTER --- */
.tactical-footer { background: #000; border-top: 3px solid var(--illuminated-gold); padding: 40px 20px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; max-width: 1400px; margin: 0 auto; text-align: left; }
.footer-col h4 { color: var(--neon-blue); font-family: var(--font-header); margin-bottom: 15px; letter-spacing: 2px; font-size: 1.1rem; }
.footer-links a { display: block; margin-bottom: 10px; color: var(--void-gold); font-family: var(--font-tech); text-decoration: none; font-size: 1rem; transition: 0.3s; }
.footer-links a:hover { color: var(--neon-blue); padding-left: 10px; text-shadow: 0 0 15px var(--neon-blue); }
.codex-input { width: 100%; background: #111; border: 1px solid var(--neon-blue); color: var(--illuminated-gold); padding: 12px; margin-bottom: 15px; font-family: var(--font-tech); }

/* --- PRELOADER --- */
#vault-preloader { position: fixed; inset: 0; background: #000; z-index: 9999; display: flex; flex-direction: column; justify-content: center; align-items: center; transition: 0.8s ease; }
.loader-sigil { width: 100px; height: 100px; border: 5px solid var(--illuminated-gold); border-top-color: var(--neon-blue); border-radius: 50%; animation: spin 1s infinite linear; }
@keyframes spin { 100% { transform: rotate(360deg); } }

@media (max-width: 900px) {
    header { height: auto; padding: 20px; flex-direction: column; gap: 15px; }
    .grid-2, .grid-3, .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .marquee-container { top: 160px; }
    img, video { max-width: 100% !important; max-height: none !important; }
}