* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    color: #2c3e50;
    line-height: 1.6;
    background: linear-gradient(to bottom, #f8f9fa, #e9ecef);
    padding-top: 80px;
    transition: padding-top 0.4s ease;
}

/* 进度条样式 - 增强版 */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 6px;
    background: linear-gradient(90deg, #20B2AA, #40E0D0, #48D1CC);
    z-index: 1200;
    transition: width 0.3s ease;
    box-shadow: 0 0 15px rgba(32, 178, 170, 0.8);
}

/* 导航栏基础样式 */
#menu {
    background: linear-gradient(135deg, rgba(224, 247, 250, 0.98) 0%, rgba(178, 235, 242, 0.98) 100%);
    height: 80px;
    backdrop-filter: blur(10px);
    border-bottom: 3px solid #20B2AA;
    box-shadow: 0 4px 20px rgba(32, 178, 170, 0.25);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1100;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    padding: 0;
    transform: translateY(0);
}

/* 滚动时完全隐藏导航栏，只显示进度条 */
#menu.scrolled {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

/* 容器调整 */
#menu .container {
    display: flex;
    align-items: center;
    height: 80px;
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    justify-content: space-between;
    transition: all 0.4s ease;
}

/* ===== 左侧Logo和标题样式 ===== */
.navbar-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    z-index: 1200;
    transition: all 0.4s ease;
    flex-shrink: 0;
    margin-right: 30px;
}

.logo-container {
    display: flex;
    align-items: center;
    transition: all 0.4s ease;
    gap: 15px;
}

.team-logo {
    width: 120px;
    height: 120px;
    filter: drop-shadow(0 3px 8px rgba(32, 178, 170, 0.4));
    transition: all 0.4s ease;
    border-radius: 50%;
    object-fit: cover;
}

.team-name-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}

.project-name-main {
    color: #20B2AA !important;
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 3px;
    white-space: nowrap;
    font-family: 'Comic Sans MS', 'Arial Rounded MT Bold', 'Segoe UI Emoji', cursive;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.1);
    transition: all 0.4s ease;
    letter-spacing: 1.5px;
}

.team-name-sub {
    color: #40E0D0 !important;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    font-family: 'Comic Sans MS', 'Arial Rounded MT Bold', 'Segoe UI Emoji', cursive;
    transition: all 0.4s ease;
    letter-spacing: 0.8px;
}

/* ===== 导航菜单样式 ===== */
#menu .navbar-collapse {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    transition: all 0.4s ease;
    max-width: 800px;
}

#menu .navbar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0;
    padding: 0;
    gap: 0;
    width: 100%;
}

#menu .navbar-nav .nav-item {
    text-align: center;
    flex: 1;
    max-width: 110px;
}

/* 增大导航链接字体大小 */
#menu .navbar-nav .nav-item .nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 5px;
    margin: 0;
    height: 80px;
    border-radius: 0;
    color: #20B2AA !important;
    font-size: 18px !important;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    background: transparent;
    border: none;
    font-family: 'Comic Sans MS', 'Arial Rounded MT Bold', 'Segoe UI Emoji', cursive;
    position: relative;
    text-decoration: none;
}

/* 悬停效果 */
#menu .navbar-nav .nav-item .nav-link:hover {
    color: #008B8B !important;
    background: rgba(32, 178, 170, 0.15);
    transform: translateY(-2px);
}

#menu .navbar-nav .nav-item .nav-link:hover::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 15%;
    width: 70%;
    height: 4px;
    background: linear-gradient(90deg, #20B2AA, #40E0D0);
    border-radius: 2px;
}

.nav-text {
    font-size: 18px !important;
    font-weight: 700;
    letter-spacing: 0.5px;
    font-family: 'Comic Sans MS', 'Arial Rounded MT Bold', 'Segoe UI Emoji', cursive;
    color: #20B2AA !important;
}

/* ===== 隐藏下拉菜单的小三角 ===== */
.dropdown-toggle::after {
    display: none !important;
}

/* ===== 下拉菜单优化 - 重新设计 ===== */
.dropdown-menu {
    background: rgba(255, 255, 255, 0.98) !important;
    border: 1px solid rgba(32, 178, 170, 0.2) !important;
    border-radius: 12px !important;
    backdrop-filter: blur(20px) !important;
    box-shadow: 0 8px 32px rgba(32, 178, 170, 0.15) !important;
    margin-top: 8px !important;
    padding: 8px 0 !important;
    overflow: hidden;
    min-width: 200px !important;
    transform: translateY(10px) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

/* 显示下拉菜单 */
.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

.dropdown-item {
    color: #2c3e50 !important;
    padding: 12px 20px !important;
    border-radius: 8px !important;
    margin: 2px 8px !important;
    transition: all 0.3s ease !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
    text-decoration: none !important;
    display: block !important;
    background: transparent !important;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, #20B2AA, #40E0D0) !important;
    color: white !important;
    transform: translateX(4px) !important;
}

.dropdown-item:last-child {
    border-bottom: none !important;
}

/* 下拉菜单箭头 */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    background: white;
    border-top: 1px solid rgba(32, 178, 170, 0.2);
    border-left: 1px solid rgba(32, 178, 170, 0.2);
    transform: translateX(-50%) rotate(45deg);
}

