/* ============================================================
   首页 Pearl 主题 — 对齐用户中心 uc-app 设计语言
   桌面端：清爽卡片式布局
   移动端：APP 风格（灰底 + 白卡片）
   ============================================================ */

body.k8-pearl-theme {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
  -webkit-tap-highlight-color: transparent;
}

/* —— 通用：按钮 / 链接圆角 —— */
body.k8-pearl-theme .k8-hero__btn,
body.k8-pearl-theme .k8-why__cta,
body.k8-pearl-theme .k8-discount-button,
body.k8-pearl-theme .k8-free-trial-button,
body.k8-pearl-theme .k8-action-card-button,
body.k8-pearl-theme .k8-navbar-register-btn {
  border-radius: var(--k8-pearl-radius);
}

body.k8-pearl-theme .k8-hero__btn,
body.k8-pearl-theme .k8-why__cta {
  border-radius: var(--k8-pearl-radius);
}

body.k8-pearl-theme .k8-hero__btn:hover,
body.k8-pearl-theme .k8-why__cta:hover {
  background: var(--k8-pearl-brand);
  border-color: var(--k8-pearl-brand);
  color: #fff;
}

/* ============================================================
   桌面端 (≥992px)
   ============================================================ */
@media (min-width: 992px) {
  body.k8-pearl-theme {
    background: var(--k8-pearl-surface);
  }

  /* 导航栏：实色白底 */
  body.k8-pearl-theme .k8-navbar-glass {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--k8-pearl-border);
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
  }

  body.k8-pearl-theme .k8-navbar-glass:hover,
  body.k8-pearl-theme .k8-navbar-glass.k8-navbar-scrolled {
    background: rgba(255, 255, 255, 0.98);
    border-bottom-color: var(--k8-pearl-border);
  }

  body.k8-pearl-theme .k8-nav-link:hover,
  body.k8-pearl-theme .k8-nav-link.k8-nav-active {
    color: var(--k8-pearl-brand);
  }

  body.k8-pearl-theme .k8-navbar-register-btn {
    border-radius: var(--k8-pearl-radius);
    background: var(--k8-pearl-brand);
  }

  /* Hero 液态玻璃底栏 */
  body.k8-pearl-theme .k8-hero-quick__item:hover .k8-hero-quick__title {
    color: var(--k8-pearl-brand);
  }

  body.k8-pearl-theme .k8-hero__tab--active .k8-hero__tab-progress {
    background: #1d2129;
  }

  /* 为何选择我们 */
  body.k8-pearl-theme .k8-why-choose-section {
    background: var(--k8-pearl-bg);
    background-image: none;
  }

  body.k8-pearl-theme .k8-why-choose-card {
    border-radius: var(--k8-pearl-radius);
    border: 1px solid var(--k8-pearl-border);
    box-shadow: var(--k8-shadow-sm);
  }

  body.k8-pearl-theme .k8-why-choose-card:hover {
    box-shadow: var(--k8-shadow);
    border-color: #c9daff;
  }

  body.k8-pearl-theme .k8-free-trial-card {
    border-radius: var(--k8-pearl-radius);
    border: 1px solid var(--k8-pearl-border);
    overflow: hidden;
  }

  body.k8-pearl-theme .k8-free-trial-button {
    background: var(--k8-pearl-brand);
    border-color: var(--k8-pearl-brand);
    border-radius: var(--k8-pearl-radius);
  }

  /* 产品推荐 */
  body.k8-pearl-theme .k8-product-recommendation-section {
    background: var(--k8-pearl-surface);
  }

  body.k8-pearl-theme .k8-product-recommendation-nav {
    background: var(--k8-pearl-bg);
    border-radius: var(--k8-pearl-radius);
    padding: 4px;
    gap: 4px;
  }

  body.k8-pearl-theme .k8-nav-item {
    border-radius: var(--k8-pearl-radius-sm);
    font-size: 15px;
  }

  body.k8-pearl-theme .k8-nav-item.k8-nav-active {
    color: var(--k8-pearl-brand);
    background: var(--k8-pearl-brand-soft);
  }

  body.k8-pearl-theme .k8-product-recommendation-content {
    border: 1px solid var(--k8-pearl-border);
    border-radius: var(--k8-pearl-radius);
    overflow: hidden;
  }

  body.k8-pearl-theme .k8-product-card {
    border-right: 1px solid var(--k8-pearl-border);
    border-bottom: 1px solid var(--k8-pearl-border);
  }

  body.k8-pearl-theme .k8-product-card:hover {
    background: var(--k8-pearl-brand-soft);
    border-color: #c9daff;
  }

  /* 优惠产品 */
  body.k8-pearl-theme .k8-discount-section {
    background: var(--k8-pearl-bg);
  }

  body.k8-pearl-theme .k8-discount-card {
    border-radius: var(--k8-pearl-radius);
    border: 1px solid var(--k8-pearl-border);
    box-shadow: var(--k8-shadow-sm);
    background-image: none;
  }

  body.k8-pearl-theme .k8-discount-card-offer {
    background: none;
    -webkit-text-fill-color: var(--k8-pearl-brand);
    color: var(--k8-pearl-brand);
  }

  body.k8-pearl-theme .k8-discount-button {
    background: var(--k8-pearl-brand);
    border-color: var(--k8-pearl-brand);
  }

  /* 行动卡片 */
  body.k8-pearl-theme .k8-action-card-left {
    background-color: #0e52e6;
  }

  body.k8-pearl-theme .k8-action-card-right {
    background-color: var(--k8-pearl-brand);
  }

  body.k8-pearl-theme .k8-action-card-button {
    border-radius: var(--k8-pearl-radius);
    color: var(--k8-pearl-brand);
  }

  /* 解决方案 */
  body.k8-pearl-theme .k8-solutions-section {
    background: var(--k8-pearl-surface);
  }

  body.k8-pearl-theme .k8-solution-card {
    border-radius: var(--k8-pearl-radius);
    overflow: hidden;
  }

  body.k8-pearl-theme .k8-solution-product-btn {
    border-radius: var(--k8-pearl-radius-sm);
  }

  /* 合作伙伴 & 底部 CTA */
  body.k8-pearl-theme .k8-partners-section {
    background: var(--k8-pearl-bg);
  }

  body.k8-pearl-theme .k8-immediate-action-section {
    background: var(--k8-pearl-surface);
  }
}

