/* =========================================================
   UISOCIAL – Login
   ========================================================= */

:root {
  --accent: #c2410c;
  --accent-dark: #9a3412;
  --accent-soft: rgba(194, 65, 12, 0.12);
  --ink: #1c1c22;
  --ink-2: #44444d;
  --muted: #8a8a96;
  --line: #e4e4ea;
  --bg: #eef0f5;
  --card: #ffffff;
  --radius-card: 34px;
  --radius-field: 12px;
  --shadow-card: 0 30px 80px -30px rgba(30, 30, 60, 0.25), 0 8px 24px -12px rgba(30, 30, 60, 0.12);

  /* scene palette (overridden per slide from JS) */
  --sky1: #0b1424;
  --sky2: #1a1f33;
  --glow: #ff7a3d;
  --planet1: #1a2236;
  --planet2: #070a12;
  --rock: #c8643b;
  --rock2: #f2a274;
  --mtn1: #2b2d3a;
  --mtn2: #0d0f17;
  --rim: #eaa47c;
  --far: #3a2f3a;
  --ground: #07080d;
}

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

html, body { height: 100%; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, #fdf1e8 0%, transparent 60%),
    radial-gradient(900px 600px at 110% 110%, #e6e9fb 0%, transparent 60%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* ---------- Layout ---------- */

.page { min-height: 100%; }

.card {
  width: 100%;
  height: 100vh;
  min-height: 660px;
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  gap: 8px;
  padding: 10px;
  background: var(--card);
  animation: rise 0.7s cubic-bezier(.2, .8, .2, 1) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px) scale(.985); }
  to   { opacity: 1; transform: none; }
}

/* =========================================================
   Showcase (left)
   ========================================================= */

