:root {
  --primary: #1a73e8;
  --primary-dark: #0d47a1;
  --primary-light: #4a9eff;
  --accent: #ff6b35;
  --accent-light: #ff9a6b;
  --gradient-1: linear-gradient(135deg, #1a73e8 0%, #6c3ce9 50%, #ff6b35 100%);
  --gradient-2: linear-gradient(135deg, #0d47a1 0%, #1a73e8 100%);
  --gradient-hero: linear-gradient(135deg, #0a1628 0%, #1a3a6b 30%, #2d1b69 60%, #4a1942 100%);
  --bg: #f5f7fb;
  --bg-card: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.72);
  --bg-glass-border: rgba(255, 255, 255, 0.35);
  --text: #1a1f2e;
  --text-secondary: #4a5568;
  --text-muted: #718096;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-glow: 0 0 30px rgba(26, 115, 232, 0.25);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1200px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1117;
    --bg-card: #161b22;
    --bg-glass: rgba(22, 27, 34, 0.78);
    --bg-glass-border: rgba(255, 255, 255, 0.08);
    --text: #e6edf3;
    --text-secondary: #b1bac4;
    --text-muted: #8b949e;
    --border: #30363d;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(26, 115, 232, 0.15);
    --gradient-hero: linear-gradient(135deg, #050a14 0%, #0d1f3c 30%, #1a0f3a 60%, #2a0a25 100%);
  }
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color var(--transition), color var(--transition);
}

::selection {
  background: var(--primary);
  color: #fff;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition), opacity var(--transition);
}

a:hover {
  color: var(--accent);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

strong {
  font-weight: 600;
  color: var(--text);
}

/* ========== Header ========== */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--bg-glass-border);
  box-shadow: var(--shadow-sm);
  transition: background var(--transition), box-shadow var(--transition);
}

header > div {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 24px;
}

header > div > a {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  letter-spacing: 0.5px;
  position: relative;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: opacity var(--transition);
}

header > div > a:hover {
  opacity: 0.8;
  -webkit-text-fill-color: transparent;
}

nav[aria-label="主导航"] ul {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

nav[aria-label="主导航"] ul li a {
  display: block;
  padding: 6px 12px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: all var(--transition);
}

nav[aria-label="主导航"] ul li a:hover {
  color: var(--primary);
  background: rgba(26, 115, 232, 0.08);
  transform: translateY(-1px);
}

/* ========== Main ========== */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 60px;
}

/* ========== Breadcrumb ========== */
nav[aria-label="面包屑导航"] {
  padding: 20px 0 0;
}

nav[aria-label="面包屑导航"] ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
}

nav[aria-label="面包屑导航"] ol li {
  display: flex;
  align-items: center;
  color: var(--text-muted);
}

nav[aria-label="面包屑导航"] ol li:not(:last-child)::after {
  content: "/";
  margin-left: 6px;
  color: var(--border);
}

nav[aria-label="面包屑导航"] ol li a {
  color: var(--text-secondary);
}

nav[aria-label="面包屑导航"] ol li a:hover {
  color: var(--primary);
}

nav[aria-label="面包屑导航"] ol li[aria-current="page"] {
  color: var(--text);
  font-weight: 500;
}

/* ========== Hero ========== */
#hero {
  margin-top: 24px;
  padding: 64px 48px;
  border-radius: var(--radius-xl);
  background: var(--gradient-hero);
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

#hero::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(26, 115, 232, 0.3) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: float 8s ease-in-out infinite;
}

#hero::after {
  content: "";
  position: absolute;
  bottom: -40%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255, 107, 53, 0.2) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -30px) scale(1.05); }
}

#hero h1 {
  font-size: 2.2rem;
  line-height: 1.4;
  font-weight: 700;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
  letter-spacing: -0.5px;
}

#hero p {
  font-size: 1rem;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
  max-width: 900px;
}

#hero p:last-child {
  margin-bottom: 0;
}

#hero strong {
  color: #ffd54f;
  font-weight: 600;
}

/* ========== Sections ========== */
section {
  margin-top: 48px;
  animation: fadeInUp 0.6s ease-out both;
}

section:nth-child(odd) {
  animation-delay: 0.05s;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

section h2 {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
  padding-bottom: 14px;
  position: relative;
  letter-spacing: -0.3px;
}

section h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 56px;
  height: 4px;
  border-radius: 2px;
  background: var(--gradient-1);
}

section h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 28px;
  margin-bottom: 12px;
  padding-left: 14px;
  border-left: 3px solid var(--primary);
  line-height: 1.5;
}

section h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 20px;
  margin-bottom: 8px;
}

section p {
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.9;
}

section > p:first-of-type {
  font-size: 1.02rem;
}

/* ========== Cards for content sections ========== */
#brand,
#products,
#solutions,
#cases,
#news,
#articles,
#knowledge,
#faq,
#howto,
#contact,
#sitemap,
#links,
#legal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  transition: box-shadow var(--transition), transform var(--transition);
}

#brand:hover,
#products:hover,
#solutions:hover,
#cases:hover,
#news:hover,
#articles:hover,
#knowledge:hover,
#faq:hover,
#howto:hover,
#contact:hover,
#sitemap:hover,
#links:hover,
#legal:hover {
  box-shadow: var(--shadow-lg);
}

/* ========== Articles ========== */
#articles article {
  background: var(--bg);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

#articles article::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--gradient-1);
  opacity: 0;
  transition: opacity var(--transition);
}

#articles article:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

#articles article:hover::before {
  opacity: 1;
}

#articles article h3 {
  margin-top: 0;
  border-left: none;
  padding-left: 0;
  font-size: 1.1rem;
}

