/* KnexPay Base — Futuristic Neon Transparent */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    background: var(--bg);
}

body {
    font-family: var(--font);
    color: var(--text);
    line-height: 1.5;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    max-width: 100vw;
    min-height: 100vh;
    min-height: 100dvh;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    overscroll-behavior: none;
    touch-action: manipulation;
    background: var(--bg);
}

/* ========================================
   BACKGROUND LAYERS
   ======================================== */

.bg-artwork {
    position: fixed;
    inset: 0;
    z-index: 0;
    background-image:
        radial-gradient(900px 600px at var(--fx-x) var(--fx-y), rgba(255,140,0,0.06), transparent 55%),
        var(--bg-url);
    background-size: cover;
    background-position: center;
    transform: scale(1.02);
    filter: saturate(1.1) brightness(0.75);
    transition: filter 0.5s ease;
}

.bg-grain {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.06;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='.45'/%3E%3C/svg%3E");
    mix-blend-mode: overlay;
}

.bg-focus {
    position: fixed;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background:
        radial-gradient(450px 340px at var(--fx-x) var(--fx-y),
            rgba(0,0,0,0.00),
            rgba(0,0,0,0.30) 60%,
            rgba(0,0,0,0.55) 100%
        );
    mix-blend-mode: multiply;
}

/* Landscape Warning */
@media screen and (orientation: landscape) and (max-height: 500px) {
    .app-container { display: none !important; }
    body::before {
        content: "Please rotate to portrait mode";
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        color: var(--text);
        padding: 24px 36px;
        border-radius: var(--radius-xl);
        border: 1px solid var(--stroke-light);
        background: var(--glass-strong);
        backdrop-filter: blur(var(--blur-strong));
        -webkit-backdrop-filter: blur(var(--blur-strong));
        font-family: var(--font);
        text-align: center;
        font-size: 16px;
        font-weight: 500;
        z-index: var(--z-toast);
        width: 80%;
        max-width: 400px;
    }
}

::selection { background: var(--neon); color: #000; }

::-webkit-scrollbar { width: 3px; height: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,215,0,0.2); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,215,0,0.35); }

a { color: var(--neon); text-decoration: none; transition: opacity var(--transition-fast); }
a:hover { opacity: 0.8; }

*:focus { outline: none; }
*:focus-visible {
    outline: 2px solid rgba(255,140,0,0.5);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* Utilities */
.text-neon { color: var(--neon); }
.text-cyan { color: var(--cyan); }
.text-magenta { color: var(--magenta); }
.text-yellow { color: var(--yellow); }
.text-red { color: var(--red); }
.text-dim { color: var(--text-dim); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-mono { font-family: var(--font-mono); }

.hidden { display: none !important; }
.visible { display: block !important; }
.flex { display: flex !important; }
.grid { display: grid !important; }

.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }

/* Glass utilities */
.glass {
    border-radius: var(--radius-xl);
    border: 1px solid var(--stroke-light);
    background: var(--glass);
    backdrop-filter: blur(var(--blur-med));
    -webkit-backdrop-filter: blur(var(--blur-med));
    box-shadow: var(--shadow-md);
}

.glass-strong {
    background: var(--glass-strong);
    backdrop-filter: blur(var(--blur-strong));
    -webkit-backdrop-filter: blur(var(--blur-strong));
    border-color: var(--stroke);
}

.glass-soft {
    background: var(--glass-soft);
    backdrop-filter: blur(var(--blur-soft));
    -webkit-backdrop-filter: blur(var(--blur-soft));
    border-color: var(--stroke-subtle);
}
