/* 导航栏样式 - navigation.css */

/* 引入统一字体 */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;800;900&family=Montserrat:wght@700;800;900&family=Inter:wght@700;800;900&display=swap');

:root {
  --primary-color: #6366f1;
  --primary-hover: #4f46e5;
  --secondary-color: #f59e0b;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --border-color: #e5e7eb;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* 现代化导航栏 */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(99, 102, 241, 0.1);
  z-index: 1000;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  margin: 0;
  padding: 0;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 12px 30px;
  position: relative;
  box-sizing: border-box;
}

.nav-left {
  flex: 0 0 200px;
}

.nav-logo {
  font-family: 'Playfair Display', 'Montserrat', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  font-size: 34px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 50%, #e91e63 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  transition: all 0.4s ease;
  display: flex;
  align-items: center;
  letter-spacing: -0.8px;
  text-shadow: 0 2px 4px rgba(99, 102, 241, 0.1);
  position: relative;
}

.nav-logo::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), #e91e63);
  border-radius: 8px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
  filter: blur(8px);
}

.nav-logo:hover::before {
  opacity: 0.3;
}

.nav-logo:hover {
  transform: scale(1.05) translateY(-1px);
  filter: drop-shadow(0 8px 16px rgba(99, 102, 241, 0.4));
  letter-spacing: -0.6px;
}

.nav-center {
  flex: 1;
  display: flex;
  justify-content: center;
  max-width: 800px;
  margin: 0 20px;
}

.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 8px;
  width: 100%;
  justify-content: center;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 15px;
  border-radius: 12px;
  transition: all 0.3s ease;
  background: transparent;
  border: 2px solid transparent;
  white-space: nowrap;
}

.nav-link:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(245, 158, 11, 0.1));
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.15);
}

.dropdown-icon {
  margin-left: 8px;
  font-size: 12px;
  transition: transform 0.3s ease;
}

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

/* 下拉菜单样式 */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.1);
  min-width: 280px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
  overflow: hidden;
}

/* 實用工具專用的四列布局 */
.dropdown-menu.tools-menu {
  min-width: 1200px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 0;
}

/* 創作工具專用的兩列布局 */
.dropdown-menu.creative-menu {
  min-width: 600px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

/* 避免下拉菜单重叠 - 为创作工具菜单调整位置 */
.nav-item:nth-child(2) .dropdown-menu {
  left: -20px;
}

/* 避免下拉菜单重叠 - 为时间工具菜单调整位置 */
.nav-item:nth-child(3) .dropdown-menu {
  left: -30px;
}

/* 避免下拉菜单重叠 - 为实用工具菜单调整位置 */
.nav-item:nth-child(4) .dropdown-menu {
  left: -50px;
}

/* 响应式下拉菜单位置调整 */
@media (max-width: 1400px) {
  .nav-item:nth-child(1) .dropdown-menu {
    left: -100px;
  }
  
  .nav-item:nth-child(2) .dropdown-menu {
    left: -50px;
  }
  
  .nav-item:nth-child(3) .dropdown-menu {
    left: -80px;
  }
  
  /* 實用工具四列布局響應式調整 */
  .dropdown-menu.tools-menu {
    min-width: 1000px;
    grid-template-columns: 1fr 1fr 1fr 1fr;
  }
  
  /* 創作工具兩列布局響應式調整 */
  .dropdown-menu.creative-menu {
    min-width: 500px;
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 1200px) {
  .nav-item:nth-child(1) .dropdown-menu {
    left: -150px;
  }
  
  .nav-item:nth-child(2) .dropdown-menu {
    left: -80px;
  }
  
  .nav-item:nth-child(3) .dropdown-menu {
    left: -120px;
  }
  
  /* 中等屏幕改為三列 */
  .dropdown-menu.tools-menu {
    min-width: 750px;
    grid-template-columns: 1fr 1fr 1fr;
  }
  
  /* 三列布局時重新設置邊框 */
  .tools-menu .dropdown-item:not(:nth-child(4n)) {
    border-right: none;
  }
  
  .tools-menu .dropdown-item:not(:nth-child(3n)) {
    border-right: 1px solid rgba(99, 102, 241, 0.05);
  }
  
  .tools-menu .dropdown-item:nth-last-child(-n+4) {
    border-bottom: 1px solid rgba(99, 102, 241, 0.05);
  }
  
  .tools-menu .dropdown-item:nth-last-child(-n+3) {
    border-bottom: none;
  }
  
  /* 創作工具中等屏幕調整 */
  .dropdown-menu.creative-menu {
    min-width: 450px;
    grid-template-columns: 1fr 1fr;
  }
}

/* 平板和小屏幕響應式 */
@media (max-width: 900px) {
  .dropdown-menu.tools-menu {
    min-width: 500px;
    grid-template-columns: 1fr 1fr;
  }
  
  .tools-menu .dropdown-item {
    padding: 12px 15px;
  }
  
  /* 兩列布局時重新設置邊框 */
  .tools-menu .dropdown-item:not(:nth-child(4n)) {
    border-right: none;
  }
  
  .tools-menu .dropdown-item:not(:nth-child(3n)) {
    border-right: none;
  }
  
  .tools-menu .dropdown-item:nth-child(odd) {
    border-right: 1px solid rgba(99, 102, 241, 0.05);
  }
  
  .tools-menu .dropdown-item:nth-last-child(-n+4) {
    border-bottom: 1px solid rgba(99, 102, 241, 0.05);
  }
  
  .tools-menu .dropdown-item:nth-last-child(-n+3) {
    border-bottom: 1px solid rgba(99, 102, 241, 0.05);
  }
  
  .tools-menu .dropdown-item:nth-last-child(-n+2) {
    border-bottom: none;
  }
  
  /* 創作工具平板響應式 */
  .dropdown-menu.creative-menu {
    min-width: 400px;
    grid-template-columns: 1fr 1fr;
  }
  
  .creative-menu .dropdown-item {
    padding: 12px 15px;
  }
}

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

.dropdown-item {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.3s ease;
  border-bottom: 1px solid rgba(99, 102, 241, 0.05);
}

.dropdown-item:last-child {
  border-bottom: none;
}

/* 三列布局的項目樣式優化 */
.tools-menu .dropdown-item {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(99, 102, 241, 0.05);
  border-right: none;
}

/* 第1、2、3列添加右邊框 */
.tools-menu .dropdown-item:not(:nth-child(4n)) {
  border-right: 1px solid rgba(99, 102, 241, 0.05);
}

/* 最後一行的項目移除底部邊框 */
.tools-menu .dropdown-item:nth-last-child(-n+4) {
  border-bottom: none;
}

/* 創作工具兩列布局的項目樣式優化 */
.creative-menu .dropdown-item {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(99, 102, 241, 0.05);
  border-right: none;
}

/* 第1列添加右邊框 */
.creative-menu .dropdown-item:nth-child(odd) {
  border-right: 1px solid rgba(99, 102, 241, 0.05);
}

/* 最後兩個項目移除底部邊框 */
.creative-menu .dropdown-item:nth-last-child(-n+2) {
  border-bottom: none;
}

.dropdown-item:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(245, 158, 11, 0.08));
  transform: translateX(4px);
}

