/* 页面布局（不改变输入框组件本身的视觉） */
html,
body {
  height: 100%;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: linear-gradient(135deg, #0d0d12 0%, #1a1a2e 50%, #16213e 100%);
  color: #eaeaf2;
  font-family: "Noto Sans SC", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto,
    Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  overflow: hidden;
}

.auth-shell {
  position: relative;
  height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
}

.card {
  position: relative;
  z-index: 1;
  width: min(480px, 94vw);
  max-height: calc(100svh - 40px);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 18px 16px 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.brand {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 6px 10px;
}

.brand .title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.brand .sub {
  font-size: 12px;
  color: rgba(234, 234, 242, 0.7);
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.tab {
  border: 0;
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  color: rgba(234, 234, 242, 0.85);
  background: transparent;
  font-weight: 600;
}

.tab.active {
  background: linear-gradient(180deg, rgba(64, 47, 181, 0.35), rgba(0, 0, 0, 0.2));
  border: 1px solid rgba(64, 47, 181, 0.35);
  color: #fff;
}

.form {
  margin-top: 14px;
  display: none;
}
.form.active {
  display: block;
}

.field {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field + .field {
  margin-top: 18px;
}

.label {
  font-size: 12px;
  color: rgba(234, 234, 242, 0.75);
  padding-left: 6px;
}

.actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.btn {
  height: 46px;
  border-radius: 12px;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.btn.primary {
  background: linear-gradient(135deg, #402fb5 0%, #6e2b8a 100%);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.note {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.55;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  color: rgba(234, 234, 242, 0.78);
  min-height: 18px;
}

.note.ok {
  border-color: rgba(40, 200, 120, 0.35);
  color: rgba(215, 255, 235, 0.9);
}

.note.err {
  border-color: rgba(255, 80, 80, 0.35);
  color: rgba(255, 220, 220, 0.92);
}

/* ===== 下面是你提供的输入框 UI（仅把 id 改为 class，视觉不变） ===== */
/* From Uiverse.io by Lakshay-art */
.grid {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(to right, #1a1a22 1px, transparent 1px),
    linear-gradient(to bottom, #1a1a22 1px, transparent 1px);
  background-size: 1rem 1rem;
  background-position: center center;
  z-index: -1;
  filter: blur(1px);
  pointer-events: none;
}
.white,
.border,
.darkBorderBg,
.glow {
  max-height: 70px;
  max-width: 314px;
  height: 100%;
  width: 100%;
  position: absolute;
  overflow: hidden;
  z-index: -1;
  border-radius: 12px;
  filter: blur(3px);
}
.input {
  background-color: #010201;
  border: none;
  width: 100%;
  max-width: 301px;
  height: 56px;
  border-radius: 10px;
  color: white;
  padding-inline: 59px;
  font-size: 18px;
}
.poda {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
  max-width: 314px;
  margin-inline: auto;
}
.input::placeholder {
  color: #c0b9c0;
}

.input:focus {
  outline: none;
}

.main:focus-within > .input-mask {
  display: none;
}

.input-mask {
  pointer-events: none;
  width: 100px;
  height: 20px;
  position: absolute;
  background: linear-gradient(90deg, transparent, black);
  top: 18px;
  left: 70px;
}
.pink-mask {
  pointer-events: none;
  width: 30px;
  height: 20px;
  position: absolute;
  background: #cf30aa;
  top: 10px;
  left: 5px;
  filter: blur(20px);
  opacity: 0.8;
  transition: all 2s;
}
.main:hover > .pink-mask {
  opacity: 0;
}

.white {
  max-height: 63px;
  max-width: 307px;
  border-radius: 10px;
  filter: blur(2px);
}

.white::before {
  content: "";
  z-index: -2;
  text-align: center;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(83deg);
  position: absolute;
  width: 600px;
  height: 600px;
  background-repeat: no-repeat;
  background-position: 0 0;
  filter: brightness(1.4);
  background-image: conic-gradient(
    rgba(0, 0, 0, 0) 0%,
    #a099d8,
    rgba(0, 0, 0, 0) 8%,
    rgba(0, 0, 0, 0) 50%,
    #dfa2da,
    rgba(0, 0, 0, 0) 58%
  );
  transition: all 2s;
}
.border {
  max-height: 59px;
  max-width: 303px;
  border-radius: 11px;
  filter: blur(0.5px);
}
.border::before {
  content: "";
  z-index: -2;
  text-align: center;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(70deg);
  position: absolute;
  width: 600px;
  height: 600px;
  filter: brightness(1.3);
  background-repeat: no-repeat;
  background-position: 0 0;
  background-image: conic-gradient(
    #1c191c,
    #402fb5 5%,
    #1c191c 14%,
    #1c191c 50%,
    #cf30aa 60%,
    #1c191c 64%
  );
  transition: all 2s;
}
.darkBorderBg {
  max-height: 65px;
  max-width: 312px;
}
.darkBorderBg::before {
  content: "";
  z-index: -2;
  text-align: center;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(82deg);
  position: absolute;
  width: 600px;
  height: 600px;
  background-repeat: no-repeat;
  background-position: 0 0;
  background-image: conic-gradient(
    rgba(0, 0, 0, 0),
    #18116a,
    rgba(0, 0, 0, 0) 10%,
    rgba(0, 0, 0, 0) 50%,
    #6e1b60,
    rgba(0, 0, 0, 0) 60%
  );
  transition: all 2s;
}
.poda:hover > .darkBorderBg::before {
  transform: translate(-50%, -50%) rotate(262deg);
}
.poda:hover > .glow::before {
  transform: translate(-50%, -50%) rotate(240deg);
}
.poda:hover > .white::before {
  transform: translate(-50%, -50%) rotate(263deg);
}
.poda:hover > .border::before {
  transform: translate(-50%, -50%) rotate(250deg);
}

.poda:hover > .darkBorderBg::before {
  transform: translate(-50%, -50%) rotate(-98deg);
}
.poda:hover > .glow::before {
  transform: translate(-50%, -50%) rotate(-120deg);
}
.poda:hover > .white::before {
  transform: translate(-50%, -50%) rotate(-97deg);
}
.poda:hover > .border::before {
  transform: translate(-50%, -50%) rotate(-110deg);
}

.poda:focus-within > .darkBorderBg::before {
  transform: translate(-50%, -50%) rotate(442deg);
  transition: all 4s;
}
.poda:focus-within > .glow::before {
  transform: translate(-50%, -50%) rotate(420deg);
  transition: all 4s;
}
.poda:focus-within > .white::before {
  transform: translate(-50%, -50%) rotate(443deg);
  transition: all 4s;
}
.poda:focus-within > .border::before {
  transform: translate(-50%, -50%) rotate(430deg);
  transition: all 4s;
}

.glow {
  overflow: hidden;
  filter: blur(30px);
  opacity: 0.4;
  max-height: 130px;
  max-width: 354px;
}
.glow:before {
  content: "";
  z-index: -2;
  text-align: center;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(60deg);
  position: absolute;
  width: 999px;
  height: 999px;
  background-repeat: no-repeat;
  background-position: 0 0;
  background-image: conic-gradient(
    #000,
    #402fb5 5%,
    #000 38%,
    #000 50%,
    #cf30aa 60%,
    #000 87%
  );
  transition: all 2s;
}

@keyframes rotate {
  100% {
    transform: translate(-50%, -50%) rotate(450deg);
  }
}
@keyframes leftright {
  0% {
    transform: translate(0px, 0px);
    opacity: 1;
  }

  49% {
    transform: translate(250px, 0px);
    opacity: 0;
  }
  80% {
    transform: translate(-40px, 0px);
    opacity: 0;
  }

  100% {
    transform: translate(0px, 0px);
    opacity: 1;
  }
}

.filter-icon {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  max-height: 40px;
  max-width: 38px;
  height: 100%;
  width: 100%;

  isolation: isolate;
  overflow: hidden;
  border-radius: 10px;
  background: linear-gradient(180deg, #161329, black, #1d1b4b);
  border: 1px solid transparent;
}
.filterBorder {
  height: 42px;
  width: 40px;
  position: absolute;
  overflow: hidden;
  top: 7px;
  right: 7px;
  border-radius: 10px;
}

.filterBorder::before {
  content: "";
  text-align: center;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(90deg);
  position: absolute;
  width: 600px;
  height: 600px;
  background-repeat: no-repeat;
  background-position: 0 0;
  filter: brightness(1.35);
  background-image: conic-gradient(
    rgba(0, 0, 0, 0),
    #3d3a4f,
    rgba(0, 0, 0, 0) 50%,
    rgba(0, 0, 0, 0) 50%,
    #3d3a4f,
    rgba(0, 0, 0, 0) 100%
  );
  animation: rotate 4s linear infinite;
}
.main {
  position: relative;
  width: 100%;
}
.search-icon {
  position: absolute;
  left: 20px;
  top: 15px;
}

/* ===== 手机端适配 ===== */
@media (max-width: 420px) {
  .auth-shell {
    padding: 14px 12px;
  }

  .card {
    width: 100%;
    padding: 14px 12px 12px;
    border-radius: 16px;
  }

  .brand {
    padding: 2px 4px 10px;
  }

  .brand .title {
    font-size: 17px;
  }

  .tabs {
    gap: 8px;
    padding: 5px;
    border-radius: 12px;
  }

  .tab {
    padding: 10px 10px;
    font-size: 14px;
  }

  .field + .field {
    margin-top: 14px;
  }

  /* 16px 防止 iOS 自动放大输入框 */
  .input {
    height: 52px;
    font-size: 16px;
    padding-inline: 52px 14px;
  }

  .input-mask {
    left: 62px;
  }

  .search-icon {
    left: 18px;
    top: 15px;
  }

  .note {
    font-size: 12px;
    margin-top: 12px;
    padding: 9px 10px;
  }
}

/* 矮屏设备：进一步压缩间距，避免出现上下滚动条 */
@media (max-height: 700px) {
  .brand {
    padding-bottom: 8px;
  }

  .form {
    margin-top: 12px;
  }

  .field + .field {
    margin-top: 12px;
  }

  .actions {
    margin-top: 14px;
  }

  .note {
    margin-top: 10px;
    padding: 8px 10px;
  }
}

