/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    transition: background-color 0.3s, color 0.3s;
}

/* 导航栏容器 */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    padding: 0 24px;
    background-color: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    width: 100%;
    transition: background-color 0.3s;
}

/* 左侧：Logo 区域 */
.nav-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 200px;
}

.logo-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-image: url('https://ui-avatars.com/api/?name=S&background=random');
    background-size: cover;
}

.logo-text {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    letter-spacing: -0.01em;
}

/* 中间：搜索框区域 */
.nav-center {
    flex: 1;
    display: flex;
    justify-content: center;
    max-width: 400px;
}

.search-box {
    display: flex;
    align-items: center;
    background-color: #f3f4f6;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 6px 12px;
    width: 100%;
    cursor: pointer;
    transition: all 0.2s;
    color: #6b7280;
}

.search-box:hover {
    background-color: #e5e7eb;
}

.search-box i {
    font-size: 14px;
    margin-right: 8px;
}

.search-text {
    font-size: 14px;
    flex: 1;
}

.search-shortcut {
    font-size: 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    padding: 2px 6px;
    color: #9ca3af;
    background: #fff;
}

/* 右侧：导航链接与功能 */
.nav-right {
    display: flex;
    align-items: center;
    gap: 0;
}

/* 导航链接组 */
.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
    font-size: 14px;
    font-weight: 500;
}

.nav-links a {
    text-decoration: none;
    color: #374151;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-links a.active {
    color: #10b981;
}

.nav-links a:hover:not(.active) {
    color: #111827;
}

.nav-links .dropdown-icon {
    font-size: 10px;
    margin-left: 2px;
}

/* 右侧功能图标组 (分隔线处理) */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    border-left: 1px solid #e5e7eb;
    padding-left: 4px;
    margin-left: 0;
}

.action-item {
    color: #4b5563;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.action-item:hover {
    color: #111827;
}

/* 自定义开关 (Toggle Switch) */
.toggle-switch {
    width: 36px;
    height: 20px;
    background-color: #e5e7eb;
    border-radius: 20px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.3s;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background-color: white;
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
    transition: transform 0.3s;
}

.toggle-switch.active {
    background-color: #10b981;
}

.toggle-switch.active::after {
    transform: translateX(16px);
}

.social-icons {
    display: flex;
    gap: 12px;
    font-size: 18px;
}

/* 响应式调整：小屏幕隐藏搜索框 */
@media (max-width: 900px) {
    .nav-center { display: none; }
}

/* ---------- 下拉菜单通用样式 ---------- */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropbtn {
    cursor: default;
}

.dropdown-content {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 160px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.02);
    padding: 0.5rem 0;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    border: 1px solid #edf2f7;
}

.dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-content a {
    display: block;
    padding: 0.6rem 1.2rem;
    color: #1e293b;
    font-weight: 400;
    font-size: 0.9rem;
    text-decoration: none;
    background: transparent;
    white-space: nowrap;
}

.dropdown-content a:hover {
    background-color: #f8fafc;
    color: #10b981;
}

.dropdown-icon {
    font-size: 0.7rem;
    margin-left: 4px;
    color: #64748b;
}

/* 语言下拉菜单右对齐 */
.lang-dropdown .dropdown-content {
    left: auto;
    right: 0;
    min-width: 120px;
}

/* ---------- 更多菜单（...）样式 ---------- */
.more-menu {
    position: relative;
    display: none;          /* 默认隐藏，由JS控制显示 */
    align-items: center;
    color: #4b5563;
    cursor: pointer;
    font-size: 20px;
    margin-left: 16px;
    transition: color 0.2s;
}

.more-menu:hover {
    color: #111827;
}

.more-menu i {
    font-size: 20px;
}

/* 更多下拉菜单 */
.more-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 160px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.02);
    padding: 0.5rem 0;
    z-index: 200;
    border: 1px solid #edf2f7;
    display: none;          /* 默认隐藏，悬停时显示 */
}

/* 悬停显示下拉菜单（图标或菜单本身） */
.more-menu:hover .more-dropdown,
.more-dropdown:hover {
    display: block;
}

