:root {
  --primary: #e94560;
  --primary-dark: #c73550;
  --primary-light: #ff6b81;
  --accent: #0f3460;
  --accent-light: #1a5276;
  --dark-bg: #1a1a2e;
  --dark-surface: #16213e;
  --dark-card: #1e2a4a;
  --dark-card-hover: #243356;
  --dark-border: #2a3a5c;
  --text-primary: #eaeaea;
  --text-secondary: #a8b2c1;
  --text-muted: #6c7a8e;
  --gradient-1: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  --gradient-2: linear-gradient(135deg, #e94560 0%, #c73550 100%);
  --gradient-3: linear-gradient(135deg, #0f3460 0%, #1a5276 100%);
  --gradient-banner: linear-gradient(135deg, #1a1a2e 0%, #16213e 30%, #0f3460 70%, #1a5276 100%);
  --glass-bg: rgba(30, 42, 74, 0.55);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 20px rgba(233, 69, 96, 0.3);
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --max-width: 1200px;
  --header-height: 64px;
}

@media (prefers-color-scheme: light) {
  :root {
    --dark-bg: #f5f7fa;
    --dark-surface: #ffffff;
    --dark-card: #ffffff;
    --dark-card-hover: #f0f2f5;
    --dark-border: #e2e8f0;
    --text-primary: #1a1a2e;
    --text-secondary: #4a5568;
    --text-muted: #8896a6;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.06);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    --gradient-banner: linear-gradient(135deg, #e8ecf1 0%, #dce3ed 30%, #cdd8e8 70%, #b8c9de 100%);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1);
  }
}

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

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

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

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

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--dark-surface);
}

::-webkit-scrollbar-thumb {
  background: var(--dark-border);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

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

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

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

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

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.3;
  font-weight: 700;
  color: var(--text-primary);
}

h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  letter-spacing: -0.01em;
  margin-bottom: 1.25rem;
  position: relative;
  padding-bottom: 0.75rem;
}

h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--gradient-2);
  border-radius: var(--radius-full);
  transition: width var(--transition-base);
}

section:hover > h2::after {
  width: 100px;
}

h3 {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

h4 {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

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

header nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
}

header nav ul {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  width: 100%;
}

header nav ul::-webkit-scrollbar {
  display: none;
}

header nav ul li {
  flex-shrink: 0;
}

header nav ul li a {
  display: block;
  padding: 0.5rem 0.85rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  white-space: nowrap;
  transition: all var(--transition-fast);
  position: relative;
}

header nav ul li a::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-full);
  background: var(--primary);
  opacity: 0;
  transform: scale(0.85);
  transition: all var(--transition-fast);
  z-index: -1;
}

header nav ul li a:hover {
  color: #fff;
}

header nav ul li a:hover::before {
  opacity: 1;
  transform: scale(1);
}

header nav ul li a:active {
  transform: scale(0.95);
}

/* ===== Main ===== */
main {
  padding-top: var(--header-height);
}

/* ===== Sections ===== */
section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem;
  scroll-margin-top: var(--header-height);
}

section + section {
  border-top: 1px solid var(--dark-border);
}

/* ===== Hero / Home ===== */
#home {
  max-width: 100%;
  padding: 0;
  background: var(--gradient-banner);
  position: relative;
  overflow: hidden;
  border-bottom: none;
}

#home::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(233, 69, 96, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  animation: floatOrb 15s ease-in-out infinite;
  pointer-events: none;
}

#home::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(15, 52, 96, 0.3) 0%, transparent 70%);
  border-radius: 50%;
  animation: floatOrb 20s ease-in-out infinite reverse;
  pointer-events: none;
}

@keyframes floatOrb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

#home > * {
  position: relative;
  z-index: 1;
}

#home h1 {
  max-width: var(--max-width);
  margin: 0 auto 1.5rem;
  padding: 4rem 1.5rem 0;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-light) 50%, var(--primary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fadeInUp 0.8s ease both;
}

#home p {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  font-size: 1.05rem;
  line-height: 1.85;
  animation: fadeInUp 0.8s ease both;
}

#home p:first-of-type {
  animation-delay: 0.1s;
}

#home p:nth-of-type(2) {
  animation-delay: 0.2s;
}

#home p:last-of-type {
  padding-bottom: 4rem;
  animation-delay: 0.3s;
}

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

/* ===== Cards ===== */
article {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.6s ease both;
}

article::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-2);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-base);
}

article:hover {
  background: var(--dark-card-hover);
  border-color: rgba(233, 69, 96, 0.3);
  box-shadow: var(--shadow-glow);
  transform: translateY(-4px);
}

