/* ==========================================
   HUANJI SILICON CLEANROOM SPEC DESIGN SYSTEM
   Base: Deep Silicon Grey (#101216)
   Accent: EUV Violet (#8A2BE2) with Glow
   Iridescent Wafer Border & Photolithography Grid
   ========================================== */

:root {
  --bg-silicon: #101216;
  --bg-card: #161920;
  --bg-card-hover: #1c202a;
  --color-euv: #8A2BE2;
  --color-euv-glow: rgba(138, 43, 226, 0.5);
  --color-euv-bright: #a855f7;
  --color-cyan: #00f0ff;
  --color-gold: #ffd700;
  --color-text-main: #e2e8f0;
  --color-text-muted: #94a3b8;
  --color-border-subtle: rgba(138, 43, 226, 0.18);
  --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  background-color: var(--bg-silicon);
  color: var(--color-text-main);
  line-height: 1.6;
}

body {
  background-color: var(--bg-silicon);
  overflow-x: hidden;
  position: relative;
}

/* Background Photolithography Circuit Grid Overlay */
.silicon-grid-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  background-image: 
    linear-gradient(to right, rgba(138, 43, 226, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(138, 43, 226, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
}

.silicon-grid-bg::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle 800px at 50% 200px, rgba(138, 43, 226, 0.08), transparent 80%);
}

/* Mouse Canvas Trail */
#cursor-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

/* Base Container */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

/* Typography & Mask Spec Badges */
.spec-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.25rem 0.75rem;
  background: rgba(138, 43, 226, 0.12);
  border: 1px solid rgba(138, 43, 226, 0.3);
  border-radius: 4px;
  color: var(--color-euv-bright);
}

.spec-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-cyan);
  box-shadow: 0 0 8px var(--color-cyan);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

/* Lithography Heading */
.heading-litho {
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 30%, #c084fc 70%, #00f0ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Wafer Card with Iridescent Interference Rainbow Border */
.wafer-card {
  position: relative;
  background: var(--bg-card);
  border-radius: 12px;
  padding: 1.75rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

.wafer-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  padding: 1px;
  background: linear-gradient(135deg, 
    rgba(138, 43, 226, 0.6) 0%, 
    rgba(0, 240, 255, 0.4) 30%, 
    rgba(255, 0, 128, 0.3) 60%, 
    rgba(255, 215, 0, 0.4) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.wafer-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px -10px rgba(138, 43, 226, 0.3);
}

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

/* Circuit Pin Spec Accents */
.card-spec-mark {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: rgba(148, 163, 184, 0.4);
  pointer-events: none;
}
.card-spec-mark.top-right {
  top: 10px;
  right: 14px;
}
.card-spec-mark.bottom-left {
  bottom: 10px;
  left: 14px;
}

/* EUV Glow Button */
.btn-euv {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: linear-gradient(135deg, #8A2BE2 0%, #7c3aed 100%);
  color: #ffffff;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.85rem 2rem;
  border-radius: 8px;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 20px var(--color-euv-glow), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: all 0.25s ease;
  cursor: pointer;
}

.btn-euv:hover {
  background: linear-gradient(135deg, #9d3bf3 0%, #8b5cf6 100%);
  box-shadow: 0 0 30px rgba(138, 43, 226, 0.8), 0 0 10px var(--color-cyan);
  transform: scale(1.02);
  color: #ffffff;
}

.btn-euv-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: rgba(22, 25, 32, 0.8);
  color: var(--color-text-main);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85rem 1.75rem;
  border-radius: 8px;
  text-decoration: none;
  border: 1px solid rgba(138, 43, 226, 0.3);
  transition: all 0.25s ease;
  cursor: pointer;
}

.btn-euv-secondary:hover {
  background: rgba(138, 43, 226, 0.15);
  border-color: var(--color-euv-bright);
  color: #ffffff;
}

/* Header & Nav */
.header-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(16, 18, 22, 0.85);
  border-bottom: 1px solid rgba(138, 43, 226, 0.15);
  padding: 1rem 0;
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.logo-chip {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #8A2BE2, #00f0ff);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: #000;
  font-family: var(--font-mono);
  box-shadow: 0 0 12px var(--color-euv-glow);
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
}

.brand-title span {
  color: var(--color-euv-bright);
  font-size: 0.85rem;
  font-family: var(--font-mono);
  margin-left: 0.3rem;
  opacity: 0.9;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--color-euv-bright);
}

/* Hero Section */
.hero-section {
  padding: 5rem 0 3rem;
  text-align: center;
  position: relative;
}

.hero-title {
  font-size: 3.25rem;
  line-height: 1.15;
  margin: 1.5rem 0 1.25rem;
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.1rem;
  }
  .nav-links {
    display: none;
  }
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--color-text-muted);
  max-width: 760px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 3.5rem;
}

