/* ============ 主题变量 ============ */
:root {
  --bg: #0b0b14;
  --bg-2: #14141f;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-hover: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.08);
  --border-active: rgba(139, 92, 246, 0.4);
  --text: #f4f4f5;
  --text-muted: #a1a1aa;
  --text-dim: #71717a;
  --accent: #8b5cf6;
  --accent-2: #6366f1;
  --accent-3: #ec4899;
  --gradient: linear-gradient(135deg, #8b5cf6 0%, #6366f1 50%, #ec4899 100%);
  --gradient-text: linear-gradient(135deg, #c4b5fd, #a5b4fc, #f9a8d4);
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 60px rgba(139, 92, 246, 0.25);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============ 基础 ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
code {
  background: var(--surface);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.88em;
  color: var(--accent);
  border: 1px solid var(--border);
}

/* ============ 顶部导航 ============ */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(11, 11, 20, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 19px;
  font-weight: 700;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

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

.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 22px;
  cursor: pointer;
}

/* ============ 首屏 Hero ============ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px 24px 60px;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(139, 92, 246, 0.18), transparent 70%),
    radial-gradient(ellipse 40% 40% at 20% 80%, rgba(99, 102, 241, 0.12), transparent 70%),
    radial-gradient(ellipse 40% 40% at 80% 80%, rgba(236, 72, 153, 0.10), transparent 70%);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
  animation: fadeUp 0.8s ease both;
}

.avatar-placeholder {
  width: 128px;
  height: 128px;
  margin: 0 auto 28px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  box-shadow: var(--shadow-glow);
  border: 3px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.hero h1 {
  font-size: 52px;
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -1px;
  background: linear-gradient(135deg, #ffffff, #d4d4d8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tagline {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 18px;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  color: var(--text-muted);
  font-size: 16px;
  margin-bottom: 36px;
  line-height: 1.8;
}

.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  padding: 13px 30px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  transition: var(--transition);
  display: inline-block;
  cursor: pointer;
  border: none;
}

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

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(139, 92, 246, 0.4);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--surface-hover);
  border-color: var(--border-active);
}

/* ============ 通用 Section ============ */
section {
  padding: 100px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-size: 38px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 56px;
}

/* 项目列表标题上移，减少与首页之间的空旷感 */
.projects {
  padding-top: 48px;
}

/* ============ 项目列表 ============ */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

/* ============ 主推暴利热门项目 ============ */
.featured-block {
  margin-bottom: 56px;
  padding: 28px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.12), rgba(139, 92, 246, 0.03));
  border: 1px solid var(--border-active);
  border-radius: var(--radius);
}

.featured-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 22px;
}

.featured-title::before {
  content: "🔥";
  font-size: 20px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

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

.project-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(139, 92, 246, 0.08), transparent 40%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.project-card:hover {
  background: var(--surface-hover);
  transform: translateY(-6px);
  border-color: var(--border-active);
  box-shadow: var(--shadow);
}

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

.project-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-bottom: 18px;
}

.project-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.project-card .card-tagline {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 16px;
  line-height: 1.6;
}

.project-card-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(139, 92, 246, 0.12);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.25);
  font-weight: 500;
}

/* ============ 联系方式 ============ */
.contact-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 24px;
  text-align: center;
  transition: var(--transition);
}

.contact-card:hover {
  background: var(--surface-hover);
  transform: translateY(-4px);
  border-color: var(--border-active);
  box-shadow: var(--shadow);
}

.contact-icon {
  font-size: 36px;
  display: block;
  margin-bottom: 14px;
}

.contact-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
  font-weight: 700;
}

.contact-card p {
  color: var(--text-muted);
  font-size: 14px;
  word-break: break-all;
}

.contact-qrcode {
  width: 180px;
  height: 180px;
  border-radius: 12px;
  margin-top: 16px;
  object-fit: cover;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
}

.contact-qrcode:hover {
  transform: scale(1.05);
}

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

/* ============ 项目详情弹窗 ============ */
.project-detail {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 200;
  padding: 24px;
  overflow-y: auto;
}

.project-detail.active {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  animation: fadeIn 0.25s ease;
}

.project-detail-content {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 720px;
  width: 100%;
  padding: 44px;
  position: relative;
  margin-top: 40px;
  box-shadow: var(--shadow);
  animation: fadeUp 0.35s ease both;
}

.close-detail {
  position: absolute;
  top: 18px; right: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 24px;
  width: 38px; height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  line-height: 1;
}

.close-detail:hover {
  background: var(--surface-hover);
  transform: rotate(90deg);
  border-color: var(--border-active);
}

.detail-header { margin-bottom: 28px; }

.detail-icon {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-glow);
}

.detail-title {
  font-size: 30px;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.detail-tagline {
  color: var(--accent);
  font-size: 16px;
  margin-bottom: 18px;
  font-weight: 500;
}

.detail-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.detail-section {
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.detail-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.detail-section h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-section h4::before {
  content: '';
  width: 4px;
  height: 16px;
  background: var(--gradient);
  border-radius: 2px;
}

.detail-section p {
  color: var(--text-muted);
  line-height: 1.9;
  font-size: 15px;
}

.detail-features li {
  color: var(--text-muted);
  padding: 10px 0;
  padding-left: 28px;
  position: relative;
  font-size: 15px;
}

.detail-features li::before {
  content: '✦';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 14px;
}

.detail-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.meta-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  flex: 1;
  min-width: 140px;
}

.meta-label {
  display: block;
  color: var(--text-dim);
  font-size: 12px;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.meta-value {
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
}

/* ============ 返回顶部 ============ */
.back-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--gradient);
  color: white;
  border: none;
  font-size: 22px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 90;
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.4);
}

.back-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(139, 92, 246, 0.5);
}

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

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

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============ 响应式 ============ */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--bg-2);
    padding: 16px 24px;
    flex-direction: column;
    gap: 16px;
    border-bottom: 1px solid var(--border);
  }

  .nav-links.active { display: flex; }
  .menu-toggle { display: block; }

  .hero h1 { font-size: 38px; }
  .tagline { font-size: 17px; }
  .hero-desc { font-size: 15px; }

  .section-title { font-size: 30px; }

  section { padding: 70px 20px; }

  .project-detail-content { padding: 28px 22px; margin-top: 20px; }
  .detail-title { font-size: 24px; }

  .back-top { bottom: 20px; right: 20px; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 32px; }
  .project-grid { grid-template-columns: 1fr; }
}
