/* ============================================
   THE LIQUID CRYSTAL CORE - Phase 12 Final
   "Ultra-Premium Unified Stats Bar"
   ============================================ */

.crystal-core-container {
    position: relative;
    width: 100%;
    max-width: 900px;
    height: 100px;
    margin: 40px auto;
    background: rgba(10, 15, 25, 0.4);
    
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50px;
    display: flex;
    align-items: center;
    padding: 0 40px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), 0 0 10px rgba(34, 211, 238, 0.08)
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.6s ease;
}

.crystal-core-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.05) 45%,
            rgba(255, 255, 255, 0.15) 50%,
            rgba(255, 255, 255, 0.05) 55%,
            transparent 100%);
    animation: crystalSweep 6s infinite linear;
}

@keyframes crystalSweep {
    0% {
        transform: translateX(-50%) skewX(-20deg);
    }

    100% {
        transform: translateX(50%) skewX(-20deg);
    }
}

/* Internal Segments */
.crystal-segment {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    position: relative;
    z-index: 10;
}

.crystal-segment:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    height: 30px;
    width: 1px;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.crystal-icon-aura {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--flux-accent, #2b50bc);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), 0 0 10px rgba(34, 211, 238, 0.08)
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.crystal-segment:hover .crystal-icon-aura {
    transform: scale(1.1) rotate(5deg);
    background: rgba(var(--flux-accent-rgb, 6, 182, 212), 0.1);
    border-color: var(--flux-accent, #2b50bc);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), 0 0 10px rgba(34, 211, 238, 0.08)
}

.crystal-data {
    display: flex;
    flex-direction: column;
}

.crystal-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 1px;
    line-height: 1;
}

.crystal-label {
    font-family: 'Cairo', sans-serif;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Liquid Portal Aura (Hero Enhancement) */
.hero-liquid-portal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    background: radial-gradient(circle,
            rgba(43, 80, 188, 0.15) 0%,
            rgba(124, 138, 255, 0.05) 40%,
            transparent 70%);
    z-index: 1;
    filter: blur(15px);
    animation: portalPulse 8s infinite alternate ease-in-out;
    pointer-events: none;
}

@media (max-width: 768px) {
    .hero-liquid-portal {
        width: 200px;
        height: 200px;
        left: 50%;
        margin-left: 0;
    }
}

@keyframes portalPulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.4;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 0.8;
    }
}

/* Accent Colors */
.seg-cyan {
    --flux-accent: #2b50bc;
    --flux-accent-rgb: 6, 182, 212;
}

.seg-purple {
    --flux-accent: #6366f1;
    --flux-accent-rgb: 139, 92, 246;
}

.seg-pink {
    --flux-accent: #a78bfa;
    --flux-accent-rgb: 236, 72, 153;
}

.crystal-icon-aura i {
    animation: crystalIconLoop 6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes crystalIconLoop {

    /* 0-30%: Entrance (Fade In + Scale) */
    0% {
        opacity: 0;
        transform: scale(0.5);
    }

    30% {
        opacity: 1;
        transform: scale(1.1);
    }

    /* 30-40%: Burst */
    40% {
        filter: drop-shadow(0 0 10px currentColor);
    }

    /* 40-70%: Hold */
    70% {
        opacity: 1;
        transform: scale(1);
    }

    /* 70-100%: Static Fade */
    100% {
        opacity: 0;
        transform: scale(0.9);
    }
}

/* Mobile Optimization */
@media (max-width: 768px) {
    .crystal-core-container {
        flex-direction: row;
        height: auto;
        padding: 15px 10px;
        border-radius: 20px;
        gap: 5px;
        width: 95%;
        justify-content: space-between;
    }

    .crystal-segment {
        width: auto;
        flex: 1;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        text-align: center;
    }

    .crystal-data {
        align-items: center;
    }

    .crystal-segment:not(:last-child)::after {
        display: block;
        right: 0;
        top: 20%;
        height: 60%;
        width: 1px;
    }

    .crystal-value {
        font-size: 1.1rem;
    }

    .crystal-label {
        font-size: 0.6rem;
    }

    .crystal-icon-aura {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
        margin: 0 auto;
    }
}
