/* --- UXT PREMIUM CURSOR STYLES --- */

/* Base hide default cursor globally when active using a transparent 1x1 pixel for extra reliability */
/* This prevents "ghost" system cursors in Safari/Chrome */
body.uxt-cursor-active:not(.uxt-lite-cursor),
body.uxt-cursor-active:not(.uxt-lite-cursor) * {
    cursor: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"), none !important;
}

/* Specific interactive elements reinforcement */
body.uxt-cursor-active:not(.uxt-lite-cursor) a,
body.uxt-cursor-active:not(.uxt-lite-cursor) button,
body.uxt-cursor-active:not(.uxt-lite-cursor) input,
body.uxt-cursor-active:not(.uxt-lite-cursor) textarea,
body.uxt-cursor-active:not(.uxt-lite-cursor) select,
body.uxt-cursor-active:not(.uxt-lite-cursor) [role="button"],
body.uxt-cursor-active:not(.uxt-lite-cursor) .clickable,
body.uxt-cursor-active:not(.uxt-lite-cursor) [style*="cursor"] {
    cursor: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"), none !important;
}

#uxt-cursor,
#uxt-cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 2147483647;
    /* Absolute maximum to stay above everything */
    border-radius: 50%;
    transform: translate(-50%, -50%);
    /* NO transition on transform or position — causes lag! */
    transition: width 0.3s, height 0.3s, background-color 0.3s, border-radius 0.3s;
    will-change: left, top;
    opacity: 0;
}

/* 1. NEON RING STYLE */
.uxt-cursor-neon-ring {
    width: 40px;
    height: 40px;
    border: 1.5px solid #00B3CC;
    box-shadow: 0 0 15px rgba(0, 179, 204, 0.4);
}

.uxt-cursor-neon-ring.hover {
    width: 60px;
    height: 60px;
    background: rgba(0, 179, 204, 0.05);
    border-width: 1px;
}

/* 2. MAGNETIC GLOW STYLE */
.uxt-cursor-magnetic-glow {
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(0, 179, 204, 0.15) 0%, transparent 70%);
    border: none;
    filter: blur(20px);
}

.uxt-cursor-magnetic-glow.hover {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(0, 179, 204, 0.25) 0%, transparent 70%);
}

/* 4. GLASS CIRCLE STYLE */
.uxt-cursor-glass-circle {
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.uxt-cursor-glass-circle.hover {
    width: 50px;
    height: 50px;
    background: rgba(0, 179, 204, 0.15);
    border-color: #00B3CC;
}

/* 4.5 PREMIUM ARROW STYLE (Classic-Look but UXT Branded) */
.uxt-cursor-premium-arrow {
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translate(0, 0);
    /* Pivot from tip */
    overflow: visible;
}

.uxt-cursor-premium-arrow svg {
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.3));
}

.uxt-cursor-premium-arrow .arrow-fill {
    fill: #00B3CC;
    stroke: #fff;
    stroke-width: 1.2px;
    stroke-linejoin: round;
}

.uxt-cursor-premium-arrow.hover {
    transform: translate(0, 0) scale(1.15);
}

.uxt-cursor-premium-arrow.hover .arrow-fill {
    filter: drop-shadow(0 0 8px rgba(0, 179, 204, 0.6));
    fill: #00E1FF;
}

/* Specific state pivots */
.uxt-cursor-premium-arrow.uxt-state-pointer {
    transform: translate(-6px, -1px) scale(1.1);
    /* Tip of index finger */
}

.uxt-cursor-premium-arrow.uxt-state-text {
    transform: translate(-50%, -50%) scale(1);
    /* Center of beam */
}

.uxt-cursor-premium-arrow.uxt-state-grab {
    transform: translate(-50%, -50%) scale(1.05);
    /* Center of palm */
}

.uxt-cursor-premium-arrow.uxt-state-grabbing {
    transform: translate(-50%, -50%) scale(0.95);
    /* Tighter fist */
}

