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

:root {
    --purple: #7C3AED;
    --accent: #A855F7;
    --pink: #EC4899;
    --dark-bg: #0B0C10;
    --dark-card: #161822;
    --dark-surface: #1A1A24;
    --light-bg: #FAFAFA;
    --light-card: #FFFFFF;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    overflow-x: hidden;
    transition: background .5s, color .5s;
}

/* ===== THEME ===== */
body.dark {
    background: var(--dark-bg);
    color: #f1f1f1;
}

body.light {
    background: var(--light-bg);
    color: #111;
}

/* ===== KEYFRAMES ===== */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(40px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

@keyframes fadeIn {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotateX(2deg)
    }

    50% {
        transform: translateY(-14px) rotateX(-2deg)
    }
}

@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(124, 58, 237, .25)
    }

    50% {
        box-shadow: 0 0 50px rgba(124, 58, 237, .5)
    }
}

@keyframes orbDrift1 {
    0% {
        transform: translate(0, 0) scale(1)
    }

    33% {
        transform: translate(100px, -80px) scale(1.1)
    }

    66% {
        transform: translate(-60px, -140px) scale(.9)
    }

    100% {
        transform: translate(0, 0) scale(1)
    }
}

@keyframes orbDrift2 {
    0% {
        transform: translate(0, 0)
    }

    50% {
        transform: translate(-120px, 80px) scale(1.15)
    }

    100% {
        transform: translate(0, 0)
    }
}

@keyframes orbDrift3 {
    0% {
        transform: translate(0, 0)
    }

    33% {
        transform: translate(60px, 90px)
    }

    66% {
        transform: translate(-80px, -50px)
    }

    100% {
        transform: translate(0, 0)
    }
}

@keyframes particleUp {
    0% {
        transform: translateY(0);
        opacity: 0
    }

    10% {
        opacity: .8
    }

    90% {
        opacity: .8
    }

    100% {
        transform: translateY(-100vh);
        opacity: 0
    }
}

@keyframes borderPulse {

    0%,
    100% {
        border-color: rgba(124, 58, 237, .2)
    }

    50% {
        border-color: rgba(168, 85, 247, .5)
    }
}

@keyframes logoIn {
    0% {
        opacity: 0;
        transform: translateY(-30px) scale(.7);
        filter: blur(12px)
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0)
    }
}

@keyframes typewriter {
    from {
        width: 0
    }

    to {
        width: 100%
    }
}

@keyframes blink {

    0%,
    100% {
        border-color: transparent
    }

    50% {
        border-color: var(--accent)
    }
}

@keyframes inputSlide {
    from {
        opacity: 0;
        transform: translateX(-20px)
    }

    to {
        opacity: 1;
        transform: translateX(0)
    }
}

@keyframes scaleUp {
    from {
        opacity: 0;
        transform: scale(.92)
    }

    to {
        opacity: 1;
        transform: scale(1)
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0
    }

    100% {
        background-position: 200% 0
    }
}

@keyframes card3D {
    0% {
        transform: perspective(1200px) rotateY(0deg) rotateX(0deg)
    }

    25% {
        transform: perspective(1200px) rotateY(4deg) rotateX(-2deg)
    }

    50% {
        transform: perspective(1200px) rotateY(0deg) rotateX(0deg)
    }

    75% {
        transform: perspective(1200px) rotateY(-4deg) rotateX(2deg)
    }

    100% {
        transform: perspective(1200px) rotateY(0deg) rotateX(0deg)
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%
    }

    50% {
        background-position: 100% 50%
    }

    100% {
        background-position: 0% 50%
    }
}

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: .6
    }

    100% {
        transform: scale(4);
        opacity: 0
    }
}

/* ===== LOGIN OVERLAY ===== */
#loginOverlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    padding: 24px 0;
    transition: opacity .6s cubic-bezier(.16, 1, .3, 1), visibility .6s;
}

@media (max-width: 768px) {
    #loginOverlay {
        align-items: flex-start;
        justify-content: center;
        padding: 40px 12px;
    }
}

@media (max-height: 720px) {
    #loginOverlay {
        align-items: flex-start;
        justify-content: center;
        padding: 30px 12px;
    }
}

#loginOverlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Login dark theme */
#loginOverlay.login-dark {
    background: radial-gradient(ellipse at 25% 15%, rgba(124, 58, 237, .18), transparent 55%),
        radial-gradient(ellipse at 75% 85%, rgba(168, 85, 247, .12), transparent 55%), #0B0C10;
}

#loginOverlay.login-dark .login-logo {
    color: #fff;
}

#loginOverlay.login-dark .login-card {
    background: rgba(255, 255, 255, .03);
    border-color: rgba(255, 255, 255, .08);
}

#loginOverlay.login-dark .login-input {
    background: rgba(255, 255, 255, .05);
    border-color: rgba(255, 255, 255, .08);
    color: #fff;
}

#loginOverlay.login-dark .login-input::placeholder {
    color: #555;
}

#loginOverlay.login-dark .login-label {
    color: #666;
}

#loginOverlay.login-dark .login-tab-inactive {
    color: #555;
}

#loginOverlay.login-dark .login-footer-text {
    color: #444;
}

/* Login light theme */
#loginOverlay.login-light {
    background: radial-gradient(ellipse at 25% 15%, rgba(124, 58, 237, .08), transparent 55%),
        radial-gradient(ellipse at 75% 85%, rgba(168, 85, 247, .06), transparent 55%), #F8F7FF;
}

#loginOverlay.login-light .login-logo {
    color: #111;
}

#loginOverlay.login-light .login-card {
    background: rgba(255, 255, 255, .85);
    border-color: rgba(0, 0, 0, .08);
    box-shadow: 0 32px 64px rgba(0, 0, 0, .08);
}

#loginOverlay.login-light .login-input {
    background: rgba(0, 0, 0, .03);
    border-color: rgba(0, 0, 0, .08);
    color: #111;
}

#loginOverlay.login-light .login-input::placeholder {
    color: #aaa;
}

#loginOverlay.login-light .login-input:focus {
    border-color: var(--purple);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, .1);
}

#loginOverlay.login-light .login-label {
    color: #888;
}

#loginOverlay.login-light .login-tab-inactive {
    color: #999;
}

#loginOverlay.login-light .login-footer-text {
    color: #bbb;
}

#loginOverlay.login-light .login-orb {
    opacity: .15;
}

#loginOverlay.login-light .login-particle {
    background: rgba(124, 58, 237, .3);
}

.login-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: .35;
    pointer-events: none;
}

.login-particle {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(168, 85, 247, .5);
    pointer-events: none;
}

.login-card {
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border-radius: 28px;
    padding: 36px;
    border: 1px solid rgba(255, 255, 255, .08);
    animation: borderPulse 3s ease-in-out infinite, scaleUp .7s cubic-bezier(.16, 1, .3, 1) .3s both;
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: conic-gradient(from 0deg, transparent, rgba(124, 58, 237, .08), transparent, rgba(168, 85, 247, .06), transparent);
    border-radius: inherit;
    z-index: -1;
    animation: gradientShift 6s ease infinite;
    background-size: 200% 200%;
}

.login-input {
    width: 100%;
    padding: 14px 20px;
    border-radius: 16px;
    border: 1px solid;
    outline: none;
    transition: all .3s;
    font-size: 14px;
}

.login-input:focus {
    border-color: var(--purple) !important;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, .12), 0 0 24px rgba(124, 58, 237, .08);
}

.login-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .15em;
    margin-bottom: 8px;
}

.typewriter {
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid var(--accent);
    animation: typewriter 2s steps(30) .8s both, blink .7s step-end infinite 2.8s;
}

.login-theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 250;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .3s;
    background: rgba(255, 255, 255, .05);
}

.login-theme-toggle:hover {
    transform: scale(1.1);
    background: rgba(124, 58, 237, .15);
}

/* ===== NAVBAR ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    transition: background 0.3s, backdrop-filter 0.3s, border-color 0.3s, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border-bottom: 1px solid transparent;
}

.navbar.nav-hidden {
    transform: translateY(-100%);
}

body.dark .navbar {
    background: transparent;
}

body.light .navbar {
    background: transparent;
}

.navbar.scrolled {
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
}

body.dark .navbar.scrolled {
    background: rgba(11, 12, 16, 0.72) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

body.light .navbar.scrolled {
    background: rgba(255, 255, 255, 0.75) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-link {
    position: relative;
    font-size: 14px;
    font-weight: 500;
    transition: color .3s;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--purple), var(--accent));
    transition: width .3s;
    border-radius: 2px;
}

.nav-link:hover::after {
    width: 100%;
}

body.dark .nav-link {
    color: #888;
}

body.dark .nav-link:hover {
    color: var(--purple);
}

body.light .nav-link {
    color: #666;
}

body.light .nav-link:hover {
    color: var(--purple);
}

/* ===== CARDS & SURFACES ===== */
.surface {
    border-radius: 24px;
    transition: all .5s;
}