/* 确保下拉菜单在移动端也有良好的体验 */
@media (max-width: 992px) {
    .dropdown-menu {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        width: 100% !important;
        margin-top: 0 !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        background: rgba(240, 253, 254, 0.95) !important;
    }
    
    .dropdown-item {
        padding: 15px 25px !important;
        margin: 0 !important;
        border-radius: 0 !important;
        border-bottom: 1px solid #e0f2f1 !important;
    }
    
    .dropdown-item:hover {
        background: rgba(32, 178, 170, 0.1) !important;
        color: #20B2AA !important;
        transform: none !important;
    }
    
    /* 隐藏移动端的下拉箭头 */
    .dropdown-menu::before {
        display: none;
    }
}

/* ===== 移动端菜单按钮 ===== */
.navbar-toggler {
    border: 2px solid #20B2AA;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2832, 178, 170, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='3' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* 页面内容 */
.content-section {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
}

.content-section h1 {
    color: #20B2AA !important;
    font-size: 3rem;
    margin-bottom: 1rem;
    font-family: 'Comic Sans MS', 'Arial Rounded MT Bold', 'Segoe UI Emoji', cursive;
}

.content-section h2 {
    color: #40E0D0 !important;
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    font-family: 'Comic Sans MS', 'Arial Rounded MT Bold', 'Segoe UI Emoji', cursive;
}

.content-section h3 {
    color: #20B2AA !important;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-family: 'Comic Sans MS', 'Arial Rounded MT Bold', 'Segoe UI Emoji', cursive;
}

.content-section p {
    margin-bottom: 1rem;
    line-height: 1.8;
    font-size: 1.1rem;
}

/* 自定义浏览器滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: linear-gradient(to bottom, #e0f7fa, #b2ebf2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #20B2AA, #40E0D0);
    border-radius: 4px;
    border: 1px solid #e0f7fa;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #008B8B, #20B2AA);
}

/* 隐藏滚动条上的箭头按钮 */
::-webkit-scrollbar-button {
    display: none;
}

/* 隐藏角落 */
::-webkit-scrollbar-corner {
    display: none !important;
    background: transparent !important;
}

/* 针对Firefox的滚动条样式 */
* {
    scrollbar-width: thin;
    scrollbar-color: #20B2AA #e0f7fa;
}

/* 响应式设计 */
@media (max-width: 1400px) {
    #menu .container {
        max-width: 100%;
        padding: 0 15px;
    }
    
    #menu .navbar-nav .nav-item {
        max-width: 100px;
    }
    
    .project-name-main {
        font-size: 2.4rem;
    }
    
    .team-name-sub {
        font-size: 1.3rem;
    }
    
    .team-logo {
        width: 100px;
        height: 100px;
    }
    
    #menu .navbar-nav .nav-item .nav-link {
        font-size: 17px !important;
    }
    
    .nav-text {
        font-size: 17px !important;
    }
}

