:root {
    /* 浅色主题 (Coffee/Warm) - 默认 */
    --bg-color: #f9f5f0;
    --text-primary: #5d4a3a;
    --text-secondary: #8b7355;
    --accent-color: #d4b896;
    --glass-bg: rgba(255, 254, 252, 0.65);
    --glass-border: rgba(255, 255, 255, 0.6);
    --glass-shadow: 0 8px 32px rgba(93, 74, 58, 0.05);
    
    /* 动态背景 - 暖色 */
    --bg-gradient-1: rgba(212, 184, 150, 0.15);
    --bg-gradient-2: rgba(139, 115, 85, 0.1);
    
    /* 切换按钮颜色 */
    --toggle-color: #d4b896;
    
    --nav-height: 64px;
    --max-width: 1200px;
    --font-family: "Segoe UI", "SF Pro Display", -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
}



/* 深色主题 (Sky/Starry Blue - Copilot Inspired) */
[data-theme="dark"] {
    --bg-color: #141926; /* 用户指定背景色 */
    --text-primary: #e8e8e8; /* 柔和的亮白 */
    --text-secondary: #a0a0b8; /* 蓝调灰 */
    --accent-color: #5c87f2; /* 稍暗的科技蓝 */
    --glass-bg: rgba(45, 54, 91, 0.25); /* 透明度降低到 25% */
    --glass-border: rgba(255, 255, 255, 0.08); /* 极淡的边框 */
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    
    /* 动态背景 - 深邃蓝调渐变 */
    --bg-gradient-1: rgba(30, 30, 60, 0.4);
    --bg-gradient-2: rgba(10, 10, 25, 0.8);
    
    /* 切换按钮颜色 */
    --toggle-color: #5c87f2;
    
    /* 深色模式下的特殊背景色变量 - 同样带透明度 */
    --card-bg-dark: rgba(45, 54, 91, 0.25); /* 透明度降低到 25% */
}

/* 深色模式下的星空背景点缀 */
[data-theme="dark"] body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    /* 使用 SVG 数据 URI 创建发光四角星 */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='white' d='M12 0L14 10L24 12L14 14L12 24L10 14L0 12L10 10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    /* 随机分布几颗星星 */
    background-position:
        15% 20%,
        85% 15%,
        25% 80%,
        75% 65%,
        50% 40%,
        90% 85%,
        10% 50%;
    background-size:
        20px 20px,
        14px 14px,
        24px 24px,
        12px 12px,
        18px 18px,
        16px 16px,
        10px 10px;
    opacity: 0.6;
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.9));
    animation: twinkle 4s infinite ease-in-out alternate;
}

@keyframes twinkle {
    0% { opacity: 0.3; transform: scale(0.9); }
    100% { opacity: 0.7; transform: scale(1.1); }
}

/* 深色模式下的通用覆盖样式 */
[data-theme="dark"] .glass,
[data-theme="dark"] .safecy-card,
[data-theme="dark"] .agent-card.glass,
[data-theme="dark"] .team-card,
[data-theme="dark"] .search-bar,
[data-theme="dark"] .dropdown-menu {
    /* 将 #2D365B 转换为 RGBA 以添加透明度，这里更低一点 */
    background: rgba(45, 54, 91, 0.25) !important; /* 透明度降低到 25% */
    backdrop-filter: blur(20px); /* 恢复模糊效果 */
    -webkit-backdrop-filter: blur(20px);
    border-color: rgba(255,255,255,0.05);
}

