/* 标题字形高度：想更大/更小就改这个值（原站 1:1 = 96px） */
:root { --yc-glyph-height: clamp(38px, 8vw, 120px); }

/* 雲创AI · 品牌层 + 版面裁剪 */

/* ---------- 1) logo：原站图标/字形隐藏，换成文字品牌 ---------- */
a[data-testid="site-shell-home-link"] > span:first-child,
a[data-testid="site-shell-home-link"] > svg,
[data-testid="site-shell-brand-wordmark"] {
  display: none !important;
}

a[data-testid="site-shell-home-link"]::after {
  content: "雲创AI";
  display: inline-block;
  flex: none;
  padding: 0 1px;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  font-size: 18px;
  line-height: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
  background: linear-gradient(92deg, #7c5cff 0%, #5b7cff 55%, #22d3ee 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-sidebar-collapsed="true"] a[data-testid="site-shell-home-link"]::after,
[data-collapsed="true"] a[data-testid="site-shell-home-link"]::after {
  display: none;
}

/* ---------- 2) 原站页脚整体不渲染 ---------- */
.home-v2-footer,
div:has(> footer),
footer {
  display: none !important;
}

/* ---------- 3) 左侧栏整块不渲染，主区占满 ---------- */
aside[data-testid="site-shell-sidebar"] {
  display: none !important;
}

div[data-testid="site-v2-shell"],
div[data-testid="site-shell-layout"],
[data-testid="site-v2-shell"],
[data-testid="site-shell-layout"] {
  grid-template-columns: minmax(0, 1fr) !important;
  --site-sidebar-width: 0px !important;
}

[data-testid="site-v2-shell"] > *,
[data-testid="site-shell-layout"] > * {
  grid-column: 1 / -1 !important;
}

/* ---------- 4) 首页创作区（大标题 + 创作/视频/图片/音乐 + 输入框 + 技能卡）不渲染 ---------- */
section:has(h1.home-title),
section:has(.agent-chat-input-root),
div.home-skill-tags {
  display: none !important;
}


/* 标题文字层：垂直真正居中（限定在英雄区内，避免误伤其他页面的同类 class） */
section:has(video[data-yc-hero="1"]) div[class*="top-[42%]"] {
  top: 50% !important;
  transform: translateY(-50%) !important;
}

/* ---------- 5) 英雄区视频铺满，消除右侧黑条与硬切边 ---------- */
section:has(video[data-yc-hero="1"]) {
  background: #000 !important;
}

section video[data-yc-hero="1"] {
  object-fit: cover !important;
  object-position: center center !important;
  width: 100% !important;
  height: 100% !important;
  left: 0 !important;
  top: 0 !important;
  transform: none !important;
}

/* 原 React 的备用 video / 背景帧图：彻底不渲染（否则与我们的视频叠加出硬分界） */
section:has(video[data-yc-hero="1"]) video:not([data-yc-hero]),
section:has(video[data-yc-hero="1"]) img:not([src*='/assets/glyph/']) {
  display: none !important;
}

/* 英雄区视频容器原本只有 72% 宽（右侧留黑），改为整幅（限定在英雄区内） */
section:has(video[data-yc-hero="1"]) div[class*="w-[72%]"] {
  width: 100% !important;
}

/* 保险：英雄区 section 内所有直接子容器铺满 */
section:has(video[data-yc-hero="1"]) > div[class*="absolute"] {
  width: 100% !important;
}

/* 原站给 72% 视频宽度做的「右侧渐隐遮罩」：视频已铺满整幅，这层只会切出一道硬边，去掉 */
section:has(video[data-yc-hero="1"]) > span[class*="right-[28%]"] {
  display: none !important;
}
/* hero-bottom-fade */
/* 英雄区底部柔化：视频铺满后与下方内容之间的硬切，加一层渐隐 */
section:has(video[data-yc-hero="1"])::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 140px;
  background: linear-gradient(to top, #0d0d0d 0%, rgba(13, 13, 13, 0) 100%);
  pointer-events: none;
  z-index: 1;
}

/* 英雄区整体缩一点：原 aspect 200/81（1600→648）切到 200/73（→584） */
section:has(video[data-yc-hero="1"]) {
  aspect-ratio: 200 / 73 !important;
}

/* 英雄区下方能力卡 —— 复刻 520YC 素材的玻璃拟态 + 细网格质感（文字用 DOM） */
[data-yc-cards] {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin: 26px 0 0;
}
@media (max-width: 900px) {
  [data-yc-cards] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

[data-yc-cards] .yc-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  min-height: 96px;
  padding: 22px 24px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  background-color: #14161b;
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 38%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.019) 0 1px, rgba(255, 255, 255, 0) 1px 7px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.019) 0 1px, rgba(255, 255, 255, 0) 1px 7px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.13),
    inset 0 0 0 1px rgba(255, 255, 255, 0.02),
    inset 0 -18px 30px rgba(0, 0, 0, 0.35),
    0 14px 36px rgba(0, 0, 0, 0.5);
  text-decoration: none;
  overflow: visible;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