@media (max-width: 1200px) {
    .project-name-main {
        font-size: 2.2rem;
    }
    
    .team-name-sub {
        font-size: 1.1rem;
    }
    
    .team-logo {
        width: 90px;
        height: 90px;
    }
    
    #menu .navbar-nav .nav-item {
        max-width: 90px;
    }
    
    #menu .navbar-nav .nav-item .nav-link {
        font-size: 16px !important;
    }
    
    .nav-text {
        font-size: 16px !important;
    }
    
    .content-section h1 {
        font-size: 2.5rem;
    }
    
    .content-section h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 992px) {
    #menu .navbar-brand {
        margin-right: auto;
    }
    
    .logo-container {
        gap: 12px;
    }
    
    .team-logo {
        width: 80px;
        height: 80px;
    }
    
    .project-name-main {
        font-size: 1.8rem;
    }
    
    .team-name-sub {
        font-size: 1rem;
    }
    
    #menu .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(224, 247, 250, 0.98);
        backdrop-filter: blur(20px);
        border-top: 3px solid #20B2AA;
        box-shadow: 0 5px 20px rgba(32, 178, 170, 0.3);
        max-width: none;
        transition: all 0.4s ease;
    }
    
    #menu .navbar-nav {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 10px 0;
    }
    
    #menu .navbar-nav .nav-item {
        text-align: left;
        width: 100%;
        max-width: none;
        border-bottom: 1px solid #e0f2f1;
    }
    
    #menu .navbar-nav .nav-item .nav-link {
        flex-direction: row;
        justify-content: flex-start;
        height: auto;
        padding: 15px 25px;
        border-radius: 0;
        margin: 0;
        font-size: 18px !important;
    }
    
    .nav-text {
        font-size: 18px !important;
    }
    
    #menu .navbar-nav .nav-item .nav-link:hover::after {
        display: none;
    }
    
    body {
        padding-top: 0;
    }
    
    .content-section h1 {
        font-size: 2.2rem;
    }
    
    .content-section h2 {
        font-size: 1.6rem;
    }
    
    .dropdown-toggle::after {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .project-name-main {
        font-size: 1.6rem;
    }
    
    .team-name-sub {
        font-size: 0.9rem;
    }
    
    .team-logo {
        width: 70px;
        height: 70px;
    }
    
    #menu .container {
        padding: 0 10px;
    }
    
    #menu .navbar-nav .nav-item .nav-link {
        font-size: 17px !important;
    }
    
    .nav-text {
        font-size: 17px !important;
    }
    
    .content-section {
        padding: 1.5rem;
        margin: 2rem auto;
    }
    
    .content-section h1 {
        font-size: 2rem;
    }
    
    .content-section h2 {
        font-size: 1.4rem;
    }
}

@media (max-width: 576px) {
    .logo-container {
        gap: 8px;
    }
    
    .team-logo {
        width: 60px;
        height: 60px;
    }
    
    .project-name-main {
        font-size: 1.4rem;
    }
    
    .team-name-sub {
        font-size: 0.8rem;
    }
    
    #menu .navbar-nav .nav-item .nav-link {
        font-size: 16px !important;
    }
    
    .nav-text {
        font-size: 16px !important;
    }
    
    .content-section {
        padding: 1rem;
        margin: 1.5rem auto;
    }
    
    .content-section h1 {
        font-size: 1.8rem;
    }
    
    .content-section h2 {
        font-size: 1.2rem;
    }
}

/* 回到顶部按钮 */
#backToTop {
    position: fixed !important;
    bottom: 70px !important;
    right: 0px !important;
    width: 280px !important;
    height: 280px !important;
    background: url('https://static.igem.wiki/teams/5543/top/top.webp') no-repeat center center !important;
    background-size: contain !important;
    cursor: pointer !important;
    z-index: 10000 !important;
    display: block !important; /* 改为block */
    background-color: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    transition: opacity 0.3s ease, visibility 0.3s ease !important; /* 添加过渡效果 */
    opacity: 0 !important; /* 初始隐藏 */
    visibility: hidden !important; /* 初始隐藏 */
}

/* 滚动时显示 */
#backToTop.show {
    opacity: 1 !important;
    visibility: visible !important;
}

/* 响应式设计保持不变... */

/* 备用样式 - 当图片加载失败时，显示简单箭头（同样无悬停效果） */
#backToTop:not([style*="background-image"]) {
    background: transparent !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #20B2AA !important;
    font-size: 140px !important;
    font-weight: bold !important;
    text-shadow: none !important;
    /* 确保箭头也没有任何悬停效果 */
    transition: none !important;
    transform: none !important;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    #backToTop {
        width: 240px !important;
        height: 240px !important;
        right: 25px !important; /* 相应调整位置 */
    }
    
    #backToTop:not([style*="background-image"]) {
        font-size: 120px !important;
    }
}

@media (max-width: 992px) {
    #backToTop {
        width: 200px !important;
        height: 200px !important;
        bottom: 60px !important;
        right: 20px !important; /* 相应调整位置 */
    }
    
    #backToTop:not([style*="background-image"]) {
        font-size: 100px !important;
    }
}

@media (max-width: 768px) {
    #backToTop {
        width: 160px !important;
        height: 160px !important;
        bottom: 50px !important;
        right: 15px !important; /* 相应调整位置 */
    }
    
    #backToTop:not([style*="background-image"]) {
        font-size: 80px !important;
    }
}

@media (max-width: 576px) {
    #backToTop {
        width: 120px !important;
        height: 120px !important;
        bottom: 40px !important;
        right: 10px !important; /* 相应调整位置 */
    }
    
    #backToTop:not([style*="background-image"]) {
        font-size: 60px !important;
    }
}
