body.cutedoor-auth-open {
  margin: 0;
  overflow: hidden;
  background: #050506;
}

body.cutedoor-auth-open #app {
  display: none;
}

.cutedoor-auth-page[hidden] {
  display: none;
}

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

.cutedoor-auth-page {
  --cutedoor-auth-panel-width: clamp(320px, 26.25vw, 420px);
  --cutedoor-auth-bg-transparent-1: rgba(20, 20, 20, 0.38);
  --cutedoor-auth-bg-transparent-2: rgba(20, 20, 20, 0.58);
  --cutedoor-auth-input-transparent: rgba(66, 66, 66, 0.3);
  position: fixed;
  inset: 0;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  color: rgba(255, 255, 255, 0.9);
  font-family: "Rubik", "Microsoft YaHei UI", "Segoe UI", Arial, sans-serif;
  background: #000;
}

.cutedoor-auth-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  background: #000;
  pointer-events: none;
}

.cutedoor-auth-space {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
  background:
    linear-gradient(rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.42)),
    url("./assets/space-bg.webp") center / cover no-repeat;
}

.cutedoor-auth-space::before {
  position: absolute;
  inset: 0;
  z-index: 2;
  content: "";
  background:
    linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.32) 100%),
    linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.68) 100%);
}

.cutedoor-auth-planet {
  position: absolute;
  z-index: 1;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  transform: scale(2.5) translateY(38%) rotate(12.2deg);
  animation: cutedoor-auth-planet-enter 1.8s cubic-bezier(0.76, -0.46, 0.37, 0.99);
}

.cutedoor-auth-earth-model {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 50%;
  transform-origin: center center;
  box-shadow:
    0 0 8px rgba(150, 186, 255, 0.48),
    0 0 60px 12px rgba(150, 186, 255, 0.32);
  transition: transform 0.3s ease-in-out;
}

.cutedoor-auth-earth-model::after {
  position: absolute;
  inset: 0;
  z-index: 2;
  content: "";
  border-radius: 50%;
  box-shadow:
    0 0 8px 4px rgba(59, 104, 196, 0.98) inset,
    -24px 0 12px 2px rgba(59, 104, 196, 0.08) inset,
    0 0 48px 48px rgba(59, 104, 196, 0.28) inset,
    -48px 0 24px 48px rgba(59, 104, 196, 0.08) inset;
  animation: cutedoor-auth-earth-glow 1.8s forwards 0.9s ease-in-out;
  transition: box-shadow 0.3s ease-in-out;
}

.cutedoor-auth-earth-textures {
  width: 100%;
  height: 100%;
  background-image: url("./assets/earth-night.webp");
  background-size: 200%;
  background-color: rgba(0, 18, 77, 0.18);
  filter: brightness(2.4) contrast(1.2);
  animation: cutedoor-auth-earth-spin 80s linear infinite;
  will-change: background-position;
}

.cutedoor-auth-railway {
  position: absolute;
  top: -40px;
  left: -40px;
  width: calc(100% + 80px);
  height: calc(100% + 80px);
  border: 0.5px dashed rgba(255, 255, 255, 0.48);
  border-radius: 50%;
  animation: cutedoor-auth-railway-rotate 40s infinite linear;
}

.cutedoor-auth-railway-point {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  animation: cutedoor-auth-railway-enter 1.68s ease-in-out forwards;
}

.cutedoor-auth-railway-point:nth-child(1) {
  transform: rotate(calc(var(--railway-angle) * 0));
}

.cutedoor-auth-railway-point:nth-child(2) {
  transform: rotate(calc(var(--railway-angle) * 1));
}

.cutedoor-auth-railway-point:nth-child(3) {
  transform: rotate(calc(var(--railway-angle) * 2));
}

.cutedoor-auth-railway-point:nth-child(4) {
  transform: rotate(calc(var(--railway-angle) * 3));
}

.cutedoor-auth-railway-point:nth-child(5) {
  transform: rotate(calc(var(--railway-angle) * 4));
}

.cutedoor-auth-railway-point [aria-label="feature"] {
  position: absolute;
  top: -30px;
  left: calc(50% - 30px);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  padding: 4px;
  text-align: center;
  transform: scale(0.68);
}

.cutedoor-auth-orbit-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  border-radius: 9999px;
  background: linear-gradient(to right, #3b82f6, #2563eb, #2563eb);
  box-shadow: 0 8px 15px -3px rgba(59, 130, 246, 0.5), 0 4px 6px -4px rgba(59, 130, 246, 0.5);
}

