/*!
 * HNSKX_STYLE_SWITCH_LITE_V11F_NATIVE_COMPONENT_20260630
 * 中文说明：原生组件版三主题背景包。只切换本地背景图，不改业务逻辑。
 */

:root {
  --hnskx-bg-image: url('/assets/theme-bg/bg-night-city.webp');
}

html[data-hnskx-bg-theme="soft-white"] {
  --hnskx-bg-image: url('/assets/theme-bg/bg-soft-white.webp');
}

html[data-hnskx-bg-theme="eye-green"] {
  --hnskx-bg-image: url('/assets/theme-bg/bg-eye-green.webp');
}

html[data-hnskx-bg-theme="night-city"] {
  --hnskx-bg-image: url('/assets/theme-bg/bg-night-city.webp');
}

html[data-hnskx-bg-theme] body {
  background-image: var(--hnskx-bg-image) !important;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-attachment: scroll !important;
}

.hnskx-bg-theme-page {
  min-height: calc(100vh - 160px);
  box-sizing: border-box;
  padding: 64px 48px 48px;
  color: #e9fbff;
}

.hnskx-bg-theme-shell-native {
  max-width: 1040px;
  margin: 0 auto;
  padding: 22px;
  border: 1px solid rgba(22, 242, 194, .34);
  border-radius: 16px;
  background: rgba(5, 14, 20, .84);
}

.hnskx-bg-theme-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 18px;
}

.hnskx-bg-theme-title {
  margin: 0;
  font-size: 26px;
  font-weight: 900;
  color: #16f2c2;
}

.hnskx-bg-theme-subtitle {
  margin: 8px 0 0;
  font-size: 14px;
  color: rgba(233, 251, 255, .76);
}

.hnskx-bg-theme-current {
  padding: 8px 12px;
  border: 1px solid rgba(22, 242, 194, .32);
  border-radius: 999px;
  color: #16f2c2;
  font-weight: 800;
  white-space: nowrap;
}

.hnskx-bg-theme-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 18px;
}

.hnskx-bg-theme-card {
  min-height: 238px;
  padding: 14px;
  border: 1px solid rgba(160, 220, 220, .22);
  border-radius: 14px;
  background: rgba(8, 18, 26, .86);
  cursor: pointer;
}

.hnskx-bg-theme-card:hover {
  border-color: rgba(22, 242, 194, .45);
}

.hnskx-bg-theme-card[data-active="1"] {
  border-color: #16f2c2;
}

.hnskx-bg-theme-preview {
  height: 118px;
  border-radius: 10px;
  margin-bottom: 14px;
  border: 1px solid rgba(255,255,255,.14);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hnskx-bg-theme-name {
  font-size: 17px;
  font-weight: 900;
  color: #e9fbff;
  margin-bottom: 6px;
}

.hnskx-bg-theme-desc {
  min-height: 38px;
  font-size: 13px;
  line-height: 1.55;
  color: rgba(233, 251, 255, .70);
}

.hnskx-bg-theme-btn {
  margin-top: 14px;
  width: 100%;
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(22, 242, 194, .35);
  background: transparent;
  color: #16f2c2;
  font-weight: 800;
  cursor: pointer;
}

.hnskx-bg-theme-card[data-active="1"] .hnskx-bg-theme-btn {
  background: rgba(22, 242, 194, .12);
}

.hnskx-bg-theme-note {
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 12px;
  color: rgba(233, 251, 255, .68);
  font-size: 13px;
  line-height: 1.7;
  background: rgba(0,0,0,.26);
}

@media (max-width: 1100px) {
  .hnskx-bg-theme-page {
    padding: 48px 24px 36px;
  }

  .hnskx-bg-theme-grid {
    grid-template-columns: 1fr;
  }

  .hnskx-bg-theme-head {
    display: block;
  }

  .hnskx-bg-theme-current {
    display: inline-block;
    margin-top: 12px;
  }
}

/* HNSKX_STYLE_SWITCH_V11F2_BG_TARGET_20260630
   中文说明：背景图应用到风格切换原生页面容器，避免body背景被系统路由容器遮住。 */
html[data-hnskx-bg-theme] .hnskx-bg-theme-page {
  background-image: var(--hnskx-bg-image) !important;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-color: #020b12 !important;
}

html[data-hnskx-bg-theme="soft-white"] .hnskx-bg-theme-page {
  background-position: center center !important;
}

html[data-hnskx-bg-theme="eye-green"] .hnskx-bg-theme-page {
  background-position: center center !important;
}

html[data-hnskx-bg-theme="night-city"] .hnskx-bg-theme-page {
  background-position: center center !important;
}

/* HNSKX_STYLE_SWITCH_V11G_GLOBAL_BG_20260630
   中文说明：把背景主题应用到全局后台主界面，不再只作用于风格切换页面。 */
html[data-hnskx-bg-theme],
html[data-hnskx-bg-theme] body,
html[data-hnskx-bg-theme] #app {
  background-image: var(--hnskx-bg-image) !important;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-attachment: scroll !important;
  background-color: #020b12 !important;
}

/* 常见后台主容器：只改背景层，不改布局 */
html[data-hnskx-bg-theme] .layout,
html[data-hnskx-bg-theme] .main,
html[data-hnskx-bg-theme] .content,
html[data-hnskx-bg-theme] .page,
html[data-hnskx-bg-theme] .page-content,
html[data-hnskx-bg-theme] .main-content,
html[data-hnskx-bg-theme] .router-view,
html[data-hnskx-bg-theme] .app-main,
html[data-hnskx-bg-theme] .el-main,
html[data-hnskx-bg-theme] .ant-layout,
html[data-hnskx-bg-theme] .ant-layout-content {
  background-image: var(--hnskx-bg-image) !important;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
}

/* 如果页面本身是风格切换页，继续使用同一张背景 */
html[data-hnskx-bg-theme] .hnskx-bg-theme-page {
  background-image: var(--hnskx-bg-image) !important;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
}

/* 三种主题只换背景图变量，不改业务逻辑 */
html[data-hnskx-bg-theme="soft-white"] {
  --hnskx-bg-image: url('/assets/theme-bg/bg-soft-white.webp');
}

html[data-hnskx-bg-theme="eye-green"] {
  --hnskx-bg-image: url('/assets/theme-bg/bg-eye-green.webp');
}

html[data-hnskx-bg-theme="night-city"] {
  --hnskx-bg-image: url('/assets/theme-bg/bg-night-city.webp');
}
