:root {
  --bg-main: #0f1221;
  --bg-heaven: #fff8d8;
  --heaven-blue: #3046ac;
  --bg-hell: #180a0a;
  --hell-red: #b21616;
  --hell-orange: #ff9c3d;
  --text-main: #1f2430;
  --text-light: #f8f9ff;
  --gold-soft: #ffe8a3;
  --border-soft: rgba(255, 255, 255, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100dvh;
  position: relative;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text-light);
}

/* 全屏：中线左 #9CC5E5 / 右 #1F0D0F + 16:9 背景图，两侧渐变虚化与左右色衔接 */
.portal-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.portal-bg-split {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #9cc5e5 0%, #9cc5e5 50%, #1f0d0f 50%, #1f0d0f 100%);
}

/* 背景图：视口宽于 16:9 时以宽度对齐视口；不宽于 16:9 时以高度对齐视口（避免窄高窗口上下留边） */
.portal-bg-photo {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.portal-bg-photo img {
  flex-shrink: 0;
  display: block;
  max-width: none;
  max-height: none;
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent 0%,
    #000 8%,
    #000 92%,
    transparent 100%
  );
  mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
}

/* 视口宽高比 > 16:9（更「扁」）：宽度贴齐视口，上下裁切 */
@media (min-aspect-ratio: 16/9) {
  .portal-bg-photo img {
    width: 100vw;
    height: auto;
  }
}

/* 视口宽高比 ≤ 16:9（更「高」）：高度贴齐视口，左右裁切 */
@media (max-aspect-ratio: 16/9) {
  .portal-bg-photo img {
    width: auto;
    height: 100vh;
  }
}

.site-header {
  height: 72px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(90deg, #2d5aa0 0%, #4a3d6b 42%, #7a2832 78%, #a01818 100%);
  backdrop-filter: blur(6px);
  position: sticky;
  top: 0;
  z-index: 2500;
  overflow: visible;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.site-title {
  margin: 0;
  font-size: clamp(22px, 3vw, 30px);
  font-family: "ZCOOL QingKe HuangYou", "站酷庆科黄油体", "Microsoft YaHei",
    sans-serif;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: #fff;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.45);
}

.site-title-with-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.site-title-logo {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  filter: brightness(0) invert(1);
  animation: mainWorldLogoGlow 2.8s ease-in-out infinite;
}

@keyframes mainWorldLogoGlow {
  0%,
  100% {
    filter: brightness(0) invert(1) drop-shadow(0 0 0 rgba(255, 255, 255, 0));
  }
  50% {
    filter: brightness(0) invert(1) drop-shadow(0 0 10px rgba(255, 255, 255, 0.55))
      drop-shadow(0 0 20px rgba(255, 255, 255, 0.25));
  }
}

.login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  color: #f6f0ff;
  background: linear-gradient(135deg, #6b4aa8, #3a1f5c);
  border: 1px solid rgba(200, 170, 255, 0.35);
  transition: transform 180ms ease, filter 180ms ease;
}

.login-btn:hover {
  filter: brightness(1.1);
}

.login-btn:active {
  transform: scale(0.97);
}

.main-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 18px;
  border-radius: 22px;
  overflow: hidden;
  border: none;
  min-height: calc(100dvh - 72px - 135px);
  box-shadow: none;
  background: transparent;
}

.panel {
  position: relative;
  overflow: hidden;
  border-radius: 0;
  padding: 22px 18px 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border: none;
}

.heaven {
  background: transparent;
  color: #000;
  border-right: none;
  backdrop-filter: none;
  box-shadow: none;
}

.hell {
  background: transparent;
  color: var(--text-light);
  backdrop-filter: none;
  box-shadow: none;
}

.panel-stack {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
  min-height: min(56vh, 560px);
  margin-top: 4px;
}

.panel-title-block {
  width: 100%;
  flex-shrink: 0;
}

.panel h2 {
  margin: 0 0 4px;
  font-size: clamp(22px, 3vw, 32px);
  letter-spacing: 0.02em;
  font-family: "ZCOOL QingKe HuangYou", "站酷庆科黄油体", "Microsoft YaHei",
    sans-serif;
  font-weight: 400;
}

.panel-title-block .subtitle {
  margin: 0 0 10px;
}

.heaven h2 {
  color: var(--heaven-blue);
  text-shadow: 0 0 18px rgba(119, 160, 255, 0.25);
}

.hell h2 {
  color: #fff;
  text-shadow: 0 0 16px rgba(255, 89, 55, 0.34);
}

.character-image {
  width: min(100%, 460px);
  aspect-ratio: 1 / 1;
  object-fit: contain;
  margin: 0;
  position: relative;
  z-index: 1;
}

.heaven .character-image {
  filter: drop-shadow(0 0 24px rgba(120, 170, 255, 0.45));
}

.hell .character-image {
  filter: drop-shadow(0 0 22px rgba(255, 93, 47, 0.38));
}

.subtitle {
  margin: 0;
  font-size: clamp(15px, 2vw, 20px);
  font-weight: 600;
  position: relative;
  z-index: 1;
}

.heaven .subtitle {
  color: #111;
}

.hell .subtitle {
  color: #fff;
}

.jump-btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  width: 100%;
  min-height: 56px;
  max-width: 440px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 800;
  font-size: clamp(15px, 1.35vw, 18px);
  padding: 16px 22px;
  margin-top: 6px;
  transition: transform 220ms ease, filter 220ms ease, box-shadow 220ms ease;
}