.uxt-cursor-active.premium-mode #uxt-cursor-dot {
    display: none !important;
}

/* 7. GLASS ARROW STYLE */
.uxt-cursor-glass-arrow {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    border: 2px solid #00B3CC;
    clip-path: polygon(0% 0%, 100% 50%, 0% 100%, 25% 50%);
    border-radius: 0 !important;
    box-shadow: 0 0 15px rgba(0, 179, 204, 0.3);
}

.uxt-cursor-glass-arrow.hover {
    transform: translate(-50%, -50%) scale(1.5);
    background: rgba(0, 179, 204, 0.2);
}

.uxt-cursor-active.arrow-mode #uxt-cursor-dot {
    display: none;
    /* Hide dot in arrow mode */
}


/* 5. MAGIC WAND / NEW YEAR STYLE */
.uxt-cursor-magic-wand {
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.2) 0%, transparent 70%);
    border: none;
    filter: blur(10px);
}

.uxt-cursor-active.magic-mode #uxt-cursor-dot {
    width: 8px;
    height: 8px;
    background: #fff;
    box-shadow: 0 0 10px #fff, 0 0 20px #FFD700, 0 0 30px #FFD700;
}

.uxt-cursor-active.magic-mode .uxt-particle {
    position: fixed;
    pointer-events: none;
    background: #FFD700;
    border-radius: 50%;
    z-index: 999998;
    box-shadow: 0 0 5px #fff;
}

/* 6. STANDARD PLUS */
.uxt-cursor-standard-plus {
    width: 20px;
    height: 20px;
    background: rgba(0, 179, 204, 0.3);
    border: none;
    filter: blur(5px);
}

/* 8. SPOOKY PUMPKIN / HALLOWEEN */
.uxt-cursor-spooky-pumpkin {
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(255, 126, 0, 0.25) 0%, transparent 70%);
    border: 1px dashed rgba(255, 126, 0, 0.3);
    filter: blur(5px);
}

.uxt-cursor-active.spooky-mode #uxt-cursor-dot {
    width: 10px;
    height: 10px;
    background: #FF7E00;
    box-shadow: 0 0 10px #FF7E00, 0 0 20px #FF4E00;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
}

.uxt-spooky-particle,
.uxt-seasonal-particle {
    position: fixed;
    pointer-events: none;
    z-index: 2147483646;
    -webkit-user-select: none;
    user-select: none;
    font-size: 14px;
}

.uxt-spooky-particle {
    filter: drop-shadow(0 0 5px rgba(255, 126, 0, 0.5));
}

.uxt-seasonal-particle {
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5));
}

/* DOT SETTINGS */
#uxt-cursor-dot {
    width: 6px;
    height: 6px;
    background: #00B3CC;
}

/* 3. MINIMAL DOT STYLE */
.uxt-cursor-minimal-dot {
    display: none;
}

.uxt-cursor-active.minimal-mode #uxt-cursor-dot {
    width: 10px;
    height: 10px;
    mix-blend-mode: difference;
    background: #fff;
}

.uxt-cursor-active.minimal-mode #uxt-cursor-dot.hover {
    width: 50px;
    height: 50px;
}

/* --- BACKGROUND ANIMATIONS --- */
#uxt-cursor-bg-container {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
    /* Don't set background-color here, let the site background show through */
}

/* Aurora Flow - Subtle overlays */
.uxt-bg-aurora-flow:before,
.uxt-bg-aurora-flow:after {
    content: '';
    position: absolute;
    width: 60vw;
    height: 60vw;
    border-radius: 50%;
    /* Use brand color but very transparent */
    background: radial-gradient(circle, rgba(0, 179, 204, 0.07) 0%, transparent 70%);
    filter: blur(80px);
    z-index: -1;
    animation: auroraMove 20s infinite alternate ease-in-out;
}

.uxt-bg-aurora-flow:after {
    background: radial-gradient(circle, rgba(0, 179, 204, 0.04) 0%, transparent 70%);
    animation: auroraMove 25s infinite alternate-reverse ease-in-out;
    right: 0;
    bottom: 0;
}

