/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Arial, sans-serif;
}

/* 浅色模式变量 - 默认主题 */
:root {
    --primary-color: #5170b4; 
    --text-color: #34495e;
    --bg-color: #ffffff; /* 白色背景 */
    --card-bg: #f8f9fa;
    --border-color: #eaecef;
    --shadow: 0 1px 2px rgba(0,0,0,0.05);
    /* 间距变量 */
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
}

/* 深色模式变量 */
[data-theme="dark"] {
    --primary-color: #5170b4;
    --text-color: #eaecef;
    --bg-color: #1a1a1a; /* 深色背景 */
    --card-bg: #2d2d2d; /* 深色卡片背景 */
    --border-color: #444444;
    --shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* 全局背景设置 */
body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* 头部样式 */
.header {
    background: var(--bg-color);
    color: var(--text-color);
    padding: var(--spacing-sm) 5%; /* 进一步减小上下内边距至sm */
    margin-bottom: var(--spacing-md); /* 减小底部外边距 */
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.logo-and-name {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs); /* 最小化Logo和文字间距 */
}

.team-info {
    display: flex;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo-and-name {
    display: flex;
    align-items: center; /* Logo和文字垂直居中对齐 */
    gap: var(--spacing-md); /* Logo和文字之间的间距 */
}

/* 添加header-actions样式 */
.header-actions {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
}

/* 修改GitHub链接样式 */
.github-link {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.github-link:hover {
    color: var(--primary-color);
}

/* 修改深色模式切换按钮样式 */
.theme-toggle {
    padding: 0.5rem;
    border-radius: 50%;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    transition: all 0.2s ease;
}

/* 添加滚动隐藏效果样式 */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.3s ease;
}

.header.hidden-actions .header-actions {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
}

.header-actions {
    transition: all 0.3s ease;
}

.team-name {
    font-size: 1.8rem;
    font-weight: 700;
    margin-right: 0;
    color: var(--primary-color);
    text-align: left;
}

.team-logo {
    height: 60px;
    border-radius: 4px;
    margin-right: 0;
}

.plugin-image {
    width: 70%;
}

/* 内容区域样式 */
.content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 5%;
}

.plugin-intro {
    background: var(--card-bg);
    padding: var(--spacing-xl);
    border-radius: 6px;
    box-shadow: var(--shadow);
    margin-bottom: var(--spacing-xl);
    border: 1px solid var(--border-color);
}

.plugin-intro h2 {
    color: var(--text-color);
    font-size: 1.5rem;
    margin-bottom: var(--spacing-lg);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.intro-text {
    font-size: 1.1rem;
    color: var(--text-color);
    line-height: 1.8;
}

iframe {
    width: 80%;
    height: 300px;
}

/* 链接按钮区域 */
.links-section {
    background: var(--card-bg);
    padding: var(--spacing-xl);
    border-radius: 6px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.links-section h3 {
    color: var(--text-color);
    font-size: 1.5rem;
    margin-bottom: var(--spacing-xl);
}

.button-group {
    display: flex;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
    margin-top: var(--spacing-md);
}

.btn {
    padding: 0.6rem 1.5rem;
    background: var(--primary-color);
    color: white; /* 按钮文字始终为白色以确保对比度 */
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
}

.btn:hover {
    background: #359469;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 深色模式切换按钮 - 确保可见 */
.theme-toggle {
    position: fixed;
    top: var(--spacing-md);
    right: var(--spacing-md);
    padding: 0.5rem;
    border-radius: 50%;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    cursor: pointer;
    z-index: 1000;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
}

/* GitHub链接样式 */
.github-link {
    position: fixed;
    top: var(--spacing-md);
    right: calc(var(--spacing-md) + 50px); /* 位于主题切换按钮左侧 */
    color: var(--text-color);
    text-decoration: none;
    z-index: 1000;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.github-link:hover {
    color: var(--primary-color);
}


/* 底部关于栏样式 */
.footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    margin-top: var(--spacing-xl);
    padding: var(--spacing-xl) 0;
}

.footer-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.footer-section {
    margin-bottom: var(--spacing-lg);
}

.footer-section h4 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
    font-size: 1.2rem;
}

/* 添加友情链接样式 */
.friend-links {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.footer-link {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: var(--text-color);
    text-decoration: underline;
}

.footer-bottom {
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.8;
}

/* 团队介绍区域样式 - 优化版 */
.team-intro {
    max-width: 800px; /* 缩小容器宽度 */
    margin: 0 auto 4rem; /* 容器完全居中 */
    padding: 0 var(--spacing-md);
    width: 100%;
}

.team-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.1;
    text-align: left;
    margin-left: 0;
    margin-right: 0;
    /* 增强蓝紫渐变效果 - 使用更鲜明的颜色对比 */
    background: linear-gradient(90deg, #0051ff, #b400cc, #ec4899);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    /* 添加文字阴影增强视觉效果 */
    text-shadow: 0 0 2px rgba(0,0,0,0.1);
}

.team-description {
    font-size: 1.5rem; /* 显著增大描述文本 */
    color: var(--text-color);
    line-height: 1.6;
    max-width: 700px;
    margin-left: 0;
}


/* 顶部链接栏样式 */
.top-nav {
    background-color: var(--primary-color);
    padding: 0.5rem 5%;
    margin: var(--spacing-lg) 0;
}

.mobile-top-nav {
    background-color: var(--primary-color);
    padding: 0.5rem 5%;
    margin: var(--spacing-lg) 0;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 0;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: white;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* 汉堡菜单样式 */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu {
    display: none;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 5%;
}

.mobile-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mobile-action-link {
    color: var(--text-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mobile-theme-toggle {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.products-dropdown {
    position: relative;
    display: inline-block;
}


.products-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 0;
    position: relative;
    cursor: pointer;
    display: flex; /* 添加flex布局 */
    align-items: center; /* 垂直居中文字 */
    height: 100%; /* 与其他导航项保持相同高度 */
}


.products-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: white;
    transition: width 0.3s ease;
}

.products-link:hover::after {
    width: 100%;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--card-bg);
    min-width: 160px;
    box-shadow: var(--shadow);
    z-index: 1;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    top: calc(100% + 10px); /* 增加距离，避免紧贴导航栏 */
    left: 50%;
    transform: translateX(-50%);
}

.products-dropdown {
    position: relative;
    display: inline-block;
    vertical-align: middle;
    height: 100%;
}

.products-dropdown.active .dropdown-content {
    display: block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--card-bg);
    min-width: 180px; /* 加宽菜单 */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); /* 增强阴影效果 */
    z-index: 100; /* 提高层级避免被遮挡 */
    border-radius: 8px; /* 更大圆角 */
    border: 1px solid var(--border-color);
    top: calc(100% + 8px); /* 调整距离 */
    left: 50%;
    transform: translateX(-50%) translateY(-10px); /* 添加初始位移 */
    transition: all 0.3s ease; /* 过渡动画 */
    overflow: hidden; /* 裁剪溢出内容 */
}


.dropdown-content .dropdown-item {
    color: var(--text-color);
    padding: 10px 16px; /* 调整内边距 */
    text-decoration: none;
    display: block;
    text-align: left;
    transition: all 0.2s ease; /* 菜单项过渡 */
}

/* 产品介绍栏样式 */
.products-intro {
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    margin: var(--spacing-xl) 0;
    overflow: hidden;
}

.products-container {
    display: flex;
    flex-wrap: wrap;
}

.products-image {
    flex: 1;
    min-width: 300px;
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}


.products-content {
    flex: 1.5;
    min-width: 300px;
    padding: var(--spacing-xl);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.products-title {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: var(--spacing-lg);
    position: relative;
    padding-bottom: 0.5rem;
}

.products-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
}

.products-description {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: var(--spacing-xl);
    color: var(--text-color);
}

.products-buttons {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.mobile-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* 移动导航链接样式 */
.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border-color);
    margin-top: 1rem;
}

.mobile-nav-link {
    color: var(--text-color);
    text-decoration: none;
    padding: 0.6rem 0;
    font-size: 1rem;
    position: relative;
    transition: color 0.2s ease;
}

.mobile-nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.mobile-nav-link:hover {
    color: var(--primary-color);
}

.mobile-nav-link:hover::after {
    width: 100%;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header {
        padding: var(--spacing-xs) 5%;
    }

    .team-title {
        font-size: 2.2rem;
    }

    .team-description {
        font-size: 1.2rem;
    }

    .team-name {
        font-size: 1.2rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 180px;
        margin-right: 0;
    }

    .team-logo {
        height: 50px;
    }

    .intro-text {
        font-size: 1rem;
    }

    .button-group {
        flex-direction: column;
        gap: var(--spacing-md);
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .plugin-image {
        width: 100%;
        height: auto;
    }

    .plugin-intro {
        padding: var(--spacing-lg);
    }

    .iframe {
        width: 100%;
        height: 200px;
    }

    .mobile-menu-toggle {
        display: block !important;
        z-index: 101;
    }

    .header-actions.desktop-only {
        display: none;
    }

    .top-nav {
        display: none;
    }

    .team-info {
        align-items: center;
        width: 100%;
    }

    .logo-and-name {
        gap: 0.5rem;
        min-width: 0;
        margin-right: 0;
    }

    .nav-links {
        gap: 0.8rem;
    }

    .nav-link {
        font-size: 0.9rem;
    }
   
    .products-link {
        padding: 0.4rem 0;
    }


}