/* Lagos Life Custom Styling & Game Juice Animations */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&family=Cabinet+Grotesk:wght@700;800;900&family=JetBrains+Mono:wght@600;700&display=swap');

:root {
    --danfo-yellow: #fdb813;
    --danfo-yellow-light: #fde047;
    --danfo-black: #0b0f19;
    --naira-green: #10b981;
    --naira-glow: rgba(16, 185, 129, 0.3);
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #070a12;
    background-image: 
        radial-gradient(at 0% 0%, rgba(253, 184, 19, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(16, 185, 129, 0.08) 0px, transparent 50%),
        radial-gradient(at 50% 100%, rgba(59, 130, 246, 0.06) 0px, transparent 50%);
    background-attachment: fixed;
    color: #f1f5f9;
    overflow-x: hidden;
}

h1, h2, h3, h4, .font-display {
    font-family: 'Cabinet Grotesk', 'Plus Jakarta Sans', sans-serif;
}

.font-mono-num {
    font-family: 'JetBrains Mono', monospace;
}

/* Danfo striped accents */
.danfo-stripe {
    background: repeating-linear-gradient(
        -45deg,
        #fdb813,
        #fdb813 14px,
        #111827 14px,
        #111827 28px
    );
}

.danfo-stripe-sm {
    background: repeating-linear-gradient(
        -45deg,
        #fdb813,
        #fdb813 8px,
        #111827 8px,
        #111827 16px
    );
}

/* Glassmorphism panels */
.glass-panel {
    background: rgba(18, 25, 38, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.glass-panel-accent {
    background: rgba(22, 31, 48, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(253, 184, 19, 0.28);
    box-shadow: 0 12px 35px -8px rgba(0, 0, 0, 0.6), 0 0 20px -5px rgba(253, 184, 19, 0.12);
}

/* Holographic resident card */
.resident-id-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.85) 0%, rgba(15, 23, 42, 0.95) 100%);
    border: 1px solid rgba(253, 184, 19, 0.35);
    position: relative;
    overflow: hidden;
}
.resident-id-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 45%,
        rgba(255, 255, 255, 0.04) 50%,
        transparent 55%
    );
    pointer-events: none;
    transform: rotate(25deg);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(11, 15, 25, 0.7);
}
::-webkit-scrollbar-thumb {
    background: rgba(253, 184, 19, 0.35);
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(253, 184, 19, 0.7);
}

/* Pulse glow effects */
.glow-yellow {
    box-shadow: 0 0 30px -5px rgba(253, 184, 19, 0.4);
}

.glow-green {
    box-shadow: 0 0 30px -5px rgba(16, 185, 129, 0.4);
}

.glow-red {
    box-shadow: 0 0 30px -5px rgba(239, 68, 68, 0.4);
}

/* Shimmer button animation */
.shimmer-btn {
    position: relative;
    overflow: hidden;
}
.shimmer-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 20%;
    height: 200%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.4) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(30deg);
    animation: shimmerPass 3.5s infinite;
}

@keyframes shimmerPass {
    0% { left: -60%; }
    20% { left: 140%; }
    100% { left: 140%; }
}

/* Screen shake for intense Lagos stress */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-7px); }
    40%, 80% { transform: translateX(7px); }
}

.animate-shake {
    animation: shake 0.45s ease-in-out;
}

/* Floating number popup animation */
@keyframes floatUpFade {
    0% {
        opacity: 0;
        transform: translateY(12px) scale(0.9);
    }
    15% {
        opacity: 1;
        transform: translateY(0) scale(1.1);
    }
    75% {
        opacity: 1;
        transform: translateY(-25px) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-45px) scale(0.95);
    }
}

.float-chip {
    animation: floatUpFade 1.6s forwards cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

/* Striped animated progress bar */
.striped-meter {
    background-image: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.15) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.15) 75%,
        transparent 75%,
        transparent
    );
    background-size: 1rem 1rem;
    animation: moveStripes 1.5s linear infinite;
}

@keyframes moveStripes {
    0% { background-position: 0 0; }
    100% { background-position: 1rem 0; }
}

.progress-bar-fill {
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Location & Asset card micro-interactions */
.interactive-card {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.interactive-card:hover {
    transform: translateY(-4px);
    border-color: rgba(253, 184, 19, 0.5);
    box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.6), 0 0 20px -8px rgba(253, 184, 19, 0.2);
}

/* Tab Navigation */
.nav-tab {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-tab.active-tab {
    background: linear-gradient(135deg, #fdb813 0%, #f59e0b 100%);
    color: #0b0f19;
    font-weight: 800;
    box-shadow: 0 4px 18px 0 rgba(253, 184, 19, 0.35);
    transform: translateY(-1px);
}

/* Toast Notifications */
#toastContainer {
    pointer-events: none;
}
.toast-item {
    pointer-events: auto;
    animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateY(-15px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Live Chat Widget Styling */
#chatWindowBox {
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 30px -8px rgba(253, 184, 19, 0.25);
}

#chatMessagesStream::-webkit-scrollbar {
    width: 4px;
}
#chatMessagesStream::-webkit-scrollbar-thumb {
    background: rgba(253, 184, 19, 0.25);
    border-radius: 4px;
}

/* Pulse badge ring */
.badge-ping {
    position: relative;
}
.badge-ping::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: inherit;
    border: 2px solid rgba(253, 184, 19, 0.6);
    animation: pingRing 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes pingRing {
    70%, 100% {
        transform: scale(1.3);
        opacity: 0;
    }
}
