/* ============================================
   BlueMe 官网全局样式
   ============================================ */

:root {
  --bg: #ffffff;
  --panel: #f7f8fc;
  --line: #e8ebf3;
  --text: #1a1d29;
  --muted: #7a8199;
  --accent: #6c5ce7;
  --accent-2: #8b5cf6;
  --accent-soft: rgba(108, 92, 231, 0.1);
  --radius: 16px;
  --shadow: 0 8px 30px rgba(30, 40, 90, 0.07);
  --shadow-lg: 0 20px 48px rgba(30, 40, 90, 0.13);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ============================================
   顶部导航
   ============================================ */
header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 19px;
  flex-shrink: 0;
}

.logo img {
  width: 30px;
  height: 30px;
  border-radius: 9px;
}

.logo span { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 24px;
  font-size: 14.5px;
  color: var(--muted);
  align-items: center;
}

.nav-links > a:hover { color: var(--text); }
.nav-links > a.active { color: var(--accent); font-weight: 600; }

.nav-links .dropdown { position: relative; }
.nav-links .dropdown > a::after {
  content: " ▾"; font-size: 10px; opacity: 0.7;
}

.nav-links .dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  margin-top: 8px;
  z-index: 100;
}

/* 关键：菜单上方的透明桥，鼠标从 "Outils" 移到子项时 hover 不断 */
.nav-links .dropdown-menu::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
  background: transparent;
}

.nav-links .dropdown:hover .dropdown-menu { display: block; }

.nav-links .dropdown-menu a {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text);
}

.nav-links .dropdown-menu a:hover {
  background: var(--panel);
  color: var(--accent);
}

.nav-links .dropdown-menu a.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.install-group {
  display: flex;
  gap: 6px;
  align-items: center;
}

.install-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
  transition: 0.18s;
  cursor: pointer;
}

.install-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.install-btn img, .install-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ============================================
   语言切换下拉
   ============================================ */
.lang-switch { position: relative; }

.lang-btn {
  padding: 7px 13px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  background: var(--panel);
  color: var(--muted);
  border: 1px solid var(--line);
  cursor: pointer;
  font-family: inherit;
  transition: 0.18s;
}

.lang-btn:hover { border-color: var(--accent); color: var(--accent); }

.lang-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 180px;
  max-height: 400px;
  overflow-y: auto;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  margin-top: 8px;
  z-index: 100;
}

/* 语言菜单上方的透明桥，防止鼠标一移开就关 */
.lang-menu::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
  background: transparent;
}

.lang-menu.open { display: block; }

.lang-menu a {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text);
}

.lang-menu a:hover { background: var(--panel); color: var(--accent); }

.lang-menu a.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

/* ============================================
   Hero
   ============================================ */
.hero {
  padding: 80px 0 64px;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(700px 340px at 50% -5%, rgba(108, 92, 231, 0.13), transparent 70%),
    radial-gradient(500px 260px at 88% 20%, rgba(139, 92, 246, 0.08), transparent 70%);
}

.hero-inner { position: relative; }

.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  background: var(--accent-soft); border: 1px solid rgba(108, 92, 231, 0.25);
  color: var(--accent); font-size: 13px; font-weight: 600;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: 52px;
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.1;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, var(--accent), #4fd1c5);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  color: var(--muted);
  font-size: 17.5px;
  margin: 20px auto 0;
  max-width: 600px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 32px;
  flex-wrap: wrap;
}

.btn {
  padding: 13px 26px;
  border-radius: 11px;
  font-weight: 650;
  font-size: 15px;
  transition: 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 22px rgba(108, 92, 231, 0.32);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(108, 92, 231, 0.45);
}

.btn-ghost {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
}

.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn img { width: 18px; height: 18px; }

/* ============================================
   Section
   ============================================ */
section { padding: 72px 0; }

.section-head {
  text-align: center;
  margin-bottom: 48px;
}

.section-head h2 {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.6px;
}

.section-head p {
  color: var(--muted);
  margin-top: 12px;
  font-size: 16px;
}

/* 功能卡片 */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.feature {
  padding: 28px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
  transition: 0.25s;
  box-shadow: var(--shadow);
  display: block;
}

.feature:hover {
  transform: translateY(-4px);
  border-color: rgba(108, 92, 231, 0.4);
  box-shadow: var(--shadow-lg);
}

.feature .ico {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
  margin-bottom: 18px;
  background: var(--accent-soft);
  border: 1px solid rgba(108, 92, 231, 0.2);
}

.feature h3 { font-size: 17px; margin-bottom: 9px; color: var(--text); }
.feature p { color: var(--muted); font-size: 14.5px; }

/* ============================================
   工具页
   ============================================ */
.tool-page { padding: 60px 0 80px; }

.tool-hero {
  text-align: center;
  margin-bottom: 48px;
}

.tool-hero h1 {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -1px;
  max-width: 760px;
  margin: 0 auto;
}

.tool-hero p {
  color: var(--muted);
  font-size: 17px;
  margin: 18px auto 0;
  max-width: 620px;
}

.tool-demo {
  max-width: 900px;
  margin: 0 auto 48px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  background: var(--panel);
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 14px;
}

/* 使用说明（工具页） */
.tool-page .steps {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}

/* ============================================
   广告位
   ============================================ */
.ad-slot {
  min-height: 90px;
  margin: 28px auto;
  max-width: 970px;
  padding: 0 24px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c8cdd8;
  font-size: 12px;
}