body.dark .surface {
    background: var(--dark-card);
    border: 1px solid rgba(255, 255, 255, .06);
}

body.light .surface {
    background: var(--light-card);
    border: 1px solid rgba(0, 0, 0, .06);
    box-shadow: 0 4px 24px rgba(0, 0, 0, .04);
}

.surface-muted {
    border-radius: 20px;
}

body.dark .surface-muted {
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .04);
}

body.light .surface-muted {
    background: #f5f5f5;
    border: 1px solid rgba(0, 0, 0, .04);
}

/* ===== TAGX CARD (matches reference image) ===== */
.tagx-card {
    width: 100%;
    max-width: 520px;
    aspect-ratio: 1.6/1;
    border-radius: 18px;
    overflow: hidden;
    transform-style: preserve-3d;
    animation: card3D 8s ease-in-out infinite, cardNeonAura 5s ease-in-out infinite alternate;
    transition: transform .15s ease;
    container-type: inline-size;
}

@keyframes cardNeonAura {
    0% {
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15), 0 0 30px rgba(124, 58, 237, 0.1);
    }

    100% {
        box-shadow: 0 30px 70px rgba(0, 0, 0, 0.25), 0 0 50px rgba(168, 85, 247, 0.22);
    }
}

.tagx-card:hover {
    animation-play-state: paused;
}

.tagx-card-inner {
    width: 100%;
    height: 100%;
    display: flex;
    position: relative;
    background: #fff;
    transition: background .5s;
}

/* Holographic Glint Glass Overlay */
.tagx-card-inner::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 10;
    background: radial-gradient(circle at var(--shine-x, 50%) var(--shine-y, 50%), rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0) 60%),
        linear-gradient(135deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.06) 50%, rgba(255, 255, 255, 0) 70%);
    background-size: 100% 100%, 200% 200%;
    background-position: 0% 0%, 0% 0%;
    mix-blend-mode: overlay;
    transition: background-position 0.15s ease;
}

.tagx-card:hover .tagx-card-inner::after {
    animation: holoShine 4s linear infinite;
}

@keyframes holoShine {
    0% {
        background-position: 0% 0%, 200% 200%;
    }

    100% {
        background-position: 0% 0%, -200% -200%;
    }
}

/* QR side */
.tagx-qr-side {
    width: 48%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    z-index: 2;
}

/* Thin border around QR (black frame on light tags, charcoal on dark tags) */
.tagx-qr-border {
    position: relative;
    border: 1px solid #1a1a2e;
    border-radius: 14px;
    padding: 10px;
    width: 32cqw;
    height: 32cqw;
    max-width: 165px;
    max-height: 165px;
    min-width: 105px;
    min-height: 105px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color .3s, background .3s;
}

/* Inner frame containing brackets and QR */
.tagx-qr-inner-frame {
    position: relative;
    width: 100%;
    height: 100%;
    padding: 8px;
    /* space between brackets and outer border */
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: 8px;
}

/* Sci-fi Scanning Laser Sweep */
.tagx-qr-inner-frame::after {
    content: '';
    position: absolute;
    left: 8px;
    right: 8px;
    height: 3px;
    background: linear-gradient(90deg, rgba(124, 58, 237, 0) 0%, var(--accent) 50%, rgba(124, 58, 237, 0) 100%);
    box-shadow: 0 0 8px var(--accent), 0 0 3px var(--purple);
    z-index: 6;
    animation: laserSweep 3.2s ease-in-out infinite;
    pointer-events: none;
    opacity: 0.8;
}

/* Hide laser sweep when printing or rendering canvas capture */
.capturing .tagx-qr-inner-frame::after,
.printing .tagx-qr-inner-frame::after {
    display: none !important;
}

@keyframes laserSweep {

    0%,
    100% {
        top: 8px;
    }

    50% {
        top: calc(100% - 10px);
    }
}