.cutedoor-auth-earth-preload {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

@keyframes cutedoor-auth-planet-enter {
  0% {
    transform: scale(1) translateY(0) rotate(-12.2deg);
  }
}

@keyframes cutedoor-auth-railway-enter {
  0% {
    opacity: 0;
    transform: rotate(-45deg);
  }

  100% {
    opacity: 1;
  }
}

@keyframes cutedoor-auth-railway-rotate {
  0% {
    transform: rotate(0);
  }

  100% {
    transform: rotate(360deg);
  }
}

@keyframes cutedoor-auth-earth-glow {
  0% {
    box-shadow:
      0 0 8px 4px rgba(59, 104, 196, 0.98) inset,
      -24px 0 12px 2px rgba(59, 104, 196, 0.08) inset,
      0 0 48px 48px rgba(59, 104, 196, 0.28) inset,
      -48px 0 24px 48px rgba(59, 104, 196, 0.08) inset;
  }

  100% {
    box-shadow:
      0 0 8px 4px rgba(59, 104, 196, 0.98) inset,
      24px 0 12px 2px rgba(59, 104, 196, 0.58) inset,
      0 8px 48px 48px rgba(59, 104, 196, 0.28) inset,
      48px 0 24px 48px rgba(59, 104, 196, 0.28) inset;
  }
}

@keyframes cutedoor-auth-earth-spin {
  0% {
    background-position: calc(120% + 120px) 0;
  }

  100% {
    background-position: calc(-80% + 120px) 0;
  }
}

.cutedoor-auth-top {
  position: absolute;
  inset: 0 32px auto;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: auto;
  margin: 0 auto;
  padding: 32px 0 0;
}

.cutedoor-auth-brand,
.cutedoor-auth-top-actions {
  display: inline-flex;
  align-items: center;
}

.cutedoor-auth-brand {
  position: relative;
  z-index: 5;
  gap: 0;
  color: #fff;
  cursor: pointer;
  font-size: 24px;
  font-weight: 800;
  text-decoration: none;
}

.cutedoor-auth-brand img {
  width: 36px;
  height: 36px;
  border-radius: 6px;
}

.cutedoor-auth-brand span {
  display: none;
}

.cutedoor-auth-top-actions {
  gap: 16px;
}

.cutedoor-auth-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 22px;
  font-weight: 800;
  border: 0;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
}

.cutedoor-auth-icon-button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.cutedoor-auth-language-button {
  font-size: 0;
}

.cutedoor-language-glyph {
  position: relative;
  display: inline-block;
  width: 30px;
  height: 24px;
}

.cutedoor-language-glyph::before,
.cutedoor-language-glyph::after {
  position: absolute;
  display: grid;
  place-items: center;
  width: 16px;
  height: 14px;
  color: #121212;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.cutedoor-language-glyph::before {
  right: 3px;
  top: 2px;
  content: "文";
}

.cutedoor-language-glyph::after {
  left: 3px;
  bottom: 3px;
  content: "A";
}

.cutedoor-auth-shell {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--cutedoor-auth-panel-width);
  align-items: stretch;
  width: 100%;
  min-height: 100vh;
  margin: 0 auto;
}

.cutedoor-auth-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1;
  min-width: 0;
  padding: 84px clamp(56px, 6.25vw, 96px) 80px;
  text-align: center;
}

.cutedoor-auth-copy h1 {
  max-width: 760px;
  margin: 0 0 80px;
  color: #fff;
  font-size: 36px;
  font-weight: 700;
  line-height: 1.375;
  letter-spacing: 0;
  text-wrap: balance;
}

.cutedoor-auth-features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  width: 100%;
  max-width: 782px;
}

.cutedoor-auth-features article {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  min-height: 365px;
  padding: 32px;
  text-align: center;
  border-radius: 16px;
  background-color: var(--cutedoor-auth-bg-transparent-1);
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: background-color 0.3s ease-in-out;
}

.cutedoor-auth-features article:hover {
  background-color: var(--cutedoor-auth-bg-transparent-2);
}

.cutedoor-auth-features img {
  width: 144px;
  height: 144px;
  margin-bottom: 32px;
  object-fit: contain;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.34));
}

.cutedoor-auth-features h2 {
  margin: 0 0 16px;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0;
}

.cutedoor-auth-features p {
  max-width: 190px;
  margin: 0;
  color: rgba(255, 255, 255, 0.64);
  font-size: 14px;
  line-height: 1.65;
}

.cutedoor-auth-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: none;
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  padding: 0 32px 34px;
  border: 0;
  border-radius: 0;
  background-color: var(--cutedoor-auth-bg-transparent-1);
  backdrop-filter: blur(12px);
  box-shadow: none;
  transition: background-color 0.3s ease-in-out;
}

.cutedoor-auth-title {
  width: 100%;
  max-width: 384px;
  margin-bottom: 16px;
}

.cutedoor-auth-title h2 {
  margin: 0 0 6px;
  color: #fff;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3333333333;
  letter-spacing: 0;
}

