/* ============================================
   绿码AI 官网 v2 · 完整样式
   - 无外部 CDN（自托管）
   - 优化动画 + 字体
   - 科技动态背景
   ============================================ */

/* === 基础重置已在 critical CSS 内 === */

/* === 字体（系统优先 + 优化） === */
@font-face {
  font-family: 'System';
  src: local('-apple-system'), local('BlinkMacSystemFont'), local('Segoe UI');
  font-display: swap;
}

/* === 容器 === */
.container { max-width: 1280px; margin: 0 auto; padding: 0 2rem; position: relative; }

/* === Section 通用 === */
.section {
  position: relative;
  padding: 6rem 0;
  isolation: isolate;
  overflow: hidden;
}

.section-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 20% 30%, rgba(139, 92, 246, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(16, 185, 129, 0.04) 0%, transparent 50%);
}

.section-alt {
  background: linear-gradient(180deg, #0a0a0f 0%, #13131a 50%, #0a0a0f 100%);
}

/* 科技动态背景（粒子层） */
.section::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.03;
  background-image:
    linear-gradient(rgba(139, 92, 246, 0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 92, 246, 0.5) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

/* === Section 头部 === */
.section-head {
  text-align: center;
  margin-bottom: 4rem;
}

.section-tag {
  display: inline-block;
  padding: 0.375rem 1rem;
  border-radius: 9999px;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: #a78bfa;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.section-desc {
  font-size: 1rem;
  color: #9ca3af;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* === Reveal 动画（自实现，替代 AOS） === */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* === Features 网格 === */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.feature-card {
  position: relative;
  padding: 1.75rem;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(19, 19, 26, 0.6) 0%, rgba(10, 10, 15, 0.4) 100%);
  border: 1px solid #26262f;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  isolation: isolate;
}

.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(139, 92, 246, 0.15) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s;
  z-index: -1;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 20px 40px -10px rgba(139, 92, 246, 0.15);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.feature-card:nth-child(even) .feature-icon {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.2);
}

.feature-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

.feature-card p {
  font-size: 0.875rem;
  color: #9ca3af;
  line-height: 1.6;
}

/* === 截图预览 === */
.screen-frame {
  position: relative;
  margin-bottom: 2rem;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #26262f;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  background: #13131a;
}

.screen-frame::before {
  content: '';
  position: absolute;
  inset: -1px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.3), rgba(139, 92, 246, 0.3));
  border-radius: 16px;
  z-index: -1;
  filter: blur(20px);
  opacity: 0.5;
}

.screen-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: #13131a;
  border-bottom: 1px solid #26262f;
}

.screen-btn {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.screen-btn.red { background: #ef4444; }
.screen-btn.yellow { background: #eab308; }
.screen-btn.green { background: #22c55e; }

.screen-title {
  margin-left: auto;
  font-size: 0.75rem;
  color: #6b7280;
}

.screen-frame img {
  width: 100%;
  height: auto;
  display: block;
}

/* === 缩略图 === */
.thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}

.thumb-btn {
  padding: 0.75rem;
  background: rgba(19, 19, 26, 0.6);
  border: 2px solid transparent;
  border-radius: 10px;
  color: #9ca3af;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  text-align: center;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.thumb-btn:hover {
  border-color: rgba(139, 92, 246, 0.3);
  color: #fff;
  background: rgba(139, 92, 246, 0.05);
}

.thumb-btn.active {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

/* === Deploy === */
.deploy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.deploy-card {
  padding: 2rem;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(19, 19, 26, 0.8) 0%, rgba(10, 10, 15, 0.6) 100%);
  border: 1px solid #26262f;
  transition: all 0.4s;
  position: relative;
  overflow: hidden;
}

.deploy-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent, #8b5cf6), transparent);
}

.deploy-card:nth-child(1) { --accent: #8b5cf6; }
.deploy-card:nth-child(2) { --accent: #10b981; }

.deploy-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.deploy-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 12px;
  background: rgba(139, 92, 246, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.deploy-card:nth-child(2) .deploy-icon {
  background: rgba(16, 185, 129, 0.1);
}

.deploy-head h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

.deploy-head span {
  font-size: 0.75rem;
  color: #6b7280;
}

.deploy-steps {
  list-style: none;
  counter-reset: step;
}

.deploy-steps li {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(38, 38, 47, 0.5);
}

.deploy-steps li:last-child { border-bottom: none; }

.step-num {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 700;
}

.deploy-steps strong {
  display: block;
  color: #fff;
  font-weight: 600;
  margin-bottom: 2px;
}

.deploy-steps div {
  font-size: 0.875rem;
  color: #9ca3af;
}

/* === 系统要求 === */
.req-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.req-card {
  padding: 1.5rem;
  text-align: center;
  background: rgba(19, 19, 26, 0.5);
  border: 1px solid #26262f;
  border-radius: 14px;
  transition: all 0.3s;
}

.req-card:hover {
  border-color: rgba(139, 92, 246, 0.3);
  transform: translateY(-2px);
}

.req-icon { font-size: 2rem; margin-bottom: 0.5rem; }

.req-card h4 { color: #fff; font-weight: 700; margin-bottom: 0.25rem; }

.req-card p {
  color: #10b981;
  font-weight: 600;
  font-size: 1rem;
}

/* === Download === */
.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 800px;
  margin: 0 auto;
}

.download-card {
  padding: 2.5rem 2rem;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(19, 19, 26, 0.9) 0%, rgba(10, 10, 15, 0.7) 100%);
  border: 1px solid #26262f;
  text-align: center;
  transition: all 0.4s;
  position: relative;
  overflow: hidden;
}

.download-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, var(--card-grad), transparent 60%);
  opacity: 0.3;
  pointer-events: none;
}

.windows-card { --card-grad: rgba(139, 92, 246, 0.3); }
.linux-card { --card-grad: rgba(16, 185, 129, 0.3); }

.download-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent, rgba(139, 92, 246, 0.4));
  box-shadow: 0 30px 60px -20px var(--shadow, rgba(139, 92, 246, 0.3));
}