.jump-btn::before {
  content: "";
  position: absolute;
  inset: -40% auto -40% -140%;
  width: 68%;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255, 255, 255, 0.18) 35%,
    rgba(255, 255, 255, 0.68) 50%,
    rgba(255, 255, 255, 0.18) 65%,
    transparent 100%
  );
  transform: rotate(10deg);
  transition: left 420ms ease;
  z-index: -1;
}

.jump-btn:hover {
  filter: brightness(1.1) saturate(1.05);
}

.jump-btn:hover::before {
  left: 165%;
}

.jump-btn:active {
  transform: scale(0.965);
}

.heaven-btn {
  background: linear-gradient(135deg, var(--gold-soft), #dbe5ff);
  border: 1px solid rgba(48, 70, 172, 0.3);
  color: #111;
  box-shadow: 0 8px 20px rgba(48, 70, 172, 0.26);
}

.hell-btn {
  background: linear-gradient(135deg, #ff7a2f, var(--hell-red));
  border: 1px solid rgba(255, 192, 134, 0.22);
  color: #fff;
  box-shadow: 0 9px 22px rgba(178, 22, 22, 0.45);
}

.heaven-btn:hover {
  box-shadow: 0 0 0 2px rgba(48, 70, 172, 0.2), 0 0 22px rgba(89, 130, 255, 0.44);
}

.hell-btn:hover {
  box-shadow: 0 0 0 2px rgba(255, 129, 56, 0.2), 0 0 24px rgba(255, 72, 26, 0.52);
}

.site-footer-bar {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: 12px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 10, 18, 0.55);
  backdrop-filter: blur(10px);
  padding: 12px 16px 18px;
  min-height: 135px;
  box-sizing: border-box;
}

.footer-ad-slot {
  display: none;
  flex: 1 1 120px;
  min-width: 0;
  align-items: flex-start;
  justify-content: center;
  width: 160px;
  min-height: 250px;
}

@media (min-width: 901px) {
  .footer-ad-slot {
    display: flex;
  }
}

body.sapphi-ads-suppressed .footer-ad-slot {
  display: none !important;
}

.site-footer {
  flex: 0 1 auto;
  min-width: min(100%, 320px);
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  padding: 4px 8px 0;
  font-size: 14px;
  line-height: 1.55;
}

.site-footer-beian {
  font-size: 12px;
  line-height: 1.55;
  opacity: 0.5;
  margin: 2px 0;
  flex-shrink: 0;
}

.site-footer-beian-inner {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  max-width: 100%;
  white-space: nowrap;
  overflow-x: auto;
  vertical-align: middle;
  -webkit-overflow-scrolling: touch;
}

.site-footer-beian-icon {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  object-fit: contain;
  vertical-align: middle;
}

.site-footer-beian a.site-footer-beian-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.site-footer p {
  margin: 2px 0;
}

.site-footer a.site-footer-contact-link {
  color: inherit;
  text-decoration: none;
}

.site-footer a.site-footer-contact-link:hover {
  text-decoration: underline;
  opacity: 0.92;
}

@media (max-width: 768px) {
  .portal-bg-photo {
    display: none;
  }

  .portal-bg-split {
    background: linear-gradient(180deg, #c6e6ff 0%, #300000 100%);
  }

  .site-header {
    height: auto;
    min-height: 72px;
    padding: 12px 14px;
  }

  .main-layout {
    grid-template-columns: 1fr;
    gap: 8px;
    min-height: auto;
    margin: 8px 10px 12px;
  }

  .panel {
    min-height: auto;
    padding: 14px 12px 18px;
  }

  .panel-stack {
    gap: 10px;
    min-height: auto;
    margin-top: 0;
  }

  .panel-title-block .subtitle {
    margin-bottom: 4px;
  }

  .character-image {
    width: min(100%, 320px);
  }

  .heaven {
    border-right: 0;
    border-bottom: none;
  }
}

.main-auth-slot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  z-index: 1300;
}

.main-user-menu {
  position: relative;
  z-index: 1400;
}

.main-user-menu::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 14px;
}

