/* 
 * Tech导航站 - 科技风格主样式文件
 */

/* 全局样式 */
:root {
  /* 科技主题色系 */
  --primary-color: #2563eb;
  --secondary-color: #10b981;
  --accent-color: #7e22ce;
  --warning-color: #f59e0b;
  --danger-color: #f43f5e;
  --info-color: #3b82f6;
  
  /* 中性色系 */
  --text-color: #f8fafc;
  --light-text-color: #94a3b8;
  --dark-bg-color: #0f172a;
  --secondary-bg-color: #1e293b;
  --card-bg-color: rgba(30, 41, 59, 0.7);
  
  /* 效果 */
  --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  --hover-transform: translateY(-5px);
  --transition-speed: 0.3s;
  
  /* 渐变 */
  --primary-gradient: linear-gradient(135deg, #2563eb, #7e22ce);
  --glow-effect: 0 0 10px rgba(37, 99, 235, 0.5);
}

/* 全局设置 */
body {
  font-family: 'Segoe UI', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Roboto', sans-serif;
  color: var(--text-color);
  line-height: 1.6;
  background-color: var(--dark-bg-color);
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

a {
  color: var(--primary-color);
  transition: all var(--transition-speed) ease;
  text-decoration: none;
}

a:hover {
  color: var(--secondary-color);
}

/* 粒子背景 */
.particles-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

/* 科技感文本效果 */
.tech-text {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.text-gradient {
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
}

/* 头部导航 */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar {
  background-color: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.8rem 0;
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
}

.nav-link {
  font-weight: 500;
  position: relative;
  padding: 0.5rem 1rem;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  background: var(--primary-gradient);
  transition: all var(--transition-speed) ease;
  transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 80%;
}

/* 大型下拉菜单 */
.mega-menu {
  width: 600px;
  padding: 1rem;
  background-color: var(--secondary-bg-color);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  box-shadow: var(--card-shadow);
}

.dropdown-menu {
  background-color: var(--secondary-bg-color);
}

.dropdown-item {
  color: var(--text-color);
  transition: all 0.2s ease;
  padding: 0.5rem 1rem;
  border-radius: 4px;
}

.dropdown-item:hover {
  background-color: rgba(37, 99, 235, 0.2);
  color: var(--primary-color);
  transform: translateX(5px);
}

.dropdown-header {
  color: var(--primary-color);
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 0.5rem;
}

/* 搜索框样式 */
.search-engines {
  padding: 4rem 0 2rem;
  background: radial-gradient(circle at top, rgba(37, 99, 235, 0.1), transparent 70%);
}

.search-container {
  background-color: transparent;
  padding: 1rem 0;
  margin-bottom: 2rem;
}

.tech-title {
  margin-bottom: 2rem;
}

.search-wrapper {
  position: relative;
  display: flex;
  width: 100%;
}

.search-box {
  max-width: 800px;
  margin: 0 auto;
}

.search-main {
  box-shadow: var(--card-shadow);
  border-radius: 30px;
  overflow: hidden;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.search-main .form-control {
  border: none;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  border-radius: 30px 0 0 30px;
  background-color: transparent;
  color: var(--text-color);
}

.search-input {
  background-color: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-color);
}

.search-btn {
  background: var(--primary-gradient);
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 0 30px 30px 0;
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.5);
  transition: all 0.3s ease;
}

.search-btn:hover {
  transform: translateX(2px);
  box-shadow: 0 0 15px rgba(37, 99, 235, 0.7);
}

.btn-search {
  background: var(--primary-gradient);
  border: none;
  padding: 0.375rem 0.75rem;
  color: white;
}

.search-engines-btns .btn-group {
  flex-wrap: wrap;
  justify-content: center;
}

.btn-engine {
  background-color: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--light-text-color);
  border-radius: 20px;
  margin: 0.25rem;
  transition: all 0.3s ease;
  padding: 0.5rem 1rem;
}

.btn-engine:hover, .btn-engine.active {
  background: var(--primary-gradient);
  color: white;
  box-shadow: var(--glow-effect);
  transform: translateY(-2px);
}

/* 暗黑模式切换按钮 */
.btn-mode {
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-color);
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-mode:hover {
  background: var(--primary-gradient);
  color: white;
  transform: rotate(20deg);
}

/* 各版块容器 */
section {
  padding: 3rem 0;
  position: relative;
}

/* 标题样式 */
.section-title {
  font-weight: 600;
  padding-bottom: 0.5rem;
  position: relative;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
}

.title-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.9rem;
  box-shadow: var(--glow-effect);
}

