/* Registracija: 4 koraka, 3D karakter, licna karta, efekti */
.page-reg { overflow-x: hidden; }
.reg { position: relative; isolation: isolate; width: min(1180px, 100% - 32px); margin: 34px auto 40px; }
.reg-bg, .reg-fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.reg-bg { z-index: -1; opacity: .9; }
.reg-fx { z-index: 60; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.reg-shell {
  display: grid; grid-template-columns: minmax(300px, .85fr) 1.15fr; gap: 0;
  border-radius: 24px; overflow: hidden; border: 1px solid var(--glass-line-2, var(--line-2));
  background: hsl(calc(var(--h) + 5) calc(54.5% * var(--sat)) 8.6% / .72); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 40px 120px -40px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 255, 255, .05);
  animation: reg-in .8s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes reg-in { from { opacity: 0; transform: translateY(24px) scale(.98); } }

/* ---- 3D scena */
.reg-stage {
  position: relative; display: flex; flex-direction: column; padding: 28px 26px 24px; overflow: hidden;
  background:
    radial-gradient(420px 360px at 50% 62%, hsl(var(--h) calc(55.1% * var(--sat)) 50.2% / .28), transparent 70%),
    radial-gradient(300px 200px at 90% 0%, rgba(224, 72, 91, .14), transparent 70%),
    linear-gradient(170deg, hsl(calc(var(--h) + 3) calc(60.9% * var(--sat)) 18%), hsl(calc(var(--h) + 5) calc(57.9% * var(--sat)) 7.5%) 70%);
  border-right: 1px solid var(--glass-line, var(--line));
}
.reg-stage::after { /* scan linije */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .25;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .03) 0 1px, transparent 1px 4px);
}
.reg-stage-top { position: relative; z-index: 2; }
.reg-stage-name { display: block; font: 700 30px/1.05 var(--f-head); text-transform: uppercase; letter-spacing: .04em; color: #fff; min-height: 1.05em; transition: opacity .25s, transform .25s; overflow-wrap: anywhere; }
.reg-stage-name.pop { animation: reg-pop .45s cubic-bezier(.2, .9, .3, 1.4); }
@keyframes reg-pop { 40% { transform: scale(1.06); color: var(--blue-3); } }
.reg-3d { position: relative; flex: 1; min-height: 420px; margin: 4px -26px 0; cursor: grab; }
.reg-3d.is-drag { cursor: grabbing; }
.reg-3d canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; }
.reg-3d-fallback { position: absolute; left: 50%; bottom: 8%; height: 78%; transform: translateX(-50%); object-fit: contain; filter: drop-shadow(0 20px 30px rgba(0, 0, 0, .6)); transition: opacity .4s; }
.reg-3d.is-3d .reg-3d-fallback { opacity: 0; }
.reg-3d.is-3d.is-error .reg-3d-fallback { opacity: 1; }
.reg-3d-load { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; gap: 6px; opacity: 0; transition: opacity .2s; }
.reg-3d.is-loading .reg-3d-load { opacity: 1; }
.reg-3d-load i { width: 8px; height: 8px; border-radius: 50%; background: var(--blue-2); animation: reg-dot 1s infinite ease-in-out; }
.reg-3d-load i:nth-child(2) { animation-delay: .15s; } .reg-3d-load i:nth-child(3) { animation-delay: .3s; }
@keyframes reg-dot { 50% { transform: translateY(-8px); opacity: .4; } }

.reg-skin-nav { position: relative; z-index: 2; display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 6px; font: 600 15px var(--f-head); letter-spacing: .12em; text-transform: uppercase; color: var(--blue-3); }
.reg-arrow {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); background: hsl(var(--h) calc(55.1% * var(--sat)) 50.2% / .1); color: #fff;
  font: 400 26px/1 var(--f-head); cursor: pointer; display: grid; place-items: center; padding-bottom: 3px;
  transition: transform .2s, background .2s, box-shadow .2s;
}
.reg-arrow:hover { background: hsl(var(--h) calc(55.1% * var(--sat)) 50.2% / .25); box-shadow: 0 0 0 4px hsl(var(--h) calc(71.3% * var(--sat)) 61.8% / .12), 0 0 24px hsl(var(--h) calc(71.3% * var(--sat)) 61.8% / .4); transform: scale(1.06); }
.reg-arrow:active { transform: scale(.94); }
.reg-hint { position: relative; z-index: 2; text-align: center; font-size: 12px; color: hsl(calc(var(--h) + 2) calc(18% * var(--sat)) 52.2%); margin: 8px 0 14px; }
.reg-perks { position: relative; z-index: 2; list-style: none; padding: 14px 0 0; margin: 0; display: grid; gap: 8px; border-top: 1px solid var(--glass-line, var(--line)); }
.reg-perks li { display: flex; align-items: center; gap: 10px; font-size: 13px; color: hsl(calc(var(--h) + 2) calc(38.8% * var(--sat)) 83.3%); }
.reg-perks .ico { color: var(--blue-2); }