/* ============================================================
   移动端 APP 风格 (≤991px)
   ============================================================ */
@media (max-width: 991px) {
  body.k8-pearl-theme {
    background: var(--k8-pearl-bg) !important;
    padding-top: calc(48px + env(safe-area-inset-top, 0px));
  }

  /* APP 顶栏 */
  body.k8-pearl-theme .k8-navbar-glass {
    height: calc(48px + env(safe-area-inset-top, 0px));
    padding-top: env(safe-area-inset-top, 0px);
    background: var(--k8-pearl-surface) !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: 1px solid var(--k8-pearl-border);
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
  }

  body.k8-pearl-theme .k8-navbar-container {
    padding: 0 12px;
  }

  body.k8-pearl-theme .k8-navbar-logo {
    height: 28px;
  }

  body.k8-pearl-theme .k8-navbar-mobile-toggle {
    top: calc(4px + env(safe-area-inset-top, 0px));
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: var(--k8-pearl-radius);
    background: var(--k8-pearl-bg);
  }

  body.k8-pearl-theme .k8-mobile-user-menu {
    top: calc(6px + env(safe-area-inset-top, 0px));
    right: 56px;
  }

  /* Hero 英雄区 — APP 风格 */
  body.k8-pearl-theme .k8-hero {
    margin-bottom: 0;
  }

  body.k8-pearl-theme .k8-hero__viewport {
    border-radius: 0;
  }

  body.k8-pearl-theme .k8-hero__track {
    border-radius: 0 0 12px 12px;
    overflow: hidden;
  }

  body.k8-pearl-theme .k8-hero__glass-dock {
    border-radius: 12px;
    margin: 8px 12px 0;
    overflow: hidden;
    border: 1px solid var(--k8-pearl-border);
    box-shadow: var(--k8-shadow-sm);
  }

  body.k8-pearl-theme .k8-hero__tab--active .k8-hero__tab-progress {
    background: #1d2129;
  }

  body.k8-pearl-theme .k8-hero-quick__item:active {
    background: rgba(255, 255, 255, 0.35);
  }

  /* 首页主体模块 — APP 卡片风格 */
  body.k8-pearl-theme .k8-main {
    background: var(--k8-pearl-bg) !important;
  }

  body.k8-pearl-theme .k8-why,
  body.k8-pearl-theme .k8-aishop,
  body.k8-pearl-theme .k8-products,
  body.k8-pearl-theme .k8-solutions,
  body.k8-pearl-theme .k8-cases,
  body.k8-pearl-theme .k8-partners,
  body.k8-pearl-theme .k8-cta {
    background: transparent !important;
  }

  body.k8-pearl-theme .k8-why__mobile .k8-why__panel,
  body.k8-pearl-theme .k8-solutions__viewport,
  body.k8-pearl-theme .k8-cases__list,
  body.k8-pearl-theme .k8-cta__panel {
    border: 1px solid var(--k8-pearl-border);
    box-shadow: var(--k8-shadow-sm);
  }

  body.k8-pearl-theme .k8-main__title,
  body.k8-pearl-theme .k8-why-choose-title,
  body.k8-pearl-theme .k8-product-recommendation-title,
  body.k8-pearl-theme .k8-discount-title,
  body.k8-pearl-theme .k8-solutions-title,
  body.k8-pearl-theme .k8-action-first-title {
    text-align: center;
    font-size: 17px;
    font-weight: 700;
    color: var(--k8-pearl-text);
  }

  body.k8-pearl-theme .k8-why__mobile .k8-why__headline {
    font-size: 17px;
    font-weight: 700;
    color: var(--k8-pearl-text);
    text-align: center;
  }

  body.k8-pearl-theme .k8-main__desc {
    text-align: center;
  }

  body.k8-pearl-theme .k8-main__head {
    text-align: center;
  }

  body.k8-pearl-theme .k8-products__head {
    text-align: center;
    align-items: center;
  }

  body.k8-pearl-theme .k8-why__mobile-lead {
    text-align: center;
    color: var(--k8-pearl-muted);
  }

  body.k8-pearl-theme .k8-why__mobile .k8-why__intro {
    background: var(--k8-pearl-surface);
  }

  body.k8-pearl-theme .k8-why__mobile .k8-why__card {
    background: var(--k8-pearl-surface);
  }

  body.k8-pearl-theme .k8-why__mobile .k8-why__card:active {
    background: #fafbfc;
  }

  body.k8-pearl-theme .k8-aishop__card {
    border-radius: var(--k8-pearl-radius);
  }

  body.k8-pearl-theme .k8-products__card,
  body.k8-pearl-theme .k8-cases__item-head {
    border-radius: var(--k8-pearl-radius-sm);
  }

  /* 通用区块：白卡片容器 */
  body.k8-pearl-theme .k8-why-choose-section,
  body.k8-pearl-theme .k8-product-recommendation-section,
  body.k8-pearl-theme .k8-discount-section,
  body.k8-pearl-theme .k8-solutions-section,
  body.k8-pearl-theme .k8-partners-section,
  body.k8-pearl-theme .k8-immediate-action-section {
    background: transparent !important;
    background-image: none !important;
    padding: 0 12px 12px;
  }

  body.k8-pearl-theme .k8-why-choose-container,
  body.k8-pearl-theme .k8-product-recommendation-container,
  body.k8-pearl-theme .k8-discount-container,
  body.k8-pearl-theme .k8-solutions-container,
  body.k8-pearl-theme .k8-partners-container {
    margin: 0;
    background: var(--k8-pearl-surface);
    border: 1px solid var(--k8-pearl-border);
    border-radius: var(--k8-pearl-radius);
    padding: 16px;
    box-shadow: var(--k8-shadow-sm);
  }

  /* 底部 CTA 保持品牌色块，圆角 APP 卡片 */
  body.k8-pearl-theme .k8-immediate-action-section {
    padding: 0 12px 12px;
  }

  body.k8-pearl-theme .k8-immediate-action-container {
    margin: 0;
    background: var(--k8-pearl-brand);
    border-radius: var(--k8-pearl-radius);
    padding: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(22, 93, 255, 0.2);
  }

  /* APP 区块标题 */
  body.k8-pearl-theme .k8-why-choose-title,
  body.k8-pearl-theme .k8-product-recommendation-title,
  body.k8-pearl-theme .k8-discount-title,
  body.k8-pearl-theme .k8-solutions-title,
  body.k8-pearl-theme .k8-action-first-title {
    margin-bottom: 12px;
    line-height: 1.3;
  }

  body.k8-pearl-theme .k8-action-first-button,
  body.k8-pearl-theme .k8-action-second-button {
    border-radius: var(--k8-pearl-radius);
  }

  body.k8-pearl-theme .k8-product-recommendation-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--k8-pearl-brand);
  }

  /* 为何选择 — 紧凑列表卡 */
  body.k8-pearl-theme .k8-why-choose-grid {
    gap: 8px;
  }

  body.k8-pearl-theme .k8-why-choose-card {
    height: auto !important;
    min-height: 72px;
    padding: 14px;
    border-radius: var(--k8-pearl-radius);
    border: 1px solid var(--k8-pearl-border);
    box-shadow: none;
    background: var(--k8-pearl-bg);
  }

  body.k8-pearl-theme .k8-why-choose-card:nth-child(1),
  body.k8-pearl-theme .k8-why-choose-card:nth-child(2),
  body.k8-pearl-theme .k8-why-choose-card:nth-child(3),
  body.k8-pearl-theme .k8-why-choose-card:nth-child(4) {
    height: auto !important;
  }

  body.k8-pearl-theme .k8-why-choose-card:active {
    background: #fafbfc;
  }

  body.k8-pearl-theme .k8-why-choose-card-number {
    font-size: 16px;
    font-weight: 700;
    color: var(--k8-pearl-brand);
  }

  body.k8-pearl-theme .k8-why-choose-card-subtitle {
    font-size: 14px;
    font-weight: 600;
    color: var(--k8-pearl-text);
  }

  body.k8-pearl-theme .k8-why-choose-card-description {
    font-size: 12px;
    color: var(--k8-pearl-muted);
    -webkit-line-clamp: 2;
  }

  body.k8-pearl-theme .k8-sprite-animation,
  body.k8-pearl-theme .k8-sprite-animation-2,
  body.k8-pearl-theme .k8-sprite-animation-3,
  body.k8-pearl-theme .k8-sprite-animation-4 {
    display: none !important;
  }

  body.k8-pearl-theme .k8-free-trial-card {
    margin-top: 12px;
    border-radius: var(--k8-pearl-radius);
    border: 1px solid var(--k8-pearl-border);
    background: var(--k8-pearl-brand-soft);
    overflow: hidden;
  }

  body.k8-pearl-theme .k8-free-trial-button {
    background: var(--k8-pearl-brand);
    border-radius: var(--k8-pearl-radius);
    border: none;
    color: #fff;
  }

  /* 产品 Tab — 横向胶囊 */
  body.k8-pearl-theme .k8-product-recommendation-header {
    margin-bottom: 12px;
    align-items: center;
  }

  body.k8-pearl-theme .k8-product-recommendation-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    background: transparent;
    padding-bottom: 12px;
    margin-bottom: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  body.k8-pearl-theme .k8-product-recommendation-nav::-webkit-scrollbar {
    display: none;
  }

  body.k8-pearl-theme .k8-nav-item {
    flex-shrink: 0;
    width: auto;
    padding: 7px 12px;
    border: 1px solid var(--k8-pearl-border);
    border-radius: var(--k8-pearl-radius-sm);
    background: var(--k8-pearl-surface);
    color: var(--k8-pearl-muted);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
  }

  body.k8-pearl-theme .k8-nav-item.k8-nav-active {
    color: var(--k8-pearl-brand);
    background: var(--k8-pearl-brand-soft);
    border-color: #c9daff;
  }

  body.k8-pearl-theme .k8-product-recommendation-content {
    background: transparent;
    border: none;
    border-radius: 0;
  }

  /* 产品列表 — 纵向卡片 */
  body.k8-pearl-theme .k8-product-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  body.k8-pearl-theme .k8-product-card {
    border: 1px solid var(--k8-pearl-border);
    border-radius: var(--k8-pearl-radius);
    padding: 14px;
    box-shadow: var(--k8-shadow-sm);
    background: var(--k8-pearl-bg);
  }

  body.k8-pearl-theme .k8-product-card:active {
    background: #fafbfc;
  }

  body.k8-pearl-theme .k8-product-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--k8-pearl-text);
    margin-bottom: 6px;
  }

  body.k8-pearl-theme .k8-product-card-description {
    font-size: 13px;
    color: var(--k8-pearl-muted);
    -webkit-line-clamp: 2;
  }

  body.k8-pearl-theme .k8-product-card-link {
    position: static;
    opacity: 1;
    transform: none;
    margin-top: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--k8-pearl-brand);
  }

  body.k8-pearl-theme .k8-product-card-content {
    margin-bottom: 0;
  }

  /* 优惠卡片 */
  body.k8-pearl-theme .k8-discount-grid {
    gap: 10px;
  }

  body.k8-pearl-theme .k8-discount-card {
    border-radius: var(--k8-pearl-radius);
    border: 1px solid var(--k8-pearl-border);
    background-image: none;
    box-shadow: var(--k8-shadow-sm);
    background: var(--k8-pearl-bg);
  }

  body.k8-pearl-theme .k8-discount-card-content {
    padding: 14px;
  }

  body.k8-pearl-theme .k8-discount-card-name {
    font-size: 15px;
    font-weight: 700;
  }

  body.k8-pearl-theme .k8-discount-card-offer {
    font-size: 16px;
    background: none;
    -webkit-text-fill-color: var(--k8-pearl-brand);
    color: var(--k8-pearl-brand);
    border-bottom-color: var(--k8-pearl-border);
  }

  body.k8-pearl-theme .k8-discount-button {
    border-radius: var(--k8-pearl-radius);
    background: var(--k8-pearl-brand);
    border-color: var(--k8-pearl-brand);
    font-size: 14px;
    font-weight: 600;
    height: 40px;
  }

  /* 行动双卡 */
  body.k8-pearl-theme .k8-action-cards-section {
    padding: 0 12px 12px;
    background: transparent;
  }

  body.k8-pearl-theme .k8-action-cards-grid {
    gap: 10px;
  }

  body.k8-pearl-theme .k8-action-card {
    border-radius: var(--k8-pearl-radius);
    overflow: hidden;
  }

  body.k8-pearl-theme .k8-action-card-left {
    background-color: #0e52e6;
  }

  body.k8-pearl-theme .k8-action-card-right {
    background-color: var(--k8-pearl-brand);
  }

  body.k8-pearl-theme .k8-action-card-button {
    border-radius: var(--k8-pearl-radius);
    color: var(--k8-pearl-brand);
  }

  /* 解决方案 — 纵向卡片列表 */
  body.k8-pearl-theme .k8-solutions-grid {
    gap: 10px;
    margin-bottom: 0;
  }

  body.k8-pearl-theme .k8-solution-card {
    border-radius: var(--k8-pearl-radius);
    margin-bottom: 0;
    overflow: hidden;
  }

  body.k8-pearl-theme .k8-solution-product-btn {
    border-radius: var(--k8-pearl-radius-sm);
  }

  /* 合作伙伴 */
  body.k8-pearl-theme .k8-partners-grid {
    gap: 8px;
  }

  /* 页脚上方留白 */
  body.k8-pearl-theme .k8-footer {
    margin-top: 0;
  }
}

/* 小屏手机微调 */
@media (max-width: 480px) {
  body.k8-pearl-theme {
    padding-top: calc(48px + env(safe-area-inset-top, 0px));
  }

  body.k8-pearl-theme .k8-hero__glass-dock {
    margin: 6px 8px 0;
  }

  body.k8-pearl-theme .k8-hero__tab {
    min-width: 68px;
  }

  body.k8-pearl-theme .k8-why-choose-container,
  body.k8-pearl-theme .k8-product-recommendation-container,
  body.k8-pearl-theme .k8-discount-container,
  body.k8-pearl-theme .k8-solutions-container {
    padding: 14px;
  }
}