article:hover::before {
  transform: scaleX(1);
}

article h3 {
  margin-bottom: 0.5rem;
  transition: color var(--transition-fast);
}

article:hover h3 {
  color: var(--primary-light);
}

article p {
  font-size: 0.925rem;
  margin-bottom: 0.75rem;
}

article a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  background: rgba(233, 69, 96, 0.1);
  transition: all var(--transition-fast);
}

article a::after {
  content: '→';
  transition: transform var(--transition-fast);
}

article a:hover {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(233, 69, 96, 0.4);
}

article a:hover::after {
  transform: translateX(3px);
}

/* ===== Glass Cards for specific sections ===== */
#about,
#products,
#solutions,
#cases,
#news,
#articles,
#faq,
#howto,
#contact {
  position: relative;
}

#about > h3,
#products > h3,
#solutions > h3,
#cases > h3,
#contact > h3 {
  margin-top: 1.5rem;
  padding-left: 0.75rem;
  border-left: 3px solid var(--primary);
  transition: border-color var(--transition-fast), padding-left var(--transition-fast);
}

#about > h3:hover,
#products > h3:hover,
#solutions > h3:hover,
#cases > h3:hover,
#contact > h3:hover {
  border-left-color: var(--primary-light);
  padding-left: 1rem;
}

#products > h4 {
  margin-top: 1.25rem;
  padding: 0.5rem 0.75rem;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  display: inline-block;
  transition: all var(--transition-fast);
}

#products > h4:hover {
  border-color: var(--primary);
  box-shadow: 0 0 12px rgba(233, 69, 96, 0.2);
}

/* ===== FAQ ===== */
#faq h3 {
  padding: 1rem 1.25rem;
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-md);
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  padding-right: 3rem;
}

#faq h3::after {
  content: '+';
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.25rem;
  font-weight: 300;
  color: var(--primary);
  transition: transform var(--transition-base);
}

#faq h3:hover {
  background: var(--dark-card-hover);
  border-color: rgba(233, 69, 96, 0.3);
  box-shadow: var(--shadow-glow);
}

#faq h3:hover::after {
  transform: translateY(-50%) rotate(90deg);
}

#faq h3 + p {
  padding: 0 1.25rem 1rem;
  margin-top: -0.5rem;
  font-size: 0.925rem;
  color: var(--text-secondary);
  border-left: 2px solid var(--primary);
  margin-left: 1.25rem;
  padding-left: 1rem;
  animation: fadeInUp 0.4s ease both;
}

/* ===== HowTo Steps ===== */
#howto h4 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
  margin-top: 1.25rem;
  transition: all var(--transition-base);
}

#howto h4::before {
  content: attr(data-step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  background: var(--gradient-2);
  color: #fff;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
}

#howto h4:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
  transform: translateX(4px);
}

#howto h4 + p {
  padding-left: 3.5rem;
  font-size: 0.925rem;
}

/* ===== Contact ===== */
#contact p {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--dark-border);
  transition: border-color var(--transition-fast), padding-left var(--transition-fast);
}

#contact p:hover {
  border-bottom-color: var(--primary);
  padding-left: 0.5rem;
}

#contact p:last-child {
  border-bottom: none;
}

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

#sitemap ul li a,
#links ul li a {
  display: block;
  padding: 0.6rem 1rem;
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  text-align: center;
}

#sitemap ul li a:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(233, 69, 96, 0.35);
  transform: translateY(-2px);
}

#links ul li a:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent-light);
  box-shadow: 0 4px 16px rgba(15, 52, 96, 0.4);
  transform: translateY(-2px);
}

/* ===== Privacy, Disclaimer, Copyright, Security, Service, Author ===== */
#privacy,
#disclaimer,
#copyright,
#security,
#service,
#author {
  background: var(--dark-surface);
  border-radius: var(--radius-lg);
  margin: 1.5rem auto;
  border: 1px solid var(--dark-border);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

#privacy:hover,
#disclaimer:hover,
#copyright:hover,
#security:hover,
#service:hover,
#author:hover {
  border-color: rgba(233, 69, 96, 0.25);
  box-shadow: var(--shadow-md);
}

