/* ==========================================================================
   딸깍공 프리미엄 3D 입체 커서 & 클릭·홀드 파동 인터랙션 시스템 (ddk-pointer.css)
   - 1. 평상시: 선명한 굵기 + 입체 3D 섀도우 네이티브 화살표/손가락 커서 (시야 방해 0%)
   - 2. 클릭 순간: 렌즈 굴절 입체 펄스 파동 (3D Bevel Ripple)
   - 3. 클릭 유지(홀드): 꾹 누르고 있을 때 에너지가 모이며 호흡하는 3D 차지 오라 (Hold Aura)
   - 4. 홀드 해제: 누르고 있다가 뗄 때 시원하게 방출되는 버스트 충격파 (Release Burst)
   ========================================================================== */

/* ── 1. 기본 네이티브 커서 (3.2px 굵기 + 3D 뎁스) ── */
html, body {
  cursor: url('/cursors/cursor_default.svg') 5 3, default !important;
}

a, button, [role="button"], [role="tab"], input[type="button"], input[type="submit"], select, .tab, .btn {
  cursor: url('/cursors/hand_default.svg') 12 4, pointer !important;
}

input[type="text"], input[type="password"], input[type="email"], input[type="search"], textarea {
  cursor: text !important;
}

/* ── 테마별 커서 컬러 자동 동기화 ── */
html[data-ddk-studio="apple-pro"],
html[data-ddk-studio="apple-pro"] body {
  cursor: url('/cursors/cursor_apple-pro.svg') 5 3, default !important;
}
html[data-ddk-studio="apple-pro"] a,
html[data-ddk-studio="apple-pro"] button,
html[data-ddk-studio="apple-pro"] [role="button"],
html[data-ddk-studio="apple-pro"] .tab {
  cursor: url('/cursors/hand_apple-pro.svg') 12 4, pointer !important;
}

html[data-ddk-studio="netflix-dark"],
html[data-ddk-studio="netflix-dark"] body {
  cursor: url('/cursors/cursor_netflix-dark.svg') 5 3, default !important;
}
html[data-ddk-studio="netflix-dark"] a,
html[data-ddk-studio="netflix-dark"] button,
html[data-ddk-studio="netflix-dark"] [role="button"],
html[data-ddk-studio="netflix-dark"] .tab {
  cursor: url('/cursors/hand_netflix-dark.svg') 12 4, pointer !important;
}

html[data-ddk-studio="capcut-creator"],
html[data-ddk-studio="capcut-creator"] body {
  cursor: url('/cursors/cursor_capcut-creator.svg') 5 3, default !important;
}
html[data-ddk-studio="capcut-creator"] a,
html[data-ddk-studio="capcut-creator"] button,
html[data-ddk-studio="capcut-creator"] [role="button"],
html[data-ddk-studio="capcut-creator"] .tab {
  cursor: url('/cursors/hand_capcut-creator.svg') 12 4, pointer !important;
}

html[data-ddk-studio="linear-minimal"],
html[data-ddk-studio="linear-minimal"] body {
  cursor: url('/cursors/cursor_linear-minimal.svg') 5 3, default !important;
}
html[data-ddk-studio="linear-minimal"] a,
html[data-ddk-studio="linear-minimal"] button,
html[data-ddk-studio="linear-minimal"] [role="button"],
html[data-ddk-studio="linear-minimal"] .tab {
  cursor: url('/cursors/hand_linear-minimal.svg') 12 4, pointer !important;
}

/* ==========================================================================
   2. 클릭 & 홀드 입체 인터랙션 파동 (DOM FX)
   ========================================================================== */

/* ── A. 단발 클릭: 렌즈 굴절 입체 펄스 파동 ── */
.ddk-3d-click-pulse {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 999999;
  transform: translate(-50%, -50%) scale(0.2);
  /* 3D 엠보싱 렌즈 림: 상단 밝은 하이라이트 + 하단 섀도우 */
  border: 2px solid var(--ddk-accent, #0A84FF);
  box-shadow: 
    0 0 14px var(--ddk-accent, #0A84FF),
    inset 0 1px 2px rgba(255, 255, 255, 0.8),
    0 4px 12px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
  animation: ddk3dPulse 0.45s cubic-bezier(0.12, 0.8, 0.25, 1) forwards;
}

@keyframes ddk3dPulse {
  0% {
    width: 14px;
    height: 14px;
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.3);
  }
  100% {
    width: 68px;
    height: 68px;
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.6);
    border-width: 1px;
  }
}

/* ── B. 클릭 유지 (홀드): 호흡하듯 에너지를 모으는 3D 차지 오라 ── */
.ddk-3d-hold-aura {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 999998;
  transform: translate(-50%, -50%) scale(1);
  width: 42px;
  height: 42px;
  border: 2px solid var(--ddk-accent, #0A84FF);
  background: radial-gradient(circle, var(--ddk-pointer-hold-bg, rgba(10, 132, 255, 0.2)) 0%, transparent 70%);
  box-shadow: 
    0 0 18px var(--ddk-accent, #0A84FF),
    inset 0 0 10px var(--ddk-accent, #0A84FF);
  animation: ddkHoldBreathe 1.2s ease-in-out infinite alternate;
}

@keyframes ddkHoldBreathe {
  0% {
    width: 34px;
    height: 34px;
    box-shadow: 0 0 12px var(--ddk-accent, #0A84FF), inset 0 0 6px var(--ddk-accent, #0A84FF);
    transform: translate(-50%, -50%) scale(0.92);
  }
  100% {
    width: 50px;
    height: 50px;
    box-shadow: 0 0 24px var(--ddk-accent, #0A84FF), inset 0 0 14px var(--ddk-accent, #0A84FF);
    transform: translate(-50%, -50%) scale(1.12);
  }
}

/* ── C. 홀드 해제: 꾹 누르고 있다가 뗄 때 방출되는 강력한 3D 버스트 충격파 ── */
.ddk-3d-release-burst {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 999999;
  transform: translate(-50%, -50%) scale(0.4);
  border: 2.5px solid #FFFFFF;
  box-shadow: 
    0 0 26px var(--ddk-accent, #0A84FF),
    0 0 50px var(--ddk-accent, #0A84FF),
    inset 0 0 14px #FFFFFF;
  animation: ddkReleaseBurst 0.6s cubic-bezier(0.08, 0.82, 0.2, 1) forwards;
}

@keyframes ddkReleaseBurst {
  0% {
    width: 40px;
    height: 40px;
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.6);
  }
  100% {
    width: 140px;
    height: 140px;
    opacity: 0;
    transform: translate(-50%, -50%) scale(2.2);
    border-width: 1px;
  }
}

/* 모바일 터치 대응 */
@media (pointer: coarse) {
  .ddk-3d-click-pulse,
  .ddk-3d-hold-aura,
  .ddk-3d-release-burst {
    display: none !important;
  }
}
