html,
body {
    cursor: none;
}

*,
*::before,
*::after {
    cursor: none !important;
}

@media (hover: none) and (pointer: coarse), (max-width: 1024px) {
    html,
    body,
    *,
    *::before,
    *::after {
        cursor: auto !important;
    }

    .qs-cursor-ring,
    .qs-cursor-dot,
    .qs-cursor-trail,
    .qs-cursor-glow {
        display: none !important;
    }
}

.qs-cursor-ring {
    position: fixed;
    top: -100px;
    left: -100px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(8px) saturate(140%);
    box-shadow: 
        0 12px 32px rgba(0, 0, 0, 0.25),
        inset 0 2px 8px rgba(255, 255, 255, 0.15),
        inset 0 -2px 8px rgba(0, 0, 0, 0.2);
    pointer-events: none;
    z-index: 999998;
    transform: translate(-50%, -50%);
    will-change: left, top, width, height, background, border-color, border-radius, transform;
    transition:
        width 0.35s var(--ease-expo, cubic-bezier(0.16, 1, 0.3, 1)),
        height 0.35s var(--ease-expo, cubic-bezier(0.16, 1, 0.3, 1)),
        background 0.25s ease,
        border-color 0.25s ease,
        border-radius 0.25s ease,
        border-width 0.25s ease,
        opacity 0.3s ease,
        box-shadow 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.qs-cursor-ring::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 50%, rgba(var(--theme-rgb, 0,196,209), 0.08) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.25s;
}

.qs-cursor-glow {
    position: fixed;
    top: -100px;
    left: -100px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--theme-rgb, 0,161,171), 0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 999996;
    transform: translate(-50%, -50%);
    will-change: left, top;
    transition: opacity 0.4s ease;
    filter: blur(8px);
}

.qs-cursor-dot {
    position: fixed;
    top: -100px;
    left: -100px;
    width: 6px;
    height: 6px;
    background: var(--cursor-dot-bg);
    border-radius: 50%;
    pointer-events: none;
    z-index: 999999;
    transform: translate(-50%, -50%);
    will-change: left, top, width, height, background, border-radius, transform;
    transition:
        width 0.15s var(--ease-expo, cubic-bezier(0.16, 1, 0.3, 1)),
        height 0.15s var(--ease-expo, cubic-bezier(0.16, 1, 0.3, 1)),
        background 0.15s ease,
        border-radius 0.15s ease,
        opacity 0.2s ease;
    box-shadow: 0 4px 12px rgba(var(--theme-rgb, 0,161,171), 0.6), inset 0 2px 4px rgba(255, 255, 255, 0.6);
}

.qs-cursor-trail {
    position: fixed;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--cursor-dot-bg);
    pointer-events: none;
    z-index: 999997;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: none;
}

.qs-cursor-label {
    font-family: var(--font-display, 'Open Sans', sans-serif);
    font-size: 0.52rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--cursor-label-color);
    white-space: nowrap;
    user-select: none;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    line-height: 1;
}

