/* 基础重置和变量 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* 颜色变量 */
  --primary-color: #00d4ff;
  --secondary-color: #0066ff;
  --accent-color: #ff6b35;
  --dark-bg: #0a0a0f;
  --darker-bg: #050508;
  --card-bg: rgba(15, 15, 25, 0.8);
  --glass-bg: rgba(255, 255, 255, 0.1);
  --text-light: #e0e0e0;
  --text-dim: #a0a0a0;
  --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-2: linear-gradient(135deg, #00d4ff 0%, #0066ff 100%);
  --gradient-3: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-secondary: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
  --gradient-accent: linear-gradient(45deg, #ff6b6b, #ffa500);

  /* 背景颜色 */
  --bg-primary: #0a0a0f;
  --bg-secondary: #161622;
  --bg-card: #1a1a2e;
  --bg-glass: rgba(255, 255, 255, 0.05);
  --bg-modal: rgba(0, 0, 0, 0.8);

  /* 文字颜色 */
  --text-primary: #ffffff;
  --text-secondary: #b8bcc8;
  --text-muted: #6c7293;
  --text-accent: #00d4ff;

  /* 阴影 */
  --shadow-glow: 0 8px 32px rgba(0, 212, 255, 0.3);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.4);

  /* 其他变量 */
  --border-radius: 16px;
  --border-radius-lg: 24px;
  --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --font-primary: 'Rajdhani', sans-serif;
  --font-tech: 'Orbitron', monospace;
}

/* 基础样式 */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Orbitron', 'Rajdhani', monospace;
  background: var(--dark-bg);
  color: var(--text-light);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* 背景效果 */
.particles-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -3;
}

.grid-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(0, 212, 255, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  z-index: -2;
  opacity: 0.3;
  animation: gridPulse 4s ease-in-out infinite;
}

.floating-elements {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

.element {
  position: absolute;
  border-radius: 50%;
  background: var(--gradient-2);
  opacity: 0.1;
  animation: float 8s ease-in-out infinite;
}

.element-1 {
  width: 100px;
  height: 100px;
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.element-2 {
  width: 150px;
  height: 150px;
  top: 20%;
  right: 15%;
  animation-delay: 2s;
}

.element-3 {
  width: 80px;
  height: 80px;
  bottom: 20%;
  left: 20%;
  animation-delay: 4s;
}

.element-4 {
  width: 120px;
  height: 120px;
  bottom: 30%;
  right: 10%;
  animation-delay: 6s;
}

.element-5 {
  width: 200px;
  height: 200px;
  top: 50%;
  left: 50%;
  animation-delay: 1s;
  transform: translate(-50%, -50%);
}

.element-6 {
  width: 90px;
  height: 90px;
  top: 70%;
  right: 30%;
  animation-delay: 3s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
    opacity: 0.1;
  }
  50% {
    transform: translateY(-20px) rotate(180deg);
    opacity: 0.3;
  }
}

@keyframes gridPulse {
  0%,
  100% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.6;
  }
}

/* 导航栏 */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 212, 255, 0.2);
  z-index: 1000;
  padding: 1rem 0;
  transition: all 0.3s ease;
}

.navbar.scrolled {
  background: rgba(10, 10, 15, 0.95);
  box-shadow: var(--shadow-glow);
}

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

.nav-brand {
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--primary-color);
  text-decoration: none;
}

.nav-brand i {
  margin-right: 0.5rem;
  animation: brandPulse 2s ease-in-out infinite;
}

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

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 500;
  position: relative;
  transition: all 0.3s ease;
  padding: 0.5rem 1rem;
  border-radius: 8px;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color);
  background: var(--glass-bg);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--gradient-2);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
}

.mobile-menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--primary-color);
  transition: all 0.3s ease;
}

/* 英雄区域 */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding: 8rem 0 4rem;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

.hero-text {
  z-index: 2;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-weight: 300;
}

.glitch-text {
  animation: glitch 2s infinite;
}

@keyframes glitch {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-2px);
  }
  40% {
    transform: translateX(2px);
  }
  60% {
    transform: translateX(-1px);
  }
  80% {
    transform: translateX(1px);
  }
}