/* 透明桥接：填补图标与菜单之间的间隙，实现平滑移动 */
.more-menu::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 12px;            /* 与 .more-dropdown 的 top 偏移量一致 */
    background: transparent;
    pointer-events: auto;   /* 允许鼠标事件通过，使桥接区域可触发hover */
    z-index: 1;
}

/* 更多下拉菜单内的链接样式 */
.more-dropdown a {
    display: block;
    padding: 0.6rem 1.2rem;
    color: #1e293b;
    font-weight: 400;
    font-size: 0.9rem;
    text-decoration: none;
    background: transparent;
    white-space: nowrap;
    cursor: pointer;
}

.more-dropdown a:hover {
    background-color: #f8fafc;
    color: #10b981;
}

/* 更多下拉菜单内的主题切换项 */
.theme-toggle-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1.2rem;
    color: #1e293b;
    font-size: 0.9rem;
}

.theme-toggle-item span {
    font-weight: 400;
}

/* 下拉菜单分隔线 */
.dropdown-divider {
    height: 1px;
    background-color: #edf2f7;
    margin: 0.5rem 0;
}

/* 更多下拉菜单内的社交图标 */
.more-dropdown .social-icons {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding: 0.6rem 1.2rem;
}

.more-dropdown .social-icons a {
    color: #64748b;
    font-size: 18px;
    transition: color 0.2s;
}

.more-dropdown .social-icons a:hover {
    color: #10b981;
}

/* ---------- 深色主题 ---------- */
body.dark-theme {
    background-color: #1a1a1a;
    color: #e5e5e5;
}

body.dark-theme .navbar {
    background-color: #2d2d2d;
    border-bottom-color: #404040;
}

body.dark-theme .nav-links a,
body.dark-theme .action-item,
body.dark-theme .logo-text,
body.dark-theme .more-menu,
body.dark-theme .more-dropdown a,
body.dark-theme .theme-toggle-item,
body.dark-theme .more-dropdown .social-icons a {
    color: #e5e5e5;
}

body.dark-theme .dropdown-content,
body.dark-theme .more-dropdown {
    background-color: #2d2d2d;
    border-color: #404040;
}

body.dark-theme .dropdown-content a:hover,
body.dark-theme .more-dropdown a:hover {
    background-color: #3a3a3a;
    color: #10b981;
}

/* ---------- 移动端元素（默认隐藏） ---------- */
.mobile-search-icon,
.hamburger-icon {
    display: none;
    align-items: center;
    color: #4b5563;
    cursor: pointer;
    font-size: 20px;
    margin-left: 16px;
}

.mobile-search-icon:hover,
.hamburger-icon:hover {
    color: #111827;
}

/* 移动端菜单容器 */
.mobile-menu {
    position: absolute;
    top: 64px;              /* 与导航栏高度一致 */
    left: 0;
    width: 100%;
    background-color: #ffffff;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
    border-top: 1px solid #e5e7eb;
    padding: 1rem 0;
    z-index: 300;
    display: none;          /* 默认隐藏 */
}

.mobile-menu.show {
    display: block;
}

/* 移动端菜单内的链接样式 */
.mobile-menu a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: #1e293b;
    text-decoration: none;
    font-size: 1rem;
    transition: background-color 0.2s;
}

.mobile-menu a:hover {
    background-color: #f8fafc;
    color: #10b981;
}

/* 移动端下拉菜单（模仿桌面版） */
.mobile-dropdown {
    position: relative;
}

.mobile-dropdown .mobile-dropdown-content {
    display: none;
    background-color: #f9fafb;
    padding-left: 1rem;
}

.mobile-dropdown.open .mobile-dropdown-content {
    display: block;
}

.mobile-dropdown .mobile-dropbtn {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 移动端分隔线 */
.mobile-divider {
    height: 1px;
    background-color: #edf2f7;
    margin: 0.5rem 0;
}

/* 移动端主题切换项 */
.mobile-theme-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    color: #1e293b;
    font-size: 1rem;
}

.mobile-theme-toggle span {
    font-weight: 400;
}

/* 移动端社交图标 */
.mobile-social-icons {
    display: flex;
    justify-content: center;
    gap: 24px;
    padding: 0.75rem 1.5rem;
}

