/* Critical Load Optimization: Set background color immediately to prevent black flash */
:root {
  --primary: #00b2d9;
  --accent: #7c3aed;
  --success: #32d74b;
  --bg-color: #030508;
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-bg-hover: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-hover: rgba(255, 255, 255, 0.2);
  --text-main: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.6);
  --radius: 24px;
  /* Localized Font Stack: Prioritize local fonts for performance and offline use */
  --font-family: 'Outfit', 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 200 700;
  font-display: swap;
  src: url('fonts/outfit.woff2') format('woff2');
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-family);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

.aurora-wrapper {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  z-index: -2;
  overflow: hidden;
  background: var(--bg-color);
  pointer-events: none;
}
.aurora-1 { position: absolute; top: -10%; left: -10%; width: 50vw; height: 50vw; background: var(--primary); border-radius: 50%; filter: blur(140px); opacity: 0.35; animation: float 20s infinite alternate ease-in-out; }
.aurora-2 { position: absolute; bottom: -20%; right: -10%; width: 60vw; height: 60vw; background: var(--accent); border-radius: 50%; filter: blur(160px); opacity: 0.25; animation: float 25s infinite alternate-reverse ease-in-out; }
.aurora-3 { position: absolute; top: 40%; left: 40%; width: 40vw; height: 40vw; background: var(--success); border-radius: 50%; filter: blur(180px); opacity: 0.15; animation: float2 30s infinite alternate ease-in-out; }

@keyframes float { 0% { transform: translate(0, 0) scale(1); } 100% { transform: translate(10%, 15%) scale(1.2); } }
@keyframes float2 { 0% { transform: translate(0, 0) scale(1); } 100% { transform: translate(-15%, -10%) scale(1.3); } }

.noise {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  z-index: -1;
  pointer-events: none;
  background: url('data:image/svg+xml;utf8,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)"/%3E%3C/svg%3E');
  opacity: 0.03;
}

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

.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: 0 30px 60px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.05);
  transition: all 0.5s cubic-bezier(0.25, 1, 0.25, 1);
}
.glass-panel:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-hover);
  transform: translateY(-4px);
}

.navbar {
  position: fixed;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(10, 15, 25, 0.4);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  padding: 14px 40px;
  z-index: 1000;
  display: flex;
  gap: 50px;
  align-items: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 500; font-size: 1.2rem; }
.brand img { width: 28px; height: 28px; border-radius: 50%; }
.nav-links { display: flex; gap: 36px; }
.nav-links a { font-size: 0.95rem; color: var(--text-muted); }
.nav-links a:hover, .nav-links a.active { color: var(--text-main); text-shadow: 0 0 16px rgba(255,255,255,0.4); }

.section-header { margin-bottom: 70px; text-align: center; }
.section-header h2 { font-size: 3.5rem; font-weight: 200; margin-bottom: 20px; }
.section-header p { font-size: 1.25rem; font-weight: 300; color: var(--text-muted); max-width: 700px; margin: 0 auto; }

.hero { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding-top: 140px; padding-bottom: 80px; }
.hero-content { max-width: 900px; text-align: center; }
.tagline { display: inline-block; background: rgba(255,255,255,0.05); border: 1px solid var(--glass-border); padding: 8px 24px; font-size: 0.95rem; border-radius: 100px; margin-bottom: 40px; letter-spacing: 2px; }
.hero h1 { font-size: 6.5rem; font-weight: 200; line-height: 1.1; margin-bottom: 32px; }
.hero h1 strong { font-weight: 500; background: linear-gradient(to right, #fff, rgba(255,255,255,0.5)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.subtitle { font-size: 1.35rem; font-weight: 300; color: var(--text-muted); max-width: 700px; margin: 0 auto 50px; }
.btn-glass { display: inline-flex; align-items: center; gap: 12px; background: rgba(255,255,255,0.05); backdrop-filter: blur(20px); border: 1px solid rgba(255,255,255,0.15); border-radius: 100px; padding: 18px 48px; font-size: 1.05rem; transition: all 0.4s; cursor: pointer; }
.btn-glass:hover { background: rgba(255,255,255,0.1); transform: translateY(-2px); }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--accent)); border: none; }

.showcase-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 40px; }
.screenshot-card { padding: 12px; overflow: hidden; }
.screenshot-frame { width: 100%; border-radius: 20px; overflow: hidden; border: 1px solid var(--glass-border); position: relative; aspect-ratio: 9 / 19.5; background: #000; }
.screenshot-frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); }
.screenshot-card:hover img { transform: scale(1.05); }

