/* MineVote Guard — „Не съм бот“ (guard.js). Неонов воксел: 3D кубче се върти докато проверява, пръсва се и рисува отметка. */
.mvg { --mvg-p: 0; --mvg-ok: #4ade80; --mvg-bad: #fb7185; position: relative; display: grid; gap: 10px; width: 100%; max-width: 420px; -webkit-tap-highlight-color: transparent; }

/* Капани: невидими за човек и за екранни четци, но в DOM-а за ботовете. */
.mvg .mvg__x { position: absolute !important; left: 0 !important; top: 0 !important; width: 1px !important; height: 1px !important; min-width: 0 !important; min-height: 0 !important;
  padding: 0 !important; margin: 0 !important; border: 0 !important; overflow: hidden !important; clip-path: inset(50%) !important; opacity: 0 !important;
  white-space: nowrap; pointer-events: none !important; }

/* ---------- кутията ---------- */
.mvg__box { position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 14px; min-height: 76px;
  padding: 12px 16px 14px 12px; border-radius: 18px; cursor: pointer; user-select: none; outline: none;
  background: linear-gradient(135deg, rgba(30, 26, 62, .95), rgba(16, 14, 38, .95)); box-shadow: inset 0 0 0 1px rgba(167, 139, 250, .28), 0 10px 30px -14px rgba(0, 0, 0, .9);
  transition: box-shadow .35s, transform .35s cubic-bezier(.34, 1.56, .64, 1), background .4s; }
.mvg__box::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .35s;
  background: radial-gradient(260px circle at var(--gx, 30%) var(--gy, 50%), rgba(167, 139, 250, .2), transparent 60%); }
.mvg__box:hover { box-shadow: inset 0 0 0 1px rgba(167, 139, 250, .55), 0 14px 34px -14px rgba(124, 58, 237, .9); transform: translateY(-1px); }
.mvg__box:hover::before { opacity: 1; }
.mvg__box:active { transform: scale(.985); }
.mvg__box:focus-visible { box-shadow: inset 0 0 0 1.5px #a78bfa, 0 0 0 4px rgba(124, 58, 237, .3); }
.mvg.is-checking .mvg__box, .mvg.is-ok .mvg__box, .mvg.is-grid .mvg__box { cursor: default; }
.mvg.is-ok .mvg__box { background: linear-gradient(135deg, rgba(20, 60, 40, .9), rgba(14, 30, 30, .95)); box-shadow: inset 0 0 0 1px rgba(74, 222, 128, .55), 0 14px 34px -16px rgba(34, 197, 94, .9); transform: none; }
.mvg.is-fail .mvg__box { box-shadow: inset 0 0 0 1px rgba(244, 63, 94, .6), 0 10px 30px -14px rgba(244, 63, 94, .6); }
.mvg.is-grid .mvg__box { box-shadow: inset 0 0 0 1px rgba(251, 191, 36, .5); }

/* сканираща линия при проверка */
.mvg__scan { position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(167, 139, 250, .22) 45%, rgba(244, 63, 94, .18) 55%, transparent); transform: translateX(-100%); }
.mvg.is-checking .mvg__scan { opacity: 1; animation: mvgScan 1.1s cubic-bezier(.65, 0, .35, 1) infinite; }
@keyframes mvgScan { to { transform: translateX(100%); } }

/* ---------- гнездото: пръстен + 3D кубче + отметка ---------- */
.mvg__slot { position: relative; width: 52px; height: 52px; display: grid; place-items: center; perspective: 220px; }
.mvg__ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.mvg__ring circle { fill: none; stroke-width: 3; }
.mvg__ringbg { stroke: rgba(167, 139, 250, .22); stroke-dasharray: 3 4.1; transition: stroke .3s; }
.mvg__box:hover .mvg__ringbg { stroke: rgba(167, 139, 250, .5); animation: mvgDash 6s linear infinite; }
@keyframes mvgDash { to { stroke-dashoffset: -71; } }
.mvg__ringv { stroke: #c084fc; stroke-linecap: round; stroke-dasharray: 106.8; stroke-dashoffset: calc(106.8 * (1 - var(--mvg-p))); transition: stroke-dashoffset .25s linear, stroke .3s;
  filter: drop-shadow(0 0 4px rgba(192, 132, 252, .8)); opacity: 0; }
.mvg.is-checking .mvg__ringv, .mvg.is-ok .mvg__ringv { opacity: 1; }
.mvg.is-ok .mvg__ringv { stroke: var(--mvg-ok); filter: drop-shadow(0 0 6px rgba(74, 222, 128, .9)); transition: stroke-dashoffset .4s ease-out, stroke .3s; }