.mobile-social-icons a {
    color: #64748b;
    font-size: 20px;
    padding: 0;
}

.mobile-social-icons a:hover {
    color: #10b981;
}

/* ---------- 移动端媒体查询 (max-width: 767px) ---------- */
@media (max-width: 767px) {
    /* 隐藏原有的大屏元素 */
    .nav-center {
        display: none !important;
    }
    .nav-links {
        display: none !important;
    }
    .nav-actions {
        display: none !important;
    }
    .more-menu {
        display: none !important;
    }

    /* 显示移动端图标 */
    .mobile-search-icon,
    .hamburger-icon {
        display: flex;
    }

    /* 调整移动端图标间距：让放大镜紧贴汉堡菜单按钮 */
    .mobile-search-icon {
        margin-left: 0;
        margin-right: 4px;
    }
    .hamburger-icon {
        margin-left: 0;
    }

    /* 调整导航栏右侧布局 */
    .nav-right {
        gap: 0;
    }

    /* 深色主题适配 */
    body.dark-theme .mobile-menu {
        background-color: #2d2d2d;
        border-top-color: #404040;
    }
    body.dark-theme .mobile-menu a {
        color: #e5e5e5;
    }
    body.dark-theme .mobile-menu a:hover {
        background-color: #3a3a3a;
        color: #10b981;
    }
    body.dark-theme .mobile-divider {
        background-color: #404040;
    }
    body.dark-theme .mobile-theme-toggle {
        color: #e5e5e5;
    }
    body.dark-theme .mobile-social-icons a {
        color: #9ca3af;
    }
}

/* ---------- 图标容器（用于后续扩展） ---------- */
/* 全局 img 样式 */
img, svg, video, canvas, audio, iframe, embed, object {
    display: block;
}
img, video {
    max-width: 100%;
    height: auto;
}

/* 父级 .landing-hero */
.landing-hero {
    padding: 6.5rem 1.5rem 3.5rem;
    text-align: center;
    position: relative;
}
@media (min-width: 768px) {
    .landing-hero {
        padding: 7rem 2rem 6rem;
    }
}

/* 直接父级 .landing-hero__content */
.landing-hero__content {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.4rem;
}

/* 目标元素 .landing-hero__logo */
.landing-hero__logo {
  /* ----- 核心：响应式尺寸 ----- */
  /* 移动优先：最小 120px，理想 24vw，最大 220px */
  width: clamp(120px, 24vw, 220px);
  
  /* ----- 强制等比缩放 ----- */
  /* 方案 A：现代浏览器（推荐） */
  aspect-ratio: 1 / 1;
  /* 方案 B：兼容旧浏览器，二选一
     height: clamp(120px, 24vw, 220px); */
  
  /* 确保图片不变形，完美填充圆形 */
  object-fit: cover;
  
  /* ----- 圆形外观 ----- */
  border-radius: 50%;
  
  /* ----- 原有投影微调（可选）----- */
  /* 随尺寸缩放投影强度，避免小屏投影过重 */
  filter: drop-shadow(0 clamp(20px, 3vw, 40px) clamp(60px, 8vw, 120px) rgba(15, 118, 110, 0.25));
  
  /* 性能优化 */
  will-change: transform;
  display: block;
}

