/* ============================================================
   effects.css — do'kon UI effektlari (effects.js bilan birga)
   Hech biri bosishlarni to'smaydi: pointer-events: none.
   ============================================================ */

/* ---------- 1) ClickSpark ---------- */
#lu-fx-spark { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 2147483000; }

/* ---------- 2) Magnet ---------- */
.lu-mag { transition: translate .3s ease-out, background-color .2s, border-color .2s, color .2s, opacity .2s, box-shadow .2s !important; }
.lu-mag-out { transition: translate .5s ease-in-out, background-color .2s, border-color .2s, color .2s, opacity .2s, box-shadow .2s !important; }

/* ---------- 3) Crosshair ---------- */
#lu-fx-cross { --ch-c: #fff; --ch-o: .85; position: fixed; inset: 0; pointer-events: none; z-index: 2147482999; opacity: 0; transition: opacity .15s; }
#lu-fx-cross.on { opacity: 1; }
body.light #lu-fx-cross { --ch-c: #14121f; --ch-o: .6; }
#lu-fx-cross i { position: absolute; left: 0; top: 0; background: var(--ch-c); opacity: var(--ch-o); will-change: transform; }
#lu-fx-cross .lu-ch-h { width: 100%; height: 1px; }
#lu-fx-cross .lu-ch-v { width: 1px; height: 100%; }
#lu-fx-cross .lu-ch-box { position: absolute; left: 0; top: 0; opacity: 0; transition: transform .16s ease-out, width .16s ease-out, height .16s ease-out, opacity .12s; }
#lu-fx-cross.locked .lu-ch-box { opacity: 1; }
#lu-fx-cross .lu-ch-box s { position: absolute; width: 9px; height: 9px; border: 0 solid var(--ch-c); opacity: var(--ch-o); }
#lu-fx-cross .lu-ch-box s:nth-child(1) { left: 0; top: 0; border-left-width: 1.5px; border-top-width: 1.5px; }
#lu-fx-cross .lu-ch-box s:nth-child(2) { right: 0; top: 0; border-right-width: 1.5px; border-top-width: 1.5px; }
#lu-fx-cross .lu-ch-box s:nth-child(3) { left: 0; bottom: 0; border-left-width: 1.5px; border-bottom-width: 1.5px; }
#lu-fx-cross .lu-ch-box s:nth-child(4) { right: 0; bottom: 0; border-right-width: 1.5px; border-bottom-width: 1.5px; }
#lu-fx-cross .lu-ch-xy { position: absolute; left: 0; top: 0; font: 600 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ch-c); opacity: .7; padding: 2px 4px; border-radius: 4px; background: color-mix(in srgb, var(--bg, #000) 55%, transparent); white-space: nowrap; }
html.lu-still #lu-fx-cross .lu-ch-box { transition: opacity .12s; }