[data-yc-cards] .yc-card:hover {
  border-color: rgba(255, 255, 255, 0.20);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(0, 0, 0, 0.55),
    0 18px 42px rgba(0, 0, 0, 0.6);
  transform: translateY(-1px);
}

[data-yc-cards] .yc-title {
  font: 600 18px/1.25 "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  letter-spacing: -0.005em;
  color: #f5f7fa;
}

[data-yc-cards] .yc-sub {
  font: 400 13px/1.3 "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  color: rgba(238, 242, 248, 0.56);
  letter-spacing: 0.01em;
}

/* NEW 签 / 右上箭头不显示 */
[data-yc-cards] .yc-new,
[data-yc-cards] .yc-arrow {
  display: none !important;
}

/* 顶部促销条（倒计时 + 限时抢购）整条不显示 */
div.campaign-benefit-board {
  display: none !important;
}

/* 卡片右侧「点击直达」提示（仅前两张） */
[data-yc-cards] .yc-go {
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  font: 400 12px/1 "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  letter-spacing: 0.06em;
  color: rgba(238, 242, 248, 0.42);
  white-space: nowrap;
  pointer-events: none;
}
[data-yc-cards] .yc-card:hover .yc-go {
  color: rgba(238, 242, 248, 0.72);
}

/* ---------- 6) 移动端适配 ---------- */
@media (max-width: 900px) {
  :root { --yc-glyph-height: clamp(34px, 13vw, 92px); }

  section:has(video[data-yc-hero="1"]) {
    aspect-ratio: 16 / 11 !important;
  }

  [data-yc-cards] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
  }
  [data-yc-cards] .yc-card {
    min-height: 84px;
    padding: 14px 16px;
    gap: 4px;
  }
  [data-yc-cards] .yc-title {
    font-size: 15px;
    line-height: 1.25;
    padding-right: 54px;          /* 给「点击直达」留位，避免重叠 */
  }
  [data-yc-cards] .yc-sub {
    font-size: 11.5px;
  }
  [data-yc-cards] .yc-go {
    right: 14px;
    top: 15px;
    transform: none;
    font-size: 10.5px;
    letter-spacing: 0.02em;
  }
}

@media (max-width: 560px) {
  :root { --yc-glyph-height: clamp(30px, 12.5vw, 52px); }

  section:has(video[data-yc-hero="1"]) {
    aspect-ratio: 16 / 10 !important;
  }

  [data-yc-cards] {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  [data-yc-cards] .yc-card {
    min-height: 0;
    padding: 14px 16px;
  }
  [data-yc-cards] .yc-title {
    font-size: 16px;
    padding-right: 62px;
  }
  [data-yc-cards] .yc-sub {
    font-size: 12px;
  }
  [data-yc-cards] .yc-go {
    top: 14px;
    font-size: 11px;
  }
}
