/* ASK ASSASSINS — javna registracija vojnika (/registracija) */

:root {
  --olive-950: #0c100b;
  --olive-900: #121810;
  --olive-800: #1a2218;
  --gold: #c5a059;
  --gold-bright: #ffb800;
  --red: #c41e3a;
  --cream: #e5e1c9;
  --text: #e8ebe6;
  --muted: #8a9688;
  --hud-line: rgba(197, 160, 89, 0.32);
  --font-display: "Bebas Neue", Impact, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --radius: 16px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body.reg-page {
  font-family: var(--font-body);
  background: var(--olive-950);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(rgba(197, 160, 89, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(197, 160, 89, 0.03) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 15%, black 10%, transparent 75%);
}

.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 100% 55% at 50% -15%, rgba(196, 30, 58, 0.18), transparent 58%),
    radial-gradient(ellipse 50% 40% at 100% 100%, rgba(197, 160, 89, 0.07), transparent 55%);
}

.reg-wrap {
  position: relative;
  z-index: 1;
  width: min(100%, 480px);
  margin: 0 auto;
  padding:
    max(1.25rem, env(safe-area-inset-top))
    max(1rem, env(safe-area-inset-right))
    max(2rem, env(safe-area-inset-bottom))
    max(1rem, env(safe-area-inset-left));
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.reg-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  animation: fadeUp 0.45s ease both;
}

.reg-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--hud-line);
  padding: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.ask-badge {
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: var(--gold);
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--hud-line);
  border-radius: 10px;
  background: rgba(18, 24, 16, 0.85);
}

.reg-card {
  animation: fadeUp 0.5s ease 0.06s both;
  margin-bottom: 1.25rem;
}

.reg-card__frame {
  position: relative;
  padding: 1.5rem 1.35rem 1.4rem;
  background: linear-gradient(168deg, rgba(42, 54, 38, 0.55) 0%, rgba(18, 24, 16, 0.98) 100%);
  border: 1px solid var(--hud-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.reg-card__frame::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--red), var(--gold), var(--red));
}

.reg-eyebrow {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  text-align: center;
  margin-bottom: 0.35rem;
}

.reg-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 11vw, 3rem);
  letter-spacing: 0.1em;
  text-align: center;
  color: #fff;
  line-height: 1;
  margin-bottom: 0.35rem;
}

.reg-club {
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  color: var(--cream);
  margin-bottom: 0.65rem;
}

.reg-lead {
  text-align: center;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 1.35rem;
}

.reg-form { display: flex; flex-direction: column; gap: 0.85rem; }

.field { display: flex; flex-direction: column; gap: 0.35rem; }

.field__label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.field__input {
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 0.9rem;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

select.field__input {
  background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%),
    linear-gradient(135deg, var(--gold) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 3px), calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 2.2rem;
  cursor: pointer;
}

select.field__input option {
  background: var(--olive-900);
  color: var(--text);
}

.reg-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  text-decoration: none;
  color: inherit;
}

.reg-footer__text {
  margin-bottom: 0.75rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.reg-footer__text a {
  color: var(--gold-bright);
  font-weight: 600;
  text-decoration: none;
}

.reg-footer__text a:hover { text-decoration: underline; }

.reg-fixed-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: -0.15rem 0 0.25rem;
}

.reg-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.85rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 8px;
  background: #4a3d5c;
  color: #fff;
}

.reg-tag--gold {
  background: rgba(197, 160, 89, 0.14);
  color: var(--gold-bright);
  border: 1px solid var(--hud-line);
}

.field__input:focus {
  outline: none;
  border-color: rgba(197, 160, 89, 0.55);
  box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.15);
}

.field__input:read-only {
  opacity: 0.75;
  cursor: not-allowed;
}

.field__input::placeholder { color: rgba(138, 150, 136, 0.7); }

.field__hint {
  font-size: 0.72rem;
  color: var(--muted);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.form-msg {
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  font-size: 0.88rem;
  line-height: 1.45;
}

.form-msg--ok {
  background: rgba(95, 180, 95, 0.15);
  color: #9ae69a;
  border: 1px solid rgba(95, 180, 95, 0.3);
}

.form-msg--err {
  background: rgba(196, 30, 58, 0.15);
  color: #ff9a9a;
  border: 1px solid rgba(196, 30, 58, 0.3);
}

.btn-register {
  width: 100%;
  min-height: 52px;
  margin-top: 0.25rem;
  padding: 0.75rem 1.25rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.12em;
  color: #fff;
  background: linear-gradient(135deg, var(--red) 0%, #a01830 100%);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: filter 0.2s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.btn-register:hover:not(:disabled) { filter: brightness(1.08); }
.btn-register:active:not(:disabled) { transform: scale(0.98); }
.btn-register:disabled { opacity: 0.65; cursor: wait; }

.reg-footer {
  text-align: center;
  animation: fadeUp 0.5s ease 0.12s both;
}

.home-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.65rem 1.15rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 10px;
  transition: color 0.2s, border-color 0.2s;
}

.home-link:hover { color: var(--gold-bright); border-color: var(--hud-line); }
.home-link--solo { margin-top: 0.75rem; }

/* Loading */
.loading-state { animation: fadeUp 0.35s ease both; }

.loading-state__text {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.skeleton-card {
  padding: 1.5rem 1.25rem;
  background: rgba(22, 30, 20, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius);
}

.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.09) 50%, rgba(255,255,255,0.04) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: 8px;
}

.skeleton--logo { width: 64px; height: 64px; border-radius: 14px; margin: 0 auto 1rem; }
.skeleton--title { height: 36px; width: 65%; margin: 0 auto 0.5rem; }
.skeleton--sub { height: 14px; width: 45%; margin: 0 auto 1.25rem; }
.skeleton--field { height: 48px; margin-bottom: 0.65rem; }
.skeleton--btn { height: 52px; margin-top: 0.5rem; }

/* Error */
.error-state {
  text-align: center;
  padding: 2rem 1rem 1rem;
  animation: fadeUp 0.4s ease both;
}

.error-state__icon {
  width: 48px;
  height: 48px;
  color: #ff6b6b;
  margin-bottom: 1rem;
}

.error-state__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.08em;
  color: #fff;
  margin-bottom: 0.5rem;
}

.error-state__text {
  font-size: 0.92rem;
  color: #ff9a9a;
  line-height: 1.5;
  margin-bottom: 1.25rem;
  max-width: 32ch;
  margin-left: auto;
  margin-right: auto;
}

.btn-retry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  min-width: 180px;
  padding: 0.65rem 1.25rem;
  margin-bottom: 0.5rem;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  background: var(--red);
  border: none;
  border-radius: 10px;
  cursor: pointer;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@media (max-width: 380px) {
  .field-row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
  .skeleton { animation: none; background: rgba(255,255,255,0.06); }
}
