:root {
  --primary: #00ffff;
  --secondary: #ff00c8;
}

@media (hover: hover) and (pointer: fine) {
  * {
    cursor: none !important;
  }

  .cursor {
    position: fixed;
    width: 32px;
    height: 32px;
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 2147483647;
    transform: translate(-50%, -50%);
    filter: drop-shadow(0 0 8px var(--primary));
    transition: transform 0.12s ease, filter 0.12s ease;
    will-change: transform, z-index;
  }

  .cursor.active {
    transform: translate(-50%, -50%) scale(1.2);
    filter: drop-shadow(0 0 12px var(--secondary));
  }

  .cursor-trail {
    position: fixed;
    width: 24px;
    height: 24px;
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 2147483646;
    transform: translate(-50%, -50%);
    filter: drop-shadow(0 0 5px var(--primary));
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
  
  .cursor-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--primary), var(--secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2147483645;
    border: none;
    box-shadow: 0 0 15px var(--primary),
                0 0 30px rgba(0, 255, 255, 0.3);
    transition: all 0.3s ease;
    font-size: 1.5rem;
  }

  .cursor-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 0 20px var(--secondary),
                0 0 40px rgba(255, 0, 200, 0.4);
  }

  .cursor-menu {
    position: fixed;
    bottom: 85px;
    right: 20px;
    z-index: 2147483646;
    display: none;
    flex-direction: column;
    gap: 15px;
    background: rgba(10, 10, 20, 0.95);
    padding: 20px;
    border-radius: 20px;
    border: 1px solid var(--primary);
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.4),
          inset 0 0 10px rgba(0, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    transform-origin: bottom right;
    opacity: 0;
    transform: scale(0.8) translateY(20px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
  }
  
  .cursor-menu.active {
    display: flex;
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  
  .cursor-option {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    background-size: 70%;
    background-position: center;
    background-repeat: no-repeat;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    background-color: rgba(0, 0, 0, 0.4);
    pointer-events: auto;
  }
  
  .cursor-option:hover {
    transform: scale(1.15);
    border-color: var(--primary);
    background-color: rgba(0, 0, 0, 0.6);
    box-shadow: 0 0 15px var(--primary);
  }
  
  .cursor-option.active {
    border-color: var(--secondary);
    background-color: rgba(0, 0, 0, 0.8);
    box-shadow: 0 0 20px var(--secondary);
  }

  .cursor-toggle i {
    text-shadow: 0 0 8px var(--primary),
                 0 0 15px var(--secondary);
    transition: all 0.3s ease;
  }

  @keyframes cursorSwitch {
    0% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(0.8); }
    100% { transform: translate(-50%, -50%) scale(1); }
  }

  .cursor.switching {
    animation: cursorSwitch 0.4s ease;
  }
}

@media (hover: none) and (pointer: coarse) {
  .cursor, .cursor-trail, .cursor-menu, .cursor-toggle {
    display: none !important;
  }
}

@media (max-width: 600px) and (hover: hover) and (pointer: fine) {
  .cursor {
    width: 24px;
    height: 24px;
  }

  .cursor-trail {
    width: 18px;
    height: 18px;
  }
  
  .cursor-menu {
    bottom: 70px;
    right: 10px;
  }
  
  .cursor-option {
    width: 30px;
    height: 30px;
  }

  .cursor-toggle {
    width: 40px;
    height: 40px;
    bottom: 15px;
    right: 15px;
  }
}

.cursor {
  z-index: 2147483647 !important;
  will-change: transform, z-index;
}

.cursor-menu {
  z-index: 2147483646 !important;
  will-change: transform, z-index;
}

.cursor-toggle {
  z-index: 2147483645 !important;
}