/* =============================================================================
 * Auth screen — Sign In / Sign Up (mobile-first), built on design tokens.
 * Aligned to the design system: DM Sans, translucent card surface + M3 shadow,
 * component gold gradient. Requires: design-tokens.css, typography.css,
 * button.css. Composes with the button partial for the submit action.
 * ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600;700&display=swap');

body { margin: 0; }

.auth-screen,
.auth-screen * {
  box-sizing: border-box;
}

.auth-screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-5);
  padding: var(--space-6);
  background:
    linear-gradient(rgba(255, 255, 255, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.032) 1px, transparent 1px),
    #101010;
  background-size: 40px 40px;
  color: var(--color-content-primary);
  font-family: 'DM Sans', var(--font-sans);
}

.auth-shell {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  align-items: stretch;
  min-height: 650px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-8);
  background: transparent;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

.auth-story {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background: transparent;
}

.auth-showcase {
  position: relative;
  min-height: 100%;
  padding: 40px;
}

.auth-showcase__copy {
  position: absolute;
  z-index: 3;
  top: 40px;
  left: 40px;
}

.auth-showcase__copy p {
  margin: 0 0 8px;
  color: #d4bd62;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.auth-showcase__copy h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.08;
  letter-spacing: 0;
}

.auth-phone {
  position: absolute;
  z-index: 2;
  top: 112px;
  left: 54px;
  width: 300px;
  height: 540px;
  overflow: hidden;
  border: 7px solid #292929;
  border-radius: 30px;
  background: #171717;
  box-shadow: 0 28px 50px rgba(0, 0, 0, 0.58);
  transform: rotate(-2.5deg);
}

.auth-phone::before {
  position: absolute;
  z-index: 4;
  top: 7px;
  left: 50%;
  width: 68px;
  height: 4px;
  border-radius: 4px;
  background: #383838;
  content: '';
  transform: translateX(-50%);
}

.auth-phone__bar {
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 8px;
}

.auth-phone__brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.auth-phone__brand i {
  width: 8px;
  height: 17px;
  border-radius: 2px;
  background: #c6b25a;
}

.auth-phone__avatar,
.auth-phone__pick-avatar {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #363636;
  color: #d7c36a;
  font-weight: 700;
}

.auth-phone__avatar { width: 27px; height: 27px; font-size: 11px; }

.auth-phone__avatar img,
.auth-phone__pick-avatar img,
.auth-share-preview__user > span img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.auth-phone__hero {
  position: relative;
  height: 150px;
  overflow: hidden;
}

.auth-phone__hero::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(13, 13, 13, 0.86), transparent 72%);
  content: '';
}

.auth-phone__hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(4px);
  transform: scale(1.04);
}
.auth-phone__hero div { position: absolute; z-index: 1; left: 16px; bottom: 14px; display: grid; gap: 3px; }
.auth-phone__hero span { color: #d7c36a; font-size: 9px; font-weight: 700; letter-spacing: 0.1em; }
.auth-phone__hero strong { font-size: 17px; }
.auth-phone__body { padding: 16px; }

.auth-phone__section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 11px;
}

.auth-phone__section-head strong { font-size: 13px; }
.auth-phone__section-head span { color: #8c8c8c; font-size: 9px; }
.auth-phone__section-head--picks { margin-top: 18px; }
.auth-phone__section-head--picks span { color: #65bd82; }

.auth-phone__game {
  padding: 12px;
  border: 1px solid #303030;
  border-radius: 6px;
  background: #1e1e1e;
}

.auth-phone__teams { display: grid; gap: 9px; }
.auth-phone__teams span { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 600; }
.auth-phone__teams i {
  width: 28px;
  height: 22px;
  display: grid;
  flex: 0 0 28px;
  place-items: center;
  color: #aaa;
  font-size: 8px;
  font-style: normal;
}

.auth-phone__teams i img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.auth-phone__line {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin-top: 12px;
}

.auth-phone__line span {
  display: grid;
  gap: 2px;
  padding: 7px;
  border: 1px solid #373737;
  border-radius: 4px;
  background: #252525;
}

.auth-phone__line small { color: #888; font-size: 7px; }
.auth-phone__line b { font-size: 11px; }

.auth-phone__pick {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px;
  border-left: 2px solid #c6b25a;
  background: #1e1e1e;
}

.auth-phone__pick-avatar { width: 27px; height: 27px; flex: 0 0 auto; font-size: 10px; }
.auth-phone__pick div { min-width: 0; display: grid; gap: 2px; }
.auth-phone__pick small,
.auth-share-preview__result strong {
  display: flex;
  align-items: center;
  gap: 5px;
}
.auth-phone__pick strong { font-size: 10px; white-space: nowrap; }
.auth-phone__pick small { color: #888; font-size: 8px; }
.auth-phone__pick > b { margin-left: auto; color: #d7c36a; font-size: 11px; }

.auth-team-logo--inline {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  object-fit: contain;
}

.auth-share-preview {
  position: absolute;
  z-index: 3;
  right: 30px;
  bottom: 68px;
  width: 244px;
  padding: 16px;
  border: 1px solid #3a3a3a;
  border-radius: 7px;
  background: rgba(31, 31, 31, 0.96);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.48);
  transform: rotate(3deg);
}

.auth-share-preview__label {
  color: #9a9a9a;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.auth-share-preview__title {
  display: block;
  margin-top: 4px;
  font-size: 15px;
}

.auth-share-preview__user,
.auth-share-preview__result { display: flex; align-items: center; }
.auth-share-preview__user { gap: 9px; padding: 13px 0; border-bottom: 1px solid #383838; }
.auth-share-preview__user > span { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 50%; background: #373737; color: #d7c36a; font-size: 11px; font-weight: 700; }
.auth-share-preview__user div,
.auth-share-preview__result div { display: grid; gap: 2px; }
.auth-share-preview__user strong { font-size: 11px; }
.auth-share-preview__user small,
.auth-share-preview__result small { color: #8d8d8d; font-size: 8px; }
.auth-share-preview__user > b { margin-left: auto; display: grid; gap: 1px; color: #6ac488; font-size: 16px; text-align: right; }
.auth-share-preview__user > b small { color: #8d8d8d; font-size: 7px; font-weight: 600; text-transform: uppercase; }
.auth-share-preview__result { gap: 9px; padding-top: 11px; }
.auth-share-preview__result > span { display: grid; width: 20px; height: 20px; place-items: center; border-radius: 3px; background: #326b45; color: #c7efd4; font-size: 9px; font-weight: 700; }
.auth-share-preview__result strong { font-size: 10px; }

.auth-access {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-5);
  padding: 42px;
  background: transparent;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  padding: var(--space-6) var(--space-5);
  /* Match the card component: translucent warm-gray surface + M3 elevation. */
  background: linear-gradient(295.78deg, rgba(43, 33, 10, 0.12) 13.81%, rgba(84, 83, 79, 0.12) 101.26%), rgba(50, 50, 50, 0.41);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 6px 10px 4px rgba(0, 0, 0, 0.15), 0 2px 3px rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-8);
}

