/* Shared by the admin app, the login screen and the scanning station. */

@font-face { font-family: "Space Grotesk"; src: url("../vendor/fonts/space-grotesk.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Orbitron"; src: url("../vendor/fonts/orbitron.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }

@property --fx-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

:root {
    --fx-bg: #05060f;
    --fx-surface: rgba(16, 21, 46, .62);
    --fx-surface-strong: rgba(18, 24, 52, .92);
    --fx-line: rgba(130, 150, 255, .16);
    --fx-text: #eaf0ff;
    --fx-muted: #9aa8cc;
    --fx-cyan: #22e6ff;
    --fx-violet: #8b5cf6;
    --fx-magenta: #ff2fb3;
    --fx-green: #3dffa8;
    --fx-amber: #ffc53d;
    --fx-red: #ff4466;
    --fx-grad: linear-gradient(120deg, var(--fx-cyan), var(--fx-violet) 55%, var(--fx-magenta));
    --fx-display: "Orbitron", "Space Grotesk", system-ui, sans-serif;
    --fx-body: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
}

@view-transition { navigation: auto; }

html, body { min-height: 100%; }

body {
    margin: 0;
    background: var(--fx-bg);
    color: var(--fx-text);
    font-family: var(--fx-body);
}

/* Animated backdrop: aurora, perspective grid, and the particle canvas. */
.fx-backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }

.fx-aurora span {
    position: absolute;
    width: 55vmax;
    height: 55vmax;
    border-radius: 50%;
    filter: blur(90px);
    opacity: .28;
    animation: fx-drift 26s ease-in-out infinite alternate;
}
.fx-aurora span:nth-child(1) { background: var(--fx-violet); top: -25vmax; left: -15vmax; }
.fx-aurora span:nth-child(2) { background: var(--fx-cyan); bottom: -30vmax; right: -15vmax; opacity: .18; animation-duration: 32s; animation-delay: -8s; }
.fx-aurora span:nth-child(3) { background: var(--fx-magenta); top: 25%; left: 45%; width: 32vmax; height: 32vmax; opacity: .12; animation-duration: 38s; animation-delay: -14s; }

@keyframes fx-drift {
    to { transform: translate3d(9vmax, 6vmax, 0) scale(1.18); }
}

.fx-grid {
    position: absolute;
    left: -50%;
    right: -50%;
    bottom: -12%;
    height: 62%;
    background-image:
        linear-gradient(rgba(34, 230, 255, .14) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34, 230, 255, .14) 1px, transparent 1px);
    background-size: 64px 64px;
    transform: perspective(420px) rotateX(62deg);
    transform-origin: center top;
    mask-image: linear-gradient(to bottom, transparent, #000 45%, transparent);
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 45%, transparent);
    animation: fx-grid-flow 6s linear infinite;
}

@keyframes fx-grid-flow {
    to { background-position: 0 64px, 0 64px; }
}

#fxCanvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.fx-cursor-glow {
    position: fixed;
    left: 0;
    top: 0;
    width: 420px;
    height: 420px;
    margin: -210px 0 0 -210px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(34, 230, 255, .09), transparent 65%);
    pointer-events: none;
    z-index: 0;
    transform: translate(var(--cx, -999px), var(--cy, -999px));
}

.fx-gradient-text {
    background: var(--fx-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    background-size: 200% auto;
    animation: fx-shine 6s linear infinite;
}

@keyframes fx-shine {
    to { background-position: 200% center; }
}

.fx-logo { filter: drop-shadow(0 0 10px rgba(34, 230, 255, .55)); animation: fx-logo-pulse 3.2s ease-in-out infinite; }

@keyframes fx-logo-pulse {
    50% { filter: drop-shadow(0 0 20px rgba(139, 92, 246, .9)); }
}

/* Rotating holographic border. Works on any element with a dark fill. */
.fx-holo { position: relative; isolation: isolate; }
.fx-holo::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: conic-gradient(from var(--fx-angle), transparent 0 55%, var(--fx-cyan) 70%, var(--fx-violet) 82%, var(--fx-magenta) 92%, transparent);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: fx-spin 6s linear infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes fx-spin {
    to { --fx-angle: 360deg; }
}

/* Motion is decoration here, so it can be removed entirely. Settings > Animated
   effects decides whether a device's reduced-motion preference is followed. */
@media (prefers-reduced-motion: reduce) {
    html:not([data-fx="on"]) *,
    html:not([data-fx="on"]) *::before,
    html:not([data-fx="on"]) *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
    html:not([data-fx="on"]) #fxCanvas,
    html:not([data-fx="on"]) .fx-cursor-glow { display: none; }
}

/* CAPTCHA on public forms (app/Services/Captcha.php) */
.fx-captcha { margin: .4rem 0 .9rem; text-align: left; }
.fx-captcha-row { display: flex; align-items: center; gap: .5rem; }
.fx-captcha-row img { border-radius: 10px; border: 1px solid rgba(140, 160, 255, .25); background: #eef0fa; max-width: 100%; height: auto; }
.fx-captcha input[name="captcha"] { text-transform: uppercase; letter-spacing: .2em; max-width: 220px; }
.fx-captcha .cf-turnstile { min-height: 65px; }
