:root {
  --blue: #5361f6;
  --ink: #171d2f;
  --muted: #9aa2b1;
  --line: #e5e8ef;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.shell {
  width: min(1190px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: absolute;
  z-index: 4;
  inset: 0 0 auto;
  height: 82px;
}

.nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 82px;
  gap: 32px;
}

.brand {
  display: inline-flex;
  line-height: 1;
}

.brand img {
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 38px;
  color: #101b31;
  font-size: 14px;
}

html[lang="en"] .nav-links {
  gap: 28px;
}

.nav-links .active {
  color: #293ed2;
  font-weight: 800;
}

.nav-menu-check,
.menu-toggle {
  display: none;
}

.menu-toggle {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(83, 97, 246, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-direction: column;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: #293ed2;
}

.mobile-auth-link {
  display: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 30px;
  color: #101b31;
  font-size: 14px;
}

.lang-toggle {
  flex: 0 0 auto;
  min-width: 46px;
  height: 32px;
  border: 1px solid rgba(83, 97, 246, 0.25);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
  color: #293ed2;
  font-weight: 800;
  cursor: pointer;
  line-height: 1;
  white-space: nowrap;
}

.pill-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 20px;
  background: var(--blue);
  color: #fff;
  font-weight: 800;
  padding: 0 26px;
  box-shadow: 0 14px 28px rgba(83, 97, 246, 0.18);
}

.auth-page {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: start;
  min-height: 100vh;
  overflow: hidden;
  padding: 137px 20px 35px;
  background:
    radial-gradient(circle at 18% 25%, rgba(203, 235, 255, 0.88), transparent 23%),
    radial-gradient(circle at 72% 28%, rgba(202, 240, 252, 0.72), transparent 22%),
    linear-gradient(115deg, #eef9ff 0%, #fff8f6 48%, #f9fcff 100%);
}

.auth-orbit {
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 44px solid rgba(83, 97, 246, 0.15);
  filter: blur(1px);
}

.auth-orbit-left {
  left: -150px;
  bottom: 64px;
}

.auth-orbit-right {
  right: -105px;
  top: 210px;
}

.auth-card {
  position: relative;
  z-index: 1;
  width: min(670px, 100%);
  border-radius: 18px;
  background: #fff;
  padding: 35px 20px 35px;
  box-shadow: 0 20px 70px rgba(33, 43, 83, 0.08);
}

.auth-card h1 {
  margin: 0 0 20px;
  text-align: center;
  font-size: 30px;
  line-height: 1;
}

.auth-card > p {
  margin: 0 0 38px;
  text-align: center;
  color: var(--muted);
  font-size: 18px;
}

form {
  display: grid;
  gap: 16px;
}

label,
.label-row {
  color: #1f2937;
  font-size: 16px;
  font-weight: 600;
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
}

.label-row a {
  color: var(--blue);
}

input[type="email"],
input[type="password"] {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: 0;
  color: #2f3849;
  padding: 0 22px;
  font-size: 16px;
}

input::placeholder {
  color: #c7ccd6;
}

input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(83, 97, 246, 0.12);
}

.check-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 18px;
  color: #333c4f;
}

.check-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}

form button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 34px;
  height: 60px;
  border: 0;
  border-radius: 6px;
  background: var(--blue);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  box-shadow: 0 16px 32px rgba(83, 97, 246, 0.22);
  cursor: pointer;
}

.switch-link {
  margin-top: 38px;
  text-align: center;
  font-size: 16px;
}

.switch-link a {
  color: var(--blue);
  font-weight: 700;
}

.auth-footer {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 44px;
  margin-top: 45px;
  color: #8791a3;
}

@media (max-width: 1100px) {
  .site-header {
    background: rgba(247, 251, 255, 0.94);
    backdrop-filter: blur(12px);
  }

  .nav {
    gap: 16px;
  }

  .brand img {
    width: 158px;
    height: auto;
  }

  .menu-toggle {
    display: inline-flex;
    order: 3;
  }

  .nav-links {
    position: absolute;
    z-index: 20;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    row-gap: 8px;
    column-gap: 8px;
    max-height: 0;
    overflow: hidden;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 45px rgba(32, 42, 83, 0.12);
    font-size: 13px;
    opacity: 0;
    transform: translateY(-6px);
    transition: max-height 0.2s ease, padding 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
  }

  html[lang="en"] .nav-links {
    gap: 8px;
    row-gap: 8px;
    column-gap: 8px;
  }

  .nav-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 6px;
    background: #f6f8fd;
    margin: 0;
    padding: 0 10px;
    text-align: center;
  }

  .nav-links .mobile-auth-link {
    display: flex;
  }

  .nav-links .mobile-register-link {
    background: #f6f8fd;
    color: inherit;
    font-weight: 400;
  }

  .nav-links .mobile-auth-link.active {
    color: #293ed2;
    font-weight: 800;
  }

  .mobile-auth-link:empty::before {
    content: "Log In";
  }

  .mobile-register-link:empty::before {
    content: "Sign Up Free";
  }

  .nav-menu-check:checked ~ .nav-links {
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    padding: 12px;
    opacity: 1;
    transform: translateY(0);
  }

  .nav-actions {
    margin-left: auto;
    gap: 14px;
    order: 2;
  }

  .lang-toggle {
    min-width: 76px;
    padding-inline: 14px;
  }
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 28px, 1190px);
  }

  .site-header {
    position: sticky;
    top: 0;
    background: #f7fbff;
    height: auto;
  }

  .nav {
    height: 64px;
    gap: 10px;
  }

  .brand img {
    width: 132px;
  }

  .nav-actions {
    gap: 6px;
  }

  .nav-actions > a:not(.pill-link) {
    display: none;
  }

  .pill-link {
    display: none;
  }

  .lang-toggle {
    min-width: 58px;
    height: 30px;
    padding-inline: 7px;
    font-size: 11px;
  }

  .menu-toggle {
    width: 38px;
    height: 38px;
  }

  .nav-links {
    grid-template-columns: 1fr;
    top: calc(100% + 6px);
    gap: 8px;
    row-gap: 8px;
    column-gap: 8px;
  }

  html[lang="en"] .nav-links {
    gap: 8px;
    row-gap: 8px;
    column-gap: 8px;
  }

  .nav-links a {
    justify-content: flex-start;
    padding-inline: 14px;
    margin: 0;
  }

  .nav-menu-check:checked ~ .nav-links {
    max-height: calc(100vh - 82px);
    padding: 10px;
  }

  .auth-page {
    padding: 28px 14px;
  }

  .auth-orbit {
    width: 160px;
    height: 160px;
    border-width: 30px;
  }

  .auth-orbit-left {
    left: -120px;
  }

  .auth-orbit-right {
    right: -120px;
    top: 180px;
  }

  .auth-card {
    width: 100%;
    border-radius: 10px;
    padding: 30px 18px;
  }

  .auth-card h1 {
    font-size: 30px;
  }

  .auth-card > p {
    margin-bottom: 28px;
    font-size: 15px;
  }

  label,
  .label-row,
  .switch-link {
    font-size: 14px;
  }

  input[type="email"],
  input[type="password"] {
    height: 44px;
    padding-inline: 14px;
  }

  form button {
    height: 50px;
    gap: 16px;
    font-size: 16px;
  }

  .auth-footer {
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px;
    margin-top: 28px;
  }
}

@media (max-width: 380px) {
  .brand img {
    width: 110px;
  }

  .lang-toggle {
    min-width: 54px;
    padding-inline: 6px;
    font-size: 10px;
  }
}
