/* ==================================================
           CSS VARIABLES & THEME
           ================================================== */
        :root {
            --bg-color: #050505;
            --surface-color: rgba(20, 20, 20, 0.65);
            --surface-hover: rgba(35, 35, 35, 0.85);
            --surface-light: rgba(255, 255, 255, 0.03);
            --accent-red: #d40000;
            --neon-red: #ff1a1a;
            --border-red: rgba(255, 26, 26, 0.25);
            --border-light: rgba(255, 255, 255, 0.08);
            --text-main: #ffffff;
            --text-secondary: #a0a0a0;
            --glass-blur: blur(20px);
            --transition-speed: 0.3s;
            --bottom-nav-height: 65px;
            --header-height: 60px;
        }

        /* ==================================================
           GLOBAL RESET & TYPOGRAPHY
           ================================================== */
        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            -webkit-tap-highlight-color: transparent;
        }

        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
            background-color: var(--bg-color);
            color: var(--text-main);
            line-height: 1.6;
            overflow-x: hidden;
        }
        
        body.viewer-open {
            overflow: hidden; /* Prevent background scrolling when viewer is open */
        }

        /* AI chat overlay is open: pin the Home page in place (instead of
           just hiding overflow) so the browser can't scroll the underlying
           page — e.g. to "help" bring a focused input into view when the
           on-screen keyboard opens. Without this, that scroll briefly
           reveals a sliver of the Home page behind the full-screen overlay.
           JS sets `top` to the negative saved scroll offset before adding
           this class, and restores the scroll position when it's removed. */
        body.ai-chat-open {
            position: fixed;
            left: 0;
            right: 0;
            width: 100%;
            overflow: hidden;
        }

        a {
            text-decoration: none;
            color: inherit;
        }

        /* ==================================================
           SPLASH SCREEN
           Pure flat black background — no gradients, no glow,
           no grain, no glaze. A single large logo slides in
           smoothly from the left to dead-center, then eases
           into a slightly larger resting size. Only transform/
           opacity are animated, so it runs on the compositor
           thread at 60/120fps with no layout or paint cost.
           ================================================== */
        .splash-screen {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: #000000;
            z-index: 99999;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.6s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .splash-screen.hidden {
            opacity: 0;
            visibility: hidden;
            pointer-events: none;
        }

        /* Center logo stage — no card, no ring, no border. Just the mark. */
        .splash-logo-stage {
            position: relative;
            z-index: 5;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .splash-logo {
            width: min(78vw, 360px);
            height: auto;
            display: block;
            opacity: 0;
            transform: translate3d(-140vw, 0, 0) scale(0.9);
            transform-origin: center;
            will-change: transform, opacity;
            /* No animation by default — it's added via the .ready class
               from app.js, only once the logo image has actually finished
               loading. This guarantees the slide-in never starts against
               a still-loading or broken image (which is what caused the
               "flash of error, then pop in mid-animation" glitch). */
        }

        .splash-logo.ready {
            animation: logoEntrance 1s 0.15s forwards;
        }

        /* Smooth slide in from off-screen left to dead-center, then a
           gentle, slightly-larger settle — one continuous, calm motion,
           no bounce, no overshoot. */
        @keyframes logoEntrance {
            0% {
                opacity: 0;
                transform: translate3d(-140vw, 0, 0) scale(0.9);
                animation-timing-function: cubic-bezier(0.22, 0.61, 0.36, 1);
            }
            65% {
                opacity: 1;
                transform: translate3d(0, 0, 0) scale(0.96);
                animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
            }
            100% {
                opacity: 1;
                transform: translate3d(0, 0, 0) scale(1.06);
            }
        }

        @media (prefers-reduced-motion: reduce) {
            .splash-logo {
                animation: none !important;
                opacity: 1;
                transform: none;
            }
        }

        /* ==================================================
           LAYOUT & CONTAINERS
           ================================================== */
        .app-container {
            max-width: 100%;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            padding-top: var(--header-height);
            padding-bottom: calc(var(--bottom-nav-height) + 40px);
        }

        .page-content {
            flex: 1;
            width: 100%;
            max-width: 850px;
            margin: 0 auto;
            padding: 20px 20px;
            display: none;
        }

        .page-content.active {
            display: block;
        }

        /* Used briefly by app.js, only while the splash screen is still
           covering the screen, to force the browser to lay out, paint,
           and composite the About/Apps/Updates sections once (including
           the costly backdrop-filter blur on every .glass-card) before
           the user ever taps into them. Without this, the FIRST real tab
           switch to one of those sections pays that one-time compositing
           cost live, which is what shows up as a lag/jank. Kept off-screen
           and invisible so nothing is seen during warm-up. */
        .page-content.warmup {
            display: block !important;
            position: fixed !important;
            top: 0;
            left: -9999px;
            visibility: hidden;
            pointer-events: none;
            z-index: -1;
        }

        /* Page Specific Animations */
        #page-home.active { animation: animHomeIn 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
        #page-apps.active { animation: animAppsIn 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
        #page-updates.active { animation: animUpdatesIn 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
        #page-profile.active { animation: animProfileIn 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
        #page-app-details.active { animation: fadeIn 0.4s ease forwards; }

        /* Staggered Block Animations */
        @keyframes blockSlideUp {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }
        .page-content.active > * {
            animation: blockSlideUp 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
        }
        .page-content.active > *:nth-child(1) { animation-delay: 0.05s; }
        .page-content.active > *:nth-child(2) { animation-delay: 0.10s; }
        .page-content.active > *:nth-child(3) { animation-delay: 0.15s; }
        .page-content.active > *:nth-child(4) { animation-delay: 0.20s; }
        .page-content.active > *:nth-child(n+5) { animation-delay: 0.25s; }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(12px); }
            to { opacity: 1; transform: translateY(0); }
        }

        @keyframes animHomeIn {
            from { opacity: 0; transform: scale(0.95) translateY(10px); }
            to { opacity: 1; transform: scale(1) translateY(0); }
        }

        @keyframes animAppsIn {
            from { opacity: 0; transform: translateX(30px); }
            to { opacity: 1; transform: translateX(0); }
        }

        @keyframes animUpdatesIn {
            from { opacity: 0; transform: translateY(30px); }
            to { opacity: 1; transform: translateY(0); }
        }

        @keyframes animProfileIn {
            from { opacity: 0; transform: perspective(500px) rotateX(-10deg) translateY(20px); }
            to { opacity: 1; transform: perspective(500px) rotateX(0deg) translateY(0); }
        }

        @keyframes bellRing {
            0% { transform: rotate(0); }
            20% { transform: rotate(15deg); }
            40% { transform: rotate(-15deg); }
            60% { transform: rotate(10deg); }
            80% { transform: rotate(-10deg); }
            100% { transform: rotate(0); }
        }
        .nav-item.updates-ringing svg {
            animation: bellRing 0.5s ease-in-out;
            transform-origin: top center;
        }

        /* ==================================================
           HEADER (TOP NAVIGATION)
           ================================================== */
        .top-header {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: var(--header-height);
            background: linear-gradient(180deg, rgba(10, 10, 10, 0.25) 0%, rgba(10, 10, 10, 0.05) 100%);
            backdrop-filter: blur(40px) saturate(200%);
            -webkit-backdrop-filter: blur(40px) saturate(200%);
            border-bottom: 1px solid rgba(255, 26, 26, 0.2);
            box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1), inset 0 -1px 0 rgba(255, 255, 255, 0.1);
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 20px;
            z-index: 1000;
            box-shadow: 0 4px 30px rgba(0, 0, 0, 0.8);
        }

        .header-brand {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .brand-logo {
            width: 32px;
            height: 32px;
            border-radius: 8px;
            object-fit: contain;
            border: 1px solid var(--border-red);
            box-shadow: 0 0 10px rgba(255, 26, 26, 0.2);
        }

        .brand-name {
            font-family: 'Outfit', 'Inter', sans-serif;
            font-size: 1.15rem;
            font-weight: 800;
            letter-spacing: 0.8px;
            text-transform: uppercase;
            background: linear-gradient(135deg, #ffffff 40%, #ff4d4d 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            text-shadow: 0 0 16px rgba(255, 26, 26, 0.4);
        }

        /* ==================================================
           BOTTOM NAVIGATION (PREMIUM GLOSSY GLASS DASHBOARD)
           ================================================== */
        .bottom-nav {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            width: 100%;
            max-width: 100%;
            height: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 0px));
            background: linear-gradient(180deg, rgba(16, 12, 14, 0.2) 0%, rgba(6, 6, 8, 0.05) 100%);
            backdrop-filter: blur(40px) saturate(220%);
            -webkit-backdrop-filter: blur(40px) saturate(220%);
            border-top: 1px solid rgba(255, 255, 255, 0.15);
            border-bottom: none;
            border-left: none;
            border-right: none;
            border-radius: 0;
            display: flex;
            align-items: flex-start;
            justify-content: center;
            padding: 6px 16px calc(6px + env(safe-area-inset-bottom, 0px));
            z-index: 1000;
            box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.2),
                        inset 0 2px 20px 0 rgba(255, 26, 26, 0.15),
                        0 -10px 40px rgba(0, 0, 0, 0.3),
                        0 -2px 16px rgba(255, 26, 26, 0.2);
            transform: none;
        }

        /* Subtle glossy reflection highlight line along top edge */
        .bottom-nav::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 1px;
            background: linear-gradient(90deg, 
                transparent 0%, 
                rgba(255, 255, 255, 0.25) 20%, 
                rgba(255, 50, 50, 0.65) 50%, 
                rgba(255, 255, 255, 0.25) 80%, 
                transparent 100%
            );
            pointer-events: none;
        }

        .nav-group {
            display: flex;
            align-items: center;
            justify-content: space-around;
            flex: 1;
            max-width: 320px;
            height: 52px;
        }

        .nav-group-left {
            margin-right: 24px;
        }

        .nav-group-right {
            margin-left: 24px;
        }

        .nav-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 3px;
            color: rgba(255, 255, 255, 0.45);
            cursor: pointer;
            width: 54px;
            height: 50px;
            border-radius: 14px;
            transition: color 0.25s cubic-bezier(0.4, 0, 0.2, 1), 
                        transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), 
                        background 0.25s ease;
            position: relative;
        }

        .nav-item:hover {
            color: rgba(255, 255, 255, 0.8);
        }

        .nav-item:active {
            transform: scale(0.92);
        }

        .nav-item svg {
            width: 22px;
            height: 22px;
            fill: none;
            transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), 
                        filter 0.25s ease, 
                        color 0.25s ease;
        }

        .nav-item span {
            font-size: 0.65rem;
            font-weight: 600;
            letter-spacing: 0.3px;
            transition: color 0.25s ease;
        }

        .nav-item.active {
            color: var(--neon-red);
            text-shadow: 0 0 10px rgba(255, 26, 26, 0.6);
        }

        .nav-item.active svg {
            filter: drop-shadow(0 0 8px rgba(255, 26, 26, 0.75));
            transform: translateY(-1px) scale(1.05);
        }

        /* TAB ICON ANIMATIONS */
        @keyframes homePop {
            0% { transform: scale(1); }
            40% { transform: scale(1.25) translateY(-3px); }
            70% { transform: scale(0.95) translateY(1px); }
            100% { transform: scale(1.05) translateY(-1px); }
        }
        
        .nav-item.active[data-icon="home"] svg {
            animation: homePop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
        }

        @keyframes appSq1 { 0% { transform: translate(0,0); } 40% { transform: translate(-3px, -3px); } 100% { transform: translate(0,0); } }
        @keyframes appSq2 { 0% { transform: translate(0,0); } 40% { transform: translate(3px, -3px); } 100% { transform: translate(0,0); } }
        @keyframes appSq3 { 0% { transform: translate(0,0); } 40% { transform: translate(3px, 3px); } 100% { transform: translate(0,0); } }
        @keyframes appSq4 { 0% { transform: translate(0,0); } 40% { transform: translate(-3px, 3px); } 100% { transform: translate(0,0); } }
        
        .nav-item.active[data-icon="apps"] .sq1 { animation: appSq1 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
        .nav-item.active[data-icon="apps"] .sq2 { animation: appSq2 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
        .nav-item.active[data-icon="apps"] .sq3 { animation: appSq3 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
        .nav-item.active[data-icon="apps"] .sq4 { animation: appSq4 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }

        @keyframes profileNod {
            0% { transform: rotate(0deg) scale(1); }
            30% { transform: rotate(-15deg) scale(1.15); }
            70% { transform: rotate(10deg) scale(1.1); }
            100% { transform: rotate(0deg) scale(1.05); }
        }
        
        .nav-item.active[data-icon="profile"] svg {
            animation: profileNod 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
        }

        /* FAB ICON ANIMATION */



        .nav-item.active::after {
            content: '';
            position: absolute;
            bottom: 2px;
            width: 12px;
            height: 3px;
            background: var(--neon-red);
            border-radius: 3px;
            box-shadow: 0 0 8px var(--neon-red);
        }

        /* ==================================================
           UI COMPONENTS (CARDS, BUTTONS, SECTIONS)
           ================================================== */
        .glass-card {
            background: var(--surface-color);
            backdrop-filter: var(--glass-blur);
            -webkit-backdrop-filter: var(--glass-blur);
            border: 1px solid var(--border-light);
            border-radius: 20px;
            padding: 24px;
            margin-bottom: 24px;
            transition: transform var(--transition-speed), border-color var(--transition-speed);
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
        }

        .glass-card:hover {
            border-color: var(--border-red);
            transform: translateY(-2px);
        }
        
        .clickable-card {
            cursor: pointer;
        }
        
        .clickable-card:active {
            transform: scale(0.98);
        }

        .section-title {
            font-size: 1.4rem;
            font-weight: 700;
            margin: 40px 0 20px;
            display: flex;
            align-items: center;
            gap: 12px;
            letter-spacing: -0.5px;
        }

        .section-title::before {
            content: '';
            display: block;
            width: 4px;
            height: 24px;
            background: var(--neon-red);
            border-radius: 4px;
            box-shadow: 0 0 10px var(--neon-red);
        }

        .primary-btn {
            background: linear-gradient(135deg, var(--accent-red), #990000);
            color: white;
            border: 1px solid var(--neon-red);
            padding: 14px 28px;
            border-radius: 14px;
            font-size: 1.05rem;
            font-weight: 600;
            cursor: pointer;
            transition: all var(--transition-speed);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            box-shadow: 0 4px 15px rgba(212, 0, 0, 0.3);
            text-align: center;
            width: 100%;
        }

        .primary-btn:hover {
            background: linear-gradient(135deg, var(--neon-red), var(--accent-red));
            box-shadow: 0 6px 20px rgba(255, 26, 26, 0.5);
            transform: translateY(-2px);
        }
        
        .primary-btn:active {
            transform: translateY(1px);
        }

        /* ==================================================
           AI ASSISTANT — FLOATING ACTION BUTTON (Home page only)
           ================================================== */
        .ai-fab {
            position: fixed;
            right: 20px;
            bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 0px) + 16px);
            width: 56px;
            height: 56px;
            border-radius: 50%;
            border: 1px solid var(--neon-red);
            background: linear-gradient(135deg, var(--neon-red), var(--accent-red) 65%, #7a0000);
            color: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            z-index: 998;
            box-shadow: 0 6px 20px rgba(255, 26, 26, 0.45), 0 2px 8px rgba(0, 0, 0, 0.5);
            transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow var(--transition-speed), opacity 0.25s ease, visibility 0.25s ease;
            opacity: 0;
            visibility: hidden;
            transform: scale(0.6);
            pointer-events: none;
        }

        /* Shown only while Home tab is active — toggled via JS (body.ai-fab-active) */
        body.ai-fab-active .ai-fab {
            opacity: 1;
            visibility: visible;
            transform: scale(1);
            pointer-events: auto;
        }

        /* Hidden while the chat itself is open, so it never peeks through.
           No opacity/scale animation of its own — the slide-in overlay
           (below) is fully opaque and simply covers/uncovers it, so the
           button looks exactly as it always does, with no separate
           fade-in "pop" of its own when the chat closes. */
        body.ai-chat-open .ai-fab {
            visibility: hidden;
            pointer-events: none;
        }

        .ai-fab:active {
            transform: scale(0.9);
        }

        .ai-fab-icon {
            position: relative;
            z-index: 2;
        }

        .ai-fab-pulse {
            position: absolute;
            inset: 0;
            border-radius: 50%;
            border: 2px solid var(--neon-red);
            animation: aiFabPulse 2.4s ease-out infinite;
            pointer-events: none;
        }

        @keyframes aiFabPulse {
            0% { transform: scale(1); opacity: 0.6; }
            70% { transform: scale(1.55); opacity: 0; }
            100% { transform: scale(1.55); opacity: 0; }
        }

        /* ==================================================
           AI ASSISTANT — FULL-SCREEN CHAT OVERLAY
           Simple, standard mobile "push" navigation: the AI page slides
           in from the right over the Home page (which stays put,
           untouched, underneath) and slides back out to the right when
           closing. No clip-path/coordinate math — just a transform, which
           is far less prone to edge-case rendering glitches.
           ================================================== */
        .ai-chat-overlay {
            position: fixed;
            inset: 0;
            z-index: 98000;
            background: var(--bg-color);
            visibility: hidden;
            transform: translateX(100%);
            transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0.38s;
        }

        .ai-chat-overlay.active {
            visibility: visible;
            transform: translateX(0);
            transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0s;
        }

        .ai-chat-sheet {
            position: relative;
            width: 100%;
            height: 100%;
            display: flex;
            flex-direction: column;
        }

        .ai-chat-header {
            flex-shrink: 0;
            display: flex;
            align-items: center;
            gap: 12px;
            padding: calc(14px + env(safe-area-inset-top, 0px)) 16px 14px;
            background: linear-gradient(180deg, rgba(212, 0, 0, 0.16) 0%, rgba(5, 5, 5, 0) 100%);
            border-bottom: 1px solid var(--border-light);
        }

        .ai-chat-icon-btn {
            width: 38px;
            height: 38px;
            border-radius: 50%;
            border: 1px solid var(--border-light);
            background: var(--surface-light);
            color: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            flex-shrink: 0;
            transition: all var(--transition-speed);
        }

        .ai-chat-icon-btn:hover {
            border-color: var(--neon-red);
            color: var(--neon-red);
        }

        .ai-chat-icon-btn:active {
            transform: scale(0.92);
        }

        .ai-chat-title-block {
            flex: 1;
            min-width: 0;
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .ai-chat-title {
            font-weight: 700;
            font-size: 1.05rem;
            color: #fff;
        }

        .ai-chat-subtitle {
            font-size: 0.72rem;
            color: var(--text-secondary);
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .ai-status-dot {
            width: 7px;
            height: 7px;
            border-radius: 50%;
            background: #2ecc71;
            box-shadow: 0 0 6px #2ecc71;
            flex-shrink: 0;
        }

        .ai-chat-messages {
            flex: 1;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            padding: 20px 16px;
            display: flex;
            flex-direction: column;
            gap: 14px;
        }

        .ai-msg-row {
            display: flex;
            width: 100%;
            animation: blockSlideUp 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
        }

        .ai-msg-row.user { justify-content: flex-end; }
        .ai-msg-row.bot { justify-content: flex-start; }

        .ai-msg-bubble {
            max-width: 82%;
            padding: 12px 16px;
            border-radius: 18px;
            font-size: 0.92rem;
            line-height: 1.5;
            white-space: pre-wrap;
            word-wrap: break-word;
        }

        .ai-msg-row.user .ai-msg-bubble {
            background: linear-gradient(135deg, var(--neon-red), var(--accent-red));
            color: #fff;
            border-bottom-right-radius: 4px;
            box-shadow: 0 4px 14px rgba(255, 26, 26, 0.3);
        }

        .ai-msg-row.bot .ai-msg-bubble {
            background: var(--surface-color);
            backdrop-filter: var(--glass-blur);
            -webkit-backdrop-filter: var(--glass-blur);
            border: 1px solid var(--border-light);
            color: var(--text-main);
            border-bottom-left-radius: 4px;
        }

        .ai-typing-bubble {
            display: flex;
            align-items: center;
            gap: 5px;
            padding: 14px 18px;
        }

        .ai-typing-bubble span {
            width: 7px;
            height: 7px;
            border-radius: 50%;
            background: var(--neon-red);
            opacity: 0.6;
            animation: aiTypingBounce 1.1s ease-in-out infinite;
        }

        .ai-typing-bubble span:nth-child(2) { animation-delay: 0.15s; }
        .ai-typing-bubble span:nth-child(3) { animation-delay: 0.3s; }

        @keyframes aiTypingBounce {
            0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
            30% { transform: translateY(-5px); opacity: 1; }
        }

        /* Rich-media inline app recommendation card */
        .ai-app-card {
            display: flex;
            align-items: center;
            gap: 12px;
            background: var(--surface-color);
            backdrop-filter: var(--glass-blur);
            -webkit-backdrop-filter: var(--glass-blur);
            border: 1px solid var(--border-red);
            border-radius: 16px;
            padding: 14px;
            margin-top: 4px;
        }

        .ai-app-card img {
            width: 52px;
            height: 52px;
            border-radius: 14px;
            object-fit: cover;
            background: #111;
            border: 1px solid var(--border-light);
            flex-shrink: 0;
        }

        .ai-app-card-info {
            flex: 1;
            min-width: 0;
        }

        .ai-app-card-info h4 {
            font-size: 0.95rem;
            color: #fff;
            margin-bottom: 2px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .ai-app-card-info span {
            font-size: 0.72rem;
            color: var(--neon-red);
            font-weight: 600;
        }

        .ai-app-card-cta {
            flex-shrink: 0;
            background: linear-gradient(135deg, var(--accent-red), #990000);
            color: #fff;
            border: 1px solid var(--neon-red);
            padding: 9px 14px;
            border-radius: 10px;
            font-size: 0.8rem;
            font-weight: 600;
            cursor: pointer;
            transition: all var(--transition-speed);
        }

        .ai-app-card-cta:hover {
            background: linear-gradient(135deg, var(--neon-red), var(--accent-red));
        }

        .ai-chat-input-bar {
            flex-shrink: 0;
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
            border-top: 1px solid var(--border-light);
            background: rgba(10, 10, 10, 0.6);
        }

        .ai-chat-input-bar input {
            flex: 1;
            background: var(--surface-light);
            border: 1px solid var(--border-light);
            color: #fff;
            padding: 12px 16px;
            border-radius: 24px;
            font-size: 0.92rem;
            font-family: inherit;
            outline: none;
            transition: border-color var(--transition-speed);
        }

        .ai-chat-input-bar input:focus {
            border-color: var(--neon-red);
        }

        .ai-chat-send-btn {
            width: 42px;
            height: 42px;
            border-radius: 50%;
            border: 1px solid var(--neon-red);
            background: linear-gradient(135deg, var(--neon-red), var(--accent-red));
            color: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            flex-shrink: 0;
            transition: all var(--transition-speed);
        }

        .ai-chat-send-btn:hover {
            box-shadow: 0 4px 14px rgba(255, 26, 26, 0.5);
        }

        .ai-chat-send-btn:active {
            transform: scale(0.9);
        }

        .ai-chat-send-btn:disabled {
            opacity: 0.4;
            cursor: not-allowed;
        }

        .ai-chat-input-bar.ai-input-hidden {
            display: none;
        }

        /* Small red-themed badge shown next to each bot question, unique
           per step (name / email / phone / budget / etc.) */
        .ai-msg-row.bot {
            align-items: flex-end;
            gap: 8px;
        }

        .ai-step-icon {
            width: 30px;
            height: 30px;
            border-radius: 50%;
            background: linear-gradient(135deg, rgba(255, 26, 26, 0.2), rgba(212, 0, 0, 0.08));
            border: 1px solid var(--border-red);
            color: var(--neon-red);
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .ai-icon-glyph {
            font-size: 0.9rem;
            font-weight: 800;
            font-family: 'Outfit', 'Inter', sans-serif;
        }

        /* Quick-reply option chips (project type, yes/no, skip) */
        .ai-quickreplies-row {
            padding-left: 38px;
        }

        .ai-quickreplies {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            max-width: 100%;
        }

        .ai-quick-btn {
            background: var(--surface-light);
            border: 1px solid var(--border-red);
            color: #fff;
            padding: 9px 15px;
            border-radius: 20px;
            font-size: 0.85rem;
            font-weight: 600;
            font-family: inherit;
            cursor: pointer;
            transition: all var(--transition-speed);
        }

        .ai-quick-btn:hover:not(:disabled) {
            background: linear-gradient(135deg, var(--neon-red), var(--accent-red));
            border-color: var(--neon-red);
            box-shadow: 0 4px 14px rgba(255, 26, 26, 0.35);
        }

        .ai-quick-btn:disabled {
            opacity: 0.4;
            cursor: not-allowed;
        }

        .ai-quick-btn-primary {
            background: linear-gradient(135deg, var(--neon-red), var(--accent-red));
            border-color: var(--neon-red);
        }

        /* Rupee badge shown inline before the budget answer once sent */
        .ai-inline-rupee {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 18px;
            height: 18px;
            border-radius: 50%;
            background: #fff;
            color: var(--neon-red);
            font-size: 0.7rem;
            font-weight: 800;
            margin-right: 6px;
            vertical-align: middle;
            box-shadow: 0 0 8px rgba(255, 26, 26, 0.5);
        }

        /* Final summary card shown before "Send this enquiry?" */
        .ai-summary-card {
            background: var(--surface-color);
            backdrop-filter: var(--glass-blur);
            -webkit-backdrop-filter: var(--glass-blur);
            border: 1px solid var(--border-red);
            border-radius: 14px;
            padding: 14px 16px;
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .ai-summary-row {
            display: flex;
            justify-content: space-between;
            align-items: baseline;
            gap: 10px;
            font-size: 0.85rem;
            border-bottom: 1px solid var(--border-light);
            padding-bottom: 7px;
        }

        .ai-summary-row:last-child {
            border-bottom: none;
            padding-bottom: 0;
        }

        .ai-summary-row span {
            color: var(--text-secondary);
            flex-shrink: 0;
        }

        .ai-summary-row strong {
            color: #fff;
            text-align: right;
            font-weight: 700;
        }

        .ai-summary-row.full {
            flex-direction: column;
            gap: 4px;
        }

        .ai-summary-row.full p {
            color: #fff;
            margin: 0;
            line-height: 1.5;
            font-size: 0.85rem;
        }

        @media (min-width: 700px) {
            .ai-chat-sheet {
                max-width: 480px;
                margin: 0 auto;
                border-left: 1px solid var(--border-light);
                border-right: 1px solid var(--border-light);
            }
        }

        /* ==================================================
           HOME PAGE & SPIDER-MAN PROMO
           ================================================== */
        #page-home {
            padding-top: 15px;
        }

        /* Spider-Man Promo Section */
        .promo-container {
            background: rgba(12, 12, 12, 0.7);
            border: 1px solid var(--border-red);
            border-radius: 24px;
            overflow: hidden;
            box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8), 0 0 25px rgba(255, 26, 26, 0.15);
            margin-bottom: 30px;
        }

        .promo-image-wrapper {
            width: 100%;
            position: relative;
            background: #000;
        }

        .promo-image-wrapper img {
            width: 100%;
            height: auto;
            display: block;
            object-fit: contain;
            border-bottom: 1px solid rgba(255, 26, 26, 0.2);
        }

        .promo-content {
            padding: 35px 25px;
            text-align: center;
        }

        .promo-title {
            font-size: 1.8rem;
            font-weight: 800;
            margin-bottom: 8px;
            color: #fff;
            letter-spacing: -0.5px;
        }

        .promo-subtitle {
            font-size: 1.15rem;
            color: var(--neon-red);
            font-weight: 600;
            margin-bottom: 16px;
        }

        .promo-desc {
            color: var(--text-secondary);
            font-size: 1rem;
            line-height: 1.6;
            margin-bottom: 28px;
            max-width: 600px;
            margin-left: auto;
            margin-right: auto;
        }

        /* ==================================================
           APP DETAILS PAGE
           ================================================== */
        .back-btn {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            color: var(--text-secondary);
            font-weight: 600;
            font-size: 1rem;
            cursor: pointer;
            margin-bottom: 24px;
            transition: color var(--transition-speed);
            background: transparent;
            border: none;
            padding: 5px 0;
        }

        .back-btn:hover {
            color: #fff;
        }
        
        .back-btn svg {
            transition: transform var(--transition-speed);
        }
        
        .back-btn:hover svg {
            transform: translateX(-4px);
        }

        .app-header-detailed {
            display: flex;
            align-items: flex-start;
            gap: 20px;
            margin-bottom: 24px;
        }

        .app-logo-large {
            width: 90px;
            height: 90px;
            border-radius: 20px;
            border: 1px solid var(--border-light);
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
            object-fit: cover;
            background: #111;
            flex-shrink: 0;
        }

        .app-title-large {
            font-size: 1.6rem;
            font-weight: 800;
            margin-bottom: 6px;
            line-height: 1.2;
            color: #fff;
        }

        .app-category {
            font-size: 0.95rem;
            color: var(--neon-red);
            font-weight: 600;
            margin-bottom: 4px;
        }

        .app-stats-row {
            display: flex;
            justify-content: space-around;
            align-items: center;
            background: var(--surface-light);
            border-top: 1px solid var(--border-light);
            border-bottom: 1px solid var(--border-light);
            padding: 16px 0;
            margin-bottom: 24px;
        }

        .app-stat-item {
            text-align: center;
            flex: 1;
        }
        
        .app-stat-divider {
            width: 1px;
            height: 30px;
            background: var(--border-light);
        }

        .app-stat-value {
            font-size: 1.1rem;
            font-weight: 700;
            color: #fff;
            margin-bottom: 2px;
        }

        .app-stat-label {
            font-size: 0.75rem;
            color: var(--text-secondary);
            font-weight: 500;
        }

        /* Screenshot Carousel */
        .screenshot-gallery {
            margin: 30px 0;
        }
        
        .carousel-track {
            display: flex;
            gap: 16px;
            overflow-x: auto;
            scroll-snap-type: x mandatory;
            padding-bottom: 15px;
            -ms-overflow-style: none; /* IE and Edge */
            scrollbar-width: none; /* Firefox */
        }
        
        .carousel-track::-webkit-scrollbar {
            display: none; /* Chrome, Safari, Opera */
        }

        .carousel-image {
            height: 360px;
            width: auto;
            border-radius: 16px;
            border: 1px solid var(--border-light);
            scroll-snap-align: center;
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
            flex-shrink: 0;
            object-fit: cover;
            background: #111;
            cursor: pointer; /* Indicates it can be clicked */
            transition: transform var(--transition-speed);
        }
        
        .carousel-image:active {
            transform: scale(0.98);
        }

        .carousel-pagination {
            display: flex;
            justify-content: center;
            gap: 8px;
            margin-top: 10px;
        }

        .carousel-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: var(--border-light);
            transition: all var(--transition-speed);
        }

        .carousel-dot.active {
            background: var(--neon-red);
            box-shadow: 0 0 8px var(--neon-red);
            width: 20px;
            border-radius: 4px;
        }

        .info-block {
            margin-bottom: 30px;
        }
        
        .info-block-title {
            font-size: 1.2rem;
            font-weight: 700;
            margin-bottom: 12px;
            color: #fff;
        }
        
        .info-block-text {
            color: var(--text-secondary);
            font-size: 0.95rem;
            line-height: 1.7;
        }

        .google-play-section {
            display: flex;
            align-items: flex-start;
            gap: 16px;
        }

        .google-play-icon {
            background: rgba(255, 255, 255, 0.05);
            padding: 14px;
            border-radius: 16px;
            flex-shrink: 0;
            color: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        /* ==================================================
           FULL-SCREEN IMAGE VIEWER (LIGHTBOX)
           ================================================== */
        .image-viewer-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.96);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            z-index: 100000;
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.3s ease, visibility 0.3s ease;
        }

        .image-viewer-overlay.active {
            opacity: 1;
            visibility: visible;
        }

        .viewer-top-bar {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            padding: 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            z-index: 2;
            background: linear-gradient(to bottom, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
        }

        .viewer-close-btn {
            background: transparent;
            border: none;
            color: #fff;
            font-size: 1.1rem;
            font-weight: 600;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 10px;
            transition: color var(--transition-speed);
            font-family: inherit;
        }

        .viewer-close-btn:hover {
            color: var(--neon-red);
        }

        .viewer-counter {
            color: #d0d0d0;
            font-size: 1rem;
            font-weight: 600;
            letter-spacing: 1px;
            padding-right: 10px;
        }

        .viewer-image-container {
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }

        .viewer-img {
            max-width: 95%;
            max-height: 90vh;
            object-fit: contain;
            user-select: none;
            transition: transform 0.2s ease-out;
            box-shadow: 0 10px 40px rgba(0,0,0,0.8);
        }

        .viewer-nav-btn {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            background: rgba(25, 25, 25, 0.6);
            border: 1px solid rgba(255, 255, 255, 0.1);
            color: #fff;
            width: 50px;
            height: 50px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            z-index: 2;
            transition: all var(--transition-speed);
        }

        .viewer-nav-btn:hover {
            background: rgba(255, 26, 26, 0.4);
            border-color: var(--neon-red);
        }

        .viewer-nav-btn:disabled {
            opacity: 0.2;
            cursor: not-allowed;
        }

        .viewer-nav-prev {
            left: 20px;
        }

        .viewer-nav-next {
            right: 20px;
        }

        /* Hide arrow buttons on small screens, users will swipe */
        @media (max-width: 768px) {
            .viewer-nav-btn {
                display: none;
            }
            .viewer-img {
                max-width: 100%;
            }
        }

        /* ==================================================
           PREMIUM PROFILE SECTION REDESIGN
           ================================================== */
        .profile-hero {
            text-align: center;
            padding: 20px 10px 40px;
            position: relative;
        }

        .profile-hero::after {
            content: '';
            position: absolute;
            top: 50px;
            left: 50%;
            transform: translateX(-50%);
            width: 150px;
            height: 150px;
            background: var(--accent-red);
            filter: blur(100px);
            opacity: 0.3;
            z-index: -1;
        }

        .profile-logo-wrapper {
            position: relative;
            display: inline-block;
            margin-bottom: 20px;
        }

        .profile-logo {
            width: 120px;
            height: 120px;
            border-radius: 30px;
            border: 2px solid rgba(255, 26, 26, 0.4);
            box-shadow: 0 0 50px rgba(212, 0, 0, 0.3);
            object-fit: contain;
            background: #000;
        }

        .profile-title {
            font-size: 2.5rem;
            font-weight: 800;
            margin-bottom: 8px;
            letter-spacing: -1px;
            background: linear-gradient(135deg, #ffffff, #c0c0c0);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .profile-tagline {
            color: var(--neon-red);
            font-weight: 600;
            font-size: 1.05rem;
            margin-bottom: 8px;
            letter-spacing: 1.5px;
            text-transform: uppercase;
        }

        .profile-vision-tag {
            font-size: 1.1rem;
            color: #e0e0e0;
            font-weight: 500;
            margin-top: 5px;
        }

        .premium-text {
            font-size: 1.05rem;
            color: var(--text-secondary);
            line-height: 1.8;
            margin-bottom: 20px;
        }
        
        .premium-text:last-child {
            margin-bottom: 0;
        }

        /* Our Focus Grid */
        .focus-grid {
            display: grid;
            grid-template-columns: 1fr;
            gap: 16px;
        }

        @media (min-width: 600px) {
            .focus-grid {
                grid-template-columns: 1fr 1fr;
            }
        }

        .focus-card {
            background: var(--surface-light);
            border: 1px solid var(--border-light);
            border-radius: 16px;
            padding: 24px;
            transition: all var(--transition-speed);
        }

        .focus-card:hover {
            background: rgba(255, 26, 26, 0.05);
            border-color: var(--border-red);
            transform: translateY(-3px);
        }

        .focus-icon-wrapper {
            width: 48px;
            height: 48px;
            background: rgba(255, 26, 26, 0.1);
            border: 1px solid var(--border-red);
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 16px;
            color: var(--neon-red);
        }

        .focus-title {
            font-size: 1.15rem;
            font-weight: 700;
            color: #fff;
            margin-bottom: 8px;
        }

        .focus-desc {
            font-size: 0.9rem;
            color: var(--text-secondary);
            line-height: 1.6;
        }

        /* Feature List (Why NRK) */
        .feature-list {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .feature-item {
            display: flex;
            align-items: center;
            gap: 16px;
            background: var(--surface-light);
            border: 1px solid var(--border-light);
            padding: 16px 20px;
            border-radius: 12px;
            font-weight: 500;
            color: #e0e0e0;
            transition: all var(--transition-speed);
        }

        .feature-item:hover {
            border-color: var(--border-red);
            background: rgba(255, 26, 26, 0.03);
            transform: translateX(5px);
        }

        .feature-icon {
            color: var(--neon-red);
            display: flex;
            align-items: center;
            justify-content: center;
        }

        /* Contact Cards */
        .contact-card {
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: var(--surface-light);
            border: 1px solid var(--border-light);
            padding: 20px 24px;
            border-radius: 16px;
            margin-bottom: 16px;
            transition: all var(--transition-speed);
            flex-wrap: wrap;
            gap: 16px;
        }

        .contact-card:hover {
            border-color: var(--border-red);
            background: rgba(20, 20, 20, 0.8);
        }

        .contact-info {
            min-width: 0;
            flex: 1;
        }

        .contact-info p:first-child {
            font-size: 0.85rem;
            color: var(--text-secondary);
            margin-bottom: 4px;
            text-transform: uppercase;
            letter-spacing: 1px;
            font-weight: 600;
        }

        .contact-info p:last-child {
            font-weight: 700;
            font-size: 1.1rem;
            color: #fff;
            letter-spacing: 0.5px;
            word-break: break-word;
        }

        /* ==================================================
           APPS & UPDATES (Empty States)
           ================================================== */
        .empty-state {
            text-align: center;
            padding: 60px 20px;
            color: var(--text-secondary);
            background: var(--surface-light);
            border: 1px dashed var(--border-light);
            border-radius: 20px;
            font-size: 1.1rem;
            font-weight: 500;
        }
        
        .hero-headline {
            font-size: 1.4rem;
            font-weight: 700;
            margin-bottom: 16px;
            color: #f0f0f0;
        }

        .hero-desc {
            color: var(--text-secondary);
            font-size: 1rem;
            max-width: 650px;
            margin: 0 auto;
            line-height: 1.7;
        }

        /* Footer */
        .footer {
            text-align: center;
            padding: 40px 20px 80px;
            color: var(--text-secondary);
        }

        .footer img {
            width: 48px;
            height: 48px;
            border-radius: 12px;
            margin-bottom: 16px;
            opacity: 0.6;
            filter: grayscale(100%);
            transition: opacity 0.3s;
        }
        
        .footer img:hover {
            opacity: 1;
            filter: grayscale(0%);
        }

        .footer p {
            font-size: 0.85rem;
            margin-bottom: 6px;
        }

        /* ==================================================
           TOAST NOTIFICATION
           ================================================== */
        .toast {
            position: fixed;
            top: 85px;
            left: 50%;
            transform: translateX(-50%) translateY(-20px);
            background: rgba(15, 15, 15, 0.95);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border: 1px solid var(--neon-red);
            color: white;
            padding: 14px 28px;
            border-radius: 30px;
            font-size: 0.95rem;
            font-weight: 600;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 20px rgba(255, 26, 26, 0.4);
            z-index: 999999;
            opacity: 0;
            visibility: hidden;
            transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .toast.show {
            opacity: 1;
            visibility: visible;
            transform: translateX(-50%) translateY(0);
        }

        /* ==================================================
           ADMIN PANEL & CMS MODALS STYLING
           ================================================== */
        .admin-modal-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.88);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            z-index: 100000;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        }

        .admin-modal-overlay.active {
            opacity: 1;
            visibility: visible;
        }

        .admin-modal-card {
            background: #0f111a;
            border: 1px solid rgba(255, 50, 50, 0.35);
            border-radius: 20px;
            padding: 28px;
            width: 100%;
            max-width: 440px;
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), 0 0 30px rgba(255, 26, 26, 0.2);
            transform: scale(0.92);
            transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        }

        .admin-modal-overlay.active .admin-modal-card {
            transform: scale(1);
        }

        .admin-modal-card.large {
            max-width: 720px;
            max-height: 90vh;
            overflow-y: auto;
        }

        .admin-modal-header {
            text-align: center;
            margin-bottom: 24px;
        }

        .admin-badge-icon {
            width: 52px;
            height: 52px;
            border-radius: 16px;
            background: rgba(255, 26, 26, 0.12);
            border: 1px solid rgba(255, 26, 26, 0.3);
            color: var(--neon-red);
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 14px;
        }

        .admin-badge-icon.red {
            background: rgba(220, 20, 20, 0.2);
            border-color: #ff3344;
            color: #ff3344;
        }

        .admin-modal-header h3 {
            font-size: 1.4rem;
            font-weight: 800;
            color: #fff;
            margin-bottom: 6px;
        }

        .admin-modal-header p {
            font-size: 0.88rem;
            color: var(--text-secondary);
        }

        .admin-alert-error {
            background: rgba(255, 30, 30, 0.15);
            border: 1px solid rgba(255, 30, 30, 0.4);
            border-radius: 12px;
            padding: 12px 16px;
            color: #ff4d4d;
            font-size: 0.88rem;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 18px;
        }

        .admin-field-group {
            display: flex;
            flex-direction: column;
            gap: 6px;
            margin-bottom: 16px;
        }

        .admin-field-group label {
            font-size: 0.82rem;
            font-weight: 700;
            color: #b0b6cc;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .admin-field-group input,
        .admin-field-group textarea,
        .admin-field-group select {
            background: #08090f;
            border: 1px solid rgba(255, 255, 255, 0.12);
            border-radius: 12px;
            padding: 12px 16px;
            color: #fff;
            font-family: inherit;
            font-size: 0.95rem;
            outline: none;
            transition: border-color 0.2s, box-shadow 0.2s;
        }

        .admin-field-group input:focus,
        .admin-field-group textarea:focus {
            border-color: var(--neon-red);
            box-shadow: 0 0 12px rgba(255, 26, 26, 0.3);
        }

        .admin-modal-actions {
            display: flex;
            gap: 12px;
            justify-content: flex-end;
            margin-top: 20px;
        }

        /* Fullscreen Admin Dashboard */
        .admin-dashboard-fullscreen {
            position: fixed;
            inset: 0;
            background: #07080e;
            z-index: 99990;
            display: flex;
            flex-direction: column;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.3s ease;
        }

        .admin-dashboard-fullscreen.active {
            opacity: 1;
            visibility: visible;
        }

        .admin-topbar {
            background: #0f111c;
            border-bottom: 1px solid rgba(255, 255, 255, 0.08);
            padding: 8px 18px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            flex-shrink: 0;
        }

        .admin-brand {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .admin-logo {
            width: 32px;
            height: 32px;
            border-radius: 8px;
            border: 1px solid var(--border-red);
            object-fit: cover;
        }

        .admin-app-title {
            font-size: 0.92rem;
            font-weight: 700;
            color: #fff;
            line-height: 1.2;
        }

        .admin-status-pill {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            font-size: 0.65rem;
            font-weight: 700;
            color: #10b981;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .live-dot {
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: #10b981;
            box-shadow: 0 0 6px #10b981;
        }

        .admin-top-actions {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .admin-top-actions .admin-btn-ghost,
        .admin-top-actions .admin-btn-danger {
            padding: 6px 12px;
            font-size: 0.8rem;
            border-radius: 8px;
        }

        .admin-body-layout {
            display: flex;
            flex: 1;
            overflow: hidden;
        }

        .admin-sidebar {
            width: 240px;
            background: #0a0b12;
            border-right: 1px solid rgba(255, 255, 255, 0.08);
            padding: 20px 14px;
            flex-shrink: 0;
            overflow-y: auto;
        }

        .admin-nav-menu {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .admin-nav-item {
            width: 100%;
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px 16px;
            border-radius: 12px;
            background: transparent;
            border: 0;
            color: #8f96b0;
            font-family: inherit;
            font-size: 0.92rem;
            font-weight: 600;
            cursor: pointer;
            text-align: left;
            transition: all 0.2s ease;
        }

        .admin-nav-item:hover {
            background: rgba(255, 255, 255, 0.05);
            color: #fff;
        }

        .admin-nav-item.active {
            background: rgba(255, 26, 26, 0.16);
            color: #ff3344;
            border-left: 3px solid #ff3344;
        }

        .admin-main-view {
            flex: 1;
            padding: 28px;
            overflow-y: auto;
            background: #07080e;
        }

        .admin-tab-view {
            display: none;
        }

        .admin-tab-view.active {
            display: block;
            animation: fadeInTab 0.3s ease;
        }

        @keyframes fadeInTab {
            from { opacity: 0; transform: translateY(6px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .admin-page-title-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            margin-bottom: 24px;
            flex-wrap: wrap;
        }

        .admin-page-title-row h2 {
            font-size: 1.6rem;
            font-weight: 800;
            color: #fff;
        }

        .admin-page-title-row p {
            font-size: 0.88rem;
            color: var(--text-secondary);
            margin-top: 4px;
        }

        .admin-stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
            gap: 18px;
            margin-bottom: 28px;
        }

        .admin-stat-card {
            background: #0f111c;
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 16px;
            padding: 20px;
            display: flex;
            align-items: center;
            gap: 16px;
        }

        .admin-stat-icon {
            width: 48px;
            height: 48px;
            border-radius: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .admin-stat-icon.red { background: rgba(255, 26, 26, 0.15); color: #ff3344; }
        .admin-stat-icon.purple { background: rgba(147, 51, 234, 0.15); color: #a855f7; }
        .admin-stat-icon.blue { background: rgba(14, 165, 233, 0.15); color: #38bdf8; }
        .admin-stat-icon.green { background: rgba(16, 185, 129, 0.15); color: #10b981; }

        .admin-stat-number {
            display: block;
            font-size: 1.5rem;
            font-weight: 800;
            color: #fff;
        }

        .admin-stat-label {
            font-size: 0.78rem;
            color: var(--text-secondary);
            font-weight: 600;
        }

        .admin-card-section, .admin-card-form {
            background: #0f111c;
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 18px;
            padding: 24px;
            margin-bottom: 24px;
        }

        .admin-card-section h3, .admin-card-form h3 {
            font-size: 1.15rem;
            font-weight: 700;
            color: #fff;
            margin-bottom: 16px;
        }

        .admin-quick-actions {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 14px;
        }

        .admin-quick-btn {
            background: #141726;
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 14px;
            padding: 16px;
            color: #fff;
            font-family: inherit;
            font-size: 0.9rem;
            font-weight: 600;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 10px;
            transition: all 0.2s ease;
        }

        .admin-quick-btn:hover {
            border-color: var(--neon-red);
            background: rgba(255, 26, 26, 0.1);
            transform: translateY(-2px);
        }

        .admin-form-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 16px;
        }

        .admin-field-group.full-width {
            grid-column: 1 / -1;
        }

        .admin-btn-primary {
            background: linear-gradient(135deg, #ff0033, #c40000);
            color: #fff;
            border: 0;
            padding: 12px 22px;
            border-radius: 12px;
            font-family: inherit;
            font-size: 0.92rem;
            font-weight: 700;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            box-shadow: 0 4px 15px rgba(255, 0, 50, 0.3);
            transition: all 0.2s ease;
        }

        .admin-btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(255, 0, 50, 0.45);
        }

        .admin-btn-secondary {
            background: #191c2b;
            color: #c5cbe0;
            border: 1px solid rgba(255, 255, 255, 0.12);
            padding: 12px 20px;
            border-radius: 12px;
            font-family: inherit;
            font-size: 0.92rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .admin-btn-secondary:hover {
            background: #22263a;
            color: #fff;
        }

        .admin-btn-ghost {
            background: transparent;
            color: #a0a8c2;
            border: 1px solid rgba(255, 255, 255, 0.12);
            padding: 9px 16px;
            border-radius: 10px;
            font-family: inherit;
            font-size: 0.85rem;
            font-weight: 600;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            transition: all 0.2s ease;
        }

        .admin-btn-ghost:hover {
            background: rgba(255, 255, 255, 0.08);
            color: #fff;
        }

        .admin-btn-danger {
            background: rgba(220, 20, 20, 0.18);
            border: 1px solid rgba(255, 50, 50, 0.4);
            color: #ff4d4d;
            padding: 9px 16px;
            border-radius: 10px;
            font-family: inherit;
            font-size: 0.85rem;
            font-weight: 700;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            transition: all 0.2s ease;
        }

        .admin-btn-danger:hover {
            background: #ff0033;
            color: #fff;
        }

        .admin-items-list {
            display: flex;
            flex-direction: column;
            gap: 14px;
        }

        .admin-item-row {
            background: #0f111c;
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 14px;
            padding: 16px 20px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
        }

        .admin-item-info {
            display: flex;
            align-items: center;
            gap: 14px;
        }

        .admin-item-thumb {
            width: 52px;
            height: 52px;
            border-radius: 12px;
            object-fit: cover;
            border: 1px solid rgba(255, 255, 255, 0.1);
            background: #000;
        }

        .admin-item-details h4 {
            font-size: 1.05rem;
            font-weight: 700;
            color: #fff;
            margin-bottom: 2px;
        }

        .admin-item-details p {
            font-size: 0.82rem;
            color: var(--text-secondary);
        }

        .admin-item-actions {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .admin-img-preview-box {
            margin-top: 8px;
            width: 100%;
            max-height: 180px;
            border-radius: 12px;
            overflow: hidden;
            background: #05050a;
            border: 1px solid rgba(255, 255, 255, 0.1);
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .admin-img-preview-box img {
            max-width: 100%;
            max-height: 180px;
            object-fit: contain;
        }

        .admin-img-preview-box.small {
            max-height: 80px;
            width: 80px;
        }

        .admin-img-preview-box.large {
            max-height: 320px;
        }

        .admin-form-actions {
            display: flex;
            justify-content: flex-end;
            margin-top: 20px;
        }

        /* Mobile adjustments for Admin Panel */
        @media (max-width: 768px) {
            .admin-body-layout {
                flex-direction: column;
            }

            .admin-sidebar {
                width: 100%;
                border-right: 0;
                border-bottom: 1px solid rgba(255, 255, 255, 0.08);
                padding: 10px 14px;
                overflow-x: auto;
            }

            .admin-nav-menu {
                flex-direction: row;
            }

            .admin-nav-item {
                white-space: nowrap;
                padding: 8px 14px;
                font-size: 0.85rem;
            }

            .admin-main-view {
                padding: 16px;
            }

            .admin-form-grid {
                grid-template-columns: 1fr;
            }

            .admin-topbar {
                padding: 6px 12px;
            }

            .admin-app-title {
                font-size: 0.85rem;
            }
        }
        /* ================= RESTRICTIONS FOR CUSTOMER PAGES ================= */
        body {
            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;
        }
        input, textarea, select {
            -webkit-user-select: auto;
            -moz-user-select: auto;
            -ms-user-select: auto;
            user-select: auto;
        }
        #admin-panel-overlay,
        #admin-login-modal,
        .admin-modal-overlay {
            -webkit-user-select: auto;
            -moz-user-select: auto;
            -ms-user-select: auto;
            user-select: auto;
        }
