/* ============================================================
   昌楠兴 CHANANCE — Glass Technology Portal
   Design: Linear dark-minimal + Superdesign particles + Gold accent
   ============================================================ */

:root {
  --bg: #08090a;
  --bg-panel: #0f1011;
  --bg-surface: #191a1b;
  --bg-elevated: #232428;
  --text-primary: #fafbfc;
  --text-secondary: #e0e4e8;
  --text-tertiary: #bcc1c7;
  --text-muted: #a8aeb5;
  --gold: #D4AF37;
  --gold-light: #e8c84a;
  --gold-dim: #b8942f;
  --gold-glow: rgba(212,175,55,0.15);
  --border: rgba(255,255,255,0.08);
  --border-subtle: rgba(255,255,255,0.05);
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --radius: 6px;
  --radius-lg: 12px;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 25px; }
body { background: linear-gradient(135deg, #0a1628 0%, #0f2440 40%, #1a3a5c 100%); 
  font-family: var(--font);
  color: var(--text-secondary);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* === Canvas Particles === */
#particles {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
}

/* === Nav === */
.nav {
  position: fixed; top: 0; width: 100%; z-index: 100;
  background: rgba(255,255,255,0.5);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  position: fixed; top: 0; width: 100%; z-index: 100;
  background: rgba(10,14,18,0.97); backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; height: 56px;
}
.nav-logo {
  font-family: var(--font); font-size: 21px; font-weight: 600; color: #0f2440;
  letter-spacing: -0.02em; text-decoration: none;
}
.nav-logo span { color: #86c8b6; }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
  color: #0f2440; font-size: 16px; font-weight: 500;
  text-decoration: none; transition: color var(--transition);
}
.nav-links a:hover, .nav-links a.active { color: #0f2440; }
.nav-lang {
  font-size: 15px; color: var(--gold); border: 1px solid var(--border);
  padding: 4px 10px; border-radius: var(--radius);
}
.nav-lang:hover { background: var(--gold-glow); border-color: var(--gold-dim); }

/* === Hero === */
.hero {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 1; text-align: center; padding: 40px 24px 120px;
}
.hero-tag {
  display: inline-block; font-size: 14px; font-weight: 500; letter-spacing: 0.15em;
  color: var(--gold); border: 1px solid var(--gold-glow);
  padding: 6px 16px; border-radius: 999px; margin-bottom: 32px;
  text-transform: uppercase;
}
.hero h1 {
  font-family: var(--font); font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 600; line-height: 1.05; letter-spacing: -0.03em;
  color: var(--text-primary); margin-bottom: 20px;
}
.hero h1 span { color: var(--gold); }
.hero-sub {
  font-size: 25px; color: var(--text-tertiary); max-width: 520px;
  margin: 0 auto 40px; line-height: 1.7; font-weight: 400;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* === Buttons === */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; font-family: var(--font); font-size: 18px;
  font-weight: 500; border-radius: var(--radius); cursor: pointer;
  transition: all var(--transition); text-decoration: none;
  border: 1px solid transparent;
  color: #ffffff;
}
.btn-primary { background: var(--gold); color: var(--bg); border-color: var(--gold); }
.btn-primary:hover { background: var(--gold-light); transform: translateY(-1px); }
.btn-ghost {
  background: rgba(255,255,255,0.05); color: #ffffff;
  border-color: var(--border);
}
.btn-ghost:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.12); }
.btn-sm { padding: 6px 14px; font-size: 15px; }

/* === AI Chat Hero === */
.ai-hero {
  max-width: 1020px; margin: 480px auto 0; position: relative; z-index: 2;
}
.ai-chat-box {
  background: var(--bg-panel); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.2), 0 8px 32px rgba(0,0,0,0.4);
}
.ai-chat-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 18px; border-bottom: 1px solid rgba(0,0,0,0.06);
}
.ai-chat-title { font-size: 16px; font-weight: 500; color: var(--text-secondary); }
.ai-model-select {
  background: var(--bg-surface); color: var(--text-secondary);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 5px 10px; font-size: 15px; font-family: var(--font); cursor: pointer;
}
.ai-chat-messages { padding: 10px; min-height: 50px; max-height: 200px; overflow-y: auto; }
.ai-msg { margin-bottom: 12px; font-size: 16px; line-height: 1.7; }
.ai-msg.assistant { color: var(--text-secondary); }
.ai-msg.user { color: var(--text-primary); }
.ai-msg.system { color: var(--text-muted); font-size: 15px; text-align: center; }
.ai-chat-input-area {
  display: flex; border-top: 1px solid var(--border-subtle); padding: 10px;
  gap: 8px;
}
.ai-chat-input {
  flex: 1; background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 8px 14px; color: var(--text-primary);
  font-size: 16px; font-family: var(--font); outline: none;
}
.ai-chat-input:focus { border-color: var(--gold-dim); }
.ai-chat-send {
  background: var(--gold); color: var(--bg); border: none;
  border-radius: var(--radius); padding: 10px 16px; font-size: 16px;
  font-weight: 500; cursor: pointer; white-space: nowrap;
}
.ai-disclaimer { font-size: 14px; color: var(--text-muted); text-align: center; margin-top: 10px; }

/* === Floating Chat Widget === */
.chat-widget { position: fixed; bottom: 24px; right: 24px; z-index: 200; }
.chat-widget-btn {
  width: 52px; height: 52px; border-radius: 50%; background: var(--gold);
  color: var(--bg); border: none; cursor: pointer; font-size: 28px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  transition: all var(--transition);
}
.chat-widget-btn:hover { transform: scale(1.08); }
.chat-widget-panel {
  display: none; position: absolute; bottom: 64px; right: 0;
  width: 380px; max-height: 520px; background: var(--bg-panel);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: 0 16px 48px rgba(0,0,0,0.6); overflow: hidden;
  flex-direction: column;
}
.chat-widget-panel.active { display: flex; }
.chat-widget-panel .ai-chat-messages { flex: 1; }