/* The actual QR graphics container */
.tagx-qr-box {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff !important;
    border-radius: 6px;
}

.tagx-qr-box img,
.tagx-qr-box canvas {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    image-rendering: pixelated !important;
    image-rendering: crisp-edges !important;
    shape-rendering: crispEdges !important;
}

.tagx-barcode-box {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    background: #ffffff !important;
    border-radius: 6px;
    padding: 4px;
    shape-rendering: crispEdges !important;
}

/* Corner brackets (purple, now inside the border) */
.tagx-bracket {
    position: absolute;
    width: 16px;
    height: 16px;
}

.tagx-bracket.tl {
    top: 0;
    left: 0;
    border-top: 3px solid var(--purple);
    border-left: 3px solid var(--purple);
    border-radius: 4px 0 0 0;
}

.tagx-bracket.tr {
    top: 0;
    right: 0;
    border-top: 3px solid var(--purple);
    border-right: 3px solid var(--purple);
    border-radius: 0 4px 0 0;
}

.tagx-bracket.bl {
    bottom: 0;
    left: 0;
    border-bottom: 3px solid var(--purple);
    border-left: 3px solid var(--purple);
    border-radius: 0 0 0 4px;
}

.tagx-bracket.br {
    bottom: 0;
    right: 0;
    border-bottom: 3px solid var(--purple);
    border-right: 3px solid var(--purple);
    border-radius: 0 0 4px 0;
}

/* Outer X Badge (positioned at top right corner of QR border so it NEVER covers QR/barcode data) */
.tagx-x-overlay {
    position: absolute;
    top: -8px;
    right: -8px;
    font-weight: 900;
    font-size: 11px;
    color: var(--purple);
    background: #ffffff;
    border: 2px solid var(--purple);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 10;
    transition: all .3s ease;
}

/* S-curve divider */
.tagx-divider {
    position: absolute;
    left: 42%;
    top: 0;
    width: 18%;
    height: 100%;
    z-index: 1;
}

.tagx-divider-svg {
    width: 100%;
    height: 100%;
}

/* Brand side */
.tagx-brand-side {
    width: 52%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-left: 16%;
    padding-right: 24px;
    position: relative;
    z-index: 2;
}

.tagx-brand-title {
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1;
}

.tagx-brand-tag {
    color: #1a1a2e;
    transition: color .5s;
}

.tagx-brand-x {
    color: var(--purple);
}

.tagx-brand-line {
    width: 32px;
    height: 3px;
    background: var(--purple);
    border-radius: 4px;
    margin: 12px 0;
}

.tagx-brand-slogan {
    font-size: 12px;
    line-height: 1.6;
    color: #888;
    transition: color .5s;
}

/* Dot grid patterns */
.tagx-dots-tr,
.tagx-dots-br {
    position: absolute;
    background-image: radial-gradient(circle, var(--purple) 1.5px, transparent 1.5px);
    background-size: 10px 10px;
    opacity: .2;
    animation: dotsDrift 8s ease-in-out infinite alternate;
}

@keyframes dotsDrift {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(3px, -3px) scale(1.05);
    }
}

.tagx-dots-tr {
    top: 16px;
    right: 16px;
    width: 48px;
    height: 48px;
}

.tagx-dots-br {
    bottom: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
}

/* ===== FORM INPUTS ===== */
.form-input {
    width: 100%;
    padding: 14px 18px;
    border-radius: 14px;
    outline: none;
    transition: all .3s;
    font-size: 14px;
}

body.dark .form-input {
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .08);
    color: #fff;
}

body.light .form-input {
    background: #f5f5f5;
    border: 1px solid rgba(0, 0, 0, .06);
    color: #111;
}

.form-input:focus {
    border-color: var(--purple) !important;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, .1);
}

.form-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    margin-bottom: 8px;
}

body.dark .form-label {
    color: #666;
}

body.light .form-label {
    color: #999;
}

/* ===== THEME BUTTONS ===== */
.theme-btn {
    flex: 1;
    padding: 12px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 13px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all .3s;
}

body.dark .theme-btn {
    background: rgba(255, 255, 255, .04);
    color: #aaa;
    border-color: rgba(255, 255, 255, .08);
}

