/* ==========================================================================
   ASTRAL SYSTEMS GLOBAL ULTRA-UPGRADE LAYER (v1.1.1 - BACKGROUND SECURE)
   Designed for AstralList & AstralShop Ecosystems
   ========================================================================== */

/* 1. CORE COSMIC ENGINE & ARCHITECTURE CUSTOMIZATIONS */
:root {
    --space-void: #060814;
    --space-deep: #0b0f19;
    --space-core: #13112c;
    --cosmic-purple: #a855f7;
    --starlight-bright: #c084fc;
    --starlight-dim: #a78bfa;
    --nebula-glow: rgba(147, 51, 234, 0.15);
    --neon-cyan: #06b6d4;
    --neon-pink: #ec4899;
    --glass-bg: rgba(19, 17, 44, 0.55);
    --glass-border: rgba(168, 85, 247, 0.25);
    --glass-border-hover: rgba(192, 132, 252, 0.6);
    --text-primary: #f8fafc;
    --text-muted: #94a3b8;
}

/* Base structural overhaul - Apply layout fluidity safely */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    /* Fallback color only applies if no background-image is specified elsewhere */
    background-color: var(--space-void);
    color: var(--text-primary);
    min-height: 100vh;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    position: relative;
    overflow-x: hidden;
}

/* HIGH-PERFORMANCE BACKGROUND ENGINE: Ambient canvas star layer mapping */
/* This layers directly *over* your background image for subtle depth without hiding it */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: 
        radial-gradient(#fff, rgba(255,255,255,.15) 1px, transparent 25px),
        radial-gradient(#fff, rgba(255,255,255,.1) 2px, transparent 40px);
    background-size: 400px 400px, 650px 650px;
    background-position: 0 0, 50px 100px;
    opacity: 0.12;
    z-index: -1;
    pointer-events: none;
}

/* 2. HYPER-SPACE FLUID KEYFRAME TIMELINES */
@keyframes zeroGravityDrift {
    0% { transform: translate3d(0, 0, 0); }
    50% { transform: translate3d(0, -6px, 0); }
    100% { transform: translate3d(0, 0, 0); }
}

@keyframes hyperLaserSweep {
    0% { transform: translate3d(-100%, 0, 0); }
    100% { transform: translate3d(100%, 0, 0); }
}

/* 3. UTILITY STRUCTURAL MODIFIERS */
.astral-float, .cosmic-float {
    animation: zeroGravityDrift 8s ease-in-out infinite;
    will-change: transform;
}

/* Stagger options for multi-element layouts */
.astral-delay-1 { animation-delay: -2s; }
.astral-delay-2 { animation-delay: -4s; }
.astral-delay-3 { animation-delay: -6s; }

/* 4. PREMIUM HYPER-SPACE GLASS PANELS */
.glass-panel, .astral-card, .card, .dashboard-block {
    position: relative;
    background: var(--glass-bg);
    backdrop-filter: blur(12px) saturate(130%);
    -webkit-backdrop-filter: blur(12px) saturate(130%);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.4),
                inset 0 0 15px rgba(168, 85, 247, 0.03);
    padding: 25px;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                border-color 0.4s ease, 
                background-color 0.4s ease, 
                box-shadow 0.4s ease;
    transform: translate3d(0, 0, 0);
    will-change: transform, border-color, box-shadow;
}

/* ANTI-JITTER HOVER BRIDGE */
.glass-panel::after, .astral-card::after, .card::after, .dashboard-block::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -20px;
    width: 100%;
    height: 20px;
    background: transparent;
    pointer-events: none;
    z-index: 10;
}

.glass-panel:hover::after, .astral-card:hover::after, .card:hover::after, .dashboard-block:hover::after {
    pointer-events: auto;
}

/* Intense reactionary magnetic hover mechanics */
.glass-panel:hover, .astral-card:hover, .card:hover, .dashboard-block:hover {
    transform: translate3d(0, -6px, 0);
    border-color: var(--glass-border-hover);
    background-color: rgba(23, 20, 56, 0.7);
    box-shadow: 0 20px 45px rgba(147, 51, 234, 0.22),
                0 0 30px rgba(6, 182, 212, 0.1),
                inset 0 0 20px rgba(168, 85, 247, 0.15);
}

/* Streamlined interior element translations */
.glass-panel:hover .breakout, 
.astral-card:hover .card-icon,
.card:hover img {
    transform: translate3d(0, -3px, 0);
    filter: drop-shadow(0 10px 15px rgba(192, 132, 252, 0.4));
}

/* 5. CHROMIUM LIQUID NEON TEXT LOGICS */
h1, h2, .neon-text {
    background: linear-gradient(135deg, #ffffff 15%, #e9d5ff 45%, var(--starlight-bright) 70%, var(--neon-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
    filter: drop-shadow(0 2px 12px rgba(168, 85, 247, 0.2));
    font-weight: 700;
    letter-spacing: 0.5px;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.8rem; }

/* 6. RESPONSIVE CONSOLE INTERACTION PORTS */
button, .cosmic-btn, .btn {
    background: linear-gradient(90deg, #7c3aed 0%, var(--cosmic-purple) 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 12px 26px;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.35);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transform: translate3d(0, 0, 0);
    will-change: transform;
}

/* Laser sweep shimmer mechanic */
button::before, .cosmic-btn::before, .btn::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: translate3d(-100%, 0, 0);
    will-change: transform;
}

button:hover, .cosmic-btn:hover, .btn:hover {
    transform: translate3d(0, -2px, 0);
    box-shadow: 0 8px 25px rgba(168, 85, 247, 0.55), 
                0 0 20px rgba(6, 182, 212, 0.4);
    background: linear-gradient(90deg, #8b5cf6 0%, #c084fc 100%);
}

button:hover::before, .cosmic-btn:hover::before, .btn:hover::before {
    animation: hyperLaserSweep 0.75s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

button:active, .cosmic-btn:active, .btn:active {
    transform: translate3d(0, 0, 0);
}

/* 7. NEON INTERFACE MATRIX INPUTS */
input[type="text"], input[type="password"], input[type="email"], textarea, .cosmic-input {
    background: rgba(11, 15, 25, 0.65);
    border: 1px solid rgba(168, 85, 247, 0.35);
    border-radius: 12px;
    padding: 12px 20px;
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
    width: 100%;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

input:focus, textarea:focus, .cosmic-input:focus {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.3),
                inset 0 0 10px rgba(6, 182, 212, 0.08);
    background: rgba(6, 8, 20, 0.85);
}

::placeholder {
    color: #64748b;
    opacity: 0.8;
}

/* 8. DYNAMIC BADGES & HIGHLIGHT CONTAINERS */
.badge, .missing-badge, .item-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(147, 51, 234, 0.15);
    border: 1px solid rgba(147, 51, 234, 0.4);
    color: var(--starlight-bright);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.badge:hover, .missing-badge:hover, .item-badge:hover {
    background: rgba(147, 51, 234, 0.3);
    border-color: var(--starlight-bright);
    color: #ffffff;
    box-shadow: 0 0 15px rgba(192, 132, 252, 0.4);
    transform: scale(1.03);
}

/* Custom modern scrollbar module */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--space-void);
}
::-webkit-scrollbar-thumb {
    background: rgba(168, 85, 247, 0.3);
    border-radius: 10px;
    border: 2px solid var(--space-void);
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(192, 132, 252, 0.6);
}