.item-icon {
  font-size: 20px;
  margin-right: 15px;
  width: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.item-content {
  flex: 1;
}

.item-title {
  display: block;
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.item-desc {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.3;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 15px;
  flex: 0 0 300px;
  justify-content: flex-end;
}

/* 下载App按钮样式 */
.download-app-btn {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
  color: white;
  text-decoration: none;
  border-radius: 25px;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-md);
  border: 2px solid transparent;
  white-space: nowrap;
  position: relative;
  overflow: visible; /* 改为visible避免裁切 */
  z-index: 10;
}

.download-app-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--primary-hover), var(--secondary-color));
  border-radius: 25px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.download-app-btn::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), #e91e63);
  border-radius: 27px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -2;
  filter: blur(8px);
}

.download-app-btn:hover::before {
  opacity: 1;
}

.download-app-btn:hover::after {
  opacity: 0.4;
}

.download-app-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(99, 102, 241, 0.4);
  color: white;
}

.download-app-btn:active {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

.download-app-btn .btn-icon {
  margin-right: 6px;
  font-size: 16px;
  transition: transform 0.3s ease;
}

.download-app-btn:hover .btn-icon {
  transform: scale(1.1) rotate(5deg);
}

.social-nav {
  display: flex;
  align-items: center;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(245, 158, 11, 0.1));
  border: 2px solid rgba(99, 102, 241, 0.3);
  border-radius: 12px;
  transition: all 0.3s ease;
  text-decoration: none;
}

.social-link:hover {
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  border-color: var(--primary-color);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 12px 30px rgba(99, 102, 241, 0.3);
}

.social-link img,
.social-link svg {
  width: 20px;
  height: 20px;
  transition: all 0.3s ease;
}

.social-link img {
  filter: brightness(0) saturate(100%) invert(27%) sepia(51%) saturate(2878%) hue-rotate(231deg) brightness(92%) contrast(93%);
}

.social-link svg {
  color: var(--primary-color);
}

.social-link:hover img {
  filter: brightness(0) saturate(100%) invert(100%);
  transform: scale(1.1);
}

.social-link:hover svg {
  color: white;
  transform: scale(1.1);
}

/* 隐藏移动端菜单按钮在桌面端 */
.mobile-menu-btn {
  display: none;
}

/* 移动端菜单和覆盖层默认隐藏 */
.mobile-menu-overlay,
.mobile-menu {
  display: none;
}