body.light .theme-btn {
    background: #f5f5f5;
    color: #888;
    border-color: rgba(0, 0, 0, .06);
}

.theme-btn.active {
    border-color: var(--purple) !important;
}

body.dark .theme-btn.active {
    color: #fff;
}

body.light .theme-btn.active {
    color: #111;
}

/* ===== BUTTONS ===== */
.btn-primary {
    padding: 14px 32px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 14px;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, var(--purple), #9333EA, var(--pink));
    color: #fff;
    box-shadow: 0 8px 32px rgba(124, 58, 237, .3);
    transition: all .3s;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 12px 40px rgba(124, 58, 237, .4);
}

.btn-primary:active {
    transform: scale(.98);
}

.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, .1), transparent);
    opacity: 0;
    transition: opacity .3s;
}

.btn-primary:hover::after {
    opacity: 1;
}

.btn-secondary {
    padding: 14px 32px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all .3s;
}

body.dark .btn-secondary {
    background: rgba(255, 255, 255, .06);
    color: #ccc;
}

body.light .btn-secondary {
    background: #eee;
    color: #555;
}

.btn-secondary:hover {
    transform: translateY(-2px);
}

/* ===== SECTION ANIMATIONS ===== */
.reveal {
    opacity: 0;
    transform: translateY(35px);
    transition: opacity .7s cubic-bezier(.16, 1, .3, 1), transform .7s cubic-bezier(.16, 1, .3, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal.visible .stagger-1 {
    animation: fadeUp .6s ease .1s both;
}

.reveal.visible .stagger-2 {
    animation: fadeUp .6s ease .2s both;
}

.reveal.visible .stagger-3 {
    animation: fadeUp .6s ease .3s both;
}

.reveal.visible .stagger-4 {
    animation: fadeUp .6s ease .4s both;
}

/* ===== USE CASE CARDS ===== */
.usecase-card {
    padding: 28px 20px;
    border-radius: 20px;
    text-align: center;
    cursor: pointer;
    transition: all .4s cubic-bezier(.16, 1, .3, 1);
}

body.dark .usecase-card {
    background: var(--dark-card);
    border: 1px solid rgba(255, 255, 255, .06);
}

body.light .usecase-card {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .06);
}

.usecase-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 24px 48px rgba(124, 58, 237, .12);
    border-color: var(--purple) !important;
}

.usecase-card .icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    transition: all .4s;
}

body.dark .usecase-card .icon-wrap {
    background: rgba(124, 58, 237, .1);
}

body.light .usecase-card .icon-wrap {
    background: rgba(124, 58, 237, .06);
}

.usecase-card:hover .icon-wrap {
    background: var(--purple);
    transform: scale(1.1) rotate(5deg);
}

.usecase-card:hover .icon-wrap svg,
.usecase-card:hover .uc-icon {
    color: #fff !important;
}

.uc-icon {
    color: #888;
    transition: color .4s;
}

body.dark .uc-icon {
    color: #999;
}

/* ===== ANALYTICS ===== */
.stat-card {
    padding: 24px;
    border-radius: 20px;
    transition: all .3s;
}

body.dark .stat-card {
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .04);
}

body.light .stat-card {
    background: #f8f8f8;
    border: 1px solid rgba(0, 0, 0, .04);
}

.stat-card:hover {
    transform: translateY(-4px);
}

/* ===== SCANNER ===== */
.scan-result {
    border-radius: 20px;
    padding: 24px;
    animation: scaleUp .5s cubic-bezier(.16, 1, .3, 1);
}

body.dark .scan-result {
    background: linear-gradient(135deg, rgba(124, 58, 237, .08), var(--dark-card));
    border: 1px solid rgba(124, 58, 237, .2);
}

body.light .scan-result {
    background: linear-gradient(135deg, rgba(124, 58, 237, .04), #fff);
    border: 1px solid rgba(124, 58, 237, .15);
}

/* ===== BADGE ===== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
}

body.dark .badge-purple {
    background: rgba(124, 58, 237, .12);
    color: var(--accent);
    border: 1px solid rgba(124, 58, 237, .2);
}

body.light .badge-purple {
    background: rgba(124, 58, 237, .06);
    color: var(--purple);
    border: 1px solid rgba(124, 58, 237, .15);
}

.badge-green {
    background: rgba(16, 185, 129, .1);
    color: #10B981;
}

/* ===== MOBILE MENU ===== */
#mobileMenu {
    transition: all .3s cubic-bezier(.16, 1, .3, 1);
}