@keyframes auroraMove {
    0% {
        transform: translate(-10%, -10%) scale(1);
    }

    100% {
        transform: translate(20%, 20%) scale(1.2);
    }
}

/* Cyber Grid - Transparent Overlay */
.uxt-bg-grid-pulse {
    /* Use a color that works on both temas.
       We'll use a very faint version of the brand color. */
    background-image:
        linear-gradient(rgba(0, 179, 204, 0.05) 1.5px, transparent 1.5px),
        linear-gradient(90deg, rgba(0, 179, 204, 0.05) 1.5px, transparent 1.5px);
    background-size: 60px 60px;
    opacity: 0.8;
}

.uxt-bg-grid-pulse:after {
    content: '';
    position: absolute;
    inset: 0;
    /* Moving scanline */
    background: linear-gradient(to bottom, transparent, rgba(0, 179, 204, 0.04), transparent);
    height: 30%;
    width: 100%;
    animation: scanLine 10s infinite linear;
    z-index: -1;
}

@keyframes scanLine {
    0% {
        transform: translateY(-100%);
    }

    100% {
        transform: translateY(400%);
    }
}

/* Flying Blobs - Drift and Float */
.uxt-bg-flying-blobs:before,
.uxt-bg-flying-blobs:after {
    content: '';
    position: absolute;
    width: 45vw;
    height: 45vw;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 179, 204, 0.08) 0%, transparent 70%);
    filter: blur(100px);
    z-index: -1;
    animation: drift 30s infinite linear;
}

.uxt-bg-flying-blobs:after {
    width: 35vw;
    height: 35vw;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.05) 0%, transparent 70%);
    animation: drift 45s infinite linear reverse;
    right: 10%;
    top: 20%;
}

/* Extra blob using box-shadow on :before to keep DOM clean */
.uxt-bg-flying-blobs:before {
    box-shadow: 40vw 50vh 200px rgba(0, 179, 204, 0.04);
}

@keyframes drift {
    0% {
        transform: translate(-10%, -10%) rotate(0deg);
    }

    33% {
        transform: translate(30%, 10%) rotate(120deg);
    }

    66% {
        transform: translate(10%, 40%) rotate(240deg);
    }

    100% {
        transform: translate(-10%, -10%) rotate(360deg);
    }
}

/* Specific adjustment if we detect light theme (if possible) */

/* --- LITE MODE TOGGLE & OVERRIDES --- */

/* 2. Restore default browser browser cursor when Cursor effect is disabled */
body.uxt-lite-cursor,
body.uxt-lite-cursor * {
    cursor: auto !important;
}

body.uxt-lite-cursor a,
body.uxt-lite-cursor a *,
body.uxt-lite-cursor button,
body.uxt-lite-cursor button *,
body.uxt-lite-cursor .clickable,
body.uxt-lite-cursor .clickable *,
body.uxt-lite-cursor [role="button"],
body.uxt-lite-cursor [role="button"] * {
    cursor: pointer !important;
}

body.uxt-lite-cursor input,
body.uxt-lite-cursor textarea {
    cursor: text !important;
}

/* 3. Hide elements based on individual flags */
body.uxt-lite-cursor #uxt-cursor,
body.uxt-lite-cursor #uxt-cursor-dot {
    display: none !important;
    opacity: 0 !important;
}

body.uxt-lite-falling #uxt-falling-container {
    display: none !important;
}

body.uxt-lite-bg #uxt-cursor-bg-container,
body.uxt-lite-bg #uxt-cursor-bg-container:before,
body.uxt-lite-bg #uxt-cursor-bg-container:after {
    display: none !important;
    animation: none !important;
    -webkit-filter: none !important;
    filter: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    transition: none !important;
    transform: none !important;
    will-change: auto !important;
}