.main-user-menu:hover .main-user-dropdown,
.main-user-menu.open .main-user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.main-user-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 6px;
  border-radius: 999px;
  border: 1px solid rgba(180, 150, 230, 0.4);
  background: linear-gradient(165deg, rgba(90, 55, 140, 0.55), rgba(35, 18, 58, 0.75));
  color: #f3eaff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(30, 12, 48, 0.45);
}

.main-user-avatar,
.main-user-avatar-fallback {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.main-user-avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #5169df, var(--heaven-blue));
  font-size: 15px;
}

.main-user-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 2px);
  min-width: 200px;
  padding: 8px 0;
  border-radius: 14px;
  border: 1px solid rgba(160, 120, 210, 0.45);
  background: linear-gradient(180deg, #2d1a45 0%, #160d24 100%);
  box-shadow: 0 14px 32px rgba(10, 4, 20, 0.55);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  pointer-events: none;
  z-index: 2000;
}

.main-dd-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 16px;
  border: 0;
  background: transparent;
  color: var(--text-light);
  font: inherit;
  cursor: pointer;
  text-decoration: none;
}

.main-dd-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.main-dd-label {
  display: block;
  padding: 6px 16px 2px;
  font-size: 12px;
  color: rgba(248, 249, 255, 0.55);
}

.main-dd-sub {
  padding-left: 24px;
  font-size: 14px;
}

.main-dd-sep {
  margin: 6px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.main-dd-logout {
  color: #ff8a8a;
  font-weight: 700;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.55);
}

.modal-dialog {
  width: min(440px, 100%);
  padding: 20px;
  border-radius: 16px;
  background: #1a1f33;
  border: 1px solid var(--border-soft);
  color: var(--text-light);
}

.modal-dialog h3 {
  margin: 0 0 12px;
}

.modal-dialog textarea,
.modal-dialog input[type="text"] {
  width: 100%;
  margin-bottom: 10px;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  background: #12162a;
  color: var(--text-light);
  padding: 10px;
  font: inherit;
}

.biz-contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 14px;
}

.biz-contact-row label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

input[type="radio"] {
  margin: 0;
  vertical-align: middle;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

