/* ==========================================================================
   GK DreamZ - Global Premium Custom Cursor
   Desktop pointer only; disabled on touch/mobile devices
   ========================================================================== */

@media (hover: hover) and (pointer: fine) and (min-width: 901px) {
  html.has-custom-cursor,
  html.has-custom-cursor body,
  html.has-custom-cursor a,
  html.has-custom-cursor button,
  html.has-custom-cursor input,
  html.has-custom-cursor textarea,
  html.has-custom-cursor select,
  html.has-custom-cursor [role="button"],
  html.has-custom-cursor label {
    cursor: none !important;
  }
}

.music-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 999999;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.music-cursor.is-visible {
  opacity: 1;
}

/* Crimson inner dot */
.music-cursor__dot {
  position: absolute;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff1730;
  box-shadow: 0 0 10px rgba(255, 23, 48, 0.7);
  transform: translate(-50%, -50%);
  pointer-events: none;
  will-change: transform;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1),
              background-color 0.2s,
              box-shadow 0.2s,
              opacity 0.2s;
}

/* Outer ring with restrained gold/crimson styling */
.music-cursor__ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 23, 48, 0.5);
  box-shadow: 0 0 15px rgba(255, 23, 48, 0.15);
  transform: translate(-50%, -50%);
  pointer-events: none;
  will-change: transform, width, height;
  transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              height 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.25s ease,
              background-color 0.25s ease,
              box-shadow 0.25s ease,
              opacity 0.2s ease;
}

/* Music wave / pulse effect */
.music-cursor__pulse {
  position: absolute;
  top: 0;
  left: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(196, 141, 63, 0.6);
  transform: translate(-50%, -50%) scale(0.9);
  opacity: 0;
  pointer-events: none;
}

/* Text beam / Caret indicator */
.music-cursor__beam {
  position: absolute;
  top: 0;
  left: 0;
  width: 2px;
  height: 22px;
  background: #ff1730;
  border-radius: 1px;
  box-shadow: 0 0 6px rgba(255, 23, 48, 0.6);
  transform: translate(-50%, -50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

/* Hover state: links, buttons, interactive cards */
.music-cursor.is-hover .music-cursor__dot {
  transform: translate(-50%, -50%) scale(1.4);
  background: #ff1730;
  box-shadow: 0 0 14px rgba(255, 23, 48, 0.9);
}

.music-cursor.is-hover .music-cursor__ring {
  width: 52px;
  height: 52px;
  border-color: #c48d3f;
  background-color: rgba(255, 23, 48, 0.06);
  box-shadow: 0 0 24px rgba(196, 141, 63, 0.35), 0 0 12px rgba(255, 23, 48, 0.2);
}

.music-cursor.is-hover .music-cursor__pulse {
  animation: cursorPulse 1.6s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

@keyframes cursorPulse {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.8;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.6);
    opacity: 0;
  }
}

/* Pressed / Click state */
.music-cursor.is-pressed .music-cursor__dot {
  transform: translate(-50%, -50%) scale(0.7);
  background: #c48d3f;
}

.music-cursor.is-pressed .music-cursor__ring {
  width: 28px;
  height: 28px;
  border-color: #ff1730;
  background-color: rgba(255, 23, 48, 0.25);
  box-shadow: 0 0 20px rgba(255, 23, 48, 0.45);
}

/* Text / Input state */
.music-cursor.is-text .music-cursor__dot {
  opacity: 0;
}

.music-cursor.is-text .music-cursor__ring {
  width: 14px;
  height: 26px;
  border-radius: 6px;
  border-color: rgba(196, 141, 63, 0.5);
  background-color: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.music-cursor.is-text .music-cursor__beam {
  opacity: 1;
  animation: cursorBlink 1.05s infinite ease-in-out;
}

@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

/* Disabled state */
.music-cursor.is-disabled .music-cursor__dot {
  background: #8c8694;
  box-shadow: none;
}

.music-cursor.is-disabled .music-cursor__ring {
  border-color: rgba(140, 134, 148, 0.4);
  border-style: dashed;
  box-shadow: none;
}

/* Mobile & Touch disable */
@media (hover: none), (pointer: coarse), (max-width: 900px) {
  .music-cursor {
    display: none !important;
  }
  html.has-custom-cursor,
  html.has-custom-cursor * {
    cursor: auto !important;
  }
}

/* Reduced Motion Override */
@media (prefers-reduced-motion: reduce) {
  .music-cursor__dot,
  .music-cursor__ring,
  .music-cursor__beam,
  .music-cursor__pulse {
    transition: none !important;
    animation: none !important;
  }
}