/* 3. Explicitly restore pointer for interactive elements */
body.uxt-lite-mode a,
body.uxt-lite-mode a *,
body.uxt-lite-mode button,
body.uxt-lite-mode button *,
body.uxt-lite-mode .clickable,
body.uxt-lite-mode .clickable *,
body.uxt-lite-mode [role="button"],
body.uxt-lite-mode [role="button"] *,
body.uxt-lite-mode .lnb-tile,
body.uxt-lite-mode .lnb-tile *,
body.uxt-lite-mode .tile,
body.uxt-lite-mode .tile * {
    cursor: pointer !important;
}

/* 4. Explicitly restore text cursor for inputs */
body.uxt-lite-mode input[type="text"],
body.uxt-lite-mode input[type="email"],
body.uxt-lite-mode input[type="password"],
body.uxt-lite-mode input[type="search"],
body.uxt-lite-mode input[type="tel"],
body.uxt-lite-mode input[type="url"],
body.uxt-lite-mode textarea {
    cursor: text !important;
}

/* Ensure cursor is ALWAYS above everything when NOT in lite mode */
#uxt-cursor,
#uxt-cursor-dot {
    z-index: 2147483647 !important;
}

/* Toggle Button Style */
#uxt-lite-toggle-wrap {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 2147483640;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    -webkit-user-select: none;
    user-select: none;
}

#uxt-lite-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(20, 22, 25, 0.45);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    backdrop-filter: blur(15px) saturate(180%);
    border: none;
    color: #fff;
    border-radius: 50%;
    cursor: grab;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    -webkit-user-select: none;
    user-select: none;
}

body.light-theme #uxt-lite-btn {
    background: rgba(255, 255, 255, 0.85) !important;
    color: #1e293b !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}

#uxt-lite-btn:active {
    cursor: grabbing;
    transform: scale(0.95);
}

#uxt-lite-btn:hover {
    border-color: #00B3CC;
    box-shadow: 0 0 20px rgba(0, 179, 204, 0.4);
}

#uxt-lite-btn .uxt-indicator {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 8px;
    height: 8px;
    background: #00ff88;
    border-radius: 50%;
    box-shadow: 0 0 8px #00ff88;
}

body.uxt-lite-mode #uxt-lite-btn .uxt-indicator {
    background: #ff4444;
    box-shadow: 0 0 8px #ff4444;
}

#uxt-lite-menu {
    width: 280px;
    background: rgba(20, 22, 26, 0.85);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    backdrop-filter: blur(30px) saturate(180%);
    border: none;
    border-radius: 24px;
    padding: 0;
    box-shadow:
        0 25px 80px rgba(0, 0, 0, 0.7),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    display: none;
    flex-direction: column;
    animation: uxtFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: absolute;
    bottom: calc(100% + 15px);
    right: 0;
    overflow: hidden;
}

/* Tabs Navigation - Widget Style */
.uxt-lite-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 6px;
    margin-bottom: 5px;
}

.uxt-lite-tab {
    flex: 1;
    background: transparent;
    border: none;
    padding: 10px 2px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.25s ease;
    border-radius: 12px;
}

.uxt-lite-tab.active {
    background: rgba(0, 179, 204, 0.12);
    color: #00B3CC;
}

.uxt-lite-content {
    display: none;
    padding: 15px 20px 20px 20px;
}

.uxt-lite-content.active {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

body.light-theme #uxt-lite-menu {
    background: rgba(255, 255, 255, 0.96) !important;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.1), inset 0 0 0 1px rgba(0, 0, 0, 0.02);
}

body.light-theme .uxt-lite-tabs {
    background: rgba(0, 0, 0, 0.03);
    border-bottom-color: rgba(0, 0, 0, 0.05);
}

body.light-theme .uxt-lite-tab {
    color: rgba(0, 0, 0, 0.4);
}

body.light-theme .uxt-lite-tab.active {
    background: rgba(0, 179, 204, 0.08);
    color: #008fa3;
}

