/* ===== 全局样式 ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #6366f1;
  --secondary-color: #8b5cf6;
  --accent-color: #ec4899;
  --dark-bg: #1e293b;
  --light-bg: #f8fafc;
  --text-dark: #1e293b;
  --text-light: #64748b;
  --white: #ffffff;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.15);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--white);
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== 导航栏 ===== */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  transition: all 0.3s ease;
}

nav.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-link {
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 500;
  position: relative;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  transition: width 0.3s ease;
}

.nav-link:hover {
  color: var(--primary-color);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link.active {
  color: var(--primary-color);
}

.nav-link.active::after {
  width: 100%;
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--text-dark);
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* ===== 首页横幅 ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  position: relative;
  overflow: hidden;
  padding-top: 80px;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
  opacity: 0.3;
}

.hero-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-text {
  color: var(--white);
}

.typing-text {
  font-size: 3.5rem;
  font-weight: bold;
  margin-bottom: 1.5rem;
  line-height: 1.2;
  animation: fadeInUp 1s ease;
}

.highlight {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  animation: fadeInUp 1s ease 0.2s both;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  animation: fadeInUp 1s ease 0.4s both;
}

.btn {
  padding: 12px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-block;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--white);
  color: var(--primary-color);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(255, 255, 255, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}

.btn-secondary:hover {
  background: var(--white);
  color: var(--primary-color);
}

.hero-image {
  animation: fadeInRight 1s ease;
}

.image-wrapper {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-hover);
  transform: perspective(1000px) rotateY(-5deg);
  transition: transform 0.3s ease;
}

.image-wrapper:hover {
  transform: perspective(1000px) rotateY(0deg) scale(1.05);
}

.image-wrapper img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: var(--white);
  animation: bounce 2s infinite;
}

.mouse {
  width: 30px;
  height: 50px;
  border: 2px solid var(--white);
  border-radius: 20px;
  margin: 10px auto;
  position: relative;
}

.mouse::before {
  content: '';
  width: 4px;
  height: 10px;
  background: var(--white);
  border-radius: 2px;
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  animation: scroll 2s infinite;
}

/* ===== 区块通用样式 ===== */
.section {
  padding: 100px 0;
  position: relative;
}

.section-dark {
  background: var(--dark-bg);
  color: var(--white);
}

.section-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
  display: inline-block;
  width: 100%;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 2px;
}

.section-dark .section-title::after {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

/* ===== 关于我 ===== */
.about-content {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 4rem;
  align-items: center;
}

.about-image {
  position: relative;
}

.about-image img {
  width: 100%;
  border-radius: 20px;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
}

.about-image:hover img {
  transform: scale(1.05);
}

.about-text h3 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
}

.about-text p {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 2rem;
  line-height: 1.8;
}

.about-info {
  display: grid;
  gap: 1.5rem;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--light-bg);
  border-radius: 10px;
  transition: transform 0.3s ease;
}

.info-item:hover {
  transform: translateX(10px);
}

.info-label {
  font-weight: 600;
  color: var(--primary-color);
  min-width: 80px;
}

.info-value {
  color: var(--text-dark);
}

/* ===== 技能展示 ===== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.skill-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 2rem;
  border-radius: 20px;
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.skill-card:hover {
  transform: translateY(-10px);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow-hover);
}

.skill-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.skill-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.tag {
  background: rgba(255, 255, 255, 0.2);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.tag:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

/* ===== 项目展示 ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.project-card {
  background: var(--white);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-hover);
}

.project-image {
  height: 200px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.project-placeholder {
  color: var(--white);
  font-size: 2rem;
  font-weight: bold;
  z-index: 1;
}

.project-content {
  padding: 2rem;
}

.project-content h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.project-content p {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.project-tags .tag {
  background: var(--light-bg);
  color: var(--text-dark);
  padding: 0.4rem 0.8rem;
  border-radius: 15px;
  font-size: 0.85rem;
}

.project-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-block;
}

.project-link:hover {
  transform: translateX(5px);
}

/* ===== 联系方式 ===== */
.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-info h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.contact-info p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  line-height: 1.8;
}