#articles article h3::before {
  content: "📖 ";
  font-size: 0.9em;
}

#articles article time {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: rgba(26, 115, 232, 0.08);
  padding: 2px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}

#articles article a {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--primary);
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: all var(--transition);
}

#articles article a:hover {
  border-bottom-color: var(--accent);
  color: var(--accent);
  transform: translateX(4px);
}

/* ========== Blockquote ========== */
blockquote {
  background: linear-gradient(135deg, rgba(26, 115, 232, 0.06), rgba(108, 60, 233, 0.06));
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 20px 24px;
  margin: 16px 0;
  position: relative;
  transition: all var(--transition);
}

blockquote:hover {
  background: linear-gradient(135deg, rgba(26, 115, 232, 0.1), rgba(108, 60, 233, 0.1));
  transform: translateX(4px);
}

blockquote p {
  color: var(--text-secondary);
  font-style: italic;
  margin: 0;
  font-size: 0.95rem;
}

blockquote p::before {
  content: "“";
  font-size: 1.5rem;
  color: var(--primary);
  font-weight: 700;
  margin-right: 2px;
}

/* ========== FAQ ========== */
#faq h3 {
  background: var(--bg);
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent);
  margin-top: 16px;
  margin-bottom: 0;
  font-size: 1rem;
  cursor: default;
  transition: all var(--transition);
}

#faq h3:hover {
  background: rgba(255, 107, 53, 0.06);
  border-left-color: var(--primary);
}

#faq h3 + p {
  padding: 12px 20px 16px;
  margin-bottom: 8px;
  border-left: 3px solid transparent;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  background: var(--bg);
  font-size: 0.95rem;
}

/* ========== HowTo ========== */
#howto h4 {
  background: var(--gradient-2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
  padding: 4px 0;
  border-bottom: 2px solid rgba(26, 115, 232, 0.2);
}

/* ========== Contact info ========== */
#contact p {
  line-height: 2;
}

/* ========== Sitemap & Links lists ========== */
#sitemap ul,
#links ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

#sitemap ul li a,
#links ul li a {
  display: block;
  padding: 10px 16px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: all var(--transition);
}

#sitemap ul li a:hover,
#links ul li a:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

/* ========== Footer ========== */
footer {
  background: var(--gradient-hero);
  color: rgba(255, 255, 255, 0.8);
  padding: 40px 24px 32px;
  margin-top: 40px;
  position: relative;
  overflow: hidden;
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-1);
}

footer > p {
  max-width: var(--max-width);
  margin: 0 auto 8px;
  font-size: 0.85rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.65);
}

footer nav[aria-label="页脚导航"] ul {
  max-width: var(--max-width);
  margin: 20px auto 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 24px;
}

footer nav[aria-label="页脚导航"] ul li a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  transition: color var(--transition);
}

footer nav[aria-label="页脚导航"] ul li a:hover {
  color: #fff;
}

/* ========== Responsive ========== */
@media (max-width: 1024px) {
  header > div {
    padding: 0 16px;
  }

  nav[aria-label="主导航"] ul li a {
    padding: 6px 8px;
    font-size: 0.82rem;
  }

  #hero {
    padding: 48px 32px;
  }

  #hero h1 {
    font-size: 1.8rem;
  }
}

@media (max-width: 768px) {
  body {
    font-size: 15px;
  }

  header > div {
    height: auto;
    padding: 12px 16px;
    flex-direction: column;
    gap: 10px;
  }

  header > div > a {
    font-size: 1.15rem;
  }

  nav[aria-label="主导航"] ul {
    justify-content: center;
    gap: 2px;
  }

  nav[aria-label="主导航"] ul li a {
    padding: 5px 8px;
    font-size: 0.78rem;
  }

  main {
    padding: 0 16px 40px;
  }

  #hero {
    padding: 36px 24px;
    border-radius: var(--radius-lg);
    margin-top: 16px;
  }

  #hero h1 {
    font-size: 1.4rem;
  }

  #hero p {
    font-size: 0.92rem;
  }

  section {
    margin-top: 32px;
  }

  section h2 {
    font-size: 1.35rem;
  }

  #brand,
  #products,
  #solutions,
  #cases,
  #news,
  #articles,
  #knowledge,
  #faq,
  #howto,
  #contact,
  #sitemap,
  #links,
  #legal {
    padding: 24px 20px;
    border-radius: var(--radius-md);
  }

  #articles article {
    padding: 18px;
  }

  #sitemap ul,
  #links ul {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
  }
}

@media (max-width: 480px) {
  header > div > a {
    font-size: 1rem;
  }

  nav[aria-label="主导航"] ul li a {
    padding: 4px 6px;
    font-size: 0.72rem;
  }

  #hero {
    padding: 28px 18px;
  }

  #hero h1 {
    font-size: 1.2rem;
  }

  section h2 {
    font-size: 1.2rem;
  }

  section h3 {
    font-size: 1.05rem;
  }

  #brand,
  #products,
  #solutions,
  #cases,
  #news,
  #articles,
  #knowledge,
  #faq,
  #howto,
  #contact,
  #sitemap,
  #links,
  #legal {
    padding: 20px 16px;
  }

  #sitemap ul,
  #links ul {
    grid-template-columns: 1fr 1fr;
  }

  blockquote {
    padding: 14px 16px;
  }
}

/* ========== Accessibility ========== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ========== Scroll animation support ========== */
@supports (animation-timeline: view()) {
  section {
    animation: fadeInUp linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 30%;
  }
}

/* ========== Print ========== */
@media print {
  header,
  footer,
  nav,
  #hero::before,
  #hero::after {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }

  section {
    box-shadow: none;
    border: 1px solid #ddd;
    break-inside: avoid;
  }
}