#uxt-lite-menu.pos-left {
    right: auto;
    left: 0;
}

#uxt-lite-menu.pos-bottom {
    bottom: auto;
    top: calc(100% + 15px);
}

@keyframes uxtFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

#uxt-lite-menu.active {
    display: flex;
}

.uxt-menu-title {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
}

body.light-theme .uxt-menu-title {
    color: #0f172a !important;
}

.uxt-menu-desc {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 5px;
    line-height: 1.3;
}

body.light-theme .uxt-menu-desc {
    color: #64748b !important;
}

.uxt-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    -webkit-user-select: none;
    user-select: none;
}

body.light-theme .uxt-menu-item {
    background: rgba(0, 0, 0, 0.04) !important;
    color: #334155 !important;
}

.uxt-menu-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* UI KIT CHECKBOX STYLE 1:1 */
.uxt-menu-item input[type="checkbox"] {
    display: none;
}

.uxt-menu-item .checkbox-visual {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s cubic-bezier(.22, .8, .2, 1);
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

body.light-theme .uxt-menu-item .checkbox-visual {
    background: rgba(0, 0, 0, 0.06) !important;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.uxt-menu-item:hover .checkbox-visual {
    box-shadow: inset 0 0 0 1px rgba(0, 179, 204, 0.5), 0 0 15px 2px rgba(0, 179, 204, 0.3);
}

.uxt-menu-item .checkbox-visual svg {
    width: 14px;
    height: 14px;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s cubic-bezier(.22, .8, .2, 1);
    stroke-width: 4;
    color: #00B3CC;
}

.uxt-menu-item input:checked+.checkbox-visual {
    background: rgba(0, 179, 204, 0.1);
    box-shadow: inset 0 0 0 1px #00B3CC, 0 0 15px 2px rgba(0, 179, 204, 0.4);
}

.uxt-menu-item input:checked+.checkbox-visual svg {
    opacity: 1;
    transform: scale(1);
}


#uxt-lite-toggle-wrap {
    opacity: 0.9;
    transition: opacity 0.3s;
}

#uxt-lite-toggle-wrap:hover,
#uxt-lite-toggle-wrap:has(.active) {
    opacity: 1 !important;
}

.uxt-menu-btn {
    margin-top: 5px;
    padding: 10px;
    background: #00B3CC;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 179, 204, 0.3);
}

.uxt-menu-btn:hover {
    background: #008fa3;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 179, 204, 0.4);
}

.uxt-menu-btn:active {
    transform: translateY(0);
}

/* Mobile Wrapper Styling */
.uxt-mob-lite-wrap {
    margin-top: 20px;
    padding: 15px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: center;
}

.uxt-mob-lite-btn {
    width: 100%;
    justify-content: center;
    background: var(--surface);
    /* Solid for mobile menu */
}

/* Mobile Floating Button - Bottom Left */
@media (max-width: 1024px) {
    #uxt-lite-toggle-wrap {
        display: block !important;
        left: 20px;
        right: auto;
        bottom: 20px;
        opacity: 0.8 !important;
    }

    #uxt-lite-btn {
        padding: 0;
        width: 42px;
        height: 42px;
        justify-content: center;
        border-radius: 50%;
        gap: 0;
    }

    #uxt-lite-btn span {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    #uxt-lite-btn svg {
        width: 18px;
        height: 18px;
    }
}

/* --- ACCESSIBILITY --- */
body.uxt-acc-contrast #uxt-cursor,
body.uxt-acc-contrast #uxt-cursor-dot {
    filter: invert(1) grayscale(1) contrast(200%) !important;
}

.uxt-click-wave {
    position: fixed;
    border: 3px solid #00B3CC;
    border-radius: 50%;
    pointer-events: none;
    z-index: 2147483646;
    animation: uxtWave 0.5s ease-out forwards;
    transform: translate(-50%, -50%);
}

@keyframes uxtWave {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
    }

    100% {
        width: 120px;
        height: 120px;
        opacity: 0;
    }
}