#mobileMenu.closed {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    visibility: hidden;
}

/* ===== TEXT HELPERS ===== */
.text-muted {
    transition: color .3s;
}

body.dark .text-muted {
    color: #777;
}

body.light .text-muted {
    color: #888;
}

.text-purple {
    color: var(--purple);
}

.gradient-text {
    background: linear-gradient(135deg, var(--purple), var(--pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -.03em;
}

body.dark .section-divider {
    border-color: rgba(255, 255, 255, .06);
}

body.light .section-divider {
    border-color: rgba(0, 0, 0, .06);
}

/* ===== RESPONSIVE ===== */
@media(max-width:768px) {
    .section-title {
        font-size: 1.6rem;
    }

    .tagx-card {
        max-width: 340px;
    }

    .tagx-brand-title {
        font-size: 1.6rem;
    }

    .hero-title {
        font-size: 2.4rem !important;
    }

    .tagx-qr-border {
        width: 110px;
        height: 110px;
        padding: 6px;
    }
}

/* ===== TOAST NOTIFICATION ===== */
.toast-bubble {
    position: fixed;
    bottom: 24px;
    right: -340px;
    background: rgba(26, 26, 36, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(124, 58, 237, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 0 0 20px rgba(124, 58, 237, 0.15);
    color: #fff;
    padding: 16px 20px;
    border-radius: 16px;
    z-index: 300;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: right 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s;
    max-width: 320px;
    opacity: 0;
}

.toast-bubble.show {
    right: 24px;
    opacity: 1;
}

body.light .toast-bubble {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(124, 58, 237, 0.15);
    color: #111;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08), 0 0 20px rgba(124, 58, 237, 0.05);
}

/* ===== HERO TELEMETRY CONSOLE ===== */
.telemetry-panel {
    background: rgba(17, 17, 24, 0.45);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(124, 58, 237, 0.15);
    border-radius: 20px;
    box-shadow: 0 35px 80px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

body.light .telemetry-panel {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(124, 58, 237, 0.1);
    box-shadow: 0 35px 80px rgba(0, 0, 0, 0.05), inset 0 1px 1px rgba(255, 255, 255, 0.8);
}

.radar-box {
    position: relative;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: rgba(124, 58, 237, 0.04);
    border: 1px solid rgba(124, 58, 237, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.radar-sweep {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(from 0deg, rgba(168, 85, 247, 0.18) 0deg, transparent 180deg);
    animation: radarRotation 4s linear infinite;
    pointer-events: none;
}

@keyframes radarRotation {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.radar-circle {
    position: absolute;
    border-radius: 50%;
    border: 1px dashed rgba(124, 58, 237, 0.12);
    pointer-events: none;
}

.radar-circle.rc-1 {
    width: 30px;
    height: 30px;
}

.radar-circle.rc-2 {
    width: 60px;
    height: 60px;
}

.radar-circle.rc-3 {
    width: 90px;
    height: 90px;
    border-style: solid;
    animation: radarPulse 2.5s ease-out infinite;
}

@keyframes radarPulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }

    100% {
        transform: scale(1.35);
        opacity: 0;
    }
}

.feed-item {
    display: flex;
    align-items: center;
    animation: feedItemIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
    border-bottom: 1px dashed rgba(124, 58, 237, 0.05);
    padding-bottom: 4px;
}

@keyframes feedItemIn {
    from {
        transform: translateY(8px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ===== CYBER GRID BACKGROUND & FLOATING TAGS FOR LOGIN OVERLAY ===== */
.login-grid-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: linear-gradient(rgba(124, 58, 237, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(124, 58, 237, 0.04) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: center center;
    pointer-events: none;
    z-index: 0;
}

.cyber-tag {
    position: absolute;
    width: 140px;
    height: 90px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    pointer-events: none;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.cyber-tag::before {
    content: 'X';
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 11px;
    font-weight: 900;
    color: var(--purple);
    opacity: 0.6;
}

.cyber-tag .tag-glow {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    filter: blur(5px);
    opacity: 0.8;
}

.cyber-tag.ct-1 {
    top: 15%;
    left: 10%;
    border-color: rgba(124, 58, 237, 0.2);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2), 0 0 15px rgba(124, 58, 237, 0.1);
    animation: ctFloat1 12s ease-in-out infinite;
}

.cyber-tag.ct-2 {
    bottom: 12%;
    right: 10%;
    border-color: rgba(236, 72, 153, 0.2);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2), 0 0 15px rgba(236, 72, 153, 0.1);
    animation: ctFloat2 15s ease-in-out infinite;
}

.cyber-tag.ct-3 {
    top: 40%;
    right: 12%;
    border-color: rgba(6, 182, 212, 0.2);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2), 0 0 15px rgba(6, 182, 212, 0.1);
    animation: ctFloat3 18s ease-in-out infinite;
}

#loginOverlay.login-light .cyber-tag {
    background: rgba(255, 255, 255, 0.45);
    border-color: rgba(124, 58, 237, 0.12);
    color: #333;
    box-shadow: 0 15px 35px rgba(124, 58, 237, 0.04);
}

@keyframes ctFloat1 {

    0%,
    100% {
        transform: translateY(0) rotate(5deg) scale(1);
    }

    50% {
        transform: translateY(-20px) rotate(-3deg) scale(1.02);
    }
}

@keyframes ctFloat2 {

    0%,
    100% {
        transform: translateY(0) rotate(-6deg) scale(1);
    }

    50% {
        transform: translateY(-25px) rotate(4deg) scale(1.02);
    }
}

@keyframes ctFloat3 {

    0%,
    100% {
        transform: translate(0, 0) rotate(8deg) scale(1);
    }

    50% {
        transform: translate(-15px, -15px) rotate(-5deg) scale(1.03);
    }
}

@media (max-width: 900px) {
    .cyber-tag {
        display: none !important;
    }
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0b0c10;
}

::-webkit-scrollbar-thumb {
    background: rgba(124, 58, 237, 0.35);
    border-radius: 4px;
    border: 2px solid #0b0c10;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(124, 58, 237, 0.6);
}

body.light ::-webkit-scrollbar-track {
    background: #f7f7f7;
}

body.light ::-webkit-scrollbar-thumb {
    background: rgba(124, 58, 237, 0.2);
    border-color: #f7f7f7;
}

body.light ::-webkit-scrollbar-thumb:hover {
    background: rgba(124, 58, 237, 0.4);
}

/* ===== ADMIN CONTROL PANEL TABLE STYLES ===== */
#admin-section table {
    color: #fff;
}

body.light #admin-section table {
    color: #111;
}

#admin-section tr {
    transition: background 0.2s;
    border-color: rgba(255, 255, 255, 0.05);
}

body.light #admin-section tr {
    border-color: rgba(0, 0, 0, 0.05);
}

#admin-section tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

body.light #admin-section tr:hover {
    background: rgba(0, 0, 0, 0.015);
}

#admin-section th {
    color: #888;
}

body.light #admin-section th {
    color: #666;
}