/* 深色模式下拉菜单特定样式 (覆盖上面的通用规则，使用用户指定的 #161A27) */
[data-theme="dark"] .dropdown-menu {
    background: rgba(22, 26, 39, 0.4) !important; /* 透明度降低到 0.4 */
    backdrop-filter: blur(24px) saturate(120%); /* 调整为与导航栏一致的模糊效果 */
    -webkit-backdrop-filter: blur(24px) saturate(120%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] .dropdown-menu li a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* 深色模式下移除特定的 Team Card 背景设置，让通用规则生效 */
[data-theme="dark"] .team-card:hover {
    background: rgba(62, 74, 120, 0.8); /* 稍微亮一点的悬停色，带透明度 */
}
/* 针对 .tool-item 的深色模式特殊处理 */
[data-theme="dark"] .tool-item.glass {
    background: rgba(45, 54, 91, 0.25) !important; /* 透明度降低到 25% */
}/* 深色模式下的按钮样式 */
[data-theme="dark"] .btn-primary {
    background: rgba(45, 54, 91, 0.6); /* 按钮也稍微透明一点 */
    color: white;
    border: 1px solid rgba(255,255,255,0.1);
}

[data-theme="dark"] .btn-primary:hover {
    background: rgba(62, 74, 120, 0.9); /* 稍微亮一点的悬停色，带透明度 */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-family);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
    /* 动态背景 - 使用变量 */
    background-image:
        radial-gradient(circle at 15% 50%, var(--bg-gradient-1), transparent 30%),
        radial-gradient(circle at 85% 30%, var(--bg-gradient-2), transparent 30%);
    background-attachment: fixed;
    zoom: 90%;
}

/* 玻璃拟物化通用类 */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(24px) saturate(120%);
    -webkit-backdrop-filter: blur(24px) saturate(120%);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Header */
header.glass {
    position: sticky;
    top: 20px; /* 悬浮效果 */
    z-index: 1000;
    max-width: var(--max-width);
    margin: 0 auto;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.4); /* 降低透明度到 0.4，与深色模式一致 */
    backdrop-filter: blur(24px) saturate(120%);
    -webkit-backdrop-filter: blur(24px) saturate(120%);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: var(--glass-shadow);
}