.qs-cursor-icon {
    position: absolute;
    width: 16px;
    height: 16px;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    color: var(--cursor-label-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.qs-cursor-icon svg {
    width: 100%;
    height: 100%;
}

.qs-cursor-ring.hidden,
.qs-cursor-dot.hidden,
.qs-cursor-glow.hidden {
    opacity: 0;
}

.qs-cursor-ring.state-link {
    width: 64px;
    height: 64px;
    background: rgba(var(--theme-rgb, 0,161,171), 0.07);
    border-color: rgba(var(--theme-rgb, 0,161,171), 0.9);
    border-width: 1px;
    mix-blend-mode: normal;
}

.qs-cursor-ring.state-link::after {
    opacity: 1;
}

.qs-cursor-ring.state-link .qs-cursor-label {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.qs-cursor-ring.state-link .qs-cursor-icon {
    opacity: 1;
}

.qs-cursor-dot.state-link {
    width: 4px;
    height: 4px;
    background: var(--theme-light, #00e0f0);
}

.qs-cursor-ring.state-button {
    width: 56px;
    height: 56px;
    background: rgba(var(--theme-rgb, 0,161,171), 0.12);
    border-color: var(--cursor-dot-bg);
    border-width: 1.5px;
    mix-blend-mode: normal;
}

.qs-cursor-ring.state-button::after {
    opacity: 1;
}

.qs-cursor-ring.state-button .qs-cursor-label {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.qs-cursor-ring.state-button .qs-cursor-icon {
    opacity: 1;
}

.qs-cursor-dot.state-button {
    width: 4px;
    height: 4px;
    background: var(--text-primary, var(--text-primary));
}

.qs-cursor-ring.state-text {
    width: 3px;
    height: 36px;
    border-radius: 2px;
    border-color: var(--cursor-ring-border);
    border-width: 1.5px;
    background: rgba(var(--theme-rgb, 0,196,209), 0.15);
    mix-blend-mode: normal;
}

.qs-cursor-dot.state-text {
    width: 3px;
    height: 3px;
    background: transparent;
}

.qs-cursor-ring.state-image {
    width: 72px;
    height: 72px;
    background: rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.6);
    border-width: 1px;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    mix-blend-mode: normal;
}

.qs-cursor-ring.state-image .qs-cursor-icon {
    opacity: 1;
    color: var(--text-primary);
}

.qs-cursor-dot.state-image {
    width: 0;
    height: 0;
    background: transparent;
}

.qs-cursor-ring.state-video {
    width: 72px;
    height: 72px;
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.7);
    border-width: 1px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    mix-blend-mode: normal;
}

.qs-cursor-ring.state-video .qs-cursor-icon {
    opacity: 1;
    color: var(--text-primary);
    width: 20px;
    height: 20px;
}

.qs-cursor-dot.state-video {
    width: 0;
    height: 0;
    background: transparent;
}

.qs-cursor-ring.state-drag {
    width: 56px;
    height: 56px;
    background: rgba(var(--theme-rgb, 0,161,171), 0.1);
    border-color: var(--cursor-ring-border);
    border-style: dashed;
    mix-blend-mode: normal;
}

.qs-cursor-ring.state-drag .qs-cursor-icon {
    opacity: 1;
    width: 18px;
    height: 18px;
}

.qs-cursor-dot.state-drag {
    width: 0;
    height: 0;
    background: transparent;
}

.qs-cursor-ring.state-grab {
    width: 48px;
    height: 48px;
    background: rgba(var(--theme-rgb, 0,161,171), 0.15);
    border-color: var(--cursor-ring-border);
    border-style: dashed;
    mix-blend-mode: normal;
}

.qs-cursor-ring.state-grab .qs-cursor-icon {
    opacity: 1;
    width: 16px;
    height: 16px;
    color: var(--cursor-label-color);
}

.qs-cursor-dot.state-grab {
    width: 0;
    height: 0;
}

.qs-cursor-ring.state-select {
    width: 20px;
    height: 20px;
    background: rgba(var(--theme-rgb, 0,196,209), 0.2);
    border-color: rgba(var(--theme-rgb, 0,196,209), 0.5);
    border-width: 1px;
    mix-blend-mode: normal;
}

.qs-cursor-dot.state-select {
    width: 8px;
    height: 8px;
    background: rgba(var(--theme-rgb, 0,196,209), 0.5);
    border-radius: 2px;
}

.qs-cursor-ring.state-click {
    width: 24px;
    height: 24px;
    background: rgba(var(--theme-rgb, 0,161,171), 0.25);
    border-color: var(--cursor-dot-bg);
    mix-blend-mode: normal;
    transition:
        width 0.07s var(--ease-expo, cubic-bezier(0.16, 1, 0.3, 1)),
        height 0.07s var(--ease-expo, cubic-bezier(0.16, 1, 0.3, 1)),
        background 0.07s ease;
}

.qs-cursor-dot.state-click {
    width: 10px;
    height: 10px;
    background: var(--cursor-dot-bg);
}

.qs-cursor-ring.state-scroll {
    width: 32px;
    height: 32px;
    background: transparent;
    border-color: rgba(var(--theme-rgb, 0,196,209), 0.35);
    border-width: 1px;
}

.qs-cursor-dot.state-scroll {
    width: 4px;
    height: 4px;
    background: rgba(var(--theme-rgb, 0,196,209), 0.5);
}

.qs-cursor-ring.magnetic {
    transition:
        left 0.2s var(--ease-expo, cubic-bezier(0.16, 1, 0.3, 1)),
        top 0.2s var(--ease-expo, cubic-bezier(0.16, 1, 0.3, 1)),
        width 0.35s var(--ease-expo, cubic-bezier(0.16, 1, 0.3, 1)),
        height 0.35s var(--ease-expo, cubic-bezier(0.16, 1, 0.3, 1)),
        background 0.25s ease,
        border-color 0.25s ease;
}