/**
 * BytePilot - 科技感视觉增强
 * 为网站添加更多现代科技感的视觉效果
 */

/* 全局背景增强 */
body {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  min-height: 100vh;
}

/* 毛玻璃效果的通用类 */
.glass-effect {
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

/* 应用于工具卡片 */
.tool-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 32px rgba(0, 122, 255, 0.15);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
  position: relative;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0) 100%
  );
  z-index: 1;
  pointer-events: none;
}

.tool-card:hover {
  transform: translateY(-15px) scale(1.03);
  box-shadow: 0 15px 30px rgba(0, 122, 255, 0.25);
}

/* 工具卡片边缘发光效果 */
.tool-card::after {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  border-radius: inherit;
  background: linear-gradient(45deg, transparent 50%, rgba(0, 122, 255, 0.1) 100%);
  z-index: -1;
  transition: opacity 0.3s ease;
  opacity: 0;
}

.tool-card:hover::after {
  opacity: 1;
}

/* 工具图标增强 */
.tool-icon {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.tool-card:hover .tool-icon {
  transform: scale(1.1);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* 标签悬停效果增强 */
.tag {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.tag::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.8) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(45deg);
  animation: shimmer 3s infinite;
  opacity: 0;
}

.tool-card:hover .tag::before {
  opacity: 1;
}

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

/* 搜索栏增强 */
.search-bar {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.search-bar:focus-within {
  box-shadow: 0 8px 20px rgba(0, 122, 255, 0.15);
  transform: translateY(-2px);
}

/* 导航链接增强 */
.nav-links a {
  position: relative;
  overflow: hidden;
}

.nav-links a::before {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s ease;
}

.nav-links a:hover::before,
.nav-links a.active::before {
  transform: scaleX(1);
}

/* 分类按钮增强 */
.category-tabs button {
  position: relative;
  overflow: hidden;
  z-index: 1;
  transition: all 0.3s ease;
}

.category-tabs button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, var(--color-primary), rgba(0, 122, 255, 0.8));
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: inherit;
}

.category-tabs button:hover::before,
.category-tabs button.active::before {
  opacity: 1;
}

.category-tabs button:hover,
.category-tabs button.active {
  color: white;
  border-color: transparent;
  box-shadow: 0 5px 15px rgba(0, 122, 255, 0.3);
}

/* 工具链接按钮增强 */
.tool-link {
  overflow: hidden;
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
}

.tool-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg, 
    rgba(0, 122, 255, 0.1),
    rgba(0, 122, 255, 0.2),
    rgba(0, 122, 255, 0.1)
  );
  transition: left 0.5s ease;
  z-index: -1;
}

.tool-link:hover {
  background-color: rgba(0, 122, 255, 0.15);
  box-shadow: 0 5px 15px rgba(0, 122, 255, 0.15);
  transform: translateY(-2px);
}

.tool-link:hover::before {
  left: 100%;
}

/* 页脚增强 */
footer {
  background: rgba(245, 245, 247, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* 响应式调整 */
@media (max-width: 768px) {
  .tool-card:hover {
    transform: translateY(-8px) scale(1.02);
  }
}

/* 加载动画增强 */
.loading {
  position: relative;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 60px;
  height: 60px;
  margin-top: -30px;
  margin-left: -30px;
  border-radius: 50%;
  border: 2px solid rgba(0, 122, 255, 0.2);
  border-top-color: var(--color-primary);
  animation: loader-spin 1s linear infinite;
  opacity: 0.5;
}

@keyframes loader-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 全局悬停状态光影效果 */
.hover-glow {
  position: relative;
  overflow: hidden;
}

.hover-glow::after {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  width: calc(100% + 20px);
  height: calc(100% + 20px);
  background: radial-gradient(
    circle at var(--x, 50%) var(--y, 50%),
    rgba(0, 122, 255, 0.2) 0%,
    transparent 50%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 2;
  border-radius: inherit;
}

.hover-glow:hover::after {
  opacity: 1;
} 