/* === Section === */
.section { padding: 100px 24px; position: relative; z-index: 1; }
.container { max-width: 1200px; margin: 0 auto; }
.section-label {
  font-size: 14px; font-weight: 500; letter-spacing: 0.15em;
  color: var(--gold); text-transform: uppercase; margin-bottom: 16px;
}
.section-title {
  font-family: var(--font); font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 600; color: var(--text-primary); letter-spacing: -0.02em;
  margin-bottom: 16px; line-height: 1.15;
}
.section-desc { font-size: 20px; color: var(--text-tertiary); text-align:center; display:block; width:100%; margin-top:-9px !important; }

/* === Cards === */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-top: 48px; }
.card {
  background: rgba(30,60,100,0.5); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: 32px;
  transition: all var(--transition);
}
.card:hover { border-color: rgba(255,255,255,0.15); background: rgba(40,75,120,0.6); }
.card-icon { font-size: 30px; color: var(--gold); margin-bottom: 16px; }
.card h3 { font-size: 20px; font-weight: 600; color: var(--text-primary); margin-bottom: 8px; }
.card p { font-size: 18px; color: var(--text-tertiary); line-height: 1.7; }

/* === Stats === */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 48px; border-top: 1px solid var(--border-subtle); border-bottom: 1px solid rgba(0,0,0,0.06); }
.stat { padding: 32px 20px; text-align: center; border-right: 1px solid var(--border-subtle); }
.stat:last-child { border-right: none; }
.stat-num { font-size: 2.5rem; font-weight: 600; color: var(--gold); line-height: 1; margin-bottom: 8px; letter-spacing: -0.02em; }
.stat-label { font-size: 15px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.08em; }

/* === Page Header === */
.page-header { padding: 120px 24px 60px; text-align: center; position: relative; z-index: 1; }
.page-header h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 600; color: var(--text-primary); letter-spacing: -0.02em; }

/* === Product === */
.product-section { padding: 40px 24px; position: relative; z-index: 1; }
.product-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.product-spec { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 24px; }
.spec-item { padding: 20px; background: rgba(30,60,110,0.4); border: 1px solid rgba(255,255,255,0.12); border-radius: var(--radius); }
.spec-label { font-size: 14px; letter-spacing: 0.1em; color: var(--text-muted); text-transform: uppercase; margin-bottom: 6px; }
.spec-value { font-size: 1.3rem; font-weight: 500; color: var(--gold); }

/* === News === */
.news-list { margin-top: 40px; }
.news-item { padding: 28px 0; border-bottom: 1px solid rgba(0,0,0,0.06); }
.news-item:first-child { border-top: 1px solid var(--border-subtle); }
.news-date { font-size: 15px; font-weight: 500; color: var(--gold); margin-bottom: 8px; letter-spacing: 0.05em; }
.news-item h3 { font-size: 25px; font-weight: 600; color: var(--text-primary); margin-bottom: 8px; }

/* === Contact === */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 40px; }
.contact-info h3 { font-size: 20px; font-weight: 600; color: var(--text-primary); margin-bottom: 20px; white-space: nowrap; }
.contact-item { display: flex; gap: 12px; margin-bottom: 16px; align-items: flex-start; }
.contact-icon { color: var(--gold); margin-top: 2px; }
.contact-item p { margin: 0; font-size: 18px; white-space: nowrap; }.contact-item h3,.contact-item p{padding-top:5px}
.contact-form input, .contact-form textarea {
  width: 100%; padding: 12px; margin-bottom: 12px;
  background: rgba(30,60,110,0.4); border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius); color: var(--text-primary);
  font-family: var(--font); font-size: 18px; outline: none;
}
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--gold-dim); }
.contact-form textarea { min-height: 120px; resize: vertical; }

/* === Video Card === */
.video-card video { width: 100%; border-radius: var(--radius); margin-top: 12px; }

/* === Doc Card === */
.doc-card .btn { margin-top: 8px; margin-right: 6px; }

/* === Footer === */
.footer {
  padding: 60px 24px 40px; border-top: 1px solid var(--border-subtle);
  position: relative; z-index: 1;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; max-width: 1200px; margin: 0 auto; }
.footer-brand p { color: #c8cdd3; font-size: 16px; max-width: 300px; margin-top: 12px; }
.footer-col h4 { color: var(--text-primary); font-size: 15px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 16px; }
.footer-col a { display: block; color: var(--text-tertiary); font-size: 16px; margin-bottom: 8px; text-decoration: none; transition: color var(--transition); }
.footer-col a:hover { color: var(--gold); }
.footer-bottom { max-width: 1200px; margin: 40px auto 0; padding-top: 20px; border-top: 1px solid var(--border-subtle); display: flex; justify-content: space-between; }
.footer-bottom p { color: var(--text-muted); font-size: 15px; margin: 0; }

/* === Responsive === */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .stat { border-bottom: 1px solid rgba(0,0,0,0.06); }
  .product-grid { grid-template-columns: 1fr; gap: 40px; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr; }
  .chat-widget-panel { width: calc(100vw - 40px); right: 0; }
}
@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr; }
}

#chat-widget { display: none; }

.news-item.card { margin-bottom: 20px; padding: 24px 28px; }
.news-item.card:last-child { margin-bottom: 0; }
