/* 自定义动画和样式 */
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-5px) rotate(-3deg); }
  50% { transform: translateY(-10px) rotate(0deg); }
  75% { transform: translateY(-5px) rotate(3deg); }
}

@keyframes bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

@keyframes wiggle {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(3deg); }
}

.float-animation {
  animation: float 3s ease-in-out infinite;
}

.bounce-hover:hover {
  animation: bounce 0.5s ease;
}

.wiggle-hover:hover {
  animation: wiggle 0.5s ease;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(45deg, #3b82f6, #8b5cf6);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(45deg, #2563eb, #7c3aed);
}

/* 卡片悬停效果 */
.card-hover {
  transition: all 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

/* 按钮动画 */
.btn-fun {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-fun:hover {
  transform: scale(1.05);
}

.btn-fun::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-fun:hover::before {
  width: 300px;
  height: 300px;
}

/* 特殊效果 */
.shine-effect {
  position: relative;
  overflow: hidden;
}

.shine-effect::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.3) 50%,
    transparent 70%
  );
  transform: rotate(45deg);
  animation: shine 3s infinite;
}

@keyframes shine {
  0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
  100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* 顶部导航栏样式 - 大气设计 */
.navbar-top {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.navbar-top .container {
  max-width: 1400px;
}

.navbar-top ul {
  list-style: none;
  display: flex;
  gap: 0;
  margin: 0;
  padding: 0;
}

.navbar-top > div > div > ul > li {
  position: relative;
}

.navbar-top > div > div > ul > li > a {
  display: block;
  padding: 1.25rem 2rem;
  color: #1f2937;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
  transition: all 0.3s ease;
  position: relative;
}

.navbar-top > div > div > ul > li > a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, #2563eb, #60a5fa);
  transition: width 0.3s ease;
}

.navbar-top > div > div > ul > li > a:hover {
  color: #2563eb;
  background-color: rgba(37, 99, 235, 0.05);
}

.navbar-top > div > div > ul > li > a:hover::after {
  width: 100%;
}

.navbar-top > div > div > ul > li.active > a {
  color: #2563eb;
}

.navbar-top > div > div > ul > li.active > a::after {
  width: 100%;
}

/* 品牌区域 */
.navbar-top .flex-items-center {
  gap: 1rem;
}

.navbar-top .text-3xl {
  font-size: 2.5rem;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

/* 二级菜单 - 垂直显示 */
.submenu {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  border: 1px solid #e5e7eb;
  border-top: 3px solid #2563eb;
  min-width: 160px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-15px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100;
  border-radius: 0 0 8px 8px;
  display: flex;
  flex-direction: column;
  padding: 0;
  margin: 0;
  list-style: none;
}

.navbar-top > div > div > ul > li:hover > .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.submenu li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.submenu a {
  display: block;
  padding: 0.875rem 1.5rem;
  color: #374151;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
  white-space: nowrap;
}

.submenu li:first-child a {
  border-radius: 0;
}

.submenu li:last-child a {
  border-radius: 0 0 8px 8px;
}

.submenu a:hover {
  background-color: #f0f9ff;
  color: #2563eb;
  border-left-color: #2563eb;
  padding-left: 2rem;
}

/* 文章卡片图片容器 */
.article-image-container {
  position: relative;
  width: 100%;
  height: 160px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.article-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-image-container.no-image {
  font-size: 3rem;
  font-weight: bold;
}

/* 响应式导航 */
@media (max-width: 768px) {
  .navbar-top {
    display: none;
  }
  
  .main-content {
    margin-left: 0 !important;
    padding-top: 4rem !important;
  }
  
  .mobile-nav {
    display: flex !important;
  }
  
  #mobile-menu {
    display: none !important;
  }
  
  #mobile-menu.hidden {
    display: none !important;
  }
  
  #mobile-menu:not(.hidden) {
    display: block !important;
  }
}

@media (min-width: 769px) {
  .mobile-nav {
    display: none !important;
  }
  
  #mobile-menu {
    display: none !important;
  }
}