/* Showcase Structure */
.showcase-wrapper { width: 100%; margin-top: 40px; }
.showcase-track { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
/* Hide duplicates on desktop */
.showcase-track .screenshot-card:nth-child(n+5) { display: none; }

.home-entry-card { padding: 60px; display: flex; gap: 40px; align-items: center; margin-bottom: 40px; }
.entry-icon-large { width: 80px; height: 80px; color: var(--primary); flex-shrink: 0; }
.entry-content h3 { font-size: 2.2rem; font-weight: 300; margin-bottom: 16px; }
.entry-content p { font-size: 1.15rem; font-weight: 300; color: var(--text-muted); margin-bottom: 30px; max-width: 600px; }

.trust-banner { padding: 40px 20px; display: flex; justify-content: space-around; align-items: center; gap: 20px; }
.trust-item { display: flex; flex-direction: column; align-items: center; flex: 1; }
.trust-num { font-size: 2.5rem; font-weight: 200; }
.trust-label { font-size: 0.9rem; color: var(--text-muted); font-weight: 300; }

.perf-container { 
  padding: 80px 60px; 
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 400px;
}
.perf-row { margin-bottom: 50px; width: 100%; }
.perf-row:last-child { margin-bottom: 0; }
.perf-label { display: flex; justify-content: space-between; margin-bottom: 20px; font-weight: 300; font-size: 1.1rem; }
.perf-bar-bg { width: 100%; height: 12px; background: rgba(255,255,255,0.05); border-radius: 100px; overflow: hidden; position: relative; }
.perf-bar-fill { 
  height: 100%; 
  border-radius: 100px; 
  background: linear-gradient(90deg, var(--primary), var(--accent)); 
  width: 0;
  animation: fill-bar 2s cubic-bezier(0.65, 0, 0.35, 1) forwards;
  box-shadow: 0 0 20px rgba(0, 178, 217, 0.3);
}

@keyframes fill-bar {
  from { width: 0; }
  to { width: var(--target-width); }
}

.spec-table { width: 100%; border-collapse: collapse; margin-top: 40px; min-width: 800px; }
.spec-table th, .spec-table td { padding: 24px; text-align: left; border-bottom: 1px solid var(--glass-border); vertical-align: middle; }
.spec-table th { font-weight: 500; color: var(--text-main); background: rgba(255,255,255,0.02); white-space: nowrap; }
.spec-table td { font-weight: 300; color: var(--text-muted); line-height: 1.5; }
.spec-table tr:last-child td { border-bottom: none; }
.spec-check { color: var(--success); display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.spec-cross { color: #ff453a; display: inline-flex; align-items: center; gap: 8px; opacity: 0.8; }
.table-wrapper { overflow-x: auto; width: 100%; border-radius: var(--radius); -webkit-overflow-scrolling: touch; margin-top: 20px; }
.table-wrapper::-webkit-scrollbar { height: 4px; }
.table-wrapper::-webkit-scrollbar-thumb { background: var(--glass-border-hover); border-radius: 10px; }

.manifesto-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 50px; }
.manifesto-card { padding: 40px; text-align: center; }
.manifesto-card .icon-svg { width: 48px; height: 48px; color: var(--primary); margin-bottom: 24px; }

.format-wall { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }
.format-badge { display: inline-block; padding: 12px 32px; font-size: 1.1rem; font-weight: 300; border-radius: 100px; }

.download-hub { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 60px; }
.download-card { padding: 50px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.download-logo { width: 80px; height: 80px; border-radius: 20px; margin-bottom: 24px; box-shadow: 0 10px 30px rgba(0, 178, 217, 0.3); border: 1px solid rgba(255,255,255,0.1); }
.checksum-box { margin-top: 30px; background: rgba(0,0,0,0.3); padding: 20px; border-radius: 12px; font-family: monospace; font-size: 0.9rem; word-break: break-all; color: var(--primary); border: 1px solid var(--glass-border); text-align: left; }

.asym-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; }
.card-glass { padding: 50px; display: flex; flex-direction: column; }
.card-1 { grid-column: 1 / 8; }
.card-2 { grid-column: 8 / 13; }
.card-3 { grid-column: 1 / 6; }
.card-4 { grid-column: 6 / 13; }

footer { padding: 80px 0; border-top: 1px solid var(--glass-border); margin-top: 100px; }
.footer-flex { display: flex; justify-content: space-between; align-items: center; }
.footer-links { display: flex; gap: 40px; }
.icp { color: rgba(255,255,255,0.3); margin-top: 40px; font-size: 0.9rem; }
.icp a { text-decoration: none; color: inherit; }
.icp a:hover { text-decoration: underline; }

.float-dl-btn {
  position: fixed;
  bottom: 40px;
  right: 40px;
  z-index: 9999;
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(0, 178, 217, 0.4), inset 0 1px 1px rgba(255,255,255,0.3);
  cursor: pointer;
  animation: pulse-glow 3s infinite;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.float-dl-btn:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 15px 40px rgba(0, 178, 217, 0.6);
}
.float-dl-btn svg { width: 28px; height: 28px; color: #fff; }

@keyframes pulse-glow {
  0% { transform: scale(1); box-shadow: 0 10px 30px rgba(0, 178, 217, 0.4); }
  50% { transform: scale(1.05); box-shadow: 0 15px 50px rgba(0, 178, 217, 0.7); }
  100% { transform: scale(1); box-shadow: 0 10px 30px rgba(0, 178, 217, 0.4); }
}

/* Subpage Styles (Fixed & Restored) */
.page-hero { padding: 220px 0 120px; text-align: center; }
.page-hero h1 { font-size: 5rem; font-weight: 200; }
.sub-section { padding: 100px 0; }
.sub-panel { padding: 60px; margin-bottom: 40px; }
.sub-panel h2 { font-size: 2.2rem; font-weight: 300; margin-bottom: 30px; color: var(--primary); }
.sub-panel p { font-size: 1.2rem; color: var(--text-muted); margin-bottom: 24px; }
.features-icon-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 60px; }
.feature-icon-card { padding: 40px; text-align: center; border-radius: var(--radius); border: 1px solid var(--glass-border); background: rgba(255,255,255,0.02); }
.feature-icon-card .icon-svg { width: 40px; height: 40px; color: var(--primary); margin-bottom: 20px; }
.faq-group { margin-bottom: 80px; }
.faq-group h2 { font-size: 2.5rem; font-weight: 200; margin-bottom: 40px; border-left: 4px solid var(--primary); padding-left: 30px; }
.faq-item { padding: 40px; margin-bottom: 20px; }
.faq-item h3 { font-size: 1.4rem; font-weight: 400; margin-bottom: 16px; color: var(--text-main); }
.faq-item p { font-size: 1.1rem; color: var(--text-muted); line-height: 1.8; }
.timeline-card { padding: 60px; margin-bottom: 60px; position: relative; overflow: hidden; }
.timeline-card::after { content: ''; position: absolute; top: 0; right: 0; width: 200px; height: 200px; background: linear-gradient(135deg, transparent, rgba(0, 178, 217, 0.05)); border-radius: 50%; transform: translate(50%, -50%); }
.version-tag { display: inline-block; padding: 6px 20px; background: var(--primary); border-radius: 100px; font-size: 0.9rem; font-weight: 500; margin-bottom: 20px; }
.version-date { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 30px; display: block; }
.change-list { list-style: none; }
.change-list li { position: relative; padding-left: 24px; margin-bottom: 12px; font-size: 1.1rem; color: var(--text-muted); }
.change-list li::before { content: ''; position: absolute; left: 0; top: 12px; width: 6px; height: 6px; background: var(--primary); border-radius: 50%; }

@media (max-width: 992px) {
  .hero h1 { font-size: 3.5rem; line-height: 1.2; }
  .page-hero { padding-top: 210px !important; }
  .page-hero h1 { font-size: 2.8rem; line-height: 1.2; }
  .subtitle { font-size: 1.1rem; }
  .showcase-grid { grid-template-columns: 1fr 1fr; }
  .asym-grid, .manifesto-grid, .download-hub, .features-icon-grid { display: flex; flex-direction: column; }
  .card-1, .card-2, .card-3, .card-4 { grid-column: auto; width: 100%; }
  
  .navbar { gap: 15px; padding: 12px 20px; width: 95%; top: 15px; flex-wrap: wrap; justify-content: center; height: auto; }
  .nav-links { gap: 15px; flex-wrap: wrap; justify-content: center; }
  .nav-links a { font-size: 0.85rem; }
  .brand { font-size: 1.1rem; }

  .container { padding: 0 20px; }
  .section-header h2 { font-size: 2.2rem; }
  .section-header p { font-size: 1.1rem; }
  
  .showcase-wrapper { margin-top: 20px; overflow: hidden; }
  .showcase-track { 
    display: flex; 
    gap: 16px; 
    grid-template-columns: none;
    animation: marquee 30s linear infinite;
    padding-bottom: 20px;
    width: max-content;
  }
  /* Show duplicates on mobile */
  .showcase-track .screenshot-card:nth-child(n+5) { display: flex; }
  .showcase-track:active { animation-play-state: paused; }
  
  .screenshot-card { 
    flex: 0 0 220px; 
    padding: 8px;
  }
  .screenshot-frame { aspect-ratio: 9 / 19; }

  @keyframes marquee {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-50%, 0, 0); }
  }

  .spec-table { min-width: 700px; margin-top: 0; }
  .spec-table th, .spec-table td { padding: 16px; font-size: 0.9rem; }
  .spec-check, .spec-cross { font-size: 0.85rem; }
  
  .footer-flex { flex-direction: column; gap: 30px; text-align: center; }
  .trust-banner { flex-direction: column; gap: 30px; border-radius: 40px !important; }
  .home-entry-card { flex-direction: column; text-align: center; padding: 30px; gap: 20px; }
  .sub-panel, .faq-item, .timeline-card { padding: 30px; }

  /* Mobile Background Optimization */
  .aurora-1 { width: 100vw; height: 100vw; top: -20%; left: -30%; opacity: 0.45; filter: blur(80px); }
  .aurora-2 { width: 120vw; height: 120vw; bottom: -30%; right: -40%; opacity: 0.35; filter: blur(100px); }
  .aurora-3 { width: 80vw; height: 80vw; top: 30%; left: 20%; opacity: 0.25; filter: blur(120px); }

  .float-dl-btn { bottom: 25px; right: 25px; width: 54px; height: 54px; }
  .float-dl-btn svg { width: 24px; height: 24px; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 2.8rem; }
  .screenshot-card { flex: 0 0 200px; }
  .btn-glass { padding: 16px 32px; width: 100%; justify-content: center; }
  .hero-actions { flex-direction: column; width: 100%; }
}
