/* 颜色主题 */
:root {
  --primary: #4A90E2;  /* 浅蓝 */
  --secondary: #A0E7A0;  /* 浅绿色 */
  --accent: #6AD4DD;   /* 柔和青色 */
  --text: #2C3E50;     /* 深蓝 */
}

/* 基础样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* 动画背景 */
body {
  background: linear-gradient(45deg, #ffcccc, #ffffcc, #ccffcc, #cceeff, #ffe5cc, #ffcccc);
  background-size: 400% 400%;
  animation: gradientBG 30s ease infinite;
  line-height: 1.6;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

@keyframes gradientBG {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

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

/* 导航栏 - PC样式 */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  animation: slideDown 0.5s ease;
}

.logo h1 a {
  text-decoration: none;
  color: black;
  font-size: xx-large;
}

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

.nav-links a {
  margin-left: 2rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  transition: all 0.3s ease;
}

.nav-links a:hover {
  color: var(--primary);
  transform: translateY(-2px);
}

/* 下拉菜单样式 */
.dropdown {
  position: relative;
  margin-left: 2rem;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  min-width: 160px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
  border-radius: 8px;
  padding: 0.5rem 0;
  z-index: 100;
}

.dropdown:hover .dropdown-menu {
  display: block;
}

.dropdown-menu a {
  display: block;
  padding: 0.8rem 1rem;
  margin: 0;
  color: var(--text);
  transition: all 0.2s ease;
}

.dropdown-menu a:hover {
  background: black;
  color: white;
  transform: none;
}

/* 主体内容 */
.hero {
  display: flex;
  align-items: center;
  min-height: 80vh;
  padding: 4rem 0;
}

.hero-content {
  flex: 1;
  padding-right: 2rem;
}

.hero-content p {
  text-align: left;
  text-indent: 2em;
  /* 增加段落间距 */
  margin-bottom: 1rem;
}

.hero-image {
  flex: 1;
  text-align: center;
}

.avatar {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 15px 30px rgba(0,0,0,0.1);
  animation: float 3s ease-in-out infinite;
}

h2 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  background: linear-gradient(45deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* 社交链接 */
.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  padding: 12px;
  background: rgba(255,255,255,0.3);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.3s ease;
}

.social-links a:hover {
  background: rgba(74, 144, 226, 0.2);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* 图标 */
.icon {
  display: inline-block;
  width: 24px;
  height: 24px;
  background-size: cover;
  margin-right: 8px;
}

/* GitHub 图标 */
.github-icon {
  width: 26px;
  height: 26px;
  background: url("./img/github-original.svg");
}

/* 微信图标 */
.wechat-icon {
  width: 26px;
  background: url("./img/weixin.svg");
}

/* TikTok 图标 */
.douyin-icon {
  width: 21px;
  background: url("./img/tiktok.svg");
}

/* 电话图标 */
.phone-icon {
  background: url("./img/phone.svg");
}

/* 邮件图标 */
.email-icon {
  background: url("./img/envelope.svg");
}

/* 动画效果 */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

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

/* 快捷入口 */
.quick-links {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin: 3rem 0;
}

.quick-link {
  flex: 1;
  max-width: 250px;
  padding: 20px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  text-align: center;
  border-radius: 12px;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  cursor: pointer;
}

.quick-link h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.quick-link p {
  font-size: 0.9rem;
}

.quick-link:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.3);
}

/* 页脚 */
.footer {
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
  color: var(--text);
}
.footer a {
  color: var(--text);
  text-decoration: none;
}
.footer a:hover {
  text-decoration: underline;
}

/* 内容样式 */
.content p {
  text-align: left;
  text-indent: 2em;
  margin-bottom: 1rem;
}

hr {
  margin: 1.5rem 0;
  border: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--primary), transparent);
}

/* ====================== 移动端优化 ====================== */
/* 汉堡菜单按钮 */
.hamburger {
  display: none;
  cursor: pointer;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--text);
  z-index: 100;
}

/* 移动端导航菜单 */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.95);
  z-index: 999;
  padding: 80px 20px 20px;
  overflow-y: auto;
}

.mobile-menu.active {
  display: block;
}

.mobile-menu .nav-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.mobile-menu .nav-links a {
  margin: 1rem 0;
  font-size: 1.2rem;
}

.mobile-menu .dropdown {
  margin: 0;
  width: 100%;
}

.mobile-menu .dropdown-menu {
  position: static;
  display: none;
  width: 100%;
  margin-top: 0.5rem;
  box-shadow: none;
  background: rgba(240, 240, 240, 0.8);
}

.mobile-menu .dropdown.active .dropdown-menu {
  display: block;
}

.mobile-menu .dropdown-toggle::after {
  content: " ▼";
  font-size: 0.8em;
}

/* 关闭按钮 */
.close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--text);
  cursor: pointer;
}

/* 响应式设计 */
@media (max-width: 992px) {
  .quick-links {
    flex-wrap: wrap;
    gap: 20px;
  }
  
  .quick-link {
    min-width: calc(50% - 20px);
    max-width: calc(50% - 20px);
  }
}

@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }
  
  .nav-links {
    display: none;
  }
  
  .hamburger {
    display: block;
  }
  
  .hero {
    flex-direction: column;
    text-align: center;
    min-height: auto;
    padding: 2rem 0;
  }
  
  .hero-content {
    padding-right: 0;
    margin-bottom: 2rem;
    order: 2;
  }

  .hero-content p {
    text-align: left;
  }

  .hero-image {
    order: 1;
    margin-bottom: 2rem;
  }
  
  h2 {
    font-size: 2.5rem;
  }
  
  .avatar {
    width: 220px;
    height: 220px;
  }
  
  .social-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
  }
  
  .social-links a {
    padding: 10px 15px;
    font-size: 0.9rem;
  }
  
  .quick-links {
    flex-direction: column;
    align-items: center;
  }
  
  .quick-link {
    min-width: 100%;
    max-width: 320px;
  }
  
  .footer {
    padding: 1.5rem 1rem;
  }
}

@media (max-width: 480px) {
  .logo h1 a {
    font-size: 1.5rem;
  }
  
  h2 {
    font-size: 2rem;
  }
  
  .avatar {
    width: 180px;
    height: 180px;
  }
  
  .social-links a {
    flex: 1 0 calc(50% - 0.8rem);
    justify-content: center;
    text-align: center;
  }
}