.social-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--white);
  text-decoration: none;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  transition: all 0.3s ease;
}

.social-link:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(10px);
}

.social-link span {
  font-size: 1.5rem;
}

/* 社交媒体图标样式 */
.social-icon {
  width: 24px;
  height: 24px;
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
  transition: transform 0.3s ease;
}

.social-link:hover .social-icon {
  transform: scale(1.2) rotate(5deg);
}

/* CSDN图标特殊样式 */
.csdn-icon {
  color: #FC5531; /* CSDN品牌色 - 橙红色 */
  width: 24px;
  height: 24px;
  filter: drop-shadow(0 2px 4px rgba(252, 85, 49, 0.3));
}

.social-link:hover .csdn-icon {
  color: #FF6B4A; /* 悬停时更亮的颜色 */
  filter: drop-shadow(0 4px 8px rgba(255, 107, 74, 0.5));
  transform: scale(1.2) rotate(5deg);
}

.contact-form {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 2rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ===== 工具库样式 - 科技风 ===== */
#tools {
  position: relative;
  overflow: hidden;
}

/* 科技感背景 */
#tools::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%),
    radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.1) 0%, transparent 70%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.03) 0px, rgba(255, 255, 255, 0.03) 1px, transparent 1px, transparent 10px);
  z-index: 0;
}

/* 科技感装饰线条 */
#tools::after {
  content: '';
  position: absolute;
  top: 20%;
  left: 10%;
  width: 300px;
  height: 300px;
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 50%;
  z-index: 0;
  animation: pulse 8s infinite ease-in-out;
}

#tools .container::before {
  content: '';
  position: absolute;
  bottom: 10%;
  right: 10%;
  width: 200px;
  height: 200px;
  border: 1px solid rgba(236, 72, 153, 0.3);
  border-radius: 50%;
  z-index: 0;
  animation: pulse 6s infinite ease-in-out reverse;
}

.section-description {
  text-align: center;
  font-size: 1.1rem;
  margin-bottom: 3rem;
  opacity: 0.9;
  position: relative;
  z-index: 1;
  text-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

/* 科技感装饰元素 */
.tech-divider {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-top: 4rem;
  padding-top: 2rem;
  position: relative;
  z-index: 1;
}

.tech-dot {
  width: 10px;
  height: 10px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-radius: 50%;
  animation: dotPulse 2s infinite ease-in-out;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.6);
}

.tech-dot:nth-child(2) {
  animation-delay: 0.5s;
}

.tech-dot:nth-child(3) {
  animation-delay: 1s;
}

/* 文本发光效果 */
.text-glow {
  font-family: 'Courier New', monospace;
  color: #a5b4fc;
  text-shadow: 0 0 10px rgba(99, 102, 241, 0.8), 0 0 20px rgba(99, 102, 241, 0.5);
  font-weight: bold;
  font-size: 1.2em;
  animation: textGlow 2s infinite alternate;
}

/* 额外动画 */
@keyframes dotPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.6);
  }
  50% {
    transform: scale(1.3);
    opacity: 0.8;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.8);
  }
}

@keyframes textGlow {
  0% {
    text-shadow: 0 0 5px rgba(99, 102, 241, 0.5), 0 0 10px rgba(99, 102, 241, 0.3);
  }
  100% {
    text-shadow: 0 0 10px rgba(99, 102, 241, 0.8), 0 0 20px rgba(99, 102, 241, 0.6), 0 0 30px rgba(99, 102, 241, 0.4);
  }
}

/* 页面加载时的渐入动画 */
#tools .section-title,
#tools .section-description,
#tools .tools-grid,
#tools .tech-divider {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease forwards;
}

#tools .section-title {
  animation-delay: 0.2s;
}

#tools .section-description {
  animation-delay: 0.4s;
}

#tools .tools-grid {
  animation-delay: 0.6s;
}

#tools .tech-divider {
  animation-delay: 1s;
}

/* 工具卡片的交错动画 */
.tool-card:nth-child(1) {
  animation-delay: 0.7s;
}

