@font-face {
  font-family: "Tune";
  src: url("./fonts/SpotifyMix-Regular.woff2") format("woff2");
  font-weight: 400;
}
@font-face {
  font-family: "Tune";
  src: url("./fonts/SpotifyMix-Bold.woff2") format("woff2");
  font-weight: 700;
}
@font-face {
  font-family: "Tune";
  src: url("./fonts/SpotifyMix-Black.woff2") format("woff2");
  font-weight: 900;
}

:root {
  --lime: #ffffff;
  --input: #202020;
  --muted: #aaa;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: #000; color: #fff; font-family: "Tune", Arial, sans-serif; }
button, input { font: inherit; }
a { color: inherit; }

.auth-checking {
  overflow: hidden;
}

.auth-checking > .auth-screen,
.auth-checking > .auth-footer {
  visibility: hidden;
}

.auth-check-screen {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 28px;
  background: #000;
  color: #fff;
  text-align: center;
  transition: opacity .35s ease, visibility .35s ease;
}

.auth-ready .auth-check-screen {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.auth-check-logo {
  width: 68px;
  height: 68px;
  object-fit: contain;
  margin-bottom: 30px;
}

.auth-check-screen h1 {
  max-width: 360px;
  margin: 20px 0 8px;
  font-size: clamp(22px, 6vw, 30px);
  line-height: 1.15;
}

.auth-check-screen p {
  margin: 0;
  color: #777;
  font-size: 13px;
}

.auth-check-loader {
  display: flex;
  gap: 5px;
}

.auth-check-loader span {
  width: 38px;
  height: 6px;
  border-radius: 999px;
  background: #333;
  animation: auth-check-pulse 1.2s ease-in-out infinite;
}

.auth-check-loader span:nth-child(2) { animation-delay: .14s; }
.auth-check-loader span:nth-child(3) { animation-delay: .28s; }

@keyframes auth-check-pulse {
  0%, 100% { background: #333; transform: scaleX(.9); }
  50% { background: #fff; transform: scaleX(1); }
}

.auth-screen {
  position: relative;
  min-height: calc(100svh - 230px);
  overflow: hidden;
  background: #000;
}

.auth-landing {
  display: grid;
  grid-template-rows: minmax(250px, 1fr) auto;
}

.landing-visual {
  position: relative;
  display: grid;
  place-items: end center;
  min-height: 0;
  overflow: visible;
}

.cover-strip {
  position: absolute;
  inset: 16% -15% 3%;
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 20px;
  align-items: center;
  opacity: .52;
  filter: brightness(.58);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 25%, #000 75%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 25%, #000 75%, transparent);
}
.cover-strip img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
}
.cover-strip img:nth-child(2) { transform: translateY(-15%); }

.landing-logo {
  position: relative;
  z-index: 2;
  width: 84px;
  height: 84px;
  object-fit: contain;
  margin-bottom: 18px;
  filter: drop-shadow(0 12px 25px #000);
}

.landing-actions {
  position: relative;
  z-index: 3;
  display: grid;
  justify-items: center;
  padding: 20px 28px 70px;
  background: #000;
}
.action-stack { display: grid; gap: 11px; width: min(100%, 286px); }

.auth-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 47px;
  padding: 12px 24px;
  border-radius: 999px;
  border: 0;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: transform .2s, opacity .2s;
}
.auth-button:hover { transform: translateY(-1px); }
.auth-button-lime { background: #fff; color: #000; }
.auth-button-white { background: #fff; color: #000; }
.auth-button-outline { background: #000; color: #fff; border: 1px solid #777; }
.auth-button img { width: 17px; height: 17px; margin-right: 7px; }
.auth-button:disabled { opacity: .45; cursor: not-allowed; }

.auth-socials {
  display: flex;
  gap: 15px;
  margin-top: 22px;
  padding: 8px 13px;
  background: #080808;
}
.auth-socials a { color: #878787; text-decoration: none; font-size: 20px; line-height: 1; }

.mini-progress {
  position: absolute;
  z-index: 5;
  bottom: 30px;
  left: 50%;
  display: flex;
  gap: 3px;
  transform: translateX(-50%);
}
.mini-progress span { width: 45px; height: 7px; border-radius: 99px; background: #666; }
.mini-progress span:first-child { background: #fff; }
.mini-progress-single span { width: 45px; }

.auth-back {
  position: absolute;
  z-index: 4;
  top: 24px;
  left: 24px;
  color: #999;
  text-decoration: none;
  font-size: 25px;
}

.auth-form-page {
  display: grid;
  place-items: center;
  padding: 38px 24px 70px;
  overflow-y: auto;
}
.auth-form-wrap { width: min(100%, 345px); text-align: center; }
.auth-mark { width: 28px; height: 28px; object-fit: contain; margin-bottom: 30px; }
.auth-form-wrap h1 {
  margin: 0 0 48px;
  font-size: clamp(34px, 10vw, 43px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -1.5px;
}

.auth-form { display: grid; gap: 15px; text-align: left; }
.auth-form label > span:first-child {
  display: block;
  margin-bottom: 8px;
  color: #bdbdbd;
  font-size: 13px;
}
.auth-form input:not([type="checkbox"]) {
  width: 100%;
  height: 44px;
  padding: 11px 14px;
  border: 1px solid transparent;
  border-radius: 9px;
  outline: 0;
  background: var(--input);
  color: #fff;
  font-size: 13px;
}
.auth-form input:focus { border-color: var(--lime); }
.auth-form input::placeholder { color: #949494; }
.auth-form small {
  display: block;
  margin-top: 7px;
  color: #666;
  font-size: 8px;
  line-height: 1.4;
  text-align: right;
}
.auth-form small strong { color: #aaa; }

.terms-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #777;
  font-size: 10px;
  line-height: 1.45;
}
.terms-check input { margin: 2px 0 0; accent-color: var(--lime); }
.terms-check span { margin: 0 !important; font-size: inherit !important; }
.terms-check a { color: #fff; }
.auth-form > .auth-button { width: 170px; margin: 26px auto 0; }

.auth-login-page .auth-form-wrap h1 { margin-bottom: 54px; }
.auth-login-page .auth-form { gap: 17px; }
.forgot-link {
  justify-self: end;
  margin-top: -7px;
  color: #777;
  font-size: 10px;
  text-decoration: none;
}
.auth-socials-inline { justify-self: center; margin: 68px 0 0; }
.auth-login-page .auth-form > .auth-button { margin-top: 0; }

#toast-container {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
}
.toast, #toast-container > div {
  min-width: 250px;
  padding: 12px 16px;
  border-radius: 9px;
  background: #fff;
  color: #000;
  text-align: center;
  font-size: 12px;
  box-shadow: 0 10px 30px #000;
}

.auth-modal {
  position: fixed;
  z-index: 30;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0,0,0,.84);
}
.auth-modal.hidden { display: none; }
.auth-modal-card {
  width: min(100%, 420px);
  padding: 30px;
  border: 1px solid #282828;
  border-radius: 18px;
  background: #121212;
  text-align: center;
}
.auth-modal-card h2 { margin: 0 0 8px; }
.auth-modal-card p { margin: 0 0 22px; color: #888; font-size: 13px; }
.auth-modal-card .auth-button { margin-top: 6px; width: 100%; }
.modal-cancel { border: 0; background: transparent; color: #888; cursor: pointer; }

.auth-footer {
  position: relative;
  z-index: 4;
  border-top: 1px solid #151515;
  background: #000;
}
.auth-footer .social-media-icons { margin-bottom: 22px; }
.auth-footer .social-media-icons a { font-size: 21px; }
.auth-footer .copyright { margin-top: 22px; }

@media (min-width: 900px) {
  .auth-screen { min-height: calc(100svh - 250px); }
  .auth-landing {
    grid-template-columns: 1.15fr .85fr;
    grid-template-rows: 1fr;
  }
  .landing-visual { place-items: center; }
  .cover-strip { inset: 12% 3%; grid-template-columns: repeat(3, 1fr); }
  .landing-logo { width: 125px; height: 125px; margin: 0; }
  .landing-actions {
    align-content: center;
    padding: 70px;
    background: linear-gradient(90deg, transparent, #000 16%);
  }
  .action-stack { width: min(100%, 350px); }
  .auth-button { min-height: 52px; font-size: 16px; }

  .auth-form-page {
    grid-template-columns: minmax(280px, .75fr) minmax(500px, 1.25fr);
    padding: 0;
    background:
      radial-gradient(circle at 20% 50%, rgba(202,255,77,.08), transparent 28rem),
      linear-gradient(105deg, #050505 0 42%, #0b0b0b 42%);
  }
  .auth-form-page::before {
    content: "";
    width: clamp(150px, 16vw, 240px);
    height: clamp(150px, 16vw, 240px);
    justify-self: center;
    background: url("./assets/logotunenew.png") center / contain no-repeat;
    filter: drop-shadow(0 0 55px rgba(202,255,77,.12));
  }
  .auth-form-wrap { width: min(520px, calc(100% - 80px)); }
  .auth-mark { display: none; }
  .auth-form-wrap h1 {
    margin-bottom: 42px;
    font-size: clamp(43px, 4vw, 62px);
  }
  .auth-form { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .auth-form label:last-of-type,
  .auth-form .terms-check,
  .auth-form > .auth-button,
  .forgot-link,
  .auth-socials-inline { grid-column: 1 / -1; }
  .auth-form label:last-of-type:not(.terms-check) { grid-column: 1 / -1; }
  .auth-form input:not([type="checkbox"]) { height: 48px; }
  .auth-login-page .auth-form { display: grid; grid-template-columns: 1fr; }
  .auth-login-page .auth-form-wrap { width: min(430px, calc(100% - 80px)); }
  .auth-socials-inline { margin-top: 34px; }
  .mini-progress { bottom: 26px; }
}

@media (max-width: 599px) {
  .auth-screen { min-height: calc(100svh - 215px); }
  .auth-landing { min-height: 590px; }
  .landing-logo {
    width: 78px;
    height: 78px;
    margin-bottom: 24px;
  }
  .landing-actions { padding-bottom: 62px; }
  .auth-footer {
    padding-top: 25px;
    padding-bottom: 25px;
  }
  .auth-footer .social-media-icons { margin-bottom: 16px; }
  .auth-footer .footer-links ul { margin-bottom: 12px; }
  .auth-footer .copyright { margin-top: 14px; }
}

@media (max-height: 690px) and (max-width: 899px) {
  .auth-form-page { padding-top: 24px; }
  .auth-mark { margin-bottom: 14px; }
  .auth-form-wrap h1 { margin-bottom: 24px; font-size: 32px; }
  .auth-form { gap: 10px; }
  .auth-form > .auth-button { margin-top: 10px; }
  .auth-socials-inline { margin-top: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