#admin-section table th,
#admin-section table td {
    padding: 12px 16px;
}

/* ===== ACCESS DENIED BIG X OVERLAY ===== */
#errorOverlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

#errorOverlay.active {
    opacity: 1;
    visibility: visible;
}

.error-x-box {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 5px solid #EF4444;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #EF4444;
    font-size: 72px;
    font-weight: 900;
    box-shadow: 0 0 35px rgba(239, 68, 68, 0.5), inset 0 0 20px rgba(239, 68, 68, 0.2);
    transform: scale(0.6);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#errorOverlay.active .error-x-box {
    transform: scale(1);
    animation: xPulse 1s infinite alternate;
}

@keyframes xPulse {
    0% {
        box-shadow: 0 0 30px rgba(239, 68, 68, 0.5);
    }

    100% {
        box-shadow: 0 0 50px rgba(239, 68, 68, 0.8);
    }
}

/* ===== PAKISTAN FLAG CARD THEME (FULL GREEN & WHITE) ===== */
.tagx-card.theme-pakistan {
    box-shadow: 0 20px 50px rgba(1, 65, 28, 0.35), 0 0 40px rgba(16, 185, 129, 0.3) !important;
}

.tagx-card.theme-pakistan .tagx-card-inner {
    background: #01411C !important;
}

.tagx-card.theme-pakistan .tagx-brand-tag {
    color: #FFFFFF !important;
}