/* ---- forma */
.reg-form { position: relative; padding: 32px 38px 28px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.reg-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.reg-head { align-items: center; }
.reg-head h1 { font: 700 40px/1 var(--f-head); text-transform: uppercase; margin: 0; letter-spacing: .03em; }
.reg-sound { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line-2); background: hsl(var(--h) calc(55.1% * var(--sat)) 50.2% / .08); color: var(--blue-3); cursor: pointer; display: grid; place-items: center; transition: background .2s, color .2s; }
.reg-sound:hover { background: hsl(var(--h) calc(55.1% * var(--sat)) 50.2% / .2); color: #fff; }
.reg-sound[aria-pressed="false"] { color: hsl(calc(var(--h) + 3) calc(19.5% * var(--sat)) 45.3%); }
.reg-sound[aria-pressed="false"] .wave { opacity: 0; }
.reg-sound .wave { transition: opacity .2s; }

/* progress */
.reg-progress { position: relative; list-style: none; margin: 4px 0 4px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); }
.reg-progress li { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.reg-progress em { font: 600 11px var(--f-head); font-style: normal; letter-spacing: .14em; text-transform: uppercase; color: hsl(calc(var(--h) + 3) calc(19.5% * var(--sat)) 45.3%); transition: color .3s; }
.reg-dot { position: relative; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: hsl(calc(var(--h) + 4) calc(53.2% * var(--sat)) 9.2%); border: 1px solid var(--line-2); color: hsl(calc(var(--h) + 2) calc(18% * var(--sat)) 52.2%); transition: background .35s, border-color .35s, color .35s, box-shadow .35s, transform .35s; }
.reg-dot b { font: 700 14px var(--f-head); transition: opacity .2s, transform .3s; }
.reg-dot svg { position: absolute; width: 18px; height: 18px; opacity: 0; transform: scale(.4); transition: opacity .25s, transform .35s cubic-bezier(.3, 1.6, .5, 1); stroke-dasharray: 24; stroke-dashoffset: 24; }
.reg-progress li.on .reg-dot { border-color: var(--blue-2); color: #fff; background: hsl(var(--h) calc(55.1% * var(--sat)) 50.2% / .25); box-shadow: 0 0 0 5px hsl(var(--h) calc(71.3% * var(--sat)) 61.8% / .12), 0 0 22px hsl(var(--h) calc(71.3% * var(--sat)) 61.8% / .45); transform: scale(1.08); }
.reg-progress li.on em, .reg-progress li.done em { color: var(--blue-3); }
.reg-progress li.done .reg-dot { background: linear-gradient(180deg, #4fe0a8, #22b07a); border-color: transparent; color: #06261a; }
.reg-progress li.done .reg-dot b { opacity: 0; transform: scale(.4); }
.reg-progress li.done .reg-dot svg { opacity: 1; transform: none; stroke-dashoffset: 0; transition: opacity .2s, transform .35s cubic-bezier(.3, 1.6, .5, 1), stroke-dashoffset .4s .1s; }
.reg-progress li[data-dot] { cursor: default; }
.reg-progress li.done { cursor: pointer; }
.reg-bar { position: absolute; left: 12.5%; right: 12.5%; top: 17px; height: 2px; background: var(--line); border-radius: 2px; z-index: 0; overflow: hidden; }
.reg-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #22b07a, var(--blue-2)); box-shadow: 0 0 12px var(--blue-2); transition: width .6s cubic-bezier(.6, 0, .2, 1); }

/* koraci */
.reg-steps { position: relative; }
.reg-step { display: flex; flex-direction: column; gap: 14px; }
.reg-step + .reg-step { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.reg-step-title { display: flex; align-items: baseline; gap: 10px; margin: 0; font: 600 20px var(--f-head); text-transform: uppercase; letter-spacing: .06em; color: #fff; }
.reg-step-title span { font-size: 14px; color: transparent; -webkit-text-stroke: 1px var(--blue-2); }
.reg-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 6px; }
.reg-nav .btn { min-width: 130px; justify-content: center; }
.reg-submit { flex: 1; max-width: 300px; position: relative; overflow: hidden; }
.reg-submit::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%); transform: translateX(-100%); animation: reg-shine 3.2s infinite; }
@keyframes reg-shine { 60%, 100% { transform: translateX(100%); } }

html.reg-js .reg-steps { display: grid; }
html.reg-js .reg-step { grid-area: 1 / 1; margin: 0; padding: 0; border: 0; visibility: hidden; opacity: 0; pointer-events: none; transform: translateX(40px); transition: opacity .45s, transform .55s cubic-bezier(.2, .8, .2, 1), visibility 0s .55s; }
html.reg-js .reg-step.left { transform: translateX(-40px); }
html.reg-js .reg-step.active { visibility: visible; opacity: 1; pointer-events: auto; transform: none; transition: opacity .45s .08s, transform .55s .08s cubic-bezier(.2, .8, .2, 1), visibility 0s; }
html.reg-js .reg-step-title { display: none; }
html:not(.reg-js) .reg-nav button[type=button], html:not(.reg-js) .reg-progress { display: none; }

/* polja */
.reg-form .input { transition: border-color .25s, box-shadow .25s, background .25s; }
.reg-form .input:focus-within { border-color: var(--blue-2); box-shadow: 0 0 0 4px hsl(var(--h) calc(71.3% * var(--sat)) 61.8% / .14), 0 0 26px -6px hsl(var(--h) calc(71.3% * var(--sat)) 61.8% / .6); background: hsl(calc(var(--h) + 3) calc(65.5% * var(--sat)) 11.4% / .7); }
.reg-form .input.bad { border-color: rgba(224, 72, 91, .7); }
.reg-form .input.shake { animation: reg-shake .45s; }
@keyframes reg-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.reg-eye { color: var(--muted); display: grid; place-items: center; }
.reg-status { width: 20px; height: 20px; flex: none; position: relative; }
.reg-status.ok::before, .reg-status.no::before, .reg-status.wait::before { content: ""; position: absolute; inset: 0; border-radius: 50%; }
.reg-status.wait::before { border: 2px solid var(--line-2); border-top-color: var(--blue-2); animation: reg-spin .7s linear infinite; }
@keyframes reg-spin { to { transform: rotate(360deg); } }
.reg-status.ok::before { background: #22b07a; animation: reg-pop2 .4s cubic-bezier(.3, 1.6, .5, 1); }
.reg-status.ok::after { content: ""; position: absolute; left: 7px; top: 4px; width: 5px; height: 9px; border: solid #06261a; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.reg-status.no::before { background: var(--red); animation: reg-pop2 .4s cubic-bezier(.3, 1.6, .5, 1); }
.reg-status.no::after { content: "×"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font: 700 15px/1 var(--f-body, sans-serif); }
@keyframes reg-pop2 { from { transform: scale(0); } }
.reg-rules { list-style: none; margin: -2px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; font-size: 13px; color: hsl(calc(var(--h) + 2) calc(18% * var(--sat)) 52.2%); }
.reg-rules li { display: flex; align-items: center; gap: 8px; transition: color .25s; }
.reg-rules li::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid currentColor; flex: none; transition: background .25s, border-color .25s, transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.reg-rules li.ok { color: #a7f3d0; }
.reg-rules li.ok::before { background: #22b07a; border-color: #22b07a; transform: scale(1.1); box-shadow: inset 0 0 0 3px hsl(calc(var(--h) + 4) calc(53.2% * var(--sat)) 9.2%); }
.reg-form .seg span { transition: border-color .2s, color .2s, background .2s, transform .2s; }
.reg-form .seg input:checked + span { transform: translateY(-1px); box-shadow: 0 8px 20px -10px hsl(var(--h) calc(71.3% * var(--sat)) 61.8% / .8); }
.reg-form .skin-pick { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); }
.reg-form .skin-opt img { max-width: 64px; }

/* ---- licna karta */
.reg-card-wrap { perspective: 1200px; display: flex; justify-content: center; padding: 6px 0 4px; }
.reg-card { position: relative; width: min(100%, 420px); aspect-ratio: 1.586; transform-style: preserve-3d; transition: transform 1s cubic-bezier(.2, .8, .2, 1); }
html.reg-js .reg-card { transform: rotateY(180deg); }
html.reg-js .reg-card.flip { transform: rotateY(0deg); }
.reg-card.flip { transform: rotateY(0deg); }
.reg-card-face { position: absolute; inset: 0; border-radius: 16px; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; }
.reg-card-back { transform: rotateY(180deg); display: grid; place-items: center; background: repeating-linear-gradient(45deg, hsl(calc(var(--h) + 2) calc(62% * var(--sat)) 15.5%) 0 10px, hsl(calc(var(--h) + 2) calc(62.5% * var(--sat)) 12.5%) 10px 20px); border: 1px solid var(--line-2); }
.reg-card-back img { width: 70px; opacity: .85; filter: var(--logo-tint) drop-shadow(0 8px 16px rgba(0, 0, 0, .6)); }
.reg-card-front {
  display: flex; flex-direction: column; padding: 14px 16px 12px; color: hsl(calc(var(--h) + 4) calc(50.9% * var(--sat)) 10.4%);
  background: radial-gradient(260px 160px at 85% 20%, rgba(255, 255, 255, .9), transparent 70%), linear-gradient(135deg, hsl(calc(var(--h) + 3) calc(63% * var(--sat)) 94.7%), hsl(calc(var(--h) + 2) calc(60.9% * var(--sat)) 82.9%) 60%, hsl(calc(var(--h) + 2) calc(55.4% * var(--sat)) 72.7%));
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .4) inset;
}
.reg-card-top { display: flex; justify-content: space-between; align-items: center; font: 700 12px var(--f-head); letter-spacing: .16em; color: hsl(calc(var(--h) + 3) calc(54% * var(--sat)) 22.2%); }
.reg-card-suit { font: 700 22px/1 Georgia, serif; color: hsl(calc(var(--h) + 4) calc(50.9% * var(--sat)) 10.4%); }
.reg-card-body { flex: 1; display: flex; gap: 14px; align-items: center; margin-top: 8px; min-height: 0; }
.reg-card-photo { width: 30%; aspect-ratio: .78; border-radius: 10px; background: linear-gradient(180deg, hsl(calc(var(--h) + 2) calc(50.3% * var(--sat)) 33.9%), hsl(calc(var(--h) + 2) calc(62% * var(--sat)) 15.5%)); display: grid; place-items: end center; overflow: hidden; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .5); flex: none; }
.reg-card-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top; transform: scale(1.5); transform-origin: top; }
.reg-card dl { margin: 0; display: grid; gap: 4px; min-width: 0; flex: 1; }
.reg-card dl div { min-width: 0; }
.reg-card dt { font: 600 9px var(--f-head); letter-spacing: .18em; text-transform: uppercase; color: hsl(var(--h) calc(34.3% * var(--sat)) 41.8%); }
.reg-card dd { margin: 0; font: 700 16px/1.15 var(--f-head); text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reg-card-foot { display: flex; justify-content: space-between; align-items: center; font: 600 12px ui-monospace, Consolas, monospace; letter-spacing: .14em; color: hsl(calc(var(--h) + 3) calc(54% * var(--sat)) 22.2%); margin-top: 6px; }
.reg-card-chip { width: 34px; height: 25px; border-radius: 5px; background: linear-gradient(135deg, #f7dd8c, #c99a2e); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .2); }
.reg-card-shine { position: absolute; inset: -40%; background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, .55) 50%, transparent 60%); transform: translateX(-60%); pointer-events: none; }
.reg-card.flip .reg-card-shine { animation: reg-card-shine 1.4s .7s ease-out both; }
@keyframes reg-card-shine { to { transform: translateX(60%); } }

/* ---- mobilni */
@media (max-width: 900px) {
  .reg { margin-top: 18px; }
  .reg-shell { grid-template-columns: 1fr; }
  .reg-stage { border-right: 0; border-bottom: 1px solid var(--glass-line, var(--line)); padding: 20px 18px 16px; }
  .reg-3d { min-height: 300px; margin: 0 -18px; }
  .reg-perks { display: none; }
  .reg-form { padding: 24px 18px 22px; }
  .reg-head h1 { font-size: 32px; }
  .reg-rules { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .reg-progress em { font-size: 9px; letter-spacing: .08em; }
  .reg-nav .btn { min-width: 0; flex: 1; }
  .reg-card dd { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .reg-shell, .reg-stage-name.pop, .reg-submit::after, .reg-card.flip .reg-card-shine { animation: none; }
  html.reg-js .reg-step, html.reg-js .reg-step.active { transition: opacity .2s, visibility 0s; transform: none; }
  .reg-card { transition: none; }
}