.windows-card:hover { --shadow: rgba(139, 92, 246, 0.3); }
.linux-card:hover { --shadow: rgba(16, 185, 129, 0.3); }

.dl-platform {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  position: relative;
}

.dl-platform svg {
  width: 3.5rem;
  height: 3.5rem;
  color: #fff;
}

.dl-platform h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
}

.dl-platform span {
  font-size: 0.75rem;
  color: #6b7280;
}

.dl-features {
  list-style: none;
  text-align: left;
  margin: 1.5rem 0;
  padding: 0;
}

.dl-features li {
  padding: 0.5rem 0;
  color: #9ca3af;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dl-features li::before {
  content: '✓';
  color: #10b981;
  font-weight: 700;
}

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

.linux-btn {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3) !important;
}

.dl-meta {
  margin-top: 1rem;
  font-size: 0.75rem;
  color: #6b7280;
}

.alt-links {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.875rem;
  color: #9ca3af;
}

.alt-links a {
  display: inline-block;
  margin: 0 0.5rem;
  padding: 0.375rem 1rem;
  border: 1px solid #26262f;
  border-radius: 9999px;
  color: #9ca3af;
  transition: all 0.2s;
}

.alt-links a:hover {
  border-color: #10b981;
  color: #10b981;
  background: rgba(16, 185, 129, 0.05);
}

/* === 新闻动态 === */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.news-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem;
  background: rgba(19, 19, 26, 0.5);
  border: 1px solid #26262f;
  border-left: 3px solid var(--priority-color, #10b981);
  border-radius: 12px;
  transition: all 0.3s;
}

.news-card:hover {
  background: rgba(19, 19, 26, 0.8);
  border-color: var(--priority-color, #10b981);
}

.news-card.priority-high { --priority-color: #f59e0b; }
.news-card.priority-normal { --priority-color: #10b981; }

.news-content { flex: 1; }

.news-title {
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.news-date {
  font-size: 0.75rem;
  color: #6b7280;
}

/* === 里程碑时间轴 === */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0.5rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, #8b5cf6, #10b981);
}

.timeline-item {
  position: relative;
  padding: 1.5rem 0 1.5rem 2rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2rem;
  top: 2rem;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: #13131a;
  border: 2px solid #8b5cf6;
  margin-left: -0.375rem;
}

.timeline-date {
  font-size: 0.8125rem;
  color: #10b981;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.timeline-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.25rem;
}

.timeline-desc {
  font-size: 0.875rem;
  color: #9ca3af;
  line-height: 1.6;
}

/* === Footer === */
.footer {
  padding: 4rem 0 2rem;
  background: #13131a;
  border-top: 1px solid #26262f;
}

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

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.footer-brand-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.footer-brand-name span { color: #10b981; }

.footer-brand-tag {
  font-size: 0.6875rem;
  color: #6b7280;
  letter-spacing: 0.15em;
  margin-top: 1px;
}

.footer-desc {
  font-size: 0.875rem;
  color: #9ca3af;
  line-height: 1.7;
}

.footer-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1rem;
}

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

.footer-list li {
  padding: 0.375rem 0;
  font-size: 0.875rem;
  color: #9ca3af;
}

.footer-list a {
  color: #9ca3af;
  transition: color 0.2s;
}

.footer-list a:hover {
  color: #10b981;
}

.qr-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.qr-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem;
  background: #fff;
  border-radius: 8px;
  text-align: center;
}

.qr-svg {
  width: 100%;
  max-width: 100px;
  height: auto;
  color: #0a0a0f;
}

.qr-card span {
  font-size: 0.6875rem;
  color: #6b7280;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid #26262f;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.8125rem;
  color: #6b7280;
}

.footer-bottom a {
  color: #9ca3af;
}

.footer-bottom a:hover {
  color: #10b981;
}

.footer-bottom-links {
  display: flex;
  gap: 1.5rem;
}

/* === GoTop === */
.go-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #8b5cf6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: all 0.3s;
  z-index: 50;
}

.go-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.go-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.5);
}

/* === 响应式 === */
@media (max-width: 768px) {
  .container { padding: 0 1.25rem; }
  .section { padding: 4rem 0; }
  .hero-stats { gap: 1.5rem; }
  .quick-nav-inner { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .quick-nav-inner { grid-template-columns: repeat(2, 1fr); }
  .hero-actions .btn { flex: 1; justify-content: center; }
}

/* === 动画工具类 === */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner {
  width: 1.5rem;
  height: 1.5rem;
  border: 2px solid #26262f;
  border-top-color: #10b981;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 2rem auto;
}
/* === Emoji 字体 fallback（修复 Windows 渲染） === */
body, body *, .feature-icon, .deploy-icon, .req-icon, .qr-card, .news-card {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", "Twemoji Mozilla",
    "EmojiOne Color", "Android Emoji", sans-serif;
}

/* 让 emoji 不被 background-clip:text 吃掉颜色 */
.feature-icon, .deploy-icon, .req-icon {
  font-style: normal;
  font-variant-emoji: emoji;
}

/* Twemoji 风格 emoji（自托管 CDN 方案备用） */
/*
@font-face {
  font-family: 'Twemoji';
  src: url('https://cdn.jsdelivr.net/npm/twemoji@14/dist/twemoji.woff2') format('woff2');
  unicode-range: U+1F300-1FAFF, U+2600-26FF;
  font-display: swap;
}
*/