.header-container {
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.logo img {
    height: 32px;
    width: auto;
}

/* Navigation & Dropdown */
nav > ul {
    display: flex;
    gap: 8px;
    align-items: center;
}

nav > ul > li {
    position: relative;
}

nav a.nav-link {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 6px;
    transition: background 0.2s;
}

nav a.nav-link:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Dropdown Menu */
.dropdown-menu {
    display: block; /* 修复布局问题 */
    position: absolute;
    top: 100%;
    left: 0;
    width: 200px;
    background: rgba(237, 234, 231, 0.369);
    /* 应用液态玻璃效果 */
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 8px;
    opacity: 0;
    transform: translateY(10px);
    visibility: hidden;
    transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
    z-index: 100;
}

nav li:hover .dropdown-menu {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.dropdown-menu li a {
    display: block;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.dropdown-menu li a:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--accent-color);
}

/* Search Bar */
.search-bar {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    padding: 6px 16px;
    width: 240px;
    transition: all 0.2s;
}

.search-bar:focus-within {
    background: rgba(255, 255, 255, 0.9);
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(0, 120, 212, 0.2);
}

.search-bar input {
    border: none;
    background: transparent;
    outline: none;
    margin-left: 8px;
    font-size: 0.9rem;
    color: var(--text-primary);
    width: 100%;
}

.search-icon {
    color: var(--text-secondary);
    width: 16px;
    height: 16px;
}

/* Hero Section */
.hero {
    position: relative;
    padding: 160px 24px 100px;
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: center;
    min-height: 80vh; /* 撑开高度 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
}

.hero h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    font-weight: 700;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #1a1a1a 0%, #4a4a4a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.4rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    font-weight: 400;
}

.video-bg {
        position: fixed;
        right: 0;
        bottom: 0;
        min-width: 100%;
        min-height: 100%;
        width: auto;
        height: auto;
        z-index: -1;
        object-fit: cover;
        pointer-events: none;
        /* 稍微调整位置以防止边缘留白 */
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

.btn-primary {
    display: inline-block;
    padding: 14px 32px;
    background: var(--text-primary);
    color: white;
    border-radius: 99px;
    font-weight: 600;
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
    background: #000;
}

/* Floating Elements Animation */
.hero-floating-elements {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.floating-img {
    position: absolute;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    padding: 10px;
    animation: float 6s ease-in-out infinite;
}

.floating-img.top {
    top: 200px;
    left: 50%;
    width: 120px;
    animation-delay: 0s;
    margin-left: -400px; /* Offset from center */
}

.floating-img.left {
    top: 65%;
    left: 10%;
    width: 140px;
    animation-delay: 1s;
}

.floating-img.right {
    top: 30%;
    right: 10%;
    width: 160px;
    animation-delay: 2s;
}

.floating-img.bottom {
    bottom: 50px;
    left: 60%;
    width: 130px;
    animation-delay: 3s;
}

@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(2deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

/* Section Common */
section {
    padding: 100px 24px;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 60px;
    font-weight: 600;
}

/* Safecy AI */
.safecy-card {
    border-radius: 32px;
    padding: 80px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
    background-color: rgba(239, 231, 222, 0.196);
}

/* Carousel / Features Slider */
.features-slider {
    position: relative;
    overflow: hidden;
    padding: 40px 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.196);
}

.slider-track {
    display: flex;
    /* gap: 30px;  移除 gap，改用 padding 控制间距，防止计算偏移 */
    transition: transform 0.5s cubic-bezier(0.2, 0, 0, 1);
    width: 100%;
}

/* Slide Card */
.slide-card {
    min-width: 100%;
    flex: 0 0 100%;
    /* 移除之前的圆角，改在 inner 设置 */
    border-radius: 0;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: visible; /* 允许 padding 正常工作 */
    padding: 0 20px; /* 关键：增加左右间距，形成卡片之间的空隙 */
    box-sizing: border-box;
}

.slide-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    max-width: 600px;
    padding: 40px;
    /* Glass card inside slide */
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.slide-content h2 {
    font-size: 3rem;
    margin-bottom: 16px;
}

/* Slide Inner Container */
.slide-inner {
    width: 100%;
    height: 100%;
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Slide Backgrounds */
.slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
    transition: transform 6s ease;
}

.slide-bg.search-ai {
    background-image: url('蓝色圆圈背景.png');
}

.slide-bg.read-file {
    background-image: url('黄粉渐变背景.png');
}

.slide-bg.nexus {
    background: linear-gradient(135deg, #e6dace 0%, #d4c5b0 100%); /* 浅咖啡色系 */
    /* 添加一点自然的纹理感或噪点会更好，这里用颜色模拟 */
}

.slide-bg.limb {
    /* 模仿自然天空风景，日落/晨曦的渐变 */
    background: linear-gradient(to bottom, #87CEEB 0%, #E0F6FF 50%, #F4E4C1 100%);
}

.slide-card:hover .slide-bg {
    transform: scale(1.05);
}

.slide-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin: 0 auto 20px;
    background: white;
    border-radius: 24px;
    padding: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}


/* Slider Controls */
.slider-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(0,0,0,0.2);
    cursor: pointer;
    transition: all 0.3s;
}

.dot.active {
    background: var(--text-primary);
    transform: scale(1.2);
}

/* Agents Grid */
.agents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    justify-content: center; /* 确保最后一行的项目居中 */
}

/* Agent Card */
.agent-card.glass {
    background-color: rgba(239, 231, 222, 0.196);
    padding: 40px;
    border-radius: 24px;
    text-align: center;
    transition: transform 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.agent-card.glass:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.5);
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
}

.agent-img {
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
    object-fit: cover; /* 改为 cover 以适应圆角 */
    border-radius: 24px; /* 添加圆角 */
    box-shadow: 0 10px 20px rgba(0,0,0,0.08); /* 添加轻微阴影 */
    background: white; /* 确保透明图片有背景 */
}

.btn-outline {
    margin-top: 24px;
    display: inline-block;
    padding: 8px 24px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 99px;
    font-size: 0.9rem;
    background: rgba(255,255,255,0.5);
    transition: all 0.2s;
}

.btn-outline:hover {
    background: var(--text-primary);
    color: white;
    border-color: transparent;
}

/* Tools Section */
.tool-item {
    display: flex;
    align-items: center;
    padding: 30px;
    margin-bottom: 20px;
    border-radius: 20px;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.4);
}

.tool-item:hover {
    background: rgba(255,255,255,0.4);
}

