:root {
  --fuhua-bg: url("/theme/Fuhua/assets/mai-senpai-bg.jpg?v=20260622fix1");
  --fuhua-card: rgba(24, 20, 32, .70);
  --fuhua-card-deep: rgba(58, 28, 42, .62);
  --fuhua-ink: #fff7ee;
  --fuhua-muted: rgba(255, 247, 238, .64);
  --fuhua-gold: #ffe08f;
  --fuhua-pink: #ff9cb2;
  --fuhua-violet: #a98bff;
  --fuhua-cyan: #74e8ff;
}

html,
body {
  min-height: 100%;
}

body:has(input[type="password"]) {
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(10, 11, 18, .30), rgba(10, 11, 18, .14) 48%, rgba(10, 11, 18, .24)),
    linear-gradient(180deg, rgba(14, 13, 23, .16), rgba(14, 13, 23, .34)),
    var(--fuhua-bg) center center / cover no-repeat fixed;
  color: var(--fuhua-ink);
  overflow-x: hidden;
}

body:has(input[type="password"]) #app,
body:has(input[type="password"]) #app > div,
body:has(input[type="password"]) .n-layout,
body:has(input[type="password"]) .n-layout-scroll-container,
body:has(input[type="password"]) main {
  background: transparent !important;
}

body:has(input[type="password"]) #app .n-card {
  position: relative !important;
  overflow: hidden !important;
  width: min(500px, calc(100vw - 40px)) !important;
  padding: 132px 36px 30px !important;
  border: 1px solid rgba(255, 224, 143, .24) !important;
  border-radius: 24px !important;
  background:
    radial-gradient(circle at 18% 4%, rgba(255, 224, 143, .18), transparent 32%),
    radial-gradient(circle at 100% 24%, rgba(116, 232, 255, .15), transparent 30%),
    linear-gradient(145deg, var(--fuhua-card), var(--fuhua-card-deep)) !important;
  box-shadow:
    0 28px 90px rgba(0, 0, 0, .44),
    inset 0 1px 0 rgba(255, 255, 255, .14),
    0 0 0 1px rgba(169, 139, 255, .08) !important;
  backdrop-filter: blur(18px) saturate(132%);
  -webkit-backdrop-filter: blur(18px) saturate(132%);
}

body:has(input[type="password"]) #app .n-card::before,
body:has(input[type="password"]) #app .n-card::after {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 0;
  pointer-events: none;
  text-align: center;
}

body:has(input[type="password"]) #app .n-card::before {
  content: "F";
  top: 28px;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 2px solid rgba(255, 224, 143, .78);
  border-radius: 18px;
  background:
    radial-gradient(circle at 72% 30%, rgba(116, 232, 255, .58), transparent 22%),
    radial-gradient(circle at 22% 78%, rgba(255, 156, 178, .52), transparent 24%),
    linear-gradient(140deg, rgba(255, 224, 143, .24), rgba(169, 139, 255, .28)),
    rgba(23, 19, 32, .92);
  color: #f5fcff;
  font-family: "Segoe UI Black", "Arial Black", sans-serif;
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
  box-shadow:
    0 16px 30px rgba(0, 0, 0, .34),
    inset 0 0 0 1px rgba(255, 255, 255, .14),
    0 0 24px rgba(116, 232, 255, .24);
}

body:has(input[type="password"]) #app .n-card::after {
  content: "浮华连接世界\A Fuhua Global Link";
  top: 98px;
  width: 100%;
  color: var(--fuhua-ink);
  white-space: pre;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.55;
  text-shadow: 0 0 20px rgba(116, 232, 255, .22);
}

body:has(input[type="password"]) #app .n-card > * {
  position: relative;
  z-index: 1;
  pointer-events: auto;
}

body:has(input[type="password"]) #app .n-card .n-card-header,
body:has(input[type="password"]) #app .n-card .n-card__content,
body:has(input[type="password"]) #app .n-card .n-card__footer {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

body:has(input[type="password"]) h1,
body:has(input[type="password"]) h2,
body:has(input[type="password"]) h3,
body:has(input[type="password"]) p,
body:has(input[type="password"]) label,
body:has(input[type="password"]) .n-text {
  color: var(--fuhua-muted) !important;
  letter-spacing: 0 !important;
}

body:has(input[type="password"]) a {
  color: #c8f5ff !important;
  text-decoration: none !important;
}

body:has(input[type="password"]) a:hover {
  color: #ffe6a5 !important;
}

body:has(input[type="password"]) .n-input,
body:has(input[type="password"]) .n-input-wrapper,
body:has(input[type="password"]) input {
  border-radius: 16px !important;
}

body:has(input[type="password"]) .n-input {
  min-height: 54px !important;
  border: 1px solid rgba(255, 224, 143, .24) !important;
  background: rgba(255, 255, 255, .12) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08) !important;
}

body:has(input[type="password"]) .n-input:hover,
body:has(input[type="password"]) .n-input:focus-within {
  border-color: rgba(116, 232, 255, .78) !important;
  box-shadow:
    0 0 0 4px rgba(116, 232, 255, .12),
    inset 0 1px 0 rgba(255, 255, 255, .12) !important;
}

body:has(input[type="password"]) input {
  color: #fffaf2 !important;
  font-weight: 700 !important;
}

body:has(input[type="password"]) input::placeholder {
  color: rgba(255, 247, 238, .52) !important;
}

body:has(input[type="password"]) .n-button,
body:has(input[type="password"]) button {
  border-radius: 16px !important;
  font-weight: 850 !important;
}

body:has(input[type="password"]) .n-button--primary-type,
body:has(input[type="password"]) button[type="submit"] {
  min-height: 54px !important;
  border: 0 !important;
  color: #22151b !important;
  background: linear-gradient(95deg, var(--fuhua-gold), var(--fuhua-pink) 44%, var(--fuhua-violet) 75%, var(--fuhua-cyan)) !important;
  box-shadow:
    0 18px 42px rgba(255, 156, 178, .26),
    0 0 24px rgba(116, 232, 255, .16) !important;
}

body:has(input[type="password"]) .n-button--primary-type:hover,
body:has(input[type="password"]) button[type="submit"]:hover {
  filter: brightness(1.05) saturate(1.08);
}

@media (max-width: 820px) {
  body:has(input[type="password"]) {
    background:
      linear-gradient(180deg, rgba(13, 12, 22, .28), rgba(13, 12, 22, .68)),
      var(--fuhua-bg) 62% center / cover no-repeat fixed;
  }

  body:has(input[type="password"]) #app .n-card {
    width: min(100vw - 28px, 440px) !important;
    padding: 118px 24px 24px !important;
    border-radius: 22px !important;
  }

  body:has(input[type="password"]) #app .n-card::before {
    top: 24px;
    width: 58px;
    height: 58px;
    border-radius: 16px;
    font-size: 31px;
  }

  body:has(input[type="password"]) #app .n-card::after {
    top: 88px;
    font-size: 12px;
  }
}
