/* 基础重置和原有样式 */
body { 
  padding-top: 80px; /* 增加padding以适应新的导航栏 */
  margin: 0;
  box-sizing: border-box;
  background-color: #2c3e50; /* 设置背景色与footer一致 */
}

/* 确保页面内容区域背景 */
.diabetes-project-page {
  background-color: #2c3e50;
  min-height: calc(100vh - 80px);
}

.left-aligned { margin-left: auto; }
.bg-dark { background-color: #343a40 !important; }
.bg-hero { background-color: #45b06cff; }

/* CALLOUT */
.bd-callout { padding:1.25rem; margin-top:1.25rem; margin-bottom:1.25rem; border:1px solid #e9ecef; border-left-width:.25rem; border-radius:.25rem }
.bd-callout h4 { margin-bottom: 1.25rem }
.bd-callout p:last-child { margin-bottom:0 }
.bd-callout code { border-radius:.25rem }
.bd-callout+.bd-callout { margin-top:-.25rem }
.bd-callout-info { border-left-color:#5bc0de }
.bd-callout-warning { border-left-color:#f0ad4e }
.bd-callout-danger { border-left-color:#d9534f }

/* 顶部导航栏样式 */
.top-navbar {
  background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
  padding: 1rem 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(244, 208, 63, 0.2);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  position: relative;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.logo-section:hover {
  transform: scale(1.05);
}

.nav-logo {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e67e22, #d35400);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(230, 126, 34, 0.4);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.logo-title {
  font-size: 1.2rem;
  font-weight: 900;
  color: #f4d03f;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.logo-subtitle {
  font-size: 0.8rem;
  font-weight: 600;
  color: #ecf0f1;
  opacity: 0.8;
}

.nav-menu {
  display: flex;
  gap: 0.5rem;
  position: relative;
  background: rgba(52, 73, 94, 0.3);
  border-radius: 25px;
  padding: 0.5rem;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(244, 208, 63, 0.1);
}

.nav-item {
  color: #ecf0f1;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.8rem 1.5rem;
  border-radius: 20px;
  position: relative;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 1;
}

.nav-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #f4d03f, #f7dc6f);
  border-radius: 20px;
  transform: scale(0);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
}

.nav-item:hover {
  color: #2c3e50;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(244, 208, 63, 0.3);
}

.nav-item:hover::before {
  transform: scale(1);
}

.nav-item.active {
  color: #2c3e50;
  background: linear-gradient(135deg, #f4d03f, #f7dc6f);
  box-shadow: 
    0 4px 15px rgba(244, 208, 63, 0.4),
    inset 0 2px 4px rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
  font-weight: 700;
}

.nav-item.active::before {
  transform: scale(1);
}

/* 移动端汉堡菜单 */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  gap: 4px;
  z-index: 1001;
}

.hamburger-line {
  width: 25px;
  height: 3px;
  background: #f4d03f;
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* 页脚样式 */
.site-footer {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  color: #ecf0f1;
  padding: 2rem 0;
  margin-top: 3rem;
  position: relative;
  border-top: 3px solid #1abc9c;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 3rem;
}

.footer-left {
  flex: 1;
  max-width: 600px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.footer-title {
  font-size: 1.8rem;
  font-weight: bold;
  color: #f4d03f;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.footer-logo-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e67e22;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(230, 126, 34, 0.4);
}

.footer-logo-img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
}

.footer-contact {
  margin-bottom: 1.5rem;
}

.contact-item {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.contact-label {
  font-weight: 600;
  color: #f4d03f;
  min-width: 60px;
}

.contact-value {
  color: #bdc3c7;
}

.footer-copyright {
  font-size: 0.8rem;
  line-height: 1.6;
  color: #95a5a6;
}

.footer-copyright p {
  margin-bottom: 0.5rem;
}

.copyright-link,
.repo-link {
  color: #1abc9c;
  text-decoration: underline;
  transition: color 0.3s ease;
}

.copyright-link:hover,
.repo-link:hover {
  color: #16a085;
}

.footer-right {
  flex: 0 0 200px;
  display: flex;
  justify-content: flex-end;
}

.social-icons {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.social-icon {
  width: 50px;
  height: 50px;
  background: #5d6d7e;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.social-icon:hover {
  transform: translateY(-3px);
  background: #6c7b8b;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.icon-placeholder {
  width: 24px;
  height: 24px;
  background: #95a5a6;
  border-radius: 4px;
  opacity: 0.7;
}

/* 响应式设计 */
@media (max-width: 768px) {
  body {
    padding-top: 70px;
  }
  
  .top-navbar {
    padding: 0.8rem 0;
  }
  
  .nav-container {
    padding: 0 1rem;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .nav-menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    flex-direction: column;
    gap: 0;
    padding: 1rem 0;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-radius: 0;
    border: none;
    backdrop-filter: blur(20px);
  }
  
  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  .nav-item {
    padding: 1rem 2rem;
    border-radius: 0;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(244, 208, 63, 0.1);
    text-transform: none;
    letter-spacing: normal;
  }
  
  .nav-item:last-child {
    border-bottom: none;
  }
  
  .nav-item::before {
    border-radius: 0;
  }
  
  .nav-item:hover {
    transform: translateX(10px);
    box-shadow: none;
  }
  
  .nav-item.active {
    transform: translateX(10px);
    box-shadow: none;
    border-left: 4px solid #f4d03f;
  }
  
  .footer-content {
    flex-direction: column;
    gap: 2rem;
  }
  
  .footer-right {
    flex: none;
    justify-content: center;
  }
  
  .footer-logo {
    justify-content: center;
  }
  
  .contact-item {
    flex-direction: column;
    gap: 0.2rem;
  }
  
  .contact-label {
    min-width: auto;
  }
  
  .footer-copyright {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .site-footer {
    padding: 1.5rem 0;
  }
  
  .footer-content {
    padding: 0 1rem;
  }
  
  .footer-title {
    font-size: 1.5rem;
  }
  
  .social-icons {
    gap: 0.5rem;
  }
  
  .social-icon {
    width: 40px;
    height: 40px;
  }
  
  .icon-placeholder {
    width: 20px;
    height: 20px;
  }
}

/* 防止移动端菜单打开时页面滚动 */
body.menu-open {
  overflow: hidden;
}

/* 导航栏滚动效果 */
.top-navbar.scrolled {
  background: rgba(44, 62, 80, 0.95);
  backdrop-filter: blur(20px);
  box-shadow: 0 2px 30px rgba(0, 0, 0, 0.3);
}

/* 下拉菜单样式 */
.nav-dropdown {
  position: relative;
  display: inline-block;
}

/* 确保我们的下拉菜单覆盖Bootstrap样式 */
.nav-menu .nav-dropdown {
  position: relative;
}

.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

/* 禁用Bootstrap默认的下拉箭头 */
.dropdown-toggle::after {
  display: none !important;
}

/* 下拉菜单toggle按钮的active状态 */
.dropdown-toggle.active {
  color: #2c3e50 !important;
  background: linear-gradient(135deg, #f4d03f, #f7dc6f) !important;
  box-shadow: 
    0 4px 15px rgba(244, 208, 63, 0.4),
    inset 0 2px 4px rgba(255, 255, 255, 0.3) !important;
  transform: translateY(-1px) !important;
  font-weight: 700 !important;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.dropdown-toggle.active::before {
  transform: scale(1) !important;
}

/* 确保下拉菜单toggle在active状态下保持稳定 */
.nav-dropdown .dropdown-toggle.active {
  position: relative;
  z-index: 2;
}

/* 防止鼠标悬停时覆盖active状态 */
.dropdown-toggle.active:hover {
  color: #2c3e50 !important;
  background: linear-gradient(135deg, #f4d03f, #f7dc6f) !important;
  transform: translateY(-1px) !important;
}

.dropdown-arrow {
  font-size: 0.8rem;
  transition: transform 0.3s ease;
}

.nav-dropdown:hover .dropdown-arrow {
  transform: rotate(180deg);
}

.nav-dropdown .dropdown-menu {
  position: absolute !important;
  top: 100% !important;
  left: 50% !important;
  transform: translateX(-50%) translateY(-10px) !important;
  background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%) !important;
  border-radius: 12px !important;
  padding: 0.5rem 0 !important;
  margin-top: 0.5rem !important;
  min-width: 150px !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3) !important;
  border: 1px solid rgba(244, 208, 63, 0.2) !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  z-index: 1001 !important;
  display: block !important;
  float: none !important;
  width: auto !important;
  margin: 0.5rem 0 0 0 !important;
  font-size: inherit !important;
  text-align: left !important;
  list-style: none !important;
  background-clip: padding-box !important;
}

.nav-dropdown:hover .dropdown-menu {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateX(-50%) translateY(0) !important;
}

.nav-dropdown .dropdown-item {
  display: block !important;
  color: #ecf0f1 !important;
  text-decoration: none !important;
  padding: 0.8rem 1.5rem !important;
  font-weight: 500 !important;
  font-size: 0.9rem !important;
  transition: all 0.3s ease !important;
  border-radius: 8px !important;
  margin: 0.2rem 0.5rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.3px !important;
  background: transparent !important;
  white-space: nowrap !important;
  border: 0 !important;
  outline: 0 !important;
}

.nav-dropdown .dropdown-item:hover,
.nav-dropdown .dropdown-item:focus {
  background: linear-gradient(135deg, #f4d03f, #f7dc6f) !important;
  color: #2c3e50 !important;
  transform: translateX(5px) !important;
  text-decoration: none !important;
  border-radius: 8px !important;
}

.nav-dropdown .dropdown-item:first-child {
  border-radius: 8px !important;
  margin-top: 0.5rem !important;
}

.nav-dropdown .dropdown-item:last-child {
  border-radius: 8px !important;
  margin-bottom: 0.5rem !important;
}

.dropdown-item:first-child {
  border-radius: 12px 12px 0 0;
}

.dropdown-item:last-child {
  border-radius: 0 0 12px 12px;
}

/* Attribution 页面样式 */
.attribution-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  background-color: #2c3e50;
  min-height: 100vh;
}

.attribution-header {
  text-align: center;
  margin-bottom: 3rem;
}

.page-title {
  font-size: 2.5rem;
  font-weight: 900;
  color: #f4d03f;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.header-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.arrow-text {
  background: linear-gradient(135deg, #f4d03f, #f7dc6f);
  color: #2c3e50;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9rem;
}

.arrow-line {
  width: 100px;
  height: 3px;
  background: linear-gradient(90deg, #f4d03f, transparent);
  position: relative;
}

.arrow-line::after {
  content: '';
  position: absolute;
  right: -8px;
  top: -5px;
  width: 0;
  height: 0;
  border-left: 8px solid #f4d03f;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}

.attribution-photo-section {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 3rem;
  background: rgba(52, 73, 94, 0.3);
  border-radius: 20px;
  padding: 2rem;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(244, 208, 63, 0.1);
}

.photo-container {
  flex: 1;
}

.attribution-team-photo {
  width: 100%;
  max-width: 650px;
  height: auto;
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  filter: brightness(1.05) contrast(1.05);
  transition: transform 0.3s ease, filter 0.3s ease;
}

.attribution-team-photo:hover {
  transform: scale(1.02);
  filter: brightness(1.1) contrast(1.1);
}

.photo-caption {
  margin-top: 1rem;
  text-align: center;
}

.photo-caption h2 {
  color: #f4d03f;
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0;
}

.attribution-badge {
  background: linear-gradient(135deg, #f4d03f, #f7dc6f);
  border-radius: 15px;
  padding: 1.5rem;
  box-shadow: 0 8px 25px rgba(244, 208, 63, 0.3);
  transform: rotate(-5deg);
}

.badge-text {
  color: #2c3e50;
  font-size: 1.5rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.attribution-members-section {
  margin-bottom: 3rem;
}

.section-header {
  text-align: center;
  margin-bottom: 2rem;
}

.section-header h2 {
  color: #f4d03f;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.header-underline {
  width: 100px;
  height: 3px;
  background: linear-gradient(90deg, #f4d03f, #f7dc6f);
  margin: 0 auto;
  border-radius: 2px;
}

.members-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.member-card {
  background: rgba(52, 73, 94, 0.4);
  border-radius: 15px;
  padding: 1.5rem;
  border: 1px solid rgba(244, 208, 63, 0.1);
  transition: all 0.3s ease;
}

.member-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(244, 208, 63, 0.2);
  border-color: rgba(244, 208, 63, 0.3);
}

.card-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.member-avatar {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #f4d03f, #f7dc6f);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.avatar-text {
  color: #2c3e50;
  font-weight: 600;
  font-size: 0.8rem;
}

.member-info {
  flex: 1;
}

.member-name {
  color: #f4d03f;
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
}

.member-tasks,
.member-specific {
  color: #ecf0f1;
  font-size: 0.9rem;
  margin: 0.3rem 0;
  opacity: 0.8;
}

.attribution-footer {
  text-align: center;
  margin-top: 3rem;
}

.footer-logo-section {
  display: inline-block;
  background: rgba(52, 73, 94, 0.3);
  border-radius: 20px;
  padding: 2rem;
  border: 1px solid rgba(244, 208, 63, 0.1);
}

.logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.footer-logo {
  /* width: 50px; */
  height: 50px;
  border-radius: 50%;
}

.logo-text {
  color: #f4d03f;
  font-size: 1.5rem;
  font-weight: 900;
}

.logo-label {
  color: #ecf0f1;
  font-size: 0.9rem;
  opacity: 0.7;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .attribution-photo-section {
    flex-direction: column;
    text-align: center;
  }
  
  .members-grid {
    grid-template-columns: 1fr;
  }
  
  .card-header {
    flex-direction: column;
    text-align: center;
  }
  
  .member-avatar {
    align-self: center;
  }
}