/* ---------- 4) StarBorder ---------- */
@property --lu-sb-a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
html { --lu-sb-c: #fff; --lu-sb-t: #fff; }
body.light { --lu-sb-c: var(--accent); --lu-sb-t: var(--accent); }
html.lu-fx-star :is(.add-task-btn, .btn-save, .ct-btn-save, #reyting-me-card),
.lu-sb-demo { position: relative; }
html.lu-fx-star :is(.add-task-btn, .btn-save, .ct-btn-save, #reyting-me-card)::after,
html.lu-fx-star :is(.add-task-btn, .btn-save, .ct-btn-save, #reyting-me-card)::before,
.lu-sb-demo::after, .lu-sb-demo::before {
  content: ''; position: absolute; pointer-events: none; border-radius: inherit;
  /* trailLength .3: dumning uzunligi aylanishning 30% i; yulduz boshi — eng yorqin */
  background: conic-gradient(from var(--lu-sb-a),
    transparent 0deg 252deg,
    color-mix(in srgb, var(--lu-sb-t) 0%, transparent) 252deg,
    color-mix(in srgb, var(--lu-sb-t) 75%, transparent) 345deg,
    var(--lu-sb-c) 357deg, transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: lu-sb-spin 4s linear infinite; /* clockwise, duration 4s */
}
/* chegara chizig'i: thickness 1 */
html.lu-fx-star :is(.add-task-btn, .btn-save, .ct-btn-save, #reyting-me-card)::after, .lu-sb-demo::after { inset: 0; padding: 1px; }
/* glow .6 — tashqariga yumshoq nur (mask filtrdan keyin, shuning uchun alohida qatlam) */
html.lu-fx-star :is(.add-task-btn, .btn-save, .ct-btn-save, #reyting-me-card)::before, .lu-sb-demo::before { inset: -4px; padding: 4px; filter: blur(3px); opacity: .6; }
@keyframes lu-sb-spin { to { --lu-sb-a: 360deg; } }
/* clickPulse */
.lu-sb-pulse { animation: lu-sb-pulse .65s ease-out; }
@keyframes lu-sb-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--lu-sb-c) 55%, transparent); } 100% { box-shadow: 0 0 0 12px transparent; } }
/* Harakatsiz rejim: yulduz bir joyda to'xtaydi */
html.lu-still :is(.add-task-btn, .btn-save, .ct-btn-save, #reyting-me-card, .lu-sb-demo)::after,
html.lu-still :is(.add-task-btn, .btn-save, .ct-btn-save, #reyting-me-card, .lu-sb-demo)::before { animation-play-state: paused; }
html.lu-still .lu-sb-pulse { animation: none; }
@media (prefers-reduced-motion: reduce) {
  :is(.add-task-btn, .btn-save, .ct-btn-save, #reyting-me-card, .lu-sb-demo)::after,
  :is(.add-task-btn, .btn-save, .ct-btn-save, #reyting-me-card, .lu-sb-demo)::before { animation-play-state: paused !important; }
  .lu-sb-pulse { animation: none !important; }
}

/* ---------- Do'kon preview'lari ---------- */
.fxp { position: relative; width: 100%; height: 56px; border-radius: 10px; overflow: hidden; background: color-mix(in srgb, var(--accent) 10%, var(--bg, #0e0e12)); display: flex; align-items: center; justify-content: center; }
.fxp-btn { position: relative; padding: 5px 12px; border-radius: 9px; font-size: 11px; font-weight: 700; color: var(--text); background: var(--surface2, rgba(255,255,255,.08)); border: 1px solid var(--border); }
/* spark: 8 ta chiziq */
.fxp-spark i { position: absolute; left: 50%; top: 50%; width: 2px; height: 9px; margin: -4.5px -1px; border-radius: 2px; background: var(--accent); opacity: 0; animation: fxp-spark 1.6s ease-out infinite; }
.fxp-spark i:nth-child(1) { --r: 0deg; } .fxp-spark i:nth-child(2) { --r: 45deg; } .fxp-spark i:nth-child(3) { --r: 90deg; } .fxp-spark i:nth-child(4) { --r: 135deg; }
.fxp-spark i:nth-child(5) { --r: 180deg; } .fxp-spark i:nth-child(6) { --r: 225deg; } .fxp-spark i:nth-child(7) { --r: 270deg; } .fxp-spark i:nth-child(8) { --r: 315deg; }
@keyframes fxp-spark { 0% { opacity: 1; transform: rotate(var(--r)) translateY(-4px) scaleY(1.4); } 35% { opacity: 1; } 45% { opacity: 0; transform: rotate(var(--r)) translateY(-22px) scaleY(.2); } 100% { opacity: 0; transform: rotate(var(--r)) translateY(-22px) scaleY(.2); } }
/* magnet */
.fxp-mag .fxp-btn { animation: fxp-mag-b 2.6s ease-in-out infinite; }
.fxp-cur { position: absolute; left: 50%; top: 50%; width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 12px solid var(--text); transform: rotate(-30deg); animation: fxp-mag-c 2.6s ease-in-out infinite; }
@keyframes fxp-mag-c { 0%, 100% { translate: 34px 14px; } 50% { translate: -40px -12px; } }
@keyframes fxp-mag-b { 0%, 100% { translate: 9px 4px; } 50% { translate: -10px -4px; } }
/* crosshair */
.fxp-ch i { position: absolute; background: var(--text); opacity: .75; }
.fxp-ch .h { left: 0; right: 0; height: 1px; top: 50%; animation: fxp-ch-y 3s ease-in-out infinite; }
.fxp-ch .v { top: 0; bottom: 0; width: 1px; left: 50%; animation: fxp-ch-x 3s ease-in-out infinite; }
.fxp-ch b { position: absolute; left: 50%; top: 50%; width: 46px; height: 30px; margin: -15px -23px; border: 1.5px solid var(--text); -webkit-mask: conic-gradient(#000 0 0) 0 0 / 10px 10px no-repeat, conic-gradient(#000 0 0) 100% 0 / 10px 10px no-repeat, conic-gradient(#000 0 0) 0 100% / 10px 10px no-repeat, conic-gradient(#000 0 0) 100% 100% / 10px 10px no-repeat; mask: conic-gradient(#000 0 0) 0 0 / 10px 10px no-repeat, conic-gradient(#000 0 0) 100% 0 / 10px 10px no-repeat, conic-gradient(#000 0 0) 0 100% / 10px 10px no-repeat, conic-gradient(#000 0 0) 100% 100% / 10px 10px no-repeat; opacity: 0; animation: fxp-ch-lock 3s ease-in-out infinite; }
@keyframes fxp-ch-x { 0%, 100% { transform: translateX(-38px); } 40%, 70% { transform: translateX(0); } }
@keyframes fxp-ch-y { 0%, 100% { transform: translateY(14px); } 40%, 70% { transform: translateY(0); } }
@keyframes fxp-ch-lock { 0%, 35%, 80%, 100% { opacity: 0; transform: scale(1.3); } 45%, 70% { opacity: .9; transform: scale(1); } }
/* star border preview */
.fxp-star .fxp-btn { padding: 7px 16px; border-radius: 12px; }
html.lu-still .fxp *, html.lu-still .fxp { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) { .fxp, .fxp * { animation: none !important; } }

/* ---------- Sozlamalar ro'yxati ---------- */
.lu-fx-set { display: flex; flex-direction: column; gap: 8px; }
.lu-fx-row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--radius-md, 12px); border: 1px solid var(--border); background: var(--surface2); }
.lu-fx-ic { font-size: 20px; flex-shrink: 0; }
.lu-fx-tx { flex: 1; min-width: 0; }
.lu-fx-n { font-size: var(--fs-sm, 13px); font-weight: 700; color: var(--text); }
.lu-fx-d { font-size: var(--fs-2xs, 11px); color: var(--text-muted); line-height: 1.35; }
.lu-fx-buy { flex-shrink: 0; padding: 6px 10px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--gold, #f5b041) 45%, transparent); background: color-mix(in srgb, var(--gold, #f5b041) 12%, transparent); color: var(--gold, #f5b041); font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; white-space: nowrap; }

/* ---------- Do'kon: kategoriya chiplari, dizayn kartalari ---------- */
.x-shop-cats { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0 2px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.x-shop-cats::-webkit-scrollbar { display: none; }
.x-shop-cats button { flex-shrink: 0; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface2, transparent); color: var(--text); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.x-shop-cats button:hover { border-color: var(--accent); }
.x-shop-dz .dz-prev { width: 100%; height: 64px; }
.x-shop-dz:not(.own):not(.on) .dz-prev { filter: saturate(.7) brightness(.8); }
.x-shop-note { font-size: 10.5px; color: var(--text-muted); margin-top: -3px; }
.x-shop-flash { animation: x-shop-flash 1.6s ease-out; }
@keyframes x-shop-flash { 0%, 40% { box-shadow: 0 0 0 3px var(--accent), 0 0 24px var(--accent-glow); } 100% { box-shadow: 0 0 0 0 transparent; } }
