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

        :root {
            --safe-top: env(safe-area-inset-top, 0px);
            --safe-bottom: env(safe-area-inset-bottom, 0px);
        }
        html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
        body {
            font-family: 'Poppins', sans-serif;
            background-color: #17001c;
            color: #f1f5f9;
            -webkit-tap-highlight-color: transparent;
            overscroll-behavior-y: none;
            padding-top: 0;
        }
        * { -webkit-touch-callout: none; }
        input, textarea, select { -webkit-touch-callout: default; }
        button, a { touch-action: manipulation; }

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

        /* Custom Scrollbars */
        ::-webkit-scrollbar {
            width: 6px;
            height: 6px;
        }
        ::-webkit-scrollbar-track {
            background: #120016;
        }
        ::-webkit-scrollbar-thumb {
            background: #4a2354;
            border-radius: 9999px;
        }
        ::-webkit-scrollbar-thumb:hover {
            background: #ff5c01;
        }

        /* Pulse glowing animations */
        @keyframes glow-orange {
            0%, 100% { box-shadow: 0 0 15px rgba(255, 92, 1, 0.2); }
            50% { box-shadow: 0 0 30px rgba(255, 92, 1, 0.55); }
        }
        .glow-bonk {
            animation: glow-orange 3s infinite;
        }

        .scanner-beam {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: linear-gradient(90deg, transparent, #ff5c01, #ff9a5c, #ff5c01, transparent);
            box-shadow: 0 0 18px #ff5c01;
            animation: scan 1.8s cubic-bezier(0.4, 0, 0.6, 1) infinite;
        }

        @keyframes scan {
            0% { top: 0%; opacity: 0.9; }
            50% { opacity: 1; }
            100% { top: 100%; opacity: 0.9; }
        }

        @keyframes bonk-float {
            0% { transform: translateY(0px); }
            50% { transform: translateY(-10px); }
            100% { transform: translateY(0px); }
        }
        @keyframes bonk-wiggle {
            0%, 100% { transform: translateY(0px) rotate(0deg); }
            25% { transform: translateY(-6px) rotate(-4deg); }
            50% { transform: translateY(-10px) rotate(0deg); }
            75% { transform: translateY(-6px) rotate(4deg); }
        }
        .bonk-float { animation: bonk-float 3s ease-in-out infinite; }
        .bonk-wiggle { animation: bonk-wiggle 3.5s ease-in-out infinite; transform-origin: center bottom; }

        .grid-pattern {
            background-image: radial-gradient(rgba(255, 92, 1, 0.12) 1px, transparent 1px);
            background-size: 20px 20px;
        }

        /* Native-app-like mobile layout */
        header {
            padding-top: calc(0.75rem + var(--safe-top));
        }
        @media (max-width: 767px) {
            body { overscroll-behavior: none; }
            .tab-bar-wrap {
                position: fixed !important;
                top: auto !important;
                bottom: 0;
                left: 0;
                right: 0;
                z-index: 50;
                border-top: 1px solid rgba(61, 26, 71, 0.9);
                border-bottom: none;
                padding: 6px 6px calc(6px + var(--safe-bottom)) 6px !important;
                background: rgba(18, 0, 22, 0.92) !important;
                backdrop-filter: blur(16px);
                -webkit-backdrop-filter: blur(16px);
            }
            .tab-bar-inner {
                display: flex !important;
                gap: 4px !important;
                overflow-x: auto;
                justify-content: flex-start;
                padding-bottom: 0 !important;
                -webkit-overflow-scrolling: touch;
                scroll-snap-type: x proximity;
            }
            .tab-bar-inner button {
                flex: 0 0 auto;
                min-width: 64px;
                min-height: 52px !important;
                padding: 6px 8px !important;
                border-radius: 14px !important;
                flex-direction: column;
                gap: 2px !important;
                font-size: 10px !important;
                line-height: 1.1;
                text-align: center;
                scroll-snap-align: start;
            }
            .tab-bar-inner button i { width: 18px; height: 18px; }
            .tab-bar-inner button span { white-space: nowrap; max-width: 72px; overflow: hidden; text-overflow: ellipsis; }
            #app-main { padding-bottom: calc(90px + var(--safe-bottom)) !important; }
            .scanner-beam { will-change: top; }
        }
        @supports (padding: max(0px)) {
            header { padding-left: max(1rem, env(safe-area-inset-left)); padding-right: max(1rem, env(safe-area-inset-right)); }
        }
