/* Giriş & Kayıt — shellmarket.online */

:root {
  --auth-grad: linear-gradient(90deg, #7c4dff 0%, #e879f9 55%, #f472b6 100%);
  --auth-purple: #6b3dff;
  --auth-card-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
  --auth-border: #e5e7eb;
  --auth-muted: #9ca3af;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body.auth-page {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 14px;
  color: #1f2937;
}

/* —— Kayıt: harita arka plan —— */
body.auth-page--register {
  background-color: #0f172a;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.58), rgba(15, 23, 42, 0.62)),
    url("assets/world-map-bg.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

body.auth-page--register .auth-wrap {
  align-items: flex-start;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 32px;
}

.auth-register-deco {
  position: fixed;
  left: -40px;
  bottom: 15%;
  width: 120px;
  height: 120px;
  background: linear-gradient(135deg, #a78bfa, #7c4dff);
  border-radius: 24px;
  transform: rotate(18deg);
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}

/* —— Giriş: harita arka plan —— */
body.auth-page--login {
  background-color: #0f172a;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.5), rgba(15, 23, 42, 0.55)),
    url("assets/world-map-bg.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

body.auth-page--login::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.28);
  pointer-events: none;
  z-index: 0;
}

/* Telegram üst şerit (giriş) */
a.auth-telegram-top {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

a.auth-telegram-top:hover {
  opacity: 0.92;
}

.auth-telegram-top {
  position: relative;
  z-index: 2;
  max-width: 520px;
  margin: 20px auto 0;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(90deg, #2563eb, #3b82f6);
  border-radius: 12px;
  color: #fff;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
}

.auth-telegram-top__ico {
  font-size: 22px;
  flex-shrink: 0;
}

.auth-telegram-top strong {
  display: block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.auth-telegram-top span {
  font-size: 11px;
  opacity: 0.92;
}

/* Kayıt üst bar */
.auth-topbar {
  position: relative;
  z-index: 2;
  display: flex;
  max-width: 440px;
  margin: 24px auto 0;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(107, 61, 255, 0.2);
}

.auth-topbar__brand {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #7c4dff, #6b3dff);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
}

.auth-topbar__brand .brand-logo-badge {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border-color: rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
}

.auth-logo-row {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}

.auth-logo-row .brand-logo-badge {
  width: 48px;
  height: 48px;
}

.auth-topbar__tag {
  padding: 12px 18px;
  background: linear-gradient(135deg, #8b5cf6, #a855f7);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  white-space: nowrap;
}

.auth-wrap {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 16px 72px;
}

.auth-wrap--login {
  padding-top: 8px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  min-width: 0;
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--auth-card-shadow);
  padding: 28px 28px 24px;
  overflow-x: clip;
}

.auth-card form {
  min-width: 0;
  max-width: 100%;
}

.auth-card--register {
  border-radius: 0 0 16px 16px;
  margin-top: 0;
}

.auth-card__title {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 800;
  background: var(--auth-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.02em;
}

.auth-card__sub {
  margin: 0 0 22px;
  font-size: 13px;
  color: var(--auth-muted);
  font-weight: 500;
}

.auth-field {
  margin-bottom: 14px;
  min-width: 0;
  max-width: 100%;
}

.auth-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
}

.auth-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 0 14px;
  border: 1px solid var(--auth-border);
  border-radius: 12px;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}

.auth-input-wrap:focus-within {
  border-color: #a78bfa;
  box-shadow: 0 0 0 3px rgba(124, 77, 255, 0.12);
}

.auth-input-wrap__ico {
  flex-shrink: 0;
  font-size: 16px;
  opacity: 0.55;
}

.auth-input-wrap input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 12px 0;
  font-family: inherit;
  font-size: 14px;
  outline: none;
}

.auth-input-wrap__toggle {
  flex-shrink: 0;
  border: none;
  background: none;
  padding: 4px;
  cursor: pointer;
  font-size: 16px;
  opacity: 0.5;
}

.auth-row-2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-bottom: 14px;
}

.auth-row-2 .auth-field {
  margin-bottom: 0;
}

.auth-telegram-join {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 16px;
  background: linear-gradient(90deg, #eff6ff, #eef2ff);
  border: 1px solid #bfdbfe;
  border-radius: 12px;
}

.auth-telegram-join__ico {
  font-size: 24px;
  flex-shrink: 0;
}

.auth-telegram-join__text {
  flex: 1;
  font-size: 12px;
  font-weight: 700;
  color: #1e40af;
  line-height: 1.35;
}

.auth-telegram-join__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  background: #2563eb;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.auth-telegram-join__btn:hover {
  filter: brightness(1.06);
}

.auth-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 12px;
  color: #4b5563;
  font-weight: 600;
  cursor: pointer;
}

.auth-check input {
  margin-top: 2px;
  accent-color: var(--auth-purple);
}

.auth-check a {
  color: #2563eb;
  text-decoration: none;
}

.auth-check a:hover {
  text-decoration: underline;
}

/* Puzzle doğrulama — kayıt */
.auth-puzzle {
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--auth-border);
  border-radius: 12px;
  background: #fafafa;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-puzzle.is-solved {
  border-color: #86efac;
  background: #f0fdf4;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
}

.auth-puzzle.is-shake {
  animation: auth-puzzle-shake 0.45s ease;
}

@keyframes auth-puzzle-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-6px);
  }
  75% {
    transform: translateX(6px);
  }
}