/* Live Metrics Ribbon */
.metrics-ribbon {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.metric-card {
  background: rgba(22, 25, 32, 0.7);
  border: 1px solid rgba(138, 43, 226, 0.2);
  border-radius: 10px;
  padding: 1.25rem;
  text-align: center;
}

.metric-value {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-cyan);
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}

.metric-label {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

/* Feature Cards Grid */
.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title h2 {
  font-size: 2.25rem;
  margin-top: 0.5rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 5rem;
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: rgba(138, 43, 226, 0.15);
  border: 1px solid rgba(138, 43, 226, 0.4);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-euv-bright);
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

/* Pricing Grid */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.5rem;
  margin-bottom: 5rem;
}

.price-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.price-card.featured {
  background: linear-gradient(180deg, rgba(138, 43, 226, 0.12) 0%, rgba(22, 25, 32, 0.95) 100%);
}

.price-card.featured::after {
  content: 'POPULAR CHOICE / 热门推荐';
  position: absolute;
  top: 14px;
  right: -30px;
  background: var(--color-euv);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2rem 2.5rem;
  transform: rotate(45deg);
  font-family: var(--font-mono);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.price-amount {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 800;
  color: #ffffff;
  margin: 1rem 0 0.5rem;
}

.price-amount span {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  font-weight: 400;
}

.price-features {
  list-style: none;
  margin: 1.5rem 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.price-features li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--color-text-main);
}

.price-features li svg {
  color: var(--color-cyan);
  flex-shrink: 0;
}

/* SEO Articles Section */
.articles-section {
  margin-bottom: 5rem;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.5rem;
}

.article-card {
  cursor: pointer;
}

.article-card:hover h3 {
  color: var(--color-euv-bright);
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.75rem 0;
}

.article-tag {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.2);
  color: var(--color-cyan);
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
}

/* Article Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 16, 0.92);
  backdrop-filter: blur(16px);
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  background: var(--bg-card);
  border: 1px solid rgba(138, 43, 226, 0.4);
  border-radius: 14px;
  max-width: 900px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 2.5rem;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(138, 43, 226, 0.2);
}

.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.25rem;
  transition: background 0.2s ease;
}

.modal-close:hover {
  background: rgba(138, 43, 226, 0.6);
}

.article-content {
  color: #cbd5e1;
  font-size: 1.05rem;
  line-height: 1.85;
}

.article-content h2 {
  color: #ffffff;
  font-size: 1.6rem;
  margin: 1.75rem 0 1rem;
  border-left: 4px solid var(--color-euv-bright);
  padding-left: 0.75rem;
}

.article-content h3 {
  color: #e2e8f0;
  font-size: 1.25rem;
  margin: 1.25rem 0 0.75rem;
}

.article-content p {
  margin-bottom: 1.25rem;
}

.article-content ul, .article-content ol {
  margin: 1rem 0 1.5rem 1.5rem;
}

.article-content li {
  margin-bottom: 0.5rem;
}

.article-content strong {
  color: #ffffff;
  background: rgba(138, 43, 226, 0.15);
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
}

/* User Reviews Section */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 5rem;
}

.user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8A2BE2, #00f0ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #000;
  font-family: var(--font-mono);
}

/* FAQ Accordion */
.faq-container {
  max-width: 860px;
  margin: 0 auto 5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid rgba(138, 43, 226, 0.2);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.25s ease;
}

.faq-question {
  width: 100%;
  padding: 1.25rem 1.5rem;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 600;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.faq-answer {
  padding: 0 1.5rem 1.25rem;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  display: none;
}

.faq-item.active .faq-answer {
  display: block;
}

.faq-item.active {
  border-color: var(--color-euv-bright);
}

/* Footer & PBN Link Pipeline */
.site-footer {
  background: #0b0d10;
  border-top: 1px solid rgba(138, 43, 226, 0.2);
  padding: 3.5rem 0 2rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  position: relative;
  z-index: 10;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.pbn-links-section {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px dashed rgba(138, 43, 226, 0.15);
  width: 100%;
}

.pbn-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(148, 163, 184, 0.5);
  margin-bottom: 0.75rem;
}

.pbn-link-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.25rem;
  font-size: 0.78rem;
}

.pbn-link-grid a {
  color: rgba(148, 163, 184, 0.65);
  text-decoration: none;
  transition: color 0.2s ease;
}

.pbn-link-grid a:hover {
  color: var(--color-cyan);
  text-decoration: underline;
}

.footer-bottom {
  font-size: 0.75rem;
  color: rgba(148, 163, 184, 0.4);
  font-family: var(--font-mono);
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }
  .btn-euv, .btn-euv-secondary {
    width: 100%;
  }
  .modal-container {
    padding: 1.5rem;
  }
}