.tool-icon {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.tool-info h3 {
    margin-bottom: 8px;
    font-size: 1.25rem;
}

/* Team Section */
.team-card {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 12px; /* 减小圆角，更像照片卡 */
    padding: 15px; /* 减小内边距，类似拍立得风格 */
    text-align: center;
    color: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
    box-shadow: 0 10px 40px rgba(93, 74, 58, 0.05);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.team-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(93, 74, 58, 0.12);
    background: rgba(255, 255, 255, 0.95);
}

.avatar-circle {
    width: 100%; /* 宽度占满 */
    height: 220px; /* 固定高度，形成矩形照片区 */
    border-radius: 8px; /* 图片微圆角 */
    margin: 0 0 20px 0;
    overflow: hidden;
    background: #f0e6d8;
    box-shadow: none; /* 移除之前的投影 */
    border: none; /* 移除之前的边框 */
}

.avatar-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 保持比例填充 */
    transition: transform 0.5s ease;
}

.team-card:hover .avatar-circle img {
    transform: scale(1.05); /* 悬停微放大 */
}

/* 移除之前的特定样式覆盖 */
.team-card:nth-child(n) .avatar-circle {
    background: #f0e6d8;
    box-shadow: none;
}

.member-name {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.member-role {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-weight: 500;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-top: auto; /* 推到底部 */
}

.tag {
    background: rgba(255, 255, 255, 0.5);
    padding: 4px 10px;
    border-radius: 6px; /* 方形圆角标签 */
    font-size: 0.75rem;
    color: #5d4a3a;
    border: 1px solid rgba(93, 74, 58, 0.1);
    font-weight: 500;
    transition: all 0.2s;
}

.team-card:hover .tag {
    border-color: rgba(0, 0, 0, 0.2);
    background: rgba(0, 0, 0, 0.02);
}

/* Footer */
footer {
    margin-top: 100px;
    padding: 60px 24px;
    background: white;
    border-top: 1px solid rgba(0,0,0,0.05);
}

/* Theme Toggle Button */
.theme-toggle {
    width: 20px;
    height: 20px;
    border: 2px solid var(--toggle-color);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    /* 移除绝对定位，使用 Flex 布局控制位置 */
    position: relative;
    margin-left: 24px; /* 与搜索框保持合理距离 */
    overflow: hidden;
}

nav {
    flex: 1; /* 让导航栏占据中间剩余空间，从而推挤 Logo 和 Search/Toggle 到两边 */
    display: flex;
    justify-content: center;
}

/* 浮动图片在深色模式下的背景色 */
[data-theme="dark"] .floating-img {
    background-color: #262B41 !important; /* 透明度不变，仅改颜色 */
    /* 保持原有的不透明度设置 */
}
.theme-toggle::after {
    display: none;
}
[data-theme="dark"] .theme-toggle::after {
    display: none;
}

/* 确保 header 容器有相对定位 */
.header-container {
    position: relative;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

.theme-toggle::after {
    content: '';
    width: 100%;
    height: 100%;
    background: var(--toggle-color);
    border-radius: 50%;
    transform: scale(0); /* 默认空心 */
    transition: transform 0.3s ease;
}

[data-theme="dark"] .theme-toggle::after {
    transform: scale(0.6); /* 深色模式显示实心点 */
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .header-container {
        padding: 0 16px;
    }
    
    .search-bar {
        display: none;
    }
    
    nav ul {
        display: none; /* 暂时隐藏，后续可添加汉堡菜单 */
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .floating-img {
        opacity: 0.3; /* 降低不透明度防止遮挡 */
        transform: scale(0.7); /* 缩小尺寸 */
    }
    
    .agents-grid {
        grid-template-columns: 1fr; /* 单列布局 */
        padding: 0 20px;
    }
    
    .features-slider {
        padding: 20px 0;
    }
    
    .slide-card {
        height: 400px; /* 减小高度 */
        padding: 0 10px;
    }
    
    .slide-content h2 {
        font-size: 2rem;
    }
    
    .team-card {
        margin-bottom: 20px;
    }
    
    /* 移动端保留 Logo 和 主题切换 */
    .header-container {
        justify-content: space-between;
    }
}