.view-more {
  color: var(--light-text-color);
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.view-more:hover {
  color: var(--primary-color);
  transform: translateX(3px);
}

/* 科技卡片 */
.tech-card {
  background-color: var(--card-bg-color);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  transition: all var(--transition-speed) ease;
  box-shadow: var(--card-shadow);
  color: var(--text-color);
}

.tech-card:hover {
  transform: var(--hover-transform);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  border-color: rgba(37, 99, 235, 0.5);
}

.tech-card:hover .icon-box {
  transform: scale(1.1) rotate(5deg);
  background: var(--primary-gradient);
}

/* 分类图标盒子 */
.icon-box {
  height: 70px;
  width: 70px;
  border-radius: 50%;
  background-color: rgba(37, 99, 235, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  transition: all var(--transition-speed) ease;
  color: var(--primary-color);
}

/* 站点卡片样式 */
.site-card {
  transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background-color: var(--card-bg-color);
  height: 100%;
}

.site-card:hover {
  transform: var(--hover-transform);
  box-shadow: var(--card-shadow);
  border-color: rgba(37, 99, 235, 0.3);
}

.site-link {
  color: var(--text-color);
  display: block;
  height: 100%;
}

.site-link:hover {
  color: var(--text-color);
}

.site-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.1);
}

.site-icon img {
  max-width: 100%;
  max-height: 100%;
}

.default-icon {
  width: 36px;
  height: 36px;
  background: var(--primary-gradient);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-weight: bold;
}

.site-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.site-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 40px;
  color: var(--light-text-color);
}

/* 趋势卡片 */
.glass-card {
  background: rgba(30, 41, 59, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  transition: all var(--transition-speed) ease;
}

.glass-card:hover {
  box-shadow: var(--card-shadow);
  border-color: var(--primary-color);
  transform: translateY(-3px);
}

.trend-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.trend-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.trend-list li:last-child {
  border-bottom: none;
}

.trend-list a {
  color: var(--text-color);
  display: inline-block;
  transition: all 0.2s ease;
}

.trend-list a:hover {
  color: var(--primary-color);
  transform: translateX(3px);
}

/* 页脚样式 */
.footer-section {
  background-color: var(--secondary-bg-color);
  padding: 3rem 0 1.5rem;
  margin-top: 3rem;
  position: relative;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-title {
  color: var(--primary-color);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1.2rem;
  position: relative;
  display: inline-block;
}

.footer-title:after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 30px;
  height: 2px;
  background: var(--primary-gradient);
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--light-text-color);
  transition: all 0.2s ease;
}

.footer-links a:hover {
  color: var(--primary-color);
  transform: translateX(3px);
  display: inline-block;
}

.social-links a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--text-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-speed) ease;
  margin-right: 0.5rem;
}

.social-links a:hover {
  background: var(--primary-gradient);
  color: white;
  transform: translateY(-3px);
}

.footer-divider {
  border-color: rgba(255, 255, 255, 0.05);
  margin: 2rem 0;
}

.back-to-top {
  display: inline-block;
  transition: all var(--transition-speed) ease;
  color: var(--light-text-color);
}

.back-to-top:hover {
  color: var(--primary-color);
  transform: translateY(-3px);
}

/* 响应式调整 */
@media (max-width: 992px) {
  .mega-menu {
    width: 100%;
  }
  
  .search-engines {
    padding: 2rem 0 1rem;
  }
  
  section {
    padding: 2rem 0;
  }
}

@media (max-width: 768px) {
  .search-container {
    padding: 1rem 1rem;
  }
  
  .mega-menu .row {
    flex-direction: column;
  }
  
  .search-engines-btns .btn {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
  }
  
  .site-desc {
    -webkit-line-clamp: 3;
    height: 60px;
  }
  
  .navbar-collapse {
    background-color: var(--secondary-bg-color);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
}

/* 动画效果 */
@keyframes fadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

.fade-in {
  animation: fadeIn 0.5s ease-in;
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

.floating {
  animation: float 3s ease-in-out infinite;
} 