.cutedoor-auth-title p {
  margin: 0;
  color: rgba(255, 255, 255, 0.52);
  font-size: 14px;
}

.cutedoor-auth-field {
  display: grid;
  gap: 0;
  width: 100%;
  max-width: 384px;
  margin-bottom: 16px;
}

.cutedoor-auth-field[hidden] {
  display: none;
}

.cutedoor-auth-field-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.cutedoor-auth-field input {
  width: 100%;
  height: 40px;
  padding: 7px 11px;
  color: #fff;
  font: inherit;
  font-size: 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  outline: none;
  background-color: var(--cutedoor-auth-input-transparent);
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.cutedoor-auth-field input::placeholder {
  color: rgba(255, 255, 255, 0.34);
}

.cutedoor-auth-field input:focus {
  border-color: rgba(29, 125, 220, 0.72);
  background: rgba(31, 31, 31, 0.72);
  box-shadow: 0 0 0 3px rgba(29, 125, 220, 0.16);
}

.cutedoor-auth-message {
  width: 100%;
  max-width: 384px;
  min-height: 20px;
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  line-height: 1.5;
}

.cutedoor-auth-message:empty {
  display: none;
}

.cutedoor-auth-message[data-type="success"] {
  color: #8ee6b1;
}

.cutedoor-auth-message[data-type="error"] {
  color: #ff9c9c;
}

.cutedoor-auth-primary,
.cutedoor-auth-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 384px;
  min-height: 40px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.cutedoor-auth-primary {
  color: #fff;
  border: 1px solid #1d7ddc;
  background: #1d7ddc;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, opacity 0.18s ease;
}

.cutedoor-auth-primary:hover {
  border-color: #2d8cf0;
  background: #2d8cf0;
}

.cutedoor-auth-primary:disabled {
  opacity: 0.62;
  cursor: wait;
}

.cutedoor-auth-secondary {
  margin-top: 16px;
  color: #1d7ddc;
  border: 1px solid #1d7ddc;
  background: transparent;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.cutedoor-auth-secondary:hover {
  color: #4da1ff;
  border-color: #4da1ff;
  background: rgba(29, 125, 220, 0.08);
}

.cutedoor-site-auth-links {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 0;
}

.cutedoor-site-auth-links .cutedoor-site-auth-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 15px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 7px;
  background: #2387e6;
  box-shadow: 0 8px 18px rgba(35, 135, 230, 0.2);
}

.cutedoor-site-auth-links .cutedoor-site-auth-button:hover {
  background: #2d94f4;
}

body.cutedoor-auth-open .cutedoor-site-auth-links {
  display: none;
}

.cutedoor-lang-area {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

@media (max-width: 1080px) {
  .cutedoor-auth-page {
    --cutedoor-auth-panel-width: 0px;
  }

  .cutedoor-auth-shell {
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(calc(100% - 32px), 560px);
    min-height: 100vh;
    min-height: 100dvh;
    padding: 96px 0 40px;
  }

  .cutedoor-auth-copy {
    display: none;
  }

  .cutedoor-auth-card {
    max-width: 420px;
    min-width: 0;
    min-height: 0;
    margin: 0 auto;
    padding: 0 0 52px;
    background: transparent;
  }

  .cutedoor-auth-planet {
    opacity: 0.58;
    transform: scale(1.9) translateY(42%) rotate(12.2deg);
  }

  .cutedoor-auth-railway {
    opacity: 0.68;
  }
}

@media (max-width: 760px) {
  .cutedoor-auth-top {
    inset: 0 16px auto;
    padding: 20px 0 0;
  }

  .cutedoor-auth-brand {
    font-size: 20px;
  }

  .cutedoor-auth-brand img {
    width: 36px;
    height: 36px;
  }

  .cutedoor-auth-top-actions {
    gap: 8px;
  }

  .cutedoor-auth-icon-button {
    width: 38px;
    height: 38px;
    font-size: 20px;
  }

  .cutedoor-auth-shell {
    width: min(calc(100% - 32px), 420px);
    padding: 82px 0 34px;
  }

  .cutedoor-auth-features {
    display: none;
  }

  .cutedoor-auth-card {
    max-width: none;
    min-width: 0;
    padding: 18px 0 52px;
  }

  .cutedoor-auth-title h2 {
    font-size: 24px;
  }

  .cutedoor-auth-field input {
    height: 48px;
    padding: 0 14px;
    border-radius: 10px;
  }

  .cutedoor-auth-primary,
  .cutedoor-auth-secondary {
    min-height: 48px;
    border-radius: 10px;
  }

  .cutedoor-site-auth-links {
    display: none;
  }

  .cutedoor-auth-planet {
    opacity: 0.5;
    transform: scale(1.5) translateY(28%) rotate(12.2deg);
  }

  .cutedoor-auth-orbit-chip {
    font-size: 9px;
  }
}