.auth-puzzle__label {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 800;
  color: #374151;
}

.auth-puzzle__canvas {
  position: relative;
  height: 120px;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.06);
}

.auth-puzzle__canvas.is-solved {
  border-color: #4ade80;
}

.auth-puzzle__bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, #c4b5fd 0%, #93c5fd 35%, #86efac 70%, #fde047 100%),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 8px,
      rgba(255, 255, 255, 0.12) 8px,
      rgba(255, 255, 255, 0.12) 16px
    );
}

.auth-puzzle__hole {
  position: absolute;
  top: 28px;
  left: 58%;
  width: 44px;
  height: 44px;
  background: rgba(15, 23, 42, 0.22);
  border: 2px dashed rgba(255, 255, 255, 0.85);
  border-radius: 10px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.2);
}

.auth-puzzle__piece {
  position: absolute;
  top: 28px;
  left: 12px;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
  transition: left 0.05s linear, box-shadow 0.2s;
  background:
    linear-gradient(135deg, #c4b5fd 0%, #93c5fd 35%, #86efac 70%, #fde047 100%),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 8px,
      rgba(255, 255, 255, 0.12) 8px,
      rgba(255, 255, 255, 0.12) 16px
    );
  border: 2px solid rgba(255, 255, 255, 0.65);
  clip-path: polygon(
    0% 12%,
    12% 12%,
    12% 0%,
    32% 0%,
    32% 12%,
    44% 12%,
    44% 32%,
    32% 32%,
    32% 44%,
    12% 44%,
    12% 32%,
    0% 32%
  );
}

.auth-puzzle__canvas.is-solved .auth-puzzle__piece {
  box-shadow: 0 0 0 2px #22c55e, 0 4px 14px rgba(34, 197, 94, 0.35);
}

.auth-puzzle__slider {
  width: 100%;
  height: 36px;
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(90deg, #dbeafe, #e0e7ff);
  border-radius: 999px;
  outline: none;
  cursor: pointer;
}

.auth-puzzle__slider.is-solved {
  background: linear-gradient(90deg, #bbf7d0, #86efac);
}

.auth-puzzle__slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 44px;
  height: 36px;
  border-radius: 999px;
  background: #22c55e url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z'/%3E%3C/svg%3E") center/20px no-repeat;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  cursor: grab;
}

.auth-puzzle__slider.is-solved::-webkit-slider-thumb {
  background-color: #16a34a;
}

.auth-puzzle__slider::-moz-range-thumb {
  width: 44px;
  height: 36px;
  border: none;
  border-radius: 999px;
  background: #22c55e;
  cursor: grab;
}

.auth-puzzle__status {
  margin: 8px 0 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--auth-muted);
  text-align: center;
  line-height: 1.45;
}

.auth-puzzle__status.is-ok {
  color: #15803d;
}

.auth-puzzle__status.is-warn {
  color: #b45309;
}

.auth-puzzle__refresh {
  display: block;
  margin: 8px auto 0;
  padding: 6px 14px;
  border: 1px solid var(--auth-border);
  border-radius: 8px;
  background: #fff;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  color: #4b5563;
  cursor: pointer;
}

.auth-puzzle__refresh[hidden] {
  display: none;
}

.auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 20px;
  border: none;
  border-radius: 12px;
  background: var(--auth-grad);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(124, 77, 255, 0.35);
  transition: filter 0.15s, transform 0.15s;
}

.auth-btn:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.auth-btn:disabled {
  opacity: 0.75;
  cursor: not-allowed;
  transform: none;
  filter: grayscale(0.25);
}

.auth-form-hint {
  margin: 0 0 12px;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #b45309;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
  text-align: center;
  line-height: 1.45;
}

.auth-form-hint[hidden] {
  display: none;
}

.auth-switch {
  margin: 18px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--auth-muted);
  font-weight: 600;
}

.auth-switch a {
  color: #2563eb;
  font-weight: 800;
  text-decoration: none;
}

.auth-switch a:hover {
  text-decoration: underline;
}

/* Giriş özel */
.auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 12px;
}

.auth-options a {
  color: #2563eb;
  font-weight: 700;
  text-decoration: none;
}

.auth-captcha-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 18px;
  background: #f3f4f6;
  border: 1px solid var(--auth-border);
  border-radius: 12px;
}

.auth-captcha-row__q {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #374151;
}

.auth-captcha-row input {
  width: 56px;
  padding: 8px 10px;
  border: 1px solid var(--auth-border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  text-align: center;
}

.auth-lang {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--auth-border);
  font-size: 12px;
  font-weight: 700;
  color: #374151;
  box-shadow: var(--auth-card-shadow);
  cursor: pointer;
  font-family: inherit;
}

@media (max-width: 560px) {
  .auth-row-2 {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .auth-row-2 .auth-field {
    margin-bottom: 14px;
  }

  .auth-row-2 .auth-field:last-child {
    margin-bottom: 0;
  }
}

@media (max-width: 480px) {
  .auth-card {
    padding: 22px 18px 20px;
  }

  .auth-topbar {
    margin-top: 12px;
    max-width: 100%;
  }

  .auth-topbar__brand {
    font-size: 12px;
    padding: 10px 12px;
  }

  .auth-topbar__tag {
    font-size: 11px;
    padding: 10px 12px;
  }
}
