/* ============================================================
   个人网站样式 - 改这里就能换颜色主题
   ============================================================ */

:root {
  --bg: #0f0f0f;
  --bg-alt: #1a1a1a;
  --bg-card: #222;
  --text: #f5f5f5;
  --text-dim: #999;
  --accent: #4dabf7;
  --accent-dark: #3b82c4;
  --border: #333;
  --radius: 12px;
  --max-width: 1200px;
  --nav-h: 60px;
}

/* 浅色主题（如需切换可改 :root 里的变量） */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ========== 导航栏 ========== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-h);
  background: rgba(15, 15, 15, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: all 0.3s ease;
}

.navbar.scrolled {
  background: rgba(15, 15, 15, 0.95);
}

.nav-container {
  max-width: var(--max-width);
  height: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.nav-menu {
  list-style: none;
  display: flex;
  gap: 30px;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text-dim);
  transition: color 0.2s;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

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

/* 汉堡菜单按钮 */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ========== Hero 首页 ========== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 20px 40px;
  position: relative;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(77, 171, 247, 0.15), transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(139, 92, 246, 0.1), transparent 50%),
    var(--bg);
}

.hero-content {
  max-width: 700px;
  animation: fadeInUp 1s ease;
}

.hero-greeting {
  font-size: 1rem;
  color: var(--accent);
  margin-bottom: 10px;
  letter-spacing: 2px;
}

.hero-title {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 20px;
}

.accent {
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--text-dim);
  margin-bottom: 35px;
}

.hero-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  padding: 12px 32px;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(77, 171, 247, 0.4);
}

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

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hero-scroll-hint {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: var(--text-dim);
  font-size: 0.8rem;
  animation: bounce 2s infinite;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(var(--accent), transparent);
  margin: 8px auto 0;
}

/* ========== 通用 Section ========== */
.section {
  padding: 80px 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 10px;
}

.section-desc {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.95rem;
  margin-bottom: 40px;
}

/* ========== 关于 ========== */
.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.about-text p {
  margin-bottom: 16px;
  color: var(--text-dim);
}

.about-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.tag {
  padding: 5px 16px;
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 0.85rem;
  color: var(--accent);
}

.about-stats {
  display: flex;
  gap: 30px;
  justify-content: center;
}

.stat {
  text-align: center;
}

.stat-num {
  display: block;
  font-size: 3rem;
  font-weight: 900;
  color: var(--accent);
}

.stat-label {
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* ========== 画廊网格 ========== */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
}

.gallery-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-dim);
}

.gallery-empty .hint {
  font-size: 0.85rem;
  color: var(--border);
  margin-top: 8px;
}

.gallery-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
}

.gallery-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.gallery-item:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.gallery-item img,
.gallery-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-item .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 50%, rgba(0,0,0,0.8));
  display: flex;
  align-items: flex-end;
  padding: 12px;
  opacity: 0;
  transition: opacity 0.3s;
}

.gallery-item:hover .overlay {
  opacity: 1;
}

.overlay-text {
  color: #fff;
  font-size: 0.9rem;
}

.play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  background: rgba(255,255,255,0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #333;
  opacity: 0.8;
  transition: all 0.3s;
}

.gallery-item:hover .play-icon {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.1);
}

/* ========== 联系 ========== */
.contact-links {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 30px 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.3s ease;
  min-width: 120px;
}

.contact-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.contact-icon {
  font-size: 2rem;
}

/* ========== 页脚 ========== */
.footer {
  text-align: center;
  padding: 30px 20px;
  color: var(--text-dim);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}

/* ========== 灯箱 ========== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox.active {
  display: flex;
}

.lightbox-img {
  max-width: 90%;
  max-height: 85vh;
  border-radius: 8px;
  object-fit: contain;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 2001;
}

.lightbox-close {
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  font-size: 1.5rem;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  font-size: 2rem;
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255,255,255,0.3);
}

/* ========== 视频弹窗 ========== */
.video-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.video-modal.active {
  display: flex;
}

.video-modal-content {
  position: relative;
  width: 100%;
  max-width: 900px;
}

.video-modal-close {
  position: absolute;
  top: -50px;
  right: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
}

#videoPlayer {
  width: 100%;
  max-height: 85vh;
  border-radius: 8px;
  background: #000;
}

/* ========== 微信弹窗 ========== */
.wechat-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.wechat-modal.active {
  display: flex;
}

.wechat-modal-content {
  background: var(--bg-card);
  padding: 30px;
  border-radius: var(--radius);
  text-align: center;
  max-width: 350px;
  border: 1px solid var(--border);
}

.wechat-modal-content h3 {
  margin-bottom: 12px;
}

.wechat-modal-content p {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-bottom: 15px;
}

.wechat-modal-content img {
  width: 250px;
  height: 250px;
  object-fit: cover;
  margin: 0 auto;
  border-radius: 8px;
}

.wechat-modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.8rem;
  cursor: pointer;
}

/* ========== 动画 ========== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* ========== 响应式 - 移动端 ========== */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    width: 100%;
    flex-direction: column;
    background: var(--bg-alt);
    padding: 20px;
    gap: 15px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-150%);
    transition: transform 0.3s ease;
  }

  .nav-menu.active {
    transform: translateY(0);
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .gallery {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
  }

  .lightbox-prev,
  .lightbox-next {
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }

  .contact-card {
    padding: 20px 25px;
    min-width: 100px;
  }

  .section {
    padding: 50px 0;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 200px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-stats {
    gap: 20px;
  }

  .stat-num {
    font-size: 2.2rem;
  }
}