.hero-title {
  font-size: 4rem;
  font-weight: 900;
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.tech-text {
  background: var(--gradient-2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text {
  background: var(--gradient-3);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: 1.2rem;
  color: var(--text-dim);
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.btn {
  padding: 1rem 2rem;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: var(--gradient-2);
  color: white;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 212, 255, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-outline:hover {
  background: var(--primary-color);
  color: var(--dark-bg);
  transform: translateY(-2px);
}

/* 全息图效果 */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hologram-container {
  position: relative;
  width: 400px;
  height: 400px;
}

.hologram {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hologram-ring {
  position: absolute;
  border: 2px solid var(--primary-color);
  border-radius: 50%;
  opacity: 0.6;
}

.hologram-ring:nth-child(1) {
  width: 300px;
  height: 300px;
  animation: rotate 10s linear infinite;
}

.hologram-ring:nth-child(2) {
  width: 200px;
  height: 200px;
  animation: rotate 8s linear infinite reverse;
}

.hologram-ring:nth-child(3) {
  width: 100px;
  height: 100px;
  animation: rotate 6s linear infinite;
}

.hologram-core {
  width: 80px;
  height: 80px;
  background: var(--gradient-2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
  animation: pulse 2s ease-in-out infinite;
  box-shadow: var(--shadow-glow);
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: var(--shadow-glow);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.6);
  }
}

/* 技术栈 */
.tech-stack {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 4rem;
  flex-wrap: wrap;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.tech-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.2rem 1.5rem;
  background: var(--glass-bg);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 212, 255, 0.2);
  transition: all 0.3s ease;
  cursor: pointer;
  min-width: 120px;
  flex: 0 0 auto;
}

.tech-item:hover {
  transform: translateY(-5px);
  background: rgba(0, 212, 255, 0.1);
  box-shadow: var(--shadow-glow);
}

.tech-item i {
  font-size: 1.8rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.tech-item span {
  font-weight: 500;
  color: var(--text-light);
  font-size: 0.9rem;
  text-align: center;
  white-space: nowrap;
}

/* 滚动指示器 */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  animation: bounce 2s infinite;
}

.scroll-line {
  width: 2px;
  height: 40px;
  background: var(--gradient-2);
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.5);
  animation: scrollFlow 2s ease-in-out infinite;
}

@keyframes scrollFlow {
  0% {
    top: -100%;
  }
  100% {
    top: 100%;
  }
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

/* 项目展示区域 */
.projects-section {
  padding: 2rem 0 6rem 0; /* 减少上边距，让教学动画区域往上提 */
  background: linear-gradient(180deg, var(--dark-bg) 0%, var(--darker-bg) 100%);
}

/* 教学视频区域 */
.videos-section {
  padding: 6rem 0;
  background: linear-gradient(180deg, var(--dark-bg) 0%, var(--darker-bg) 100%);
}

/* 关于区域 */
.about-section {
  padding: 6rem 0;
  background: var(--darker-bg);
}

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

.section-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  font-size: 3rem;
  font-weight: 900;
  margin-bottom: 1rem;
}

.title-number {
  color: var(--primary-color);
  font-size: 1.5rem;
  opacity: 0.7;
}

.title-text {
  background: var(--gradient-2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  font-size: 1.2rem;
  color: var(--text-dim);
}

/* 主要控制区域样式 */
.main-controls {
  margin-top: 3rem;
  padding: 2rem;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(94, 234, 212, 0.3);
  border-radius: 15px;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.main-search-container {
  margin-bottom: 1.5rem;
}

.main-search-box {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

.main-search-box input {
  width: 100%;
  padding: 1rem 1rem 1rem 3rem;
  background: rgba(15, 23, 42, 0.9);
  border: 2px solid rgba(94, 234, 212, 0.3);
  border-radius: 25px;
  color: #e2e8f0;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.main-search-box input:focus {
  outline: none;
  border-color: #5eead4;
  box-shadow: 0 0 20px rgba(94, 234, 212, 0.3);
}

.main-search-box i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #5eead4;
  font-size: 1.1rem;
}

.main-filter-selectors {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: end;
  justify-content: center;
}

.selector-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.selector-group label {
  color: #94a3b8;
  font-size: 0.9rem;
  font-weight: 500;
}

.filter-selector {
  padding: 0.8rem 1rem;
  background: rgba(15, 23, 42, 0.9);
  border: 2px solid rgba(94, 234, 212, 0.3);
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 0.9rem;
  min-width: 120px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.filter-selector:focus,
.filter-selector:hover {
  outline: none;
  border-color: #5eead4;
  box-shadow: 0 0 15px rgba(94, 234, 212, 0.2);
}

.search-btn {
  padding: 0.8rem 1.5rem;
  background: linear-gradient(135deg, #5eead4, #14b8a6);
  border: none;
  border-radius: 8px;
  color: #0f172a;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.search-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(94, 234, 212, 0.4);
}

.search-btn i {
  font-size: 1rem;
}

/* 控制面板 */
.controls-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
  gap: 2rem;
  flex-wrap: wrap;
}

.search-container {
  flex: 1;
  max-width: 400px;
}

.search-box {
  position: relative;
  background: var(--glass-bg);
  border-radius: 12px;
  border: 1px solid rgba(0, 212, 255, 0.3);
  overflow: hidden;
}

.search-box i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary-color);
  z-index: 2;
}

.search-box input {
  width: 100%;
  padding: 1rem 1rem 1rem 3rem;
  background: transparent;
  border: none;
  color: var(--text-light);
  font-size: 1rem;
  outline: none;
}

.search-box input::placeholder {
  color: var(--text-dim);
}

.search-highlight {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--gradient-2);
  width: 0;
  transition: width 0.3s ease;
}

.search-box:focus-within .search-highlight {
  width: 100%;
}

.filter-controls {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.filter-tabs {
  display: flex;
  gap: 0.5rem;
  background: var(--glass-bg);
  padding: 0.5rem;
  border-radius: 12px;
  border: 1px solid rgba(0, 212, 255, 0.2);
}

.filter-tab {
  padding: 0.8rem 1.5rem;
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-weight: 500;
}

.filter-tab.active,
.filter-tab:hover {
  background: var(--primary-color);
  color: var(--dark-bg);
}

.view-toggle {
  display: flex;
  gap: 0.5rem;
  background: var(--glass-bg);
  padding: 0.5rem;
  border-radius: 12px;
  border: 1px solid rgba(0, 212, 255, 0.2);
}

.view-btn {
  padding: 0.8rem;
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.3s ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.view-btn.active,
.view-btn:hover {
  background: var(--primary-color);
  color: var(--dark-bg);
}

/* 项目网格 */
.projects-grid,
.cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  justify-content: center;
  margin-bottom: 3rem;
}

.project-card {
  background: var(--card-bg);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 212, 255, 0.1);
  cursor: pointer;
  position: relative;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-2);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.project-card:hover::before {
  transform: scaleX(1);
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-card);
  border-color: rgba(0, 212, 255, 0.3);
}

.project-image {
  width: 100%;
  height: 200px;
  background: var(--gradient-1);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.project-card:hover .project-image img {
  transform: scale(1.1);
}

.project-icon {
  font-size: 3rem;
  color: white;
  opacity: 0.8;
}

.project-info {
  padding: 1.5rem;
}

.project-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-light);
}

.project-description {
  color: var(--text-dim);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.project-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.project-type {
  background: rgba(0, 212, 255, 0.2);
  color: var(--primary-color);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.project-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.project-link:hover {
  transform: translateX(5px);
}

/* 项目卡片新增样式 */
.project-thumbnail {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 200px;
  background: var(--gradient-1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s ease;
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-card:hover .project-thumbnail img {
  transform: scale(1.1);
}

.quick-view-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 12px 16px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.quick-view-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 212, 255, 0.5);
}

.project-thumbnail-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(0, 100, 200, 0.1));
  color: var(--primary-color);
  font-size: 3rem;
}

.project-actions {
  display: flex;
  gap: 8px;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.action-btn {
  flex: 1;
  padding: 10px 15px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.action-btn.primary {
  background: var(--gradient-2);
  color: white;
}

.action-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.action-btn.secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-light);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 10px;
  min-width: auto;
  flex: none;
}

.action-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* 加载状态 */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem;
  text-align: center;
}