#author p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ===== Footer ===== */
footer {
  background: var(--dark-surface);
  border-top: 1px solid var(--dark-border);
  padding: 2.5rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

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

footer p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

footer p:last-child {
  margin-bottom: 0;
}

footer a {
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

footer a:hover {
  color: var(--primary);
}

/* ===== Scroll Animations ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Staggered animation delays for articles */
#news article:nth-child(1) { animation-delay: 0.05s; }
#news article:nth-child(2) { animation-delay: 0.1s; }
#news article:nth-child(3) { animation-delay: 0.15s; }
#news article:nth-child(4) { animation-delay: 0.2s; }
#news article:nth-child(5) { animation-delay: 0.25s; }

#articles article:nth-child(1) { animation-delay: 0.05s; }
#articles article:nth-child(2) { animation-delay: 0.1s; }
#articles article:nth-child(3) { animation-delay: 0.15s; }
#articles article:nth-child(4) { animation-delay: 0.2s; }
#articles article:nth-child(5) { animation-delay: 0.25s; }
#articles article:nth-child(6) { animation-delay: 0.3s; }
#articles article:nth-child(7) { animation-delay: 0.35s; }
#articles article:nth-child(8) { animation-delay: 0.4s; }
#articles article:nth-child(9) { animation-delay: 0.45s; }
#articles article:nth-child(10) { animation-delay: 0.5s; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  :root {
    --max-width: 100%;
  }

  section {
    padding: 2.5rem 1.25rem;
  }

  #home h1 {
    padding-top: 3rem;
  }

  #home p:last-of-type {
    padding-bottom: 3rem;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 56px;
    --radius-lg: 12px;
    --radius-xl: 16px;
  }

  body {
    font-size: 15px;
  }

  header nav {
    padding: 0 1rem;
  }

  header nav ul {
    gap: 0.15rem;
  }

  header nav ul li a {
    padding: 0.4rem 0.65rem;
    font-size: 0.8rem;
  }

  section {
    padding: 2rem 1rem;
  }

  #home h1 {
    padding: 2.5rem 1rem 0;
  }

  #home p {
    padding: 0 1rem;
    font-size: 0.95rem;
  }

  #home p:last-of-type {
    padding-bottom: 2.5rem;
  }

  h2 {
    font-size: 1.35rem;
    margin-bottom: 1rem;
  }

  h2::after {
    width: 40px;
  }

  article {
    padding: 1.15rem;
    border-radius: var(--radius-md);
  }

  article:hover {
    transform: translateY(-2px);
  }

  #faq h3 {
    padding: 0.85rem 1rem;
    padding-right: 2.5rem;
    font-size: 1rem;
  }

  #faq h3::after {
    right: 1rem;
  }

  #faq h3 + p {
    padding-left: 0.75rem;
    margin-left: 1rem;
  }

  #howto h4 {
    padding: 0.6rem 0.85rem;
    font-size: 0.95rem;
  }

  #howto h4 + p {
    padding-left: 2.5rem;
  }

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

  #sitemap ul li a,
  #links ul li a {
    padding: 0.5rem 0.75rem;
    font-size: 0.82rem;
  }

  footer {
    padding: 2rem 1rem;
  }

  footer p {
    font-size: 0.78rem;
  }
}

@media (max-width: 480px) {
  :root {
    --header-height: 52px;
  }

  header nav ul li a {
    padding: 0.35rem 0.5rem;
    font-size: 0.75rem;
  }

  section {
    padding: 1.75rem 0.85rem;
  }

  #home h1 {
    font-size: 1.5rem;
    padding: 2rem 0.85rem 0;
  }

  #home p {
    padding: 0 0.85rem;
    font-size: 0.9rem;
  }

  #home p:last-of-type {
    padding-bottom: 2rem;
  }

  h2 {
    font-size: 1.2rem;
  }

  h3 {
    font-size: 1.05rem;
  }

  article {
    padding: 1rem;
  }

  article h3 {
    font-size: 1rem;
  }

  article p {
    font-size: 0.85rem;
  }

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

  #sitemap ul li a,
  #links ul li a {
    padding: 0.45rem 0.5rem;
    font-size: 0.78rem;
  }

  #howto h4 {
    font-size: 0.88rem;
  }

  #howto h4::before {
    width: 26px;
    height: 26px;
    min-width: 26px;
    font-size: 0.7rem;
  }

  #howto h4 + p {
    padding-left: 2rem;
    font-size: 0.85rem;
  }

  footer p {
    font-size: 0.72rem;
  }
}

/* ===== Reduced Motion ===== */
@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;
  }
}

/* ===== Print ===== */
@media print {
  header,
  footer,
  #sitemap,
  #links {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 12pt;
  }

  section {
    padding: 1rem 0;
    border: none;
  }

  a {
    color: #000;
    text-decoration: underline;
  }
}