@import url('site-fonts.css');

* {
  box-sizing: border-box;
}

:root {
  --font: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html {
  color-scheme: dark;
  height: 100%;
}

body.auth-page {
  margin: 0;
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  background-color: #080808;
  font-family: var(--font);
}

.auth-ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.auth-ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
}

.auth-ambient-orb--a {
  width: min(70vw, 560px);
  height: min(70vw, 560px);
  top: -18%;
  right: 10%;
  background: radial-gradient(circle, rgba(255, 140, 0, 0.45) 0%, transparent 70%);
}

.auth-ambient-orb--b {
  width: min(55vw, 440px);
  height: min(55vw, 440px);
  bottom: -10%;
  left: -8%;
  background: radial-gradient(circle, rgba(70, 70, 80, 0.55) 0%, transparent 70%);
}

.auth-ambient-orb--c {
  width: min(40vw, 320px);
  height: min(40vw, 320px);
  top: 40%;
  left: 35%;
  background: radial-gradient(circle, rgba(255, 120, 0, 0.12) 0%, transparent 70%);
}

.auth-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}

.auth-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2.5rem, 6vw, 5rem);
  background:
    linear-gradient(165deg, rgba(255, 140, 0, 0.08) 0%, transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, transparent 100%);
  border-right: 1px solid rgba(100, 100, 100, 0.38);
}

.auth-hero-inner {
  width: 100%;
  max-width: 34rem;
}

.auth-hero-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: clamp(2rem, 5vh, 3.5rem);
}

.auth-hero-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.45));
}

.auth-hero-wordmark {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #ffffff;
}

.auth-hero-headline {
  margin: 0 0 1.25rem;
  font-family: var(--font);
  font-size: clamp(2.25rem, 4.5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: #ffffff;
}

.auth-hero-copy {
  margin: 0 0 2rem;
  max-width: 30rem;
  font-size: clamp(1rem, 1.6vw, 1.125rem);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.58);
}

.auth-hero-points {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.auth-hero-points li {
  position: relative;
  padding-left: 1.35rem;
  font-size: 0.975rem;
  color: rgba(255, 255, 255, 0.72);
}

.auth-hero-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #ff8c00;
  box-shadow: 0 0 10px rgba(255, 140, 0, 0.55);
}

.auth-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 100dvh;
  overflow: hidden;
  background: rgba(8, 8, 8, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.auth-content-header {
  padding: clamp(1.25rem, 3vw, 2rem) clamp(1.5rem, 4vw, 3.5rem) 0;
}

.auth-content-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #ffffff;
}

.auth-content-logo img {
  display: block;
  object-fit: contain;
}

.auth-content-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
  padding: clamp(1.25rem, 3vw, 2rem) clamp(1.5rem, 4vw, 3rem);
}

.login-logo-accent {
  color: #ff8c00;
}

.auth-card {
  width: 100%;
  max-width: 30rem;
  margin: 0 auto;
  padding: clamp(1.75rem, 3.5vw, 2.5rem);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  max-height: calc(100dvh - 7rem);
  overflow: hidden;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  padding: 0.55rem;
  margin: 0 0 clamp(2.25rem, 5vh, 3rem);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(100, 100, 100, 0.42);
}