/* 为 .landing-hero 中的 h1 添加渐变文字效果 */
.landing-hero h1 {
    display: inline-block;
    font-size: clamp(3.5rem, 8vw, 5.8rem); /* 响应式字体大小 */
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: -.02em;
    text-rendering: optimizeLegibility;
    padding-block: .12em;
    /* 渐变背景：青 -> 蓝 -> 紫 */
    background: linear-gradient(120deg, #06b6d4, #2563eb, #6366f1);
    /* 关键属性：将背景裁剪到文字形状 */
    -webkit-background-clip: text;
    background-clip: text;
    /* 使文字颜色透明，以显示背景渐变 */
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.landing-hero h1 span {
    display: block;
    line-height: inherit;
}

.landing-hero__buttons{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

/* 基础卡片样式 */
.feature-card {
    position: relative;
    border-radius: 1.5rem;
    padding: 1.8rem;
    backdrop-filter: blur(8px);
    overflow: hidden;
    isolation: isolate;
    box-shadow: 0 18px 40px #0f172a1c;
    transition: transform .26s ease, box-shadow .26s ease, border-color .26s ease;
    border: 1px solid rgba(148,163,184,.2);
    background: #f8fafcd1;
    --card-border: rgba(59, 130, 246, .4);
    --card-gradient: linear-gradient(135deg, rgba(59, 130, 246, .18), rgba(56, 189, 248, .12));
}

/* 背景装饰 */
.feature-card:before {
    content: "";
    position: absolute;
    inset: -20% -25% auto;
    height: 62%;
    border-radius: 55%;
    background: var(--card-gradient);
    filter: blur(2px);
    opacity: .55;
    z-index: -2;
}

.feature-card:after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at top, rgba(255,255,255,.38), transparent 72%);
    opacity: .48;
    mix-blend-mode: screen;
    z-index: -1;
}

/* 悬停效果 */
.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--card-border);
    box-shadow: 0 24px 60px #0f172a2e;
}

/* 图标容器 */
.feature-card .icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    margin-bottom: 1.2rem;
}

.feature-card .icon svg {
    width: 26px;
    height: 26px;
    stroke-width: 1.8;
}

.feature-card .icon .icon-inline {
    display: inline-flex;
    width: 26px;
    height: 26px;
    align-items: center;
    justify-content: center;
}

.feature-card .icon .icon-inline svg {
    width: 26px;
    height: 26px;
}

.feature-card .icon .iconify-node {
    display: inline-flex;
    width: 26px;
    height: 26px;
}

.feature-card .icon .iconify-node svg {
    width: 100%;
    height: 100%;
}

/* 图标颜色变体 */
.feature-card .icon.teal {
    background: #0d94881f;
    color: #0d9488e6;
}

/* 卡片标题 */
.feature-card h3 {
    margin: 0 0 .6rem;
    font-size: 1.25rem;
}

/* 卡片正文 */
.feature-card p {
    margin: 0;
    color: #475569cc;
    line-height: 1.6;
}

/* 特定 teal 色调的自定义属性 */
.feature-card[data-accent=teal] {
    --card-gradient: linear-gradient(135deg, rgba(13, 148, 136, .2), rgba(20, 184, 166, .08));
    --card-border: rgba(13, 148, 136, .4);
}

/* 深色模式覆盖 */
.dark .feature-card {
    background: #0f172abd;
    border-color: #47556966;
    box-shadow: 0 28px 70px #02061773;
}

.dark .feature-card:after {
    background: radial-gradient(circle at top, rgba(148,163,184,.2), transparent 75%);
    opacity: .38;
}

.dark .feature-card[data-accent=teal] {
    --card-gradient: linear-gradient(135deg, rgba(13, 148, 136, .38), rgba(20, 184, 166, .18));
    --card-border: rgba(20, 184, 166, .6);
}

.feature-card h3 {
    margin: 0 0 .6rem;
    font-size: 1.25rem;
}

/* 副标题：对标题形成视觉对齐 */
.landing-hero__content p {
  color: rgb(76, 79, 105);
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  
  /* 动态字体：最小 1rem (16px)，理想 2vw，最大 1.25rem (20px) */
  font-size: clamp(1rem, 2vw, 1.25rem);
  
  line-height: 1.7;
  font-weight: 400;
  letter-spacing: 0.01em;
  margin-top: 0.6rem;
  margin-bottom: 0;
}

.landing-hero__buttons {
  display: grid;
  /* 自适应列：最小 280px，最大 1fr，自动填充 */
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  width: 100%;
  margin-top: 1rem;
}

/* 确保卡片在网格中等高，且可自由调节宽度/高度 */
.feature-card {
  min-width: 0;                /* 允许网格缩小，不必强制260px */
  flex-shrink: initial;       /* 移除之前的 flex-shrink: 0 */
  /* 你仍可自由设置高度，例如：
     min-height: 220px;
  */
  display: flex;
  flex-direction: column;
}