/* 全站液态玻璃主题 — Liquid Glass Site Theme v=lg1 */

body.lg-site {
  --lg-site-shell-max: 1180px;
  --lg-bg: #0a0a12;
  --lg-text: rgba(255, 255, 255, 0.92);
  --lg-muted: rgba(255, 255, 255, 0.52);
  --lg-glass-fill: rgba(255, 255, 255, 0.035);
  --lg-glass-fill-hover: rgba(255, 255, 255, 0.065);
  --lg-blur: 56px;
  --lg-saturate: 200%;
  --lg-radius: 28px;
  --lg-radius-sm: 18px;
  --lg-edge-light: rgba(255, 255, 255, 0.42);
  --lg-edge-dark: rgba(0, 0, 0, 0.18);
  --lg-accent: rgba(140, 180, 255, 0.95);
  --lg-accent-soft: rgba(120, 160, 255, 0.18);
  background: var(--lg-bg) !important;
  color: var(--lg-text);
  -webkit-font-smoothing: antialiased;
}

/* 首页/创作页/运维后台自带背景，禁用全局层 */
body.lg-site.fx-home,
body.lg-site.mhome,
body.lg-site.drama-page,
body.lg-site.cs-console-page {
  background: var(--lg-bg) !important;
}

body.lg-site::before {
  display: none !important;
}

/* —— 全局背景 —— */
.lg-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse 90% 70% at 15% 10%, rgba(120, 160, 255, 0.52) 0%, transparent 58%),
    radial-gradient(ellipse 70% 60% at 85% 20%, rgba(180, 140, 255, 0.45) 0%, transparent 52%),
    radial-gradient(ellipse 80% 50% at 50% 95%, rgba(100, 200, 220, 0.38) 0%, transparent 55%),
    linear-gradient(165deg, #0c0c14 0%, #12121c 40%, #0a0a12 100%);
}

body.lg-site.fx-home .lg-bg,
body.lg-site.mhome .lg-bg,
body.lg-site.cs-console-page .lg-bg {
  display: none;
}

.lg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.72;
  animation: lg-drift 22s ease-in-out infinite;
}

.lg-orb-a {
  width: 520px;
  height: 520px;
  background: rgba(100, 149, 237, 0.45);
  top: -140px;
  left: 5%;
}

.lg-orb-b {
  width: 440px;
  height: 440px;
  background: rgba(186, 148, 255, 0.38);
  top: 35%;
  right: -80px;
  animation-delay: -8s;
}

.lg-orb-c {
  width: 380px;
  height: 380px;
  background: rgba(94, 196, 220, 0.32);
  bottom: -60px;
  left: 25%;
  animation-delay: -14s;
}

.lg-grid {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 100% 80% at 50% 40%, black 15%, transparent 75%);
}

@keyframes lg-drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(24px, -18px) scale(1.06); }
}

/* —— 玻璃卡片工具类 —— */
body.lg-site .lg-glass,
body.lg-site .card,
body.lg-site .login-card,
body.lg-site .account-card,
body.lg-site .busy-card,
body.lg-site .hp-head,
body.lg-site .hp-upload-form,
body.lg-site .hp-grid .hp-item,
body.lg-site .download-center-item,
body.lg-site .recharge-policy-single,
body.lg-site .billing-corp-panel,
body.lg-site .modal-card {
  position: relative;
  isolation: isolate;
  background: var(--lg-glass-fill) !important;
  backdrop-filter: blur(var(--lg-blur)) saturate(var(--lg-saturate));
  -webkit-backdrop-filter: blur(var(--lg-blur)) saturate(var(--lg-saturate));
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  border-radius: var(--lg-radius-sm) !important;
  box-shadow:
    inset 0 1px 0 var(--lg-edge-light),
    inset 0 -1px 0 var(--lg-edge-dark),
    0 12px 40px rgba(0, 0, 0, 0.12) !important;
}

body.lg-site .login-card {
  border-radius: var(--lg-radius) !important;
  padding: 32px 26px !important;
}

/* —— 布局层叠 —— */
body.lg-site .login-page,
body.lg-site .account-wrap,
body.lg-site .billing-wrap,
body.lg-site .settings-wrap,
body.lg-site .hp-shell,
body.lg-site .download-center-wrap,
body.lg-site .cs-shell {
  position: relative;
  z-index: 1;
  max-width: var(--lg-site-shell-max, 1180px);
  margin-left: auto;
  margin-right: auto;
}