.showcase {
  position: relative;
  overflow: hidden;
  color: #fff;
  border-radius: 26px;
  -webkit-clip-path: url(#panelClip);
  clip-path: url(#panelClip);
  background: var(--sky1);
  isolation: isolate;
}

.scene {
  position: absolute;
  inset: 0;
  z-index: -1;
  transition: opacity .45s ease, transform .9s cubic-bezier(.2, .8, .2, 1), filter .45s ease;
}
.scene.is-fading {
  opacity: 0;
  transform: scale(1.04);
  filter: blur(6px);
}
.scene svg { width: 100%; height: 100%; display: block; }

.layer {
  transition: transform .6s cubic-bezier(.2, .8, .2, 1);
  will-change: transform;
}

.moon { animation: float 7s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

#stars circle { animation: twinkle 3s ease-in-out infinite; }
@keyframes twinkle {
  0%, 100% { opacity: var(--o, .8); }
  50%      { opacity: .15; }
}

/* top bar */
.showcase-top {
  position: absolute;
  top: 34px;
  left: 44px;
  right: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-mini {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.top-actions { display: flex; align-items: center; gap: 22px; }

.link-light {
  font-size: 14px;
  font-weight: 600;
  opacity: .92;
  transition: opacity .2s;
}
.link-light:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }

.btn-outline {
  font-size: 14px;
  font-weight: 600;
  padding: 11px 22px;
  border: 1.6px solid rgba(255, 255, 255, .9);
  border-radius: 999px;
  transition: background .25s, color .25s, transform .2s;
}
.btn-outline:hover { background: #fff; color: var(--ink); transform: translateY(-1px); }

/* bottom bar – right edge follows the slanted panel edge */
.showcase-bottom {
  position: absolute;
  bottom: 40px;
  left: 44px;
  right: calc(7% + 30px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.artist {
  display: flex;
  align-items: center;
  gap: 14px;
  transition: opacity .35s ease, transform .45s cubic-bezier(.2, .8, .2, 1);
}
.artist.is-fading { opacity: 0; transform: translateY(8px); }

.avatar {
  width: 58px;
  height: 58px;
  flex: none;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .18);
}
.avatar svg { width: 100%; height: 100%; display: block; }

.artist-meta { display: flex; flex-direction: column; line-height: 1.25; }
.artist-meta strong { font-size: 15px; font-weight: 700; }
.artist-meta span { font-size: 12.5px; opacity: .85; }

.slider-ctrl { display: flex; gap: 10px; }

.circle-btn {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, .85);
  background: rgba(255, 255, 255, .04);
  color: #fff;
  backdrop-filter: blur(4px);
  transition: background .25s, color .25s, transform .2s;
}
.circle-btn svg {
  width: 18px; height: 18px;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.circle-btn:hover { background: #fff; color: var(--ink); }
.circle-btn:active { transform: scale(.92); }

/* =========================================================
   Auth (right)
   ========================================================= */

.auth {
  display: flex;
  flex-direction: column;
  padding: 26px 44px 30px 40px;
  min-width: 0;
}

.auth-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-weight: 800;
  font-size: 25px;
  letter-spacing: -0.01em;
  color: #2a2a30;
}

/* language picker */
.lang { position: relative; }

.lang-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 46px;
  padding: 0 18px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  transition: border-color .2s, box-shadow .2s;
}
.lang-btn:hover,
.lang.open .lang-btn { border-color: #cfcfd8; box-shadow: 0 6px 18px -10px rgba(0, 0, 0, .25); }

.flag {
  display: inline-flex;
  width: 20px;
  height: 14px;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .06);
}
.flag svg { width: 100%; height: 100%; display: block; }

.caret {
  width: 14px; height: 14px;
  fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round;
  transition: transform .25s;
}
.lang.open .caret { transform: rotate(180deg); }

.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 170px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #fff;
  border: 1px solid #efeff3;
  border-radius: 16px;
  box-shadow: 0 20px 40px -18px rgba(20, 20, 40, .3);
  opacity: 0;
  transform: translateY(-6px) scale(.98);
  transform-origin: top right;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 10;
}
.lang.open .lang-menu { opacity: 1; transform: none; pointer-events: auto; }

.lang-menu li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  color: var(--ink-2);
  cursor: pointer;
  transition: background .15s;
}
.lang-menu li:hover { background: #f5f5f8; }
.lang-menu li.active { color: var(--accent); font-weight: 600; }
.lang-menu li.active::after { content: "✓"; margin-left: auto; }

/* body */
.auth-body {
  flex: 1;
  width: 100%;
  max-width: 350px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px 0;
}

h1 {
  margin: 0;
  text-align: center;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ink);
}

.subtitle {
  margin: 8px 0 30px;
  text-align: center;
  font-size: 13.5px;
  color: var(--muted);
}

.hello-pill {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 14px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 11.5px;
  font-weight: 600;
}
.hello-pill::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(194, 65, 12, .18);
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(194, 65, 12, 0); } }

.wave { display: inline-block; transform-origin: 70% 70%; animation: wave 2.6s ease-in-out 1s 2; }
@keyframes wave {
  0%, 60%, 100% { transform: rotate(0); }
  10%, 30% { transform: rotate(14deg); }
  20%, 40% { transform: rotate(-8deg); }
}

.form { display: flex; flex-direction: column; gap: 14px; }

/* floating-label fields */
.field { position: relative; }

.field input {
  width: 100%;
  height: 50px;
  padding: 18px 14px 6px;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid #dadae0;
  border-radius: var(--radius-field);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.field input[type="password"],
.field input#password { padding-right: 46px; }

.field label {
  position: absolute;
  left: 14px;
  top: 25px; /* input centre; stays put when an error shows below */
  transform: translateY(-50%);
  font-size: 13px;
  color: #5b5b66;
  pointer-events: none;
  transition: top .2s, font-size .2s, color .2s;
}
.field input:focus + label,
.field input:not(:placeholder-shown) + label {
  top: 14px;
  font-size: 10.5px;
  font-weight: 500;
}
.field input:hover { border-color: #c4c4cd; }
.field input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field input:focus + label { color: var(--accent); }

.field.invalid input { border-color: var(--accent); }
.field.invalid { animation: shake .35s; }
@keyframes shake {
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}

.error {
  display: block;
  max-height: 0;
  overflow: hidden;
  font-size: 12px;
  color: var(--accent);
  padding-left: 4px;
  transition: max-height .25s, margin .25s;
}
.field.invalid .error { max-height: 20px; margin-top: 6px; }

.eye {
  position: absolute;
  right: 8px;
  top: 7px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  transition: background .2s, color .2s;
}
.eye:hover { background: #f4f4f7; color: var(--ink-2); }
.eye svg {
  width: 18px; height: 18px;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.eye .eye-closed { display: none; }
.eye.on .eye-open { display: none; }
.eye.on .eye-closed { display: block; }

.row-end { display: flex; justify-content: flex-end; margin-top: 2px; }

.link-accent {
  color: var(--accent);
  font-size: 12px;
  font-weight: 500;
  transition: color .2s;
}
.link-accent:hover { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; }

.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-size: 12px;
  color: var(--ink-2);
  margin: 2px 0;
}
.divider::before,
.divider::after {
  content: "";
  width: 30px;
  height: 1px;
  background: #cfcfd6;
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 50px;
  margin-top: 8px;
  border: 1.5px solid #dadae0;
  border-radius: var(--radius-field);
  background: #fff;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.btn-google:hover {
  border-color: #c4c4cd;
  box-shadow: 0 10px 22px -16px rgba(0, 0, 0, .35);
  transform: translateY(-1px);
}
.g-logo { width: 20px; height: 20px; }

.btn-primary {
  position: relative;
  height: 46px;
  margin-top: 14px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #2b2b33 0%, #16161b 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 12px 24px -14px rgba(22, 22, 27, .7);
  transition: transform .2s, box-shadow .2s, background .3s;
  overflow: hidden;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 28px -14px rgba(194, 65, 12, .55); }
.btn-primary:active { transform: translateY(0) scale(.985); }

.btn-primary .spinner,
.btn-primary .check {
  position: absolute;
  inset: 0;
  margin: auto;
  opacity: 0;
  transition: opacity .2s;
}
.btn-primary .spinner {
  width: 20px; height: 20px;
  border: 2.5px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
.btn-primary .check {
  width: 22px; height: 22px;
  fill: none; stroke: #fff; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 24; stroke-dashoffset: 24;
}
.btn-primary .btn-label { transition: opacity .2s; }

.btn-primary.loading .btn-label { opacity: 0; }
.btn-primary.loading .spinner { opacity: 1; }
.btn-primary.success { background: linear-gradient(180deg, #2fc37a, #22a866); box-shadow: 0 14px 26px -14px rgba(34, 168, 102, .8); }
.btn-primary.success .btn-label { opacity: 0; }
.btn-primary.success .check { opacity: 1; animation: draw .45s .05s ease forwards; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes draw { to { stroke-dashoffset: 0; } }

.signup-line {
  margin: 14px 0 0;
  text-align: center;
  font-size: 12px;
  color: var(--ink-2);
}

/* socials */
.socials {
  display: flex;
  justify-content: center;
  gap: 22px;
}
.socials a {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #3a3a42;
  transition: color .2s, transform .2s, background .2s;
}
.socials svg { width: 22px; height: 22px; fill: currentColor; }
.socials .s-ig svg { fill: none; }
.socials a:hover { transform: translateY(-3px); background: #f4f4f7; }
.socials .s-fb:hover { color: #1877f2; }
.socials .s-tw:hover { color: #1d9bf0; }
.socials .s-in:hover { color: #0a66c2; }
.socials .s-ig:hover { color: #e1306c; }

/* toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 20px);
  padding: 12px 20px;
  border-radius: 999px;
  background: #1f1f26;
  color: #fff;
  font-size: 14px;
  box-shadow: 0 16px 36px -14px rgba(0, 0, 0, .5);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .35s cubic-bezier(.2, .8, .2, 1);
  z-index: 50;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.field input:focus-visible { outline: none; }

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 980px) {
  .card {
    height: auto;
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
  }
  .showcase {
    height: 340px;
    -webkit-clip-path: none;
    clip-path: none;
  }
  .showcase-bottom { right: 32px; bottom: 28px; }
  .showcase-top { top: 26px; left: 32px; right: 28px; }
  .showcase-bottom { left: 32px; }
  .auth { padding: 24px 28px 28px; }
  .auth-body { padding: 36px 0 32px; }
}

@media (max-width: 520px) {
  .card { min-height: 100vh; padding: 8px; }
  .showcase { height: 260px; border-radius: 22px; }
  .showcase-top { left: 22px; right: 18px; top: 20px; }
  .showcase-bottom { left: 22px; right: 20px; bottom: 20px; }
  .top-actions { gap: 14px; }
  .btn-outline { padding: 8px 16px; }
  .avatar { width: 46px; height: 46px; }
  .artist-meta strong { font-size: 14px; }
  .artist-meta span { font-size: 12px; }
  .circle-btn { width: 38px; height: 38px; }
  .auth { padding: 20px 16px 24px; }
  .logo { font-size: 22px; }
  .lang-btn { height: 42px; padding: 0 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .btn-primary .check { stroke-dashoffset: 0; }
}

/* =========================================================
   A2Z additions
   ========================================================= */

.logo { display: inline-flex; align-items: center; gap: 9px; font-size: 16px; font-weight: 700; }
.logo img { height: 28px; width: auto; display: block; }

.avatar { background: #fff; display: grid; place-items: center; }
.avatar img { width: 70%; height: 70%; object-fit: contain; display: block; }

.auth-error {
  margin: -10px 0 20px;
  padding: 12px 14px;
  border-radius: var(--radius-field);
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 500;
  text-align: center;
}

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 2px;
}

.check-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-2);
  cursor: pointer;
}
.check-line input { width: 15px; height: 15px; margin: 0; accent-color: var(--accent); }

button.link-accent { border: 0; padding: 0; background: none; }

.auth-hint {
  margin: 14px 0 0;
  text-align: center;
  font-size: 12px;
  color: var(--ink-2);
}

.terms {
  margin: 0;
  text-align: center;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}