.tool-card:nth-child(2) {
  animation-delay: 0.9s;
}

.tool-card:nth-child(3) {
  animation-delay: 1.1s;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
  position: relative;
  z-index: 1;
}

.tool-card {
  background: rgba(30, 41, 59, 0.8);
  backdrop-filter: blur(12px);
  padding: 2.5rem;
  border-radius: 16px;
  text-align: center;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* 卡片发光边框效果 */
.tool-card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2), rgba(236, 72, 153, 0.2));
  border-radius: 17px;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.tool-card:hover::before {
  opacity: 1;
  animation: borderGlow 2s infinite alternate;
}

/* 卡片悬停效果 */
.tool-card:hover {
  transform: translateY(-12px);
  background: rgba(30, 41, 59, 0.9);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3), 0 0 20px rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.6);
}

.tool-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  transition: all 0.5s ease;
  position: relative;
  display: inline-block;
}

/* 图标脉冲效果 */
.tool-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.3) 0%, transparent 70%);
  z-index: -1;
  animation: iconPulse 3s infinite ease-out;
}

.tool-card:hover .tool-icon {
  transform: scale(1.2) rotate(5deg);
  filter: drop-shadow(0 0 15px rgba(99, 102, 241, 0.6));
}

.tool-card h3 {
  font-size: 1.6rem;
  margin-bottom: 1.2rem;
  background: linear-gradient(135deg, #ffffff, #a5b4fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 2px 10px rgba(99, 102, 241, 0.3);
}

.tool-card p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1.8rem;
  line-height: 1.7;
  font-size: 1.05rem;
}

.tool-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.tool-tags .tag {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2));
  color: var(--white);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid rgba(99, 102, 241, 0.3);
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.tool-tags .tag:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.4), rgba(139, 92, 246, 0.4));
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
}

/* 科技风按钮样式 */
.tool-card .btn-primary {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: var(--white);
  padding: 12px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.4s ease;
  display: inline-block;
  border: none;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* 按钮发光效果 */
.tool-card .btn-primary::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  transition: all 0.6s ease;
  border-radius: 50%;
}

.tool-card .btn-primary:hover::before {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.tool-card .btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5), 0 0 15px rgba(99, 102, 241, 0.4);
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
}

/* 按钮点击效果 */
.tool-card .btn-primary:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

/* 动画效果 */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.8;
  }
}

@keyframes borderGlow {
  0% {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2), rgba(236, 72, 153, 0.2));
  }
  50% {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.3), rgba(99, 102, 241, 0.3), rgba(139, 92, 246, 0.3));
  }
  100% {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(236, 72, 153, 0.2), rgba(99, 102, 241, 0.2));
  }
}

@keyframes iconPulse {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.5;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0;
  }
}

/* 响应式调整 */
@media (max-width: 768px) {
  .tools-grid {
    gap: 2rem;
  }
  
  .tool-card {
    padding: 2rem;
  }
  
  .tool-icon {
    font-size: 3rem;
  }
  
  #tools::after,
  #tools .container::before {
    display: none;
  }
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  background: rgba(255, 255, 255, 0.15);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* ===== 留言板 ===== */
.message-board {
  max-width: 1000px;
  margin: 0 auto;
}

.message-form-wrapper {
  background: var(--white);
  padding: 2rem;
  border-radius: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 3rem;
}

.message-form .form-group input,
.message-form .form-group textarea {
  background: var(--light-bg);
  border: 1px solid #e2e8f0;
  color: var(--text-dark);
}

.message-form .form-group input::placeholder,
.message-form .form-group textarea::placeholder {
  color: var(--text-light);
}

.message-form .form-group input:focus,
.message-form .form-group textarea:focus {
  background: var(--white);
  border-color: var(--primary-color);
}

.message-list-wrapper h3 {
  margin-bottom: 1.5rem;
  color: var(--text-dark);
}

.message-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.message-item {
  background: var(--white);
  padding: 1.5rem;
  border-radius: 15px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border-left: 4px solid var(--primary-color);
  transition: all 0.3s ease;
}