body.lg-site .app-wrap:not(.drama-shell) {
  max-width: var(--lg-site-shell-max, 1180px);
  padding-bottom: calc(80px + env(safe-area-inset-bottom, 0));
}

/* —— 文字与链接 —— */
body.lg-site a {
  color: var(--lg-accent);
}

body.lg-site a:hover {
  color: rgba(180, 210, 255, 1);
}

body.lg-site .card-title,
body.lg-site .login-card h1,
body.lg-site .account-head h1,
body.lg-site .billing-page-title,
body.lg-site .hp-head h1 {
  color: var(--lg-text) !important;
  font-weight: 700;
  letter-spacing: 0.02em;
}

body.lg-site .hint-line,
body.lg-site .account-user,
body.lg-site .login-brand-sub,
body.lg-site .hp-sub,
body.lg-site .hp-intro {
  color: var(--lg-muted) !important;
}

/* —— 表单 —— */
body.lg-site .form-control {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 14px !important;
  color: var(--lg-text) !important;
}

body.lg-site .form-control:focus {
  border-color: rgba(140, 180, 255, 0.55) !important;
  box-shadow: 0 0 0 3px rgba(120, 160, 255, 0.15) !important;
}

body.lg-site .form-group label {
  color: var(--lg-muted);
}

/* —— 按钮 —— */
body.lg-site .btn-primary {
  background: linear-gradient(135deg, rgba(100, 149, 237, 0.85), rgba(140, 100, 255, 0.75)) !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  box-shadow: 0 8px 28px rgba(80, 120, 255, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
  border-radius: 14px !important;
}

body.lg-site .btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(120, 165, 255, 0.95), rgba(160, 120, 255, 0.85)) !important;
}

body.lg-site .btn-ghost {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  color: var(--lg-text) !important;
  border-radius: 12px !important;
}

body.lg-site .btn-ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
}

/* —— 账户页 —— */
body.lg-site .account-head {
  margin-bottom: 16px;
}

body.lg-site .account-head-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

body.lg-site .account-action-btn {
  background: transparent;
  border: none;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 4px;
  color: var(--lg-text);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  font: inherit;
}

body.lg-site .account-action-btn:hover {
  background: rgba(255, 255, 255, 0.04);
}

body.lg-site .account-action-meta {
  color: var(--lg-muted);
  font-size: 0.88rem;
}

/* —— 财务页 —— */
body.lg-site .billing-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

body.lg-site .billing-tab {
  flex: 1;
  padding: 10px 12px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--lg-muted);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

body.lg-site .billing-tab.active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--lg-text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

body.lg-site .billing-table-scroll {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

body.lg-site .billing-amt-chip {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 12px !important;
  color: var(--lg-text) !important;
}

body.lg-site .billing-amt-chip.active {
  background: var(--lg-accent-soft) !important;
  border-color: rgba(140, 180, 255, 0.45) !important;
}

/* —— Hub 资源库 —— */
body.lg-site.hub-page .hp-shell {
  max-width: var(--lg-site-shell-max, 1180px);
  margin: 0 auto;
  padding: calc(16px + env(safe-area-inset-top, 0)) 16px calc(72px + env(safe-area-inset-bottom, 0));
}

body.lg-site.hub-page .hp-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 20px;
  margin-bottom: 16px;
}

body.lg-site.hub-page .hp-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

body.lg-site.hub-page .hp-me {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
}

body.lg-site.hub-page .hp-upload-form {
  padding: 16px;
  margin-bottom: 16px;
}

body.lg-site.hub-page .hp-grid .hp-item {
  overflow: hidden;
  transition: transform 0.25s ease, background 0.25s ease;
}

body.lg-site.hub-page .hp-grid .hp-item:hover {
  background: var(--lg-glass-fill-hover) !important;
  transform: translateY(-2px);
}

/* —— 下载中心 —— */
body.lg-site .download-center-item {
  padding: 16px 18px;
  margin-bottom: 12px;
}

body.lg-site .download-center-item-title {
  margin: 0 0 4px;
  font-size: 1rem;
  color: var(--lg-text);
}

