:root {
    --bg-deep: #050505;
    --card-bg: #0a0a0a;
    --border-hairline: rgba(255, 255, 255, 0.08);
    --accent: #ccff00;
    --accent-glow: rgba(204, 255, 0, 0.15);
    --font-heading: 'Clash Display', sans-serif;
    --font-mono: 'Space Mono', monospace;
}

body {
    background-color: var(--bg-deep);
}

.vignette {
    position: fixed; width: 100%; height: 100%; top: 0; left: 0;
    background: radial-gradient(circle, transparent 50%, #000 120%);
    pointer-events: none; z-index: 5;
}


.glass-nav {
    border-bottom: 1px solid var(--border-hairline);
    background: rgba(5, 5, 5, 0.95);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-family: var(--font-heading);
    color: #fff;
    font-size: 1.5rem;
    font-weight: 600;
    margin-right: auto; 
}

.version { font-size: 0.5rem; color: var(--accent); vertical-align: super; }

.nav-container {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-menu a {
    text-decoration: none;
    color: #888;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    transition: 0.3s;
    border: 1px solid transparent;
    padding: 8px 16px;
}

.back-core-btn {
    border-radius: 999px;
    border: 1px solid var(--border-hairline);
    display: inline-block;
}

.nav-menu a:hover {
    color: var(--accent);
    border: 1px solid var(--accent);
    background: rgba(204, 255, 0, 0.05);
}

.wallet-pill {
    border: 1px solid var(--border-hairline);
    padding: 6px 16px;
    border-radius: 50px; 
    font-family: var(--font-mono);
    font-size: 0.75rem;
    display: flex; gap: 8px;
    transition: 0.3s;
    color: #fff;
}
.wallet-pill:hover { border-color: var(--accent); background: var(--accent-glow); }
.wallet-value { color: var(--accent); font-weight: 700; }


.archive-container {
    max-width: 1600px; margin: 0 auto;
    padding: 80px 40px 40px 40px;
}

.archive-header {
    margin-bottom: 80px;
    border-bottom: 1px solid var(--border-hairline);
    padding-bottom: 40px;
}

.glitch-text {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 8vw, 8rem);
    line-height: 0.9;
    color: #fff;
    text-transform: uppercase;
}

.header-meta {
    display: flex; justify-content: space-between;
    margin-top: 20px;
    font-family: var(--font-mono); font-size: 0.8rem; color: #666;
}


.content-wrapper { display: flex; gap: 60px; }


.sticky-sidebar { width: 200px; position: sticky; top: 120px; height: fit-content; }
.filter-section { margin-bottom: 40px; }
.filter-label { display: block; font-family: var(--font-mono); font-size: 0.7rem; color: #444; margin-bottom: 15px; letter-spacing: 1px; }

.filter-list { list-style: none; padding: 0; }
.filter-list li { margin-bottom: 8px; }
.filter-btn {
    background: none; border: none; color: #888;
    font-family: var(--font-heading); font-size: 1.1rem;
    cursor: pointer; transition: 0.3s; padding: 0;
    text-transform: uppercase;
}
.filter-btn:hover, .filter-btn.active { color: #fff; letter-spacing: 1px; }
.filter-btn.active { color: var(--accent); }


.toggle-container {
    display: flex; align-items: center; gap: 10px;
    color: #888; font-family: var(--font-mono); font-size: 0.8rem;
    margin-bottom: 8px; cursor: pointer;
}
.checkmark { width: 10px; height: 10px; border: 1px solid #444; display: inline-block; }
.toggle-container input { display: none; }
.toggle-container input:checked + .checkmark.common { background: #fff; border-color: #fff; }
.toggle-container input:checked + .checkmark.rare { background: #00ccff; border-color: #00ccff; box-shadow: 0 0 5px #00ccff; }
.toggle-container input:checked + .checkmark.legendary { background: #ffaa00; border-color: #ffaa00; box-shadow: 0 0 5px #ffaa00; }


.product-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 40px 20px; 
}

.item-card {
    background: transparent;
    position: relative;
    cursor: none;
    transition: transform 0.1s;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.card-image-wrapper {
    width: 100%; aspect-ratio: 3/4;
    background: #0f0f0f;
    overflow: hidden;
    margin-bottom: 15px;
    position: relative;
    border: 1px solid var(--border-hairline);
}

.card-image-wrapper img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0.8;
    filter: grayscale(20%);
}
.item-card:hover .card-image-wrapper img { transform: scale(1.05); opacity: 1; filter: grayscale(0%); }

.card-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.4);
    display: flex; justify-content: center; align-items: center;
    opacity: 0; transition: 0.3s;
}
.item-card:hover .card-overlay { opacity: 1; }
.view-btn {
    border: 1px solid #fff; color: #fff; padding: 10px 20px;
    font-family: var(--font-mono); font-size: 0.8rem;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(5px);
}

.card-details h3 { font-size: 1rem; color: #fff; font-weight: 400; letter-spacing: 0.5px; }
.card-details .price { font-family: var(--font-mono); font-size: 0.9rem; color: var(--accent); }
.rarity-dot { width: 6px; height: 6px; display: inline-block; border-radius: 50%; margin-right: 5px; vertical-align: middle; }


.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8); backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex; justify-content: center; align-items: center;
}
.hidden { display: none !important; }

.holo-modal {
    width: 900px; max-width: 95vw;
    background: #080808;
    border: 1px solid #333;
    position: relative;
    box-shadow: 0 0 100px rgba(0,0,0,0.8);
    display: flex; flex-direction: column;
}

.close-modal-btn {
    position: absolute; top: -40px; right: 0;
    background: none; border: none; color: #fff;
    font-family: var(--font-mono); cursor: pointer;
}

.holo-content { display: flex; height: 500px; }

.holo-visual {
    flex: 1; background: #050505;
    position: relative; overflow: hidden;
    border-right: 1px solid #222;
    display: flex; justify-content: center; align-items: center;
}
.holo-visual img { height: 80%; object-fit: contain; position: relative; z-index: 2; }


.scan-line {
    position: absolute; width: 100%; height: 2px; background: var(--accent);
    top: 0; left: 0; z-index: 3; opacity: 0; box-shadow: 0 0 15px var(--accent);
    animation: scan-once 1.5s cubic-bezier(0.45, 0, 0.55, 1) forwards;
}
@keyframes scan-once {
    0% { top: 0; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

.visual-decor {
    position: absolute; bottom: 20px; left: 20px;
    font-family: var(--font-mono); font-size: 0.6rem; color: #444;
    display: flex; flex-direction: column; gap: 5px;
}

.holo-data {
    flex: 1; padding: 40px;
    display: flex; flex-direction: column;
    background: 
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    overflow-y: auto;
}

.data-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.id-badge { font-family: var(--font-mono); color: #666; font-size: 0.8rem; }
.rarity-pill { 
    background: #222; padding: 4px 12px; font-size: 0.7rem; font-family: var(--font-mono); 
    border: 1px solid #444; color: #fff; letter-spacing: 1px;
}

#modal-title { font-size: 2.5rem; line-height: 1; margin-bottom: 10px; color: #fff; }
.desc-text { color: #888; font-size: 0.9rem; margin-bottom: 20px; line-height: 1.5; }

.memory-chain-panel {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-hairline);
    padding: 15px; margin-bottom: 15px;
}
.chain-list { list-style: none; font-family: var(--font-mono); font-size: 0.75rem; color: #aaa; padding: 0; }
.chain-list li { margin-bottom: 5px; display: flex; justify-content: space-between; }
.chain-list strong { color: #fff; }

.eco-trace-panel {
    background: rgba(204, 255, 0, 0.05);
    border: 1px solid var(--border-hairline);
    padding: 15px; margin-bottom: 30px;
}
.panel-label { display: block; font-family: var(--font-mono); font-size: 0.6rem; color: var(--accent); margin-bottom: 10px; }
.trace-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.trace-item { display: flex; align-items: center; gap: 10px; }
.trace-item .icon { font-size: 1.2rem; }
.trace-info strong { display: block; color: #fff; font-size: 1rem; }
.trace-info small { color: #666; font-size: 0.7rem; }

.purchase-zone {
    margin-top: auto;
    display: flex; justify-content: space-between; align-items: center;
    border-top: 1px solid #333; padding-top: 20px;
}
.price-block small { font-family: var(--font-mono); font-size: 0.7rem; color: #666; }
.price-block h2 { font-size: 1.8rem; color: var(--accent); margin: 0; }

.action-buttons { display: flex; gap: 10px; }

.btn-purchase {
    background: #fff; color: #000; border: none;
    padding: 15px 30px; font-family: var(--font-mono); font-weight: 700;
    cursor: pointer; position: relative; transition: 0.3s;
}
.btn-purchase:hover { background: var(--accent); letter-spacing: 1px; }

.btn-ar-tryon {
    background: transparent; color: #fff;
    border: 1px solid var(--accent);
    padding: 15px 20px; font-family: var(--font-mono);
    cursor: pointer; transition: 0.3s;
}
.btn-ar-tryon:hover { background: var(--accent-glow); box-shadow: 0 0 10px var(--accent); }

.insufficient-funds { color: #ff003c; font-family: var(--font-mono); font-size: 0.8rem; margin-top: 10px; text-align: right; }


.ar-interface {
    width: 100vw; height: 100vh;
    background: #000;
    position: relative;
    overflow: hidden;
    display: flex; justify-content: center; align-items: center;
}

#camera-feed {
    width: 100%; height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
    filter: contrast(1.1) saturation(1.2);
}

.ar-overlay-container {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 80%; max-width: 500px;
    z-index: 10;
    opacity: 0.9;
}
#ar-clothing-img { width: 100%; height: auto; filter: drop-shadow(0 0 20px rgba(0,0,0,0.5)); }

.close-ar-btn {
    position: absolute; top: 20px; right: 20px; z-index: 100;
    background: rgba(255, 0, 60, 0.8); color: #fff; border: 1px solid #fff;
    padding: 10px 20px; font-family: var(--font-mono); cursor: pointer; font-weight: bold;
}


.ar-hud { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 20; padding: 40px; }
.hud-corner { position: absolute; width: 50px; height: 50px; border: 2px solid var(--accent); }
.top-left { top: 20px; left: 20px; border-right: none; border-bottom: none; }
.top-right { top: 20px; right: 20px; border-left: none; border-bottom: none; }
.bottom-left { bottom: 20px; left: 20px; border-right: none; border-top: none; }
.bottom-right { bottom: 20px; right: 20px; border-left: none; border-top: none; }
.ar-status { position: absolute; top: 30px; left: 50%; transform: translateX(-50%); color: var(--accent); font-family: var(--font-mono); font-size: 0.7rem; background: rgba(0,0,0,0.5); padding: 5px 10px; border-radius: 4px; display: flex; gap: 15px; }
.blink { animation: blink 1s infinite; color: #ff003c; }
.ar-instructions { position: absolute; bottom: 50px; left: 50%; transform: translateX(-50%); color: #fff; font-family: var(--font-heading); letter-spacing: 2px; text-shadow: 0 0 10px rgba(0,0,0,0.8); opacity: 0.8; }
.hud-scan-line { position: absolute; width: 100%; height: 2px; background: rgba(204, 255, 0, 0.3); top: 0; left: 0; animation: hud-scan 3s infinite linear; }
@keyframes hud-scan { 0% {top:0} 100% {top:100%} }
@keyframes blink { 50% { opacity: 0.5; } }



@media (max-width: 900px) { .glass-nav { 
        padding: 15px 20px; 
        flex-direction: column;          
        gap: 15px;
        align-items: stretch;
    }
    
    .nav-container {
        position: static !important; 
        right: auto !important;
        width: 100% !important;
        height: auto !important;
        background: transparent !important;
        box-shadow: none !important;
        display: flex !important;
        flex-direction: column;         
        gap: 12px;
        padding: 0 !important;
    }

    .nav-menu {
        width: 100%; display: block !important; position: static !important;
        transform: none !important; margin: 0 !important; padding: 0 !important;
    }
    
    .back-core-btn {
        display: flex !important; justify-content: center; align-items: center;
        width: 100%; text-align: center;
        background: rgba(255,255,255,0.05); border-color: var(--accent);
        color: #fff; font-weight: 700; padding: 12px 0; margin-top: 5px; font-size: 0.9rem;
    }
    .back-core-btn:active { background: var(--accent); color: #000; }
    .nav-auth { width: 100%; padding: 0 !important; margin: 0 !important; }
    .wallet-pill { width: 100%; justify-content: space-between; background: rgba(0,0,0,0.5); }
    .content-wrapper { flex-direction: column; gap: 20px; }
    .archive-container { padding: 40px 20px; }
    .glitch-text { font-size: 3rem; }
    
    
    .sticky-sidebar {
        width: 100%; position: relative; top: 0;
        display: flex; flex-direction: column; align-items: flex-start;
        gap: 20px; overflow: visible; white-space: normal;
        border-bottom: 1px solid var(--border-hairline);
        padding-bottom: 20px; margin-bottom: 20px;
    }

    .filter-section:first-child {
        width: 100%; margin-bottom: 0; overflow-x: auto;
        white-space: nowrap; padding-bottom: 5px;
        scrollbar-width: none; -ms-overflow-style: none;
    }
    .filter-section:first-child::-webkit-scrollbar { display: none; }
    .filter-list { display: inline-flex; gap: 10px; }
    .filter-label { display: none; } 

    .filter-section:last-child { width: 100%; display: block; margin: 0; }
    .rarity-toggles { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; width: 100%; }
    .toggle-container { display: flex; align-items: center; justify-content: flex-start; width: 100%; margin-bottom: 0; }

    .filter-btn {
        background: #1a1a1a; color: #888; padding: 8px 16px;
        border-radius: 20px; border: 1px solid #333; font-size: 0.75rem;
    }
    .filter-btn.active { background: var(--accent); color: #000; border-color: var(--accent); }

   
    .product-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important; 
        gap: 15px !important;
        padding-bottom: 50px;
    }
    .item-card { width: 100%; }
    .card-details h3 { font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .card-details .price { font-size: 0.8rem; }
    .view-btn { padding: 5px 10px; font-size: 0.6rem; }


    .holo-modal {
        width: 100% !important; height: 100% !important;
        max-width: 100%; top: 0; border: none;
        display: flex; flex-direction: column;
    }
    
    .holo-content { 
        flex-direction: column; 
        height: 100%; 
        overflow-y: auto; 
        padding-bottom: 120px;
    }

    
    .holo-visual { 
        width: 100%;
        height: 45vh;
        min-height: 350px; 
        flex-shrink: 0;
        border-right: none;
        border-bottom: 1px solid #333;
        padding: 0;
        background: radial-gradient(circle at center, #222 0%, #000 70%); 
        display: flex;
        justify-content: center;
        align-items: center;
    }

   
    .holo-visual img { 
        width: 90% !important;
        height: 90% !important;
        object-fit: contain; 
        transform: scale(1.1); 
        filter: drop-shadow(0 20px 30px rgba(0,0,0,0.6)); 
    }


    .holo-data { 
        padding: 25px 20px; 
        height: auto; 
        overflow: visible; 
    }

    #modal-title { font-size: 2.2rem; margin-bottom: 5px; }
    .desc-text { font-size: 1rem; line-height: 1.6; color: #aaa; }

   
    .close-modal-btn {
        position: fixed !important; 
        top: 15px !important; right: 15px !important;
        z-index: 9999 !important;
        background: rgba(0, 0, 0, 0.9) !important;
        border: 1px solid var(--accent) !important;
        color: var(--accent);
        padding: 10px 16px;
        font-weight: bold;
    }
    
    .purchase-zone {
        position: fixed; bottom: 0; left: 0; width: 100%;
        background: rgba(0,0,0,0.95);
        border-top: 1px solid var(--accent);
        padding: 15px 20px; z-index: 1000;
        gap: 10px;
        display: flex;
    }
    .btn-ar-tryon { padding: 0 15px; font-size: 1.5rem; display: flex; align-items: center; }
    .btn-purchase { flex-grow: 1; padding: 15px; font-size: 1rem; }
    .price-block { display: none; }
}