.tech-loader {
  position: relative;
  width: 80px;
  height: 80px;
  margin-bottom: 2rem;
}

.loader-ring {
  position: absolute;
  border: 2px solid transparent;
  border-top: 2px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loader-ring:nth-child(1) {
  width: 80px;
  height: 80px;
  animation-delay: 0s;
}

.loader-ring:nth-child(2) {
  width: 60px;
  height: 60px;
  top: 10px;
  left: 10px;
  animation-delay: 0.3s;
}

.loader-ring:nth-child(3) {
  width: 40px;
  height: 40px;
  top: 20px;
  left: 20px;
  animation-delay: 0.6s;
}

.loader-core {
  position: absolute;
  width: 20px;
  height: 20px;
  top: 30px;
  left: 30px;
  background: var(--primary-color);
  border-radius: 50%;
  animation: pulse 1s ease-in-out infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 4rem;
  color: var(--text-dim);
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* 分页 */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 3rem;
}

.page-btn {
  padding: 0.8rem 1rem;
  background: var(--glass-bg);
  border: 1px solid rgba(0, 212, 255, 0.2);
  color: var(--text-light);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
}

.page-btn:hover:not(:disabled) {
  background: var(--primary-color);
  color: var(--dark-bg);
}

.page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.page-numbers {
  display: flex;
  gap: 0.5rem;
}

.page-number {
  padding: 0.8rem 1rem;
  background: var(--glass-bg);
  border: 1px solid rgba(0, 212, 255, 0.2);
  color: var(--text-light);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 40px;
  text-align: center;
}

.page-number.active {
  background: var(--primary-color);
  color: var(--dark-bg);
}

.page-number:hover:not(.active) {
  background: rgba(0, 212, 255, 0.1);
}

/* 模态框 */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.modal.show,
.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
}