@media (min-width: 600px) {
  .auth-card { padding: var(--space-8) var(--space-6); }
}

/* -----------------------------------------------------------------------------
 * Header / branding
 * -------------------------------------------------------------------------- */
.auth-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-2);
}
.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}
.auth-mark {
  width: 22px;
  height: 30px;
  border-radius: 5px;
  background-image: linear-gradient(310.14deg, #b7af69 12.98%, #cdb140 92.6%, #cdb664 131.58%);
  flex-shrink: 0;
}
.auth-wordmark {
  font-family: 'DM Sans', var(--font-sans);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-content-primary);
}
.auth-title { margin: 0; color: var(--color-content-primary); }
.auth-subtitle { margin: 0; color: var(--color-content-secondary); }

/* -----------------------------------------------------------------------------
 * Forms
 * -------------------------------------------------------------------------- */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.auth-form[hidden] { display: none; }

/* -----------------------------------------------------------------------------
 * Row helpers (remember me / forgot password) + checkboxes
 * -------------------------------------------------------------------------- */
.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.auth-link {
  color: var(--color-content-accent);
  text-decoration: none;
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-medium);
}
.auth-link:hover { text-decoration: underline; }

/* -----------------------------------------------------------------------------
 * Footer toggle (secondary/ghost switch)
 * -------------------------------------------------------------------------- */