.auth-tab {
  padding: 0.72rem 0.85rem;
  border: none;
  border-radius: 11px;
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: color 0.2s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.auth-tab[aria-selected="true"] {
  background: rgba(255, 140, 0, 0.14);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(255, 140, 0, 0.32);
}

.auth-tab:hover {
  color: rgba(255, 255, 255, 0.92);
}

.auth-panels-viewport {
  overflow: hidden;
  width: 100%;
}

.auth-panels-track {
  display: flex;
  width: 100%;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

.auth-panels-track[data-panel="signup"] {
  transform: translate3d(-100%, 0, 0);
}

@media (prefers-reduced-motion: reduce) {
  .auth-panels-track {
    transition: none;
  }
}

.auth-panel {
  flex: 0 0 100%;
  min-width: 0;
  padding: 0 0.35rem;
}

.auth-panel-title {
  font-family: var(--font);
  font-size: clamp(1.75rem, 3.5vw, 2.35rem);
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 0.65rem;
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.auth-panel-desc {
  margin: 0 0 clamp(2rem, 4.5vh, 2.5rem);
  max-width: 26rem;
  font-size: 0.975rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.52);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-field-hint {
  margin: -0.85rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.42);
}

.login-input-group {
  position: relative;
}

.login-input {
  width: 100%;
  padding: 1.05rem 1rem 0.55rem;
  font-size: 0.9375rem;
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(100, 100, 100, 0.5);
  border-radius: 11px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.login-input::placeholder {
  color: transparent;
}

.login-input:hover {
  border-color: rgba(100, 100, 100, 0.62);
  background-color: rgba(255, 255, 255, 0.05);
}

.login-input:focus {
  border-color: rgba(255, 140, 0, 0.65);
  box-shadow: 0 0 0 1px rgba(255, 140, 0, 0.35);
  background-color: rgba(255, 255, 255, 0.05);
}

.login-label {
  position: absolute;
  left: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9375rem;
  color: #9ca3af;
  pointer-events: none;
  transition: top 0.2s ease, transform 0.2s ease, font-size 0.2s ease, color 0.2s ease, background 0.2s ease, padding 0.2s ease;
}

.login-input:focus ~ .login-label,
.login-input:not(:placeholder-shown) ~ .login-label,
.login-input:-webkit-autofill ~ .login-label {
  top: 0;
  transform: translateY(-50%) scale(0.85);
  transform-origin: left center;
  color: #ff8c00;
  font-size: 0.8125rem;
  background: #101012;
  padding: 0 0.3rem;
}

.login-input:-webkit-autofill,
.login-input:-webkit-autofill:hover,
.login-input:-webkit-autofill:focus {
  -webkit-text-fill-color: #ffffff;
  caret-color: #ffffff;
  transition: background-color 99999s ease-out 0s;
  box-shadow: 0 0 0 1000px #101012 inset !important;
}

.login-toggle-btn {
  align-self: flex-start;
  padding: 0.15rem 0;
  margin: -0.25rem 0 0;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9375rem;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s, text-decoration 0.2s;
}

.login-toggle-btn:hover {
  color: #ff8c00;
  text-decoration: underline;
}

.login-error {
  margin: 0;
  font-size: 0.975rem;
  line-height: 1.5;
  color: #f87171;
}

.login-btn {
  margin-top: 0.75rem;
  padding: 0.9rem 1.35rem;
  font-size: 0.975rem;
  font-weight: 600;
  color: #0a0a0a;
  background: linear-gradient(180deg, #ff9f2e 0%, #ff8c00 100%);
  border: none;
  border-radius: 11px;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 8px 28px rgba(255, 140, 0, 0.24);
}

.login-btn:hover {
  filter: brightness(1.06);
  box-shadow: 0 10px 32px rgba(255, 140, 0, 0.34);
}

.login-btn:active {
  transform: scale(0.99);
}

.login-btn--signup {
  background: linear-gradient(180deg, #ffa033 0%, #e67e00 100%);
}

.auth-panel--single {
  max-width: 32rem;
  margin: 0 auto;
}

.auth-panel-note {
  margin: -0.75rem 0 clamp(1.5rem, 3vh, 2rem);
  padding: 0.9rem 1rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(100, 100, 100, 0.42);
  font-size: 0.9375rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.58);
}

.auth-panel-desc--success {
  color: #86efac;
}

.auth-panel-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.auth-panel-actions .login-btn {
  margin-top: 0;
  width: 100%;
}

.login-btn--link {
  display: block;
  margin-top: 0;
  text-align: center;
  text-decoration: none;
}

.login-btn--secondary {
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(100, 100, 100, 0.5);
  box-shadow: none;
}

.login-btn--secondary:hover {
  filter: none;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

input:focus,
button:focus,
textarea:focus {
  outline: none;
}

input:focus-visible,
button:focus-visible {
  outline: 2px solid rgba(255, 140, 0, 0.9);
  outline-offset: 2px;
}

@media (max-width: 960px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-hero {
    display: none;
  }

  .auth-content-body {
    align-items: center;
    padding-top: 0.5rem;
  }
}

@media (max-height: 760px) {
  .auth-panel-title {
    font-size: 1.65rem;
    margin-bottom: 0.4rem;
  }

  .auth-panel-desc {
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
  }

  .auth-tabs {
    margin-bottom: 1.25rem;
  }

  .auth-form {
    gap: 0.85rem;
  }

  .login-input {
    padding: 0.95rem 0.95rem 0.5rem;
  }

  .login-btn {
    margin-top: 0.35rem;
    padding: 0.8rem 1.2rem;
  }

  .auth-field-hint {
    margin-top: -0.55rem;
  }
}

/* ——— Verify email (simple centered card) ——— */

body.auth-page--verify {
  display: flex;
  align-items: center;
  justify-content: center;
}

.verify-center {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 26rem;
  padding: 1.5rem;
}

.verify-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.85rem;
  padding: clamp(2rem, 5vw, 2.75rem) clamp(1.75rem, 4vw, 2.25rem);
  border-radius: 20px;
  background: rgba(18, 18, 20, 0.92);
  border: 1px solid rgba(100, 100, 100, 0.42);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.verify-card[data-state="success"] {
  border-color: rgba(134, 239, 172, 0.25);
}

.verify-card[data-state="error"] {
  border-color: rgba(248, 113, 113, 0.25);
}

.verify-card-logo {
  object-fit: contain;
  margin-bottom: 0.25rem;
}

.verify-card-title {
  margin: 0;
  font-family: var(--font);
  font-size: clamp(1.5rem, 4vw, 1.85rem);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}

.verify-card-text {
  margin: 0;
  font-size: 0.975rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.58);
  max-width: 22rem;
}

.verify-card-error {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #f87171;
}

.verify-card-link {
  display: inline-block;
  width: 100%;
  margin-top: 0.35rem;
  text-decoration: none;
  text-align: center;
}

.verify-card-meta {
  margin: 0;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.42);
}

.verify-card-resend {
  width: 100%;
}

@media (max-width: 480px) {
  .auth-content-header {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .auth-content-body {
    padding: 1rem 1.25rem 1.25rem;
  }

  .auth-tab {
    padding: 0.75rem 0.65rem;
    font-size: 0.9375rem;
  }

  .auth-card {
    padding: 1.5rem 1.25rem;
  }
}