/* ============================================
   CTA
   ============================================ */
.cta {
  text-align: center;
  padding: 64px 32px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 30px 70px rgba(108, 92, 231, 0.3);
  max-width: 1120px;
  margin: 0 auto;
}

.cta h2 { font-size: 30px; font-weight: 800; letter-spacing: -0.5px; }
.cta p { opacity: 0.9; margin: 14px 0 28px; }

.cta-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.cta .btn { background: #fff; color: var(--accent); }
.cta .btn:hover { transform: translateY(-2px); }
.cta .btn img { width: 18px; height: 18px; }

/* ============================================
   色卡库页（独立文件，不参与 build）
   ============================================ */
.palette-hero { padding: 56px 0 20px; text-align: center; }
.palette-hero h1 { font-size: 38px; font-weight: 800; letter-spacing: -0.8px; }
.palette-hero p {
  color: var(--muted);
  margin-top: 12px;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
}

.search { max-width: 460px; margin: 26px auto 0; position: relative; }
.search input {
  width: 100%;
  padding: 13px 18px 13px 44px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: 0.2s;
  font-family: inherit;
}
.search input::placeholder { color: #a8aebd; }
.search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.13);
}
.search::before {
  content: "⌕";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 18px;
}

.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 28px 0 36px;
}
.filters button {
  padding: 8px 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  transition: 0.2s;
  font-family: inherit;
}
.filters button:hover { color: var(--accent); border-color: var(--accent); }
.filters button.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.swatch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}
.swatch {
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  transition: 0.25s;
  box-shadow: var(--shadow);
}
.swatch:hover {
  transform: translateY(-5px);
  border-color: rgba(108, 92, 231, 0.45);
  box-shadow: var(--shadow-lg);
}
.swatch .color {
  height: 118px;
  padding: 13px 15px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 650;
  color: rgba(255, 255, 255, 0.95);
  position: relative;
}
.swatch .color .tag {
  background: rgba(0, 0, 0, 0.25);
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  backdrop-filter: blur(4px);
}
.swatch .info { padding: 15px 17px 17px; }
.swatch .info h4 { font-size: 15.5px; font-weight: 700; }
.swatch .info p { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.swatch .chips { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.swatch .chips i {
  width: 20px; height: 20px; border-radius: 6px; display: block;
  border: 1px solid rgba(0, 0, 0, 0.06); cursor: pointer; transition: 0.15s;
}
.swatch .chips i:hover { transform: scale(1.15); }
.swatch .actions { display: flex; gap: 8px; margin-top: 14px; }
.swatch .actions button {
  flex: 1;
  padding: 9px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  cursor: pointer;
  transition: 0.2s;
  font-family: inherit;
}
.swatch .actions .dl { background: var(--accent); border-color: var(--accent); color: #fff; }
.swatch .actions .dl:hover { background: #4a5bec; }
.swatch .actions .cp:hover { border-color: var(--accent); color: var(--accent); }
.empty { grid-column: 1 / -1; text-align: center; padding: 60px 0; color: var(--muted); }

/* ============================================
   使用说明（三步）
   ============================================ */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
  margin-top: 10px;
}
.step {
  padding: 26px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.step .n {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  margin-bottom: 16px;
}
.step h4 { font-size: 16px; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 14px; }

/* ============================================
   更新日志（独立文件，不参与 build）
   ============================================ */
.changelog-wrap { max-width: 760px; margin: 0 auto; }
.changelog-item {
  position: relative;
  padding: 0 0 34px 32px;
  border-left: 2px solid var(--line);
}
.changelog-item:last-child { border-left-color: transparent; padding-bottom: 0; }
.changelog-item::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--accent);
}
.changelog-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.changelog-ver { font-size: 19px; font-weight: 800; letter-spacing: -0.3px; }
.changelog-date { font-size: 13px; color: var(--muted); }
.changelog-type {
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.changelog-type.added { background: rgba(52, 199, 120, 0.14); color: #1f9d5f; }
.changelog-type.fixed { background: rgba(108, 92, 231, 0.14); color: var(--accent); }
.changelog-type.improved { background: rgba(255, 159, 28, 0.16); color: #c26e00; }
.changelog-list { margin-top: 10px; padding-left: 18px; }
.changelog-list li { color: var(--muted); font-size: 14.5px; margin-bottom: 6px; }

/* ============================================
   Footer
   ============================================ */
footer {
  padding: 48px 0 32px;
  border-top: 1px solid var(--line);
  margin-top: 60px;
  color: var(--muted);
  font-size: 13.5px;
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  justify-content: center;
  margin-bottom: 16px;
}
.footer-links a:hover { color: var(--accent); }

/* ============================================
   RTL 微调（阿拉伯语、希伯来语、乌尔都语、波斯语）
   ============================================ */
html[dir="rtl"] .nav-links .dropdown-menu {
  left: auto;
  right: 0;
}
html[dir="rtl"] .lang-menu {
  right: auto;
  left: 0;
}

/* ============================================
   响应式
   ============================================ */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .install-group .install-btn span { display: none; }
  .install-group .install-btn { padding: 8px; }
  .hero h1 { font-size: 34px; }
  .hero { padding: 56px 0 40px; }
  section { padding: 52px 0; }
  .section-head h2 { font-size: 26px; }
  .tool-hero h1 { font-size: 30px; }
  .cta h2 { font-size: 23px; }
}