.auth-switch {
  text-align: center;
  color: var(--color-content-secondary);
  font-size: var(--font-size-footnote);
}
.auth-switch button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--color-content-accent);
  font-family: 'DM Sans', var(--font-sans);
  font-size: var(--font-size-footnote);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  padding: var(--space-1);
}
.auth-switch button:hover { text-decoration: underline; }

.auth-footer {
  width: min(1120px, 100%);
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  color: var(--color-content-tertiary);
  font-size: 12px;
}

.auth-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.auth-footer a { color: inherit; text-decoration: none; }
.auth-footer a:hover { color: var(--color-content-primary); }

@media (max-width: 959px) {
  .auth-screen {
    justify-content: flex-start;
    padding: 0 0 88px;
    background-size: 36px 36px;
  }

  .auth-shell {
    display: flex;
    flex-direction: column;
    min-height: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .auth-story { min-height: 225px; }
  .auth-showcase { padding: 0; }
  .auth-showcase__copy { top: 27px; left: 22px; }
  .auth-showcase__copy h1 { font-size: 29px; }
  .auth-phone {
    top: 20px;
    right: 10px;
    left: auto;
    width: 126px;
    height: 224px;
    border-width: 4px;
    border-radius: 17px;
    transform: rotate(3deg);
  }
  .auth-phone::before { top: 4px; width: 34px; height: 2px; }
  .auth-phone__bar { height: 31px; padding: 9px 7px 4px; }
  .auth-phone__brand { gap: 3px; font-size: 6px; }
  .auth-phone__brand i { width: 4px; height: 9px; }
  .auth-phone__avatar { width: 13px; height: 13px; font-size: 5px; }
  .auth-phone__hero { height: 67px; }
  .auth-phone__hero div { left: 7px; bottom: 6px; }
  .auth-phone__hero span { font-size: 4px; }
  .auth-phone__hero strong { font-size: 8px; }
  .auth-phone__body { padding: 7px; }
  .auth-phone__section-head { margin-bottom: 5px; }
  .auth-phone__section-head strong { font-size: 6px; }
  .auth-phone__section-head span { font-size: 4px; }
  .auth-phone__game { padding: 5px; border-radius: 3px; }
  .auth-phone__teams { gap: 3px; }
  .auth-phone__teams span { gap: 3px; font-size: 5px; }
  .auth-phone__teams i { width: 12px; height: 10px; flex-basis: 12px; font-size: 4px; }
  .auth-phone__line { gap: 2px; margin-top: 5px; }
  .auth-phone__line span { gap: 1px; padding: 3px; border-radius: 2px; }
  .auth-phone__line small { font-size: 3px; }
  .auth-phone__line b { font-size: 5px; }
  .auth-phone__section-head--picks { margin-top: 7px; }
  .auth-phone__pick { gap: 3px; padding: 4px; }
  .auth-phone__pick-avatar { width: 12px; height: 12px; font-size: 4px; }
  .auth-phone__pick strong { font-size: 4px; }
  .auth-phone__pick small { font-size: 3px; }
  .auth-phone__pick > b { font-size: 4px; }
  .auth-share-preview { display: none; }

  .auth-access {
    align-items: center;
    padding: 24px 16px 10px;
  }

  .auth-card { border-radius: var(--radius-8); }

  .auth-footer {
    padding: 0 20px;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .auth-footer nav { justify-content: center; }
}

@media (max-width: 420px) {
  .auth-story { min-height: 205px; }
  .auth-showcase__copy h1 { max-width: 180px; font-size: 27px; }
  .auth-access { padding-inline: 12px; }
  .auth-card { padding: var(--space-5) var(--space-4); }
}