/* 响应式设计 */
@media (max-width: 1024px) {
  .nav-container {
    padding: 15px 20px;
  }

  .nav-left {
    flex: 0 0 180px;
  }

  .nav-logo {
    font-family: 'Playfair Display', 'Montserrat', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-size: 28px;
    letter-spacing: -0.6px;
  }

  .nav-center {
    display: none;
  }
    
    /* 移動端實用工具回到單列 */
    .dropdown-menu.tools-menu {
      min-width: 320px;
      grid-template-columns: 1fr;
    }
    
    /* 單列布局時重置所有邊框 */
    .tools-menu .dropdown-item:not(:nth-child(4n)) {
      border-right: none;
    }
    
    .tools-menu .dropdown-item:not(:nth-child(3n)) {
      border-right: none;
    }
    
    .tools-menu .dropdown-item:nth-child(odd) {
      border-right: none;
    }
    
    .tools-menu .dropdown-item:nth-last-child(-n+4) {
      border-bottom: 1px solid rgba(99, 102, 241, 0.05);
    }
    
    .tools-menu .dropdown-item:nth-last-child(-n+3) {
      border-bottom: 1px solid rgba(99, 102, 241, 0.05);
    }
    
    .tools-menu .dropdown-item:nth-last-child(-n+2) {
      border-bottom: 1px solid rgba(99, 102, 241, 0.05);
    }
    
    .tools-menu .dropdown-item:last-child {
      border-bottom: none;
    }
    
    /* 移動端創作工具回到單列 */
    .dropdown-menu.creative-menu {
      min-width: 320px;
      grid-template-columns: 1fr;
    }
    
    /* 單列布局時重置創作工具邊框 */
    .creative-menu .dropdown-item:nth-child(odd) {
      border-right: none;
    }
    
    .creative-menu .dropdown-item:nth-last-child(-n+2) {
      border-bottom: 1px solid rgba(99, 102, 241, 0.05);
    }
    
    .creative-menu .dropdown-item:last-child {
      border-bottom: none;
    }

  .nav-right {
    gap: 12px;
    flex: 0 0 auto;
  }

  .download-app-btn {
    padding: 8px 16px;
    font-size: 13px;
  }

  .download-app-btn::after {
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border-radius: 20px;
    filter: blur(6px);
  }

  .download-app-btn .btn-icon {
    margin-right: 4px;
    font-size: 14px;
  }

  .download-app-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(99, 102, 241, 0.35);
  }

  .social-link {
    width: 40px;
    height: 40px;
  }

  .social-link img,
  .social-link svg {
    width: 18px;
    height: 18px;
  }

  /* 移动端菜单按钮 */
  .mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(245, 158, 11, 0.1));
    border: 2px solid rgba(99, 102, 241, 0.3);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
  }

  .mobile-menu-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: scale(1.05);
  }

  .mobile-menu-btn span {
    font-size: 20px;
    color: var(--primary-color);
    transition: color 0.3s ease;
  }

  .mobile-menu-btn:hover span {
    color: white;
  }

  /* 移动端菜单覆盖层 */
  .mobile-menu-overlay {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }

  .mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  /* 移动端菜单 */
  .mobile-menu {
    display: block;
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    z-index: 9999;
    padding: 20px;
    transition: right 0.3s ease;
    overflow-y: auto;
  }

  .mobile-menu.active {
    right: 0;
  }

  .mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
  }

  .mobile-menu-close {
    width: 36px;
    height: 36px;
    background: rgba(99, 102, 241, 0.1);
    border: none;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
  }

  .mobile-menu-close:hover {
    background: var(--primary-color);
    color: white;
  }

  .mobile-nav-section {
    margin-bottom: 25px;
  }

  .mobile-nav-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
    padding: 8px 10px;
    border-left: 3px solid var(--primary-color);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(245, 158, 11, 0.05));
    border-radius: 0 8px 8px 0;
    transition: all 0.3s ease;
  }

  .mobile-nav-title:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(245, 158, 11, 0.1));
    transform: translateX(3px);
  }

  .mobile-nav-item {
    display: block;
    padding: 12px 15px;
    text-decoration: none;
    color: var(--text-primary);
    border-radius: 10px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    background: rgba(99, 102, 241, 0.03);
    border: 1px solid rgba(99, 102, 241, 0.1);
  }

  .mobile-nav-item:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(245, 158, 11, 0.1));
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateX(5px);
  }

  .mobile-nav-item-icon {
    margin-right: 12px;
    font-size: 18px;
  }

  .mobile-nav-item-title {
    font-weight: 600;
    font-size: 15px;
  }
}

@media (max-width: 768px) {
  .nav-container {
    padding: 12px 15px;
  }

  .nav-logo {
    font-family: 'Playfair Display', 'Montserrat', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-size: 26px;
    letter-spacing: -0.4px;
  }

  .mobile-menu {
    width: 100%;
    right: -100%;
  }

  .mobile-menu.active {
    right: 0;
  }

  .download-app-btn {
    padding: 6px 12px;
    font-size: 12px;
  }

  .download-app-btn::after {
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border-radius: 18px;
    filter: blur(4px);
  }

  .download-app-btn .btn-icon {
    margin-right: 3px;
    font-size: 13px;
  }

  .download-app-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
  }
} 