/* —— 创作页（PC / 手机）：shell 内一层玻璃，顶栏/Tab 透明 —— */
body.lg-site.drama-page .drama-shell .drama-header {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: none !important;
}

body.lg-site.drama-page .drama-shell .drama-tabs {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: none !important;
}

body.lg-site.drama-page .tab-item.active {
  color: var(--lg-accent) !important;
  background: var(--lg-accent-soft) !important;
  border-bottom-color: rgba(140, 180, 255, 0.6) !important;
}

body.lg-site.drama-page .card {
  border-radius: var(--lg-radius-sm) !important;
}

body.lg-site.drama-page .log-panel {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 14px !important;
}

body.lg-site.drama-page .header {
  background: transparent !important;
  box-shadow: none !important;
}

/* —— 状态消息 —— */
body.lg-site .status-msg.ok {
  color: #6ee7b7 !important;
}

body.lg-site .status-msg.err {
  color: #fcd34d !important;
}

body.lg-site .email-code-banner {
  background: rgba(52, 211, 153, 0.12) !important;
  border: 1px solid rgba(52, 211, 153, 0.35) !important;
  color: #a7f3d0 !important;
}

/* —— 全站 ICP 底栏 —— */
.lg-site-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 20px 16px calc(16px + env(safe-area-inset-bottom, 0));
  font-size: 0.78rem;
  color: var(--lg-muted);
}

.lg-site-footer a {
  color: rgba(255, 255, 255, 0.45);
  text-decoration: none;
}

.lg-site-footer a:hover {
  color: rgba(255, 255, 255, 0.7);
}

body.lg-site.fx-home .lg-site-footer,
body.lg-site.mhome .lg-site-footer,
body.lg-site.drama-page .lg-site-footer {
  display: none;
}

/* —— 移动端账户底栏 —— */
.lg-mobile-tabbar {
  display: none;
}

@media (max-width: 768px) {
  body.lg-site.account-page:not(.drama-page):not(.fx-home):not(.mhome),
  body.lg-site.settings-page,
  body.lg-site.billing-page,
  body.lg-site.page-downloads {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0));
  }

  body.lg-site.account-page:not(.drama-page) .lg-mobile-tabbar,
  body.lg-site.settings-page .lg-mobile-tabbar,
  body.lg-site.billing-page .lg-mobile-tabbar,
  body.lg-site.page-downloads .lg-mobile-tabbar {
    display: flex;
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(8px + env(safe-area-inset-bottom, 0));
    z-index: 200;
    padding: 8px 6px;
    gap: 4px;
    background: var(--lg-glass-fill);
    backdrop-filter: blur(var(--lg-blur)) saturate(var(--lg-saturate));
    -webkit-backdrop-filter: blur(var(--lg-blur)) saturate(var(--lg-saturate));
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 22px;
    box-shadow: inset 0 1px 0 var(--lg-edge-light), 0 12px 40px rgba(0, 0, 0, 0.2);
  }

  body.lg-site.account-page:not(.drama-page) .lg-mobile-tabbar a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 4px;
    font-size: 0.68rem;
    color: var(--lg-muted);
    text-decoration: none;
    border-radius: 14px;
  }

  body.lg-site.account-page:not(.drama-page) .lg-mobile-tabbar a.lg-tab-on {
    color: var(--lg-text);
    background: rgba(255, 255, 255, 0.08);
  }

  body.lg-site.account-page:not(.drama-page) .lg-mobile-tabbar .lg-tab-icon {
    font-size: 1.1rem;
    line-height: 1;
  }

  body.lg-site .login-page {
    align-items: flex-start;
    padding-top: calc(40px + env(safe-area-inset-top, 0));
  }

  body.lg-site.hub-page .hp-head {
    flex-direction: column;
  }
}

/* ========== 全站宽屏电脑版（与首页 1180 对齐） ========== */
body.lg-site .login-page,
body.lg-site .account-wrap,
body.lg-site .billing-wrap,
body.lg-site .settings-wrap,
body.lg-site .hp-shell,
body.lg-site .downloads-wrap,
body.lg-site .download-center-wrap,
body.lg-site .lg-inner-shell,
body.lg-site .app-wrap,
body.lg-site.fx-home .fx-shell {
  max-width: var(--lg-site-shell-max, 1180px) !important;
  width: 100%;
  box-sizing: border-box;
}
