/* ============================================================
   TwelveSky2 Unleashed — auth.css
   Login & Register shared styles
   ============================================================ */

/* ── Page base ──────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Auth Section ───────────────────────────────────────── */
.auth-section {
  position: relative;
  flex: 1;
  display: flex;
  align-items: stretch;
  min-height: 100vh;
  overflow: hidden;
}

.auth-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.auth-bg-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(to right,
      rgba(0,0,0,0.15) 0%,
      rgba(0,0,0,0.45) 45%,
      rgba(0,0,0,0.88) 70%,
      rgba(0,0,0,0.96) 100%),
    linear-gradient(to top,
      rgba(0,0,0,0.85) 0%,
      transparent 40%);
}

.auth-bg-overlay--register {
  background:
    linear-gradient(to right,
      rgba(0,0,0,0.10) 0%,
      rgba(0,0,0,0.40) 40%,
      rgba(0,0,0,0.88) 68%,
      rgba(0,0,0,0.97) 100%),
    linear-gradient(to top,
      rgba(0,0,0,0.85) 0%,
      transparent 40%);
}

/* ── Inner layout ───────────────────────────────────────── */
.auth-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 100px 60px 60px;
  display: grid;
  grid-template-columns: 1fr 480px;
  align-items: flex-end;
  gap: 0;
}

/* ── Left — Character ───────────────────────────────────── */
.auth-hero {
  display: flex;
  justify-content: flex-start;
  align-items: flex-end;
  pointer-events: none;
  padding-bottom: 0;
}

.auth-hero__img {
  width: 100%;
  max-width: 540px;
  object-fit: contain;
  position: relative;
  left: -20px;
  bottom: -60px;
  filter:
    drop-shadow(0 0 40px rgba(201,162,39,0.25))
    drop-shadow(0 0 100px rgba(201,162,39,0.10))
    drop-shadow(0 30px 60px rgba(0,0,0,0.5));
  animation: authCharFloat 7s ease-in-out infinite;
  transform-origin: bottom center;
}

.auth-hero--register .auth-hero__img {
  filter:
    drop-shadow(0 0 40px rgba(150,120,255,0.2))
    drop-shadow(0 0 100px rgba(201,162,39,0.12))
    drop-shadow(0 30px 60px rgba(0,0,0,0.5));
}

@keyframes authCharFloat {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-12px); }
}

/* ── Right — Panel ──────────────────────────────────────── */
.auth-panel {
  background: rgba(6, 4, 2, 0.82);
  border: 1px solid rgba(201,162,39,0.18);
  border-radius: 8px;
  padding: 44px 40px 36px;
  box-shadow:
    0 0 0 1px rgba(201,162,39,0.06) inset,
    0 30px 80px rgba(0,0,0,0.7),
    0 0 60px rgba(201,162,39,0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: panelFadeIn 0.7s ease both;
  align-self: center;
  margin-bottom: 40px;
}

.auth-panel--register {
  padding: 36px 40px 30px;
}

@keyframes panelFadeIn {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ornamental top/bottom bar */
.auth-panel__ornament {
  width: 100%;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--gold-dim), var(--gold), var(--gold-dim), transparent);
  margin-bottom: 28px;
  position: relative;
}

.auth-panel__ornament::before {
  content: '⬦';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: var(--gold);
  font-size: 1rem;
  background: rgba(6,4,2,0.85);
  padding: 0 10px;
  text-shadow: 0 0 12px rgba(201,162,39,0.8);
}

.auth-panel__ornament--bottom {
  margin-top: 24px;
  margin-bottom: 0;
}

.auth-panel__top {
  margin-bottom: 28px;
}

.auth-panel__label {
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}

.auth-panel__title {
  font-family: 'Cinzel Decorative', serif;
  font-size: 2rem;
  font-weight: 900;
  color: var(--white-soft);
  text-shadow: 0 0 30px rgba(201,162,39,0.25);
  margin-bottom: 6px;
  line-height: 1.15;
}

.auth-panel__sub {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: 0.88rem;
  color: rgba(232,220,200,0.5);
}

/* ── Alerts ──────────────────────────────────────────────── */
.auth-alert {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 16px;
  border-radius: 4px;
  font-family: 'IM Fell English', serif;
  font-size: 0.88rem;
  line-height: 1.5;
  margin-bottom: 4px;
}

.auth-alert--error {
  background: rgba(180, 30, 30, 0.15);
  border: 1px solid rgba(200, 50, 50, 0.35);
  color: #f08080;
}

.auth-alert--success {
  background: rgba(30, 140, 60, 0.15);
  border: 1px solid rgba(50, 180, 80, 0.35);
  color: #7dd99a;
}