.message-item:hover {
  transform: translateX(5px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.message-item strong {
  color: var(--primary-color);
  font-size: 1.1rem;
}

.message-item p {
  margin: 0.5rem 0;
  color: var(--text-dark);
  line-height: 1.6;
}

.message-time {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* ===== 页脚 ===== */
.footer {
  background: var(--dark-bg);
  color: var(--white);
  text-align: center;
  padding: 2rem 0;
}

.footer p {
  margin: 0.5rem 0;
  opacity: 0.8;
}

/* ===== 返回顶部按钮 ===== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--white);
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

/* ===== 动画 ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

@keyframes scroll {
  0% {
    opacity: 1;
    top: 10px;
  }
  100% {
    opacity: 0;
    top: 30px;
  }
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background: var(--white);
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
    padding: 2rem 0;
  }

  .nav-menu.active {
    left: 0;
  }

  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .typing-text {
    font-size: 2.5rem;
  }

  .about-content {
    grid-template-columns: 1fr;
  }

  .contact-content {
    grid-template-columns: 1fr;
  }

  .skills-grid,
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .section-title {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .typing-text {
    font-size: 2rem;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    text-align: center;
  }
}









/* ===== 跳转动画样式 ===== */
.transition-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--dark-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.transition-overlay.active {
  opacity: 1;
  visibility: visible;
}

.codebear-logo {
  text-align: center;
  margin-bottom: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fadeInUp 0.8s ease;
}

.logo-icon {
  font-size: 4rem;
  margin-bottom: 15px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: pulse 1.5s ease-in-out infinite;
}

.logo-text {
  font-size: 2.5rem;
  font-weight: bold;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 精美的进度条样式 */
.progress-container {
  width: 80%;
  max-width: 500px;
  margin: 0 auto;
  animation: fadeIn 1s ease 0.3s both;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  margin-bottom: 15px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) inset;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  border-radius: 4px;
  width: 0;
  transition: width 2s ease;
  position: relative;
  overflow: hidden;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 1.5s infinite;
}

.progress-text {
  text-align: center;
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 500;
  opacity: 0.9;
}

/* 动画效果 */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* 加载提示文本动画 */
.loading-text {
  margin-top: 20px;
  color: var(--white);
  opacity: 0.8;
  font-size: 1rem;
  animation: fadeIn 1s ease 0.5s both;
}

.loading-text span {
  animation: loadingDots 1.5s infinite;
  opacity: 0;
}

.loading-text span:nth-child(1) { animation-delay: 0s; }
.loading-text span:nth-child(2) { animation-delay: 0.3s; }
.loading-text span:nth-child(3) { animation-delay: 0.6s; }

@keyframes loadingDots {
  0%, 100% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
}

.redirect-logo {
  font-size: 3rem;
  font-weight: bold;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: scaleIn 0.5s ease 0.2s both;
}

.redirect-text {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  animation: fadeIn 0.5s ease 0.4s both;
}

.redirect-progress {
  width: 200px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  overflow: hidden;
  margin: 0 auto;
  animation: fadeIn 0.5s ease 0.6s both;
}

.redirect-progress::after {
  content: '';
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  animation: progressFill 1.5s ease forwards;
}

/* 动画关键帧 */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes scaleIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes progressFill {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

/* 项目链接悬停效果增强 */
.project-link {
  position: relative;
  display: inline-block;
  overflow: hidden;
  transition: all 0.3s ease;
}

.project-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width 0.3s ease;
}

.project-link:hover {
  color: var(--primary-color);
  transform: translateX(5px);
}

.project-link:hover::after {
  width: 100%;
}


/*新增页尾*/
/* From Uiverse.io by solowzrd */ 
.jp-matrix {
  background-color: #05050a;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
  grid-auto-rows: 40px;
  min-width: 1920px;
  min-height: 1080px;
  font-size: 32px;
  color: rgba(0, 150, 255, 0.4);
  font-family: "Courier New", Courier, monospace;
  justify-content: center;
  align-content: center;
}

.jp-matrix > span {
  text-align: center;
  text-shadow: 0 0 5px rgba(0, 150, 255, 0.5);
  user-select: none;
  transition:
    color 0.5s,
    text-shadow 0.5s;
  line-height: 1;
}

.jp-matrix > span:nth-child(19n + 2) {
  animation: smooth-pulse 3.5s ease-in-out infinite 0.2s;
}
.jp-matrix > span:nth-child(29n + 1) {
  animation: smooth-pulse 4.1s ease-in-out infinite 0.7s;
}
.jp-matrix > span:nth-child(11n) {
  color: rgba(100, 200, 255, 0.7);
  animation: smooth-pulse 2.9s ease-in-out infinite 1.1s;
}
.jp-matrix > span:nth-child(37n + 10) {
  animation: smooth-pulse 5.3s ease-in-out infinite 1.5s;
}
.jp-matrix > span:nth-child(41n + 1) {
  animation: smooth-pulse 3.9s ease-in-out infinite 0.4s;
}
.jp-matrix > span:nth-child(17n + 9) {
  animation: smooth-pulse 2.8s ease-in-out infinite 0.9s;
}
.jp-matrix > span:nth-child(23n + 18) {
  animation: smooth-pulse 4.3s ease-in-out infinite 1.3s;
}
.jp-matrix > span:nth-child(31n + 4) {
  animation: smooth-pulse 5.6s ease-in-out infinite 0.1s;
}
.jp-matrix > span:nth-child(43n + 20) {
  animation: smooth-pulse 3.6s ease-in-out infinite 1.8s;
}
.jp-matrix > span:nth-child(13n + 6) {
  animation: smooth-pulse 3.2s ease-in-out infinite 1.2s;
}
.jp-matrix > span:nth-child(53n + 5) {
  animation: smooth-pulse 4.9s ease-in-out infinite 0.5s;
}
.jp-matrix > span:nth-child(47n + 15) {
  animation: smooth-pulse 5.9s ease-in-out infinite 1s;
}

@keyframes smooth-pulse {
  0%,
  100% {
    color: rgba(0, 150, 255, 0.4);
    text-shadow: 0 0 5px rgba(0, 150, 255, 0.5);
  }
  30% {
    color: rgba(100, 200, 255, 1);
    text-shadow:
      0 0 10px rgba(100, 200, 255, 1),
      0 0 15px rgba(100, 200, 255, 1);
  }
  50% {
    color: rgba(255, 105, 180, 1);
    text-shadow:
      0 0 10px rgba(255, 105, 180, 1),
      0 0 15px rgba(255, 105, 180, 1);
  }
  70% {
    color: #ffffff;
    text-shadow:
      0 0 10px #fff,
      0 0 15px #fff,
      0 0 20px #fff;
  }
}


/* 转场动画容器：全屏覆盖，固定定位在最顶层 */
.transition-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #1e293b; /* 使用深色背景，与logo形成对比 */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999; /* 确保在所有元素上方 */
  opacity: 0;
  pointer-events: none; /* 默认不拦截点击 */
  transition: opacity 0.3s ease;
}

/* 转场动画激活状态：显示并拦截点击 */
.transition-overlay.active {
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.3s ease;
}

/* 确保在active状态时重新应用动画 */
.transition-overlay.active .codebear-logo {
  animation: logoTransition 1.5s ease-in-out;
}

/* CodeBear logo 样式（文字+图标版） */
.codebear-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transform: scale(0.8);
  opacity: 0;
}

/* logo 图标（用 Font Awesome 4.7.0版本） */
.logo-icon {
  font-size: 8rem; /* 增大图标大小 */
  color: #6366f1; /* 使用主题色 */
  margin-bottom: 1.5rem;
  text-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
}

/* logo 文字 */
.logo-text {
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 3px;
  text-transform: uppercase;
}

/* logo 转场动画：缩放+透明度变化 */
@keyframes logoTransition {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* 可选：给链接添加 hover 效果，提示可点击 */
.project-link {
  position: relative;
  transition: color 0.3s ease;
}

.project-link:hover {
  color: #2563eb;
}

.project-link::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #2563eb;
  transition: width 0.3s ease;
}

.project-link:hover::after {
  width: 100%;
}