.modal-content {
  position: relative;
  background: var(--card-bg);
  border-radius: 20px;
  max-width: 800px;
  max-height: 90vh;
  overflow: auto;
  border: 1px solid rgba(0, 212, 255, 0.3);
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem;
  border-bottom: 1px solid rgba(0, 212, 255, 0.2);
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-light);
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.close-btn:hover {
  background: var(--glass-bg);
  color: var(--primary-color);
}

.modal-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  padding: 2rem;
}

.modal-preview {
  position: relative;
}

.preview-container {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: var(--gradient-1);
  aspect-ratio: 16/9;
}

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

.preview-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.preview-container:hover .preview-overlay {
  opacity: 1;
}

.preview-btn {
  background: var(--gradient-2);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

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

.modal-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.project-type-badge {
  background: rgba(0, 212, 255, 0.2);
  color: var(--primary-color);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  align-self: flex-start;
}

.modal-description {
  color: var(--text-dim);
  line-height: 1.6;
  flex: 1;
}

.modal-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* 页脚 */
.footer {
  background: var(--darker-bg);
  border-top: 1px solid rgba(0, 212, 255, 0.2);
  padding: 3rem 0 2rem;
  margin-top: 4rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section ul li a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.3s ease;
  cursor: pointer !important;
}

.footer-section ul li a:hover {
  color: var(--primary-color);
  cursor: pointer !important;
}

.footer-brand {
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.footer-brand i {
  margin-right: 0.5rem;
}

.contact-info {
  margin-top: 1rem;
}

.contact-info p {
  color: var(--text-light);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.contact-info p i {
  color: var(--primary-color);
}

.contact-note {
  font-size: 0.9rem;
  color: var(--text-dim) !important;
  margin-left: 1.5rem;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(0, 212, 255, 0.1);
  color: var(--text-dim);
}

/* 动画效果 */
@keyframes slideInLeft {
  from {
    transform: translateX(-50px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(50px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideInUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* 响应式设计 */
@media (max-width: 1024px) {
  .tech-stack {
    gap: 1.5rem;
    margin-top: 3rem;
  }

  .tech-item {
    padding: 1rem 1.2rem;
    min-width: 100px;
  }

  .tech-item i {
    font-size: 1.6rem;
  }

  .tech-item span {
    font-size: 0.85rem;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }

  .section-header {
    text-align: center;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .controls-panel {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-controls {
    justify-content: center;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .modal-body {
    grid-template-columns: 1fr;
  }

  .tech-stack {
    gap: 1rem;
    margin-top: 2rem;
    justify-content: space-around;
  }

  .tech-item {
    padding: 0.8rem 1rem;
    min-width: 80px;
    flex: 1 1 calc(33.333% - 0.67rem);
    max-width: 150px;
  }

  .tech-item i {
    font-size: 1.4rem;
  }

  .tech-item span {
    font-size: 0.8rem;
    line-height: 1.2;
  }

  .subject-filters {
    gap: 0.3rem;
  }

  .subject-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }

  .subject-btn i {
    margin-right: 0.3rem;
    font-size: 0.9rem;
  }

  .pagination-info {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  .hero-buttons {
    justify-content: center;
  }

  .container {
    padding: 0 1rem;
  }

  .main-controls {
    margin-top: 2rem;
    padding: 1.5rem;
  }

  .main-filter-selectors {
    flex-direction: column;
    align-items: stretch;
  }

  .selector-group {
    width: 100%;
  }

  .filter-selector {
    width: 100%;
  }

  .search-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

  .btn {
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
  }

  .filter-tabs {
    flex-wrap: wrap;
  }

  .modal-content {
    margin: 1rem;
    max-height: calc(100vh - 2rem);
  }

  .tech-stack {
    gap: 0.8rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .tech-item {
    padding: 0.7rem 0.8rem;
    min-width: 70px;
    flex: 1 1 calc(50% - 0.4rem);
    max-width: 120px;
  }

  .tech-item:nth-child(5) {
    flex: 1 1 100%;
    max-width: 150px;
  }

  .tech-item i {
    font-size: 1.2rem;
  }

  .tech-item span {
    font-size: 0.75rem;
    line-height: 1.1;
  }

  .subject-filters {
    justify-content: center;
  }

  .subject-btn {
    flex: 1;
    min-width: 0;
    text-align: center;
  }
}

/* 滚动条美化 */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--darker-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-color);
}

/* 选择文本美化 */
::selection {
  background: var(--primary-color);
  color: var(--dark-bg);
}

/* 焦点样式 */
*:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* 确保所有链接都有正确的鼠标指针 */
a {
  cursor: pointer !important;
}

a:hover {
  cursor: pointer !important;
}

/* 学科筛选按钮 - 科技风格 */
.subject-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.subject-btn {
  background: rgba(15, 15, 25, 0.8);
  border: 1px solid rgba(0, 212, 255, 0.3);
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-family: var(--font-tech);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.subject-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

.subject-btn:hover::before {
  left: 100%;
}

.subject-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
  transform: translateY(-2px);
}

.subject-btn.active {
  background: rgba(0, 212, 255, 0.1);
  border-color: var(--primary-color);
  color: var(--primary-color);
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.4);
}

.subject-btn i {
  margin-right: 0.5rem;
  font-size: 1rem;
}

/* 更新技术栈项目点击功能 */
.tech-item[data-stage] {
  cursor: pointer;
  transition: var(--transition);
}

.tech-item[data-stage]:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 10px 30px rgba(0, 212, 255, 0.4);
}

.tech-item[data-stage]:active {
  transform: translateY(-2px) scale(1.02);
}

/* 分页信息样式更新 */
.pagination-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-secondary);
  font-family: var(--font-tech);
  font-size: 0.9rem;
}

#paginationText {
  color: var(--text-secondary);
}

.page-size-selector {
  background: rgba(15, 15, 25, 0.8);
  border: 1px solid rgba(0, 212, 255, 0.3);
  color: var(--text-light);
  padding: 0.3rem 0.8rem;
  border-radius: 6px;
  font-family: var(--font-tech);
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
  backdrop-filter: blur(10px);
}

.page-size-selector:hover {
  border-color: var(--primary-color);
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.page-size-selector:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.4);
}

/* 教育信息和目标显示样式 */
.education-info {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.education-badge {
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.3);
  color: var(--primary-color);
  padding: 0.3rem 0.8rem;
  border-radius: 12px;
  font-family: var(--font-tech);
  font-size: 0.8rem;
  font-weight: 500;
}

.education-goals {
  margin: 1rem 0;
}

.education-goals h4 {
  color: var(--primary-color);
  font-family: var(--font-tech);
  font-size: 1rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.education-goals h4::before {
  content: '🎯';
  font-size: 1.2em;
}

.education-goals ul {
  list-style: none;
  padding: 0;
}

.education-goals li {
  background: rgba(15, 15, 25, 0.6);
  border-left: 3px solid var(--primary-color);
  padding: 0.5rem 1rem;
  margin: 0.5rem 0;
  border-radius: 0 6px 6px 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: var(--transition);
}

.education-goals li:hover {
  background: rgba(0, 212, 255, 0.05);
  color: var(--text-light);
}

/* 响应式设计已合并到主要媒体查询中 */

/* 使用指南模态框样式 */
.guide-modal .modal-content {
  max-width: 600px;
  width: 90%;
}

.guide-section {
  margin: 1.5rem 0;
  padding: 1rem;
  background: rgba(0, 212, 255, 0.05);
  border-left: 3px solid var(--primary-color);
  border-radius: 0 8px 8px 0;
}

.guide-section h4 {
  color: var(--primary-color);
  font-family: var(--font-tech);
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.guide-section p {
  color: var(--text-secondary);
  margin: 0.5rem 0;
  line-height: 1.6;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1.5rem;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition);
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--primary-color);
}

.modal-footer {
  padding: 1rem 2rem 2rem;
  text-align: center;
  border-top: 1px solid rgba(0, 212, 255, 0.2);
}

/* 响应式优化已合并到主要媒体查询 */

/* 外部视频卡片特殊样式 */
.project-card.external-video {
  border: 2px solid rgba(59, 130, 246, 0.3);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(147, 51, 234, 0.05));
}

.external-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 2;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.source-info {
  font-size: 0.8rem;
  color: #3b82f6;
  font-weight: 500;
  background: rgba(59, 130, 246, 0.1);
  padding: 2px 8px;
  border-radius: 8px;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #5eead4, #14b8a6);
  color: #0f172a;
  text-decoration: none;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
}

.action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(94, 234, 212, 0.4);
  text-decoration: none;
  color: #0f172a;
}

.external-video-btn {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: white;
}

.external-video-btn:hover {
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
  color: white;
}

.grade-badge {
  background: rgba(168, 85, 247, 0.2);
  border: 1px solid rgba(168, 85, 247, 0.3);
  color: #a855f7;
}

/* 响应式优化 */
@media (max-width: 768px) {
  .project-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .source-info {
    align-self: flex-end;
  }

  .external-badge {
    position: static;
    margin-bottom: 0.5rem;
    align-self: flex-start;
  }
}

/* AI工具区域样式 */
.tools-section {
  padding: 4rem 0;
  background: linear-gradient(180deg, rgba(0, 212, 255, 0.05) 0%, transparent 100%);
}

.tools-container {
  margin-top: 2rem;
}

.tools-grid {
  display: grid !important;
  grid-template-columns: repeat(6, 1fr) !important;
  gap: 1.5rem !important;
  margin-top: 2rem !important;
  width: 100% !important;
}

.tool-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
  position: relative;
  overflow: hidden;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

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

.tool-card:hover {
  transform: translateY(-5px);
  border-color: #00d4ff;
  box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
  background: rgba(0, 212, 255, 0.1);
}

.tool-icon {
  width: 48px !important;
  height: 48px !important;
  margin-bottom: 1rem;
  display: block;
  transition: transform 0.3s ease;
  object-fit: contain;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  padding: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tool-card:hover .tool-icon {
  transform: scale(1.1);
}

.tool-name {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.tool-description {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* AI工具响应式设计 */
@media (max-width: 1200px) {
  .tools-grid {
    grid-template-columns: repeat(4, 1fr) !important;
  }
}

@media (max-width: 768px) {
  .tools-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1rem !important;
  }
  
  .tool-card {
    padding: 1rem;
  }
  
  .tool-icon {
    width: 40px !important;
    height: 40px !important;
  }
  
  .tool-name {
    font-size: 0.9rem;
  }
  
  .tool-description {
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .tools-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.8rem !important;
  }
  
  .tool-card {
    padding: 0.8rem;
  }
  
  .tool-icon {
    width: 36px !important;
    height: 36px !important;
  }
  
  .tool-name {
    font-size: 0.85rem;
  }
  
  .tool-description {
    font-size: 0.75rem;
  }
}