.mvg__cube { --s: 20px; position: relative; width: var(--s); height: var(--s); transform-style: preserve-3d; transform: rotateX(-28deg) rotateY(38deg);
  transition: transform .6s cubic-bezier(.34, 1.56, .64, 1), opacity .25s; }
.mvg__cube i { position: absolute; inset: 0; border-radius: 3px; backface-visibility: hidden; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); }
.mvg__cube .c1 { transform: translateZ(10px); background: linear-gradient(135deg, #a78bfa, #7c3aed); }
.mvg__cube .c2 { transform: rotateY(180deg) translateZ(10px); background: linear-gradient(135deg, #c026d3, #7c3aed); }
.mvg__cube .c3 { transform: rotateY(90deg) translateZ(10px); background: linear-gradient(135deg, #f43f5e, #c026d3); }
.mvg__cube .c4 { transform: rotateY(-90deg) translateZ(10px); background: linear-gradient(135deg, #7c3aed, #5b21b6); }
.mvg__cube .c5 { transform: rotateX(90deg) translateZ(10px); background: linear-gradient(135deg, #ddd6fe, #a78bfa); }
.mvg__cube .c6 { transform: rotateX(-90deg) translateZ(10px); background: #2e1065; }
.mvg__box:hover .mvg__cube { transform: rotateX(-28deg) rotateY(128deg) scale(1.08); }
.mvg.is-checking .mvg__cube { animation: mvgSpin .9s linear infinite; }
@keyframes mvgSpin { from { transform: rotateX(-28deg) rotateY(0) } to { transform: rotateX(332deg) rotateY(360deg) } }
.mvg.is-ok .mvg__cube { animation: mvgPop .45s cubic-bezier(.65, 0, .35, 1) forwards; }
@keyframes mvgPop { 40% { transform: rotateX(-28deg) rotateY(80deg) scale(1.35); opacity: 1 } 100% { transform: rotateX(-28deg) rotateY(120deg) scale(0); opacity: 0 } }
.mvg.is-fail .mvg__cube { opacity: 0; transform: scale(.3); }
.mvg.is-grid .mvg__cube { animation: mvgBob 1.6s ease-in-out infinite; }
@keyframes mvgBob { 50% { transform: rotateX(-28deg) rotateY(218deg) translateY(-3px) } }

.mvg__ok, .mvg__bad { position: absolute; width: 28px; height: 28px; fill: none; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.mvg__ok { stroke: var(--mvg-ok); stroke-dasharray: 24; stroke-dashoffset: 24; filter: drop-shadow(0 0 6px rgba(74, 222, 128, .8)); }
.mvg.is-ok .mvg__ok { animation: mvgDraw .5s cubic-bezier(.16, 1, .3, 1) .3s forwards; }
@keyframes mvgDraw { to { stroke-dashoffset: 0; } }
.mvg__bad { stroke: var(--mvg-bad); opacity: 0; transform: scale(.4) rotate(-45deg); transition: opacity .2s, transform .45s cubic-bezier(.34, 1.56, .64, 1); }
.mvg.is-fail .mvg__bad { opacity: 1; transform: none; }

/* вокселчета при успех */
.mvg__fx { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; }
.mvg__fx i { position: absolute; left: 0; top: 0; width: var(--s, 5px); height: var(--s, 5px); border-radius: 1px; margin: calc(var(--s, 5px) / -2) 0 0 calc(var(--s, 5px) / -2);
  animation: mvgShard .85s cubic-bezier(.16, 1, .3, 1) .15s forwards; opacity: 0; }
@keyframes mvgShard { 0% { opacity: 1; transform: none } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--r)) scale(.4) } }

/* ---------- текст ---------- */
.mvg__txt { display: grid; gap: 2px; min-width: 0; }
.mvg__label { font: 700 1.02rem/1.25 "Exo 2", system-ui, sans-serif; color: #ecebff; transition: color .3s; }
.mvg.is-ok .mvg__label { color: var(--mvg-ok); animation: mvgIn .45s cubic-bezier(.34, 1.56, .64, 1); }
.mvg.is-fail .mvg__label { color: var(--mvg-bad); }
.mvg.is-checking .mvg__label::after { content: ""; display: inline-block; width: 1.2em; text-align: left; animation: mvgDots 1.2s steps(4) infinite; }
@keyframes mvgDots { 0% { content: "" } 25% { content: "." } 50% { content: ".." } 75% { content: "..." } }
@keyframes mvgIn { from { transform: translateY(6px); opacity: 0 } }
.mvg__sub { font-size: .76rem; color: #8b88b6; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mvg__logo { width: 34px; height: 34px; display: grid; place-items: center; transition: transform .5s cubic-bezier(.34, 1.56, .64, 1); }
.mvg__logo svg { width: 30px; height: 30px; filter: drop-shadow(0 4px 10px rgba(192, 38, 211, .55)); }
.mvg__box:hover .mvg__logo { transform: rotate(-10deg) scale(1.08); }
.mvg.is-ok .mvg__logo { animation: mvgLogo .8s cubic-bezier(.34, 1.56, .64, 1) .2s; }
@keyframes mvgLogo { 40% { transform: scale(1.25) rotate(8deg) } }

/* лента за напредъка */
.mvg__bar { position: absolute; left: 12px; right: 12px; bottom: 6px; height: 3px; border-radius: 9px; overflow: hidden; background: rgba(255, 255, 255, .05); }
.mvg__bar i { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(var(--mvg-p)); border-radius: inherit;
  background: linear-gradient(90deg, #7c3aed, #c026d3, #f43f5e); transition: transform .25s linear; box-shadow: 0 0 8px rgba(192, 38, 211, .8); }
.mvg.is-ok .mvg__bar i { background: linear-gradient(90deg, #22c55e, #4ade80); box-shadow: 0 0 8px rgba(74, 222, 128, .8); }
.mvg.is-idle .mvg__bar i, .mvg:not(.is-checking):not(.is-ok) .mvg__bar i { transition: transform .3s; }

/* съобщение */
.mvg__msg { display: flex; align-items: center; gap: 8px; min-height: 0; max-height: 0; overflow: hidden; font-size: .86rem; font-weight: 600; color: #fda4af; opacity: 0;
  transition: max-height .35s cubic-bezier(.16, 1, .3, 1), opacity .25s; }
.mvg__msg.is-on { max-height: 60px; opacity: 1; }
.mvg__msg.is-on::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 2px; background: currentColor; transform: rotate(45deg); }

/* ---------- задачата с блоковете ---------- */
.mvg__grid { padding: 14px; border-radius: 18px; background: linear-gradient(180deg, rgba(30, 26, 62, .97), rgba(14, 12, 34, .97));
  box-shadow: inset 0 0 0 1px rgba(251, 191, 36, .35), 0 20px 50px -20px rgba(0, 0, 0, .95); transform-origin: top center; }
.mvg__grid[hidden] { display: none; }
.mvg__grid.is-in { animation: mvgGridIn .5s cubic-bezier(.34, 1.56, .64, 1); }
.mvg__grid.is-out { animation: mvgGridOut .3s cubic-bezier(.65, 0, .35, 1) forwards; }
@keyframes mvgGridIn { from { opacity: 0; transform: translateY(-10px) scale(.96) } }
@keyframes mvgGridOut { to { opacity: 0; transform: translateY(-8px) scale(.97) } }
.mvg__ghead { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.mvg__ghead small { display: block; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: #fbbf24; font-weight: 700; }
.mvg__ghead span { font-size: .95rem; color: #d6d4f0; }
.mvg__ghead b { color: #fff; font-weight: 800; }
.mvg__gico { flex: none; width: 42px; height: 42px; padding: 5px; border-radius: 11px; background: rgba(0, 0, 0, .35); box-shadow: inset 0 0 0 1px rgba(251, 191, 36, .45);
  animation: mvgBob2 2s ease-in-out infinite; }
.mvg__gico img { width: 100%; height: 100%; image-rendering: pixelated; border-radius: 3px; }
@keyframes mvgBob2 { 50% { transform: translateY(-3px) rotate(-4deg) } }
.mvg__tiles { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mvg__tile { position: relative; aspect-ratio: 1; padding: 6px; border-radius: 12px; cursor: pointer; background: rgba(0, 0, 0, .35);
  box-shadow: inset 0 0 0 1px rgba(167, 139, 250, .22); transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), box-shadow .25s, background .25s;
  animation: mvgTile .45s cubic-bezier(.34, 1.56, .64, 1) both; animation-delay: var(--d, 0ms); }
@keyframes mvgTile { from { opacity: 0; transform: scale(.6) rotate(-8deg) } }
.mvg__tile img { width: 100%; height: 100%; display: block; border-radius: 5px; image-rendering: pixelated; pointer-events: none; transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), filter .25s; }
.mvg__tile:hover { box-shadow: inset 0 0 0 1.5px rgba(167, 139, 250, .7); transform: translateY(-2px); }
.mvg__tile:hover img { transform: scale(1.04); }
.mvg__tile:focus-visible { outline: 2px solid #fbbf24; outline-offset: 2px; }
.mvg__tile[aria-pressed="true"] { background: rgba(74, 222, 128, .14); box-shadow: inset 0 0 0 2px var(--mvg-ok), 0 0 18px -4px rgba(74, 222, 128, .8); }
.mvg__tile[aria-pressed="true"] img { transform: scale(.86); filter: brightness(1.1); }
.mvg__tk { position: absolute; right: -6px; top: -6px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--mvg-ok); color: #062012;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .5); opacity: 0; transform: scale(.3); transition: opacity .2s, transform .35s cubic-bezier(.34, 1.56, .64, 1); }
.mvg__tk svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }
.mvg__tile[aria-pressed="true"] .mvg__tk { opacity: 1; transform: none; }
.mvg__gfoot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; }
.mvg__left { flex: 1; text-align: center; font-size: .78rem; color: #fbbf24; font-weight: 700; }
.mvg__new, .mvg__go { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 11px; font: 700 .86rem/1 "Exo 2", system-ui, sans-serif; cursor: pointer;
  transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), box-shadow .25s, background .25s; }
.mvg__new svg, .mvg__go svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .5s cubic-bezier(.34, 1.56, .64, 1); }
.mvg__new { color: #c4b5fd; background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px rgba(167, 139, 250, .3); }
.mvg__new:hover { background: rgba(167, 139, 250, .12); }
.mvg__new:hover svg { transform: rotate(180deg); }
.mvg__go { color: #062012; background: linear-gradient(135deg, #4ade80, #22c55e); box-shadow: 0 6px 18px -6px rgba(34, 197, 94, .9); }
.mvg__go:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -6px rgba(34, 197, 94, 1); }
.mvg__go:active, .mvg__new:active { transform: scale(.95); }
.mvg__go.is-busy { pointer-events: none; opacity: .7; }
.mvg__go.is-busy svg { animation: mvgSpinFlat .8s linear infinite; }
@keyframes mvgSpinFlat { to { transform: rotate(360deg) } }

.mvg-shake { animation: mvgShake .45s cubic-bezier(.36, .07, .19, .97); }
@keyframes mvgShake { 20% { transform: translateX(-6px) } 40% { transform: translateX(6px) } 60% { transform: translateX(-4px) } 80% { transform: translateX(3px) } }

/* ---------- без JavaScript: блокчетата са направо във формата ---------- */
.mvg__fb { display: none; padding: 14px; border-radius: 18px; background: rgba(21, 19, 46, .95); box-shadow: inset 0 0 0 1px rgba(167, 139, 250, .3); color: #d6d4f0; }
.mvg.is-fb .mvg__fb { display: block; animation: mvgGridIn .5s cubic-bezier(.34, 1.56, .64, 1); }
.mvg.is-fb .mvg__box { display: none; }
.mvg__fbh { margin: 0 0 12px; font-size: .95rem; line-height: 1.4; }
.mvg__fbh span { display: block; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #fbbf24; margin-bottom: 2px; }
.mvg__fbh b { color: #fff; }
.mvg__fbt { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 280px; }
.mvg__fbi { position: relative; display: block; aspect-ratio: 1; padding: 6px; border-radius: 12px; cursor: pointer; background: rgba(0, 0, 0, .35); box-shadow: inset 0 0 0 1px rgba(167, 139, 250, .25);
  transition: box-shadow .25s, background .25s; }
.mvg__fbi img { display: block; width: 100%; height: 100%; border-radius: 5px; image-rendering: pixelated; }
.mvg__fbi input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mvg__fbk { position: absolute; right: -5px; top: -5px; width: 22px; height: 22px; border-radius: 50%; background: rgba(8, 7, 24, .9); box-shadow: inset 0 0 0 1.5px rgba(167, 139, 250, .6); }
.mvg__fbi:has(input:checked) { background: rgba(74, 222, 128, .14); box-shadow: inset 0 0 0 2px #4ade80; }
.mvg__fbi:has(input:checked) .mvg__fbk { background: #4ade80 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23062012' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/14px no-repeat; box-shadow: none; }
.mvg__fbi:has(input:focus-visible) { outline: 2px solid #fbbf24; outline-offset: 2px; }
.mvg__fbs { display: block; margin-top: 10px; font-size: .8rem; color: #8b88b6; }

@media (max-width: 420px) {
  .mvg__box { grid-template-columns: 46px 1fr auto; gap: 10px; padding-left: 10px; }
  .mvg__slot { width: 46px; height: 46px; }
  .mvg__sub { font-size: .72rem; }
  .mvg__tiles { gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .mvg *, .mvg *::before, .mvg *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .mvg.is-ok .mvg__ok { stroke-dashoffset: 0; }
  .mvg.is-ok .mvg__cube { opacity: 0; }
}

/* Невидими копия на кутийката (капани): нулев размер, без мишка, извън Tab реда. */
.mvg .mvg__box.mvg__dz { position: absolute !important; left: 0 !important; top: 0 !important; width: 0 !important; height: 0 !important; min-height: 0 !important;
  padding: 0 !important; margin: 0 !important; border: 0 !important; overflow: hidden !important; opacity: 0 !important; clip-path: inset(50%) !important;
  pointer-events: none !important; box-shadow: none !important; }