/* ── Form ───────────────────────────────────────────────── */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* Field */
.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

.auth-field__label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(201,162,39,0.75);
  cursor: pointer;
}

.auth-field__icon {
  display: flex;
  align-items: center;
  color: var(--gold-dim);
}

.auth-field__wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-field__wrap .auth-field__input {
  padding-right: 44px;
}

.auth-field__input {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(201,162,39,0.18);
  border-radius: 4px;
  padding: 13px 16px;
  font-family: 'IM Fell English', serif;
  font-size: 0.9rem;
  color: var(--white-soft);
  outline: none;
  transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
  letter-spacing: 0.02em;
  text-transform: none;
}

.auth-field__input::placeholder {
  color: rgba(232,220,200,0.25);
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: 0.82rem;
  letter-spacing: 0;
}

.auth-field__input:focus {
  border-color: rgba(201,162,39,0.55);
  background: rgba(201,162,39,0.05);
  box-shadow:
    0 0 0 3px rgba(201,162,39,0.07),
    0 0 20px rgba(201,162,39,0.08) inset;
}

.auth-field__line {
  display: block;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(201,162,39,0.2), transparent);
  transform: scaleX(0);
  transition: transform 0.3s ease;
  transform-origin: left;
}

.auth-field:focus-within .auth-field__line {
  transform: scaleX(1);
}

/* Show/hide password toggle */
.auth-field__toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(201,162,39,0.5);
  display: flex;
  align-items: center;
  padding: 4px;
  transition: color 0.2s;
  opacity: 1;
}

.auth-field__toggle:hover { color: var(--gold); }

/* Meta row (remember me + forgot) */
.auth-form__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: -6px;
}

.auth-form__forgot {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: 0.82rem;
  color: rgba(201,162,39,0.6);
  transition: color 0.2s;
}

.auth-form__forgot:hover { color: var(--gold-light); }

/* Checkbox */
.auth-checkbox {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  font-family: 'IM Fell English', serif;
  font-size: 0.82rem;
  color: rgba(232,220,200,0.5);
  user-select: none;
}

.auth-checkbox input[type="checkbox"] {
  display: none;
}

.auth-checkbox__box {
  width: 16px;
  height: 16px;
  border: 1px solid rgba(201,162,39,0.35);
  border-radius: 3px;
  background: rgba(201,162,39,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s;
}

.auth-checkbox input:checked + .auth-checkbox__box {
  background: rgba(201,162,39,0.25);
  border-color: var(--gold);
}

.auth-checkbox input:checked + .auth-checkbox__box::after {
  content: '✓';
  font-size: 0.65rem;
  color: var(--gold-light);
  line-height: 1;
}

.auth-form__terms {
  margin-top: -4px;
}

.auth-form__terms a {
  color: rgba(201,162,39,0.7);
  transition: color 0.2s;
}

.auth-form__terms a:hover { color: var(--gold-light); }

/* Submit button */
.auth-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 15px 28px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-family: 'Cinzel', serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #6b2a00, var(--gold-dim), var(--gold));
  color: var(--dark-0);
  box-shadow:
    0 0 30px rgba(201,162,39,0.35),
    inset 0 1px 0 rgba(255,255,200,0.15);
  transition: all 0.3s ease;
  margin-top: 4px;
}

.auth-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 50px rgba(201,162,39,0.55), 0 8px 24px rgba(0,0,0,0.5);
  filter: brightness(1.08);
}

.auth-submit:active { transform: translateY(0); }

.auth-submit--register {
  background: linear-gradient(135deg, #2a006b, #5a1a9a, #8a40d0);
  color: #fff;
  box-shadow:
    0 0 30px rgba(138,64,208,0.35),
    inset 0 1px 0 rgba(200,180,255,0.15);
}

.auth-submit--register:hover {
  box-shadow: 0 0 50px rgba(138,64,208,0.55), 0 8px 24px rgba(0,0,0,0.5);
}

/* Switch link */
.auth-switch {
  text-align: center;
  font-family: 'IM Fell English', serif;
  font-size: 0.85rem;
  color: rgba(232,220,200,0.4);
  margin-top: -4px;
}

.auth-switch a {
  color: var(--gold);
  transition: color 0.2s;
}

.auth-switch a:hover { color: var(--gold-light); }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .auth-inner {
    grid-template-columns: 1fr;
    padding: 100px 24px 48px;
    align-items: flex-start;
  }

  .auth-hero {
    display: none;
  }

  .auth-panel {
    margin: 0 auto;
    width: 100%;
    max-width: 440px;
    align-self: flex-start;
    margin-bottom: 0;
  }
}