.tagx-card.theme-pakistan .tagx-brand-x {
    color: #FFFFFF !important;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
}

.tagx-card.theme-pakistan .tagx-brand-line {
    background: #FFFFFF !important;
}

.tagx-card.theme-pakistan .tagx-brand-slogan {
    color: #E2F4E8 !important;
}

.tagx-card.theme-pakistan .tagx-top-title {
    color: #FFFFFF !important;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

.tagx-card.theme-pakistan .tagx-top-sub {
    color: #E2F4E8 !important;
}

.tagx-card.theme-pakistan .tagx-qr-border {
    border-color: #FFFFFF !important;
    background: #FFFFFF !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
}

.tagx-card.theme-pakistan .tagx-bracket {
    border-color: #01411C !important;
}

.tagx-card.theme-pakistan .tagx-x-overlay {
    background: #01411C !important;
    color: #FFFFFF !important;
    border-color: #FFFFFF !important;
}

.tagx-card.theme-pakistan .tagx-dots-tr,
.tagx-card.theme-pakistan .tagx-dots-br {
    background-image: radial-gradient(circle, #FFFFFF 1.5px, transparent 1.5px) !important;
    opacity: 0.25 !important;
}

.theme-btn#btnPakistan.active {
    background: #01411C !important;
    color: #FFFFFF !important;
    border-color: #FFFFFF !important;
    box-shadow: 0 4px 15px rgba(1, 65, 28, 0.4) !important;
}

/* ===== CHARCOAL BLACK DARK THEME ===== */
.tagx-card.theme-dark .tagx-card-inner {
    background: #18181C !important;
}

.theme-btn#btnDark.active {
    background: #18181C !important;
    color: #FFFFFF !important;
    border-color: var(--purple) !important;
}

/* ===== VERTICAL PRODUCT TAG LAYOUT ===== */
.tagx-card.layout-vertical {
    max-width: 320px !important;
    width: 100% !important;
    aspect-ratio: 1 / 1.48 !important;
    border-radius: 24px !important;
}

.tagx-card.layout-vertical .tagx-card-inner {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 24px 20px !important;
    text-align: center !important;
}

.tagx-card.layout-vertical .tagx-top-header {
    width: 100%;
    text-align: center;
    z-index: 3;
    padding-bottom: 4px;
}

.tagx-card.layout-vertical .tagx-top-title {
    font-size: 1.18rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--purple);
    margin-bottom: 2px;
}

.tagx-card.layout-vertical .tagx-top-sub {
    font-size: 11px;
    font-weight: 600;
    color: #888;
    letter-spacing: 0.02em;
}

.tagx-card.layout-vertical .tagx-qr-side {
    width: 100% !important;
    height: auto !important;
    padding: 4px 0 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.tagx-card.layout-vertical .tagx-qr-border {
    width: 165px !important;
    height: 165px !important;
    max-width: 165px !important;
    max-height: 165px !important;
}

.tagx-card.layout-vertical .tagx-divider {
    display: none !important;
}

.tagx-card.layout-vertical .tagx-brand-side {
    width: 100% !important;
    height: auto !important;
    padding: 4px 0 0 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
}

.tagx-card.layout-vertical .tagx-brand-title {
    font-size: 1.85rem !important;
}

.tagx-card.layout-vertical .tagx-brand-line {
    margin: 6px 0 !important;
    width: 28px !important;
    height: 3px !important;
}

.tagx-card.layout-vertical .tagx-brand-slogan {
    font-size: 11px !important;
    line-height: 1.4 !important;
}

.tagx-card.layout-horizontal .tagx-top-header {
    display: none !important;
}

/* ===== HIGH-SPEED PRINT OPTIMIZATION ===== */
@media print {
    body {
        background: #ffffff !important;
        color: #000000 !important;
    }
    body * {
        visibility: hidden !important;
    }
    #genTagCard, #genTagCard * {
        visibility: visible !important;
    }
    #genTagCard {
        position: fixed !important;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) scale(1.2) !important;
        animation: none !important;
        box-shadow: none !important;
        border: 1px solid #ccc !important;
        margin: 0 !important;
        page-break-inside: avoid;
    }
    .tagx-qr-inner-frame::after {
        display: none !important;
    }
    .tagx-card-inner::after {
        display: none !important;
    }
}
