/* DaoCore Website Styles */

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #111118;
  --bg-card: #18181f;
  --bg-card-hover: #1e1e28;
  --text-primary: #f0f0f5;
  --text-secondary: #a0a0b8;
  --text-tertiary: #6b6b80;
  --accent: #c43b3b;
  --accent-hover: #d94a4a;
  --accent-bg: rgba(196, 59, 59, 0.12);
  --accent-glow: 0 0 20px rgba(196, 59, 59, 0.3);
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.08);
  --radius: 12px;
  --radius-sm: 8px;
  --duration: 0.3s;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.0, 0.0, 0.2, 1);
  --max-width: 1200px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Selection & scrollbar styling */
::selection { background: rgba(196, 59, 59, 0.3); color: #fff; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: rgba(196, 59, 59, 0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(196, 59, 59, 0.5); }

/* Chinese language: use Taoist-style serif fonts */
html[lang="zh-CN"] body {
  font-family: 'Noto Serif SC', 'STSong', 'Songti SC', 'SimSun', serif;
  line-height: 1.8;
}

/* Particle canvas */
#particles {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 32px; position: relative; z-index: 1; }

a { color: var(--accent); text-decoration: none; }

/* ===== Header ===== */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--glass-border);
  transition: background var(--duration) var(--ease);
}
.header.scrolled {
  background: rgba(10, 10, 15, 0.95);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  color: var(--text-primary); font-weight: 600; font-size: 18px;
}
html[lang="zh-CN"] .logo {
  font-family: 'ZCOOL XiaoWei', 'Ma Shan Zheng', 'KaiTi', serif;
}
.logo img { width: 36px; height: 36px; transition: transform 0.4s var(--ease); }
.logo:hover img { transform: rotate(15deg) scale(1.05); }
.logo-text { letter-spacing: 0.06em; }

.nav { display: flex; gap: 32px; }
.nav a {
  color: var(--text-secondary); font-size: 15px;
  transition: color var(--duration) var(--ease);
  position: relative;
}
html[lang="zh-CN"] .nav a {
  font-family: 'ZCOOL XiaoWei', 'KaiTi', serif; letter-spacing: 0.04em;
}
/* Underline hover effect */
.nav a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 50%; right: 50%;
  height: 1px;
  background: var(--accent);
  transition: all 0.3s var(--ease);
}
.nav a:hover { color: var(--text-primary); }
.nav a:hover::after { left: 0; right: 0; }
.nav a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

.header-right { display: flex; align-items: center; gap: 24px; }

.lang-switch {
  width: 36px; height: 36px; border: 1px solid var(--glass-border);
  border-radius: 50%; background: var(--glass-bg); color: var(--text-secondary);
  font-size: 11px; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--duration) var(--ease);
  flex-shrink: 0; padding: 0; line-height: 1;
}
.lang-switch:hover {
  border-color: rgba(196, 59, 59, 0.5);
  color: var(--accent);
  background: var(--accent-bg);
  transform: scale(1.05);
}
.lang-switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lang-zh, .lang-en { display: none; }

/* ===== Hero ===== */
.hero {
  padding: 160px 0 120px;
  text-align: center;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(196, 59, 59, 0.08), transparent),
    radial-gradient(ellipse 50% 40% at 50% 100%, rgba(196, 59, 59, 0.04), transparent);
  position: relative;
  overflow: hidden;
}
/* Decorative corner accents */
.hero::before, .hero::after {
  content: '';
  position: absolute;
  width: 200px; height: 200px;
  border: 1px solid rgba(196, 59, 59, 0.08);
  pointer-events: none;
}
.hero::before {
  top: 80px; left: -100px;
  border-right: none; border-bottom: none;
  transform: rotate(-45deg);
}
.hero::after {
  bottom: 40px; right: -100px;
  border-left: none; border-top: none;
  transform: rotate(-45deg);
}
.hero-logo {
  width: 100px; height: 100px; margin-bottom: 28px;
  filter: drop-shadow(0 0 30px rgba(196, 59, 59, 0.35));
  animation: rotate-slow 16s linear infinite;
  opacity: 0;
  animation: fadeScaleIn 0.8s var(--ease-out) forwards, rotate-slow 16s linear 0.8s infinite;
}
@keyframes rotate-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes fadeScaleIn {
  from { opacity: 0; transform: scale(0.8) rotate(-180deg); }
  to { opacity: 1; transform: scale(1) rotate(0deg); }
}

.hero h1 {
  font-size: 64px; font-weight: 400; letter-spacing: 0.12em;
  background: linear-gradient(135deg, #f0f0f5 0%, #d4c5a0 40%, #c43b3b 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: title-glow 3s ease-in-out infinite alternate;
  opacity: 0;
  animation: slideUp 0.6s var(--ease-out) 0.3s forwards;
}
html[lang="zh-CN"] .hero h1 {
  font-family: 'ZCOOL XiaoWei', 'Ma Shan Zheng', 'KaiTi', 'STKaiti', serif;
}
@keyframes title-glow {
  from { filter: drop-shadow(0 0 8px rgba(196, 59, 59, 0.3)); }
  to { filter: drop-shadow(0 0 20px rgba(196, 59, 59, 0.6)); }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-tagline {
  font-size: 20px; color: var(--text-secondary);
  margin-top: 20px; max-width: 560px; margin-inline: auto;
  opacity: 0;
  animation: slideUp 0.6s var(--ease-out) 0.5s forwards;
}
html[lang="zh-CN"] .hero-tagline {
  font-family: 'Noto Serif SC', 'STSong', 'Songti SC', serif;
}
.hero-desc {
  font-size: 15px; color: var(--text-tertiary);
  margin-top: 14px; max-width: 640px; margin-inline: auto;
  opacity: 0;
  animation: slideUp 0.6s var(--ease-out) 0.65s forwards;
}
html[lang="zh-CN"] .hero-desc {
  font-family: 'Noto Serif SC', 'STSong', 'Songti SC', serif;
}

/* Decorative divider */
.hero-divider {
  width: 80px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  margin: 32px auto;
  opacity: 0;
  animation: fadeIn 0.6s var(--ease-out) 0.8s forwards;
}

.btn-hero {
  display: inline-block; margin-top: 40px;
  padding: 15px 44px; border-radius: 30px;
  background: var(--accent); color: #fff;
  font-size: 17px; font-weight: 600;
  transition: all var(--duration) var(--ease);
  box-shadow: var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.1);
  opacity: 0;
  animation: slideUp 0.6s var(--ease-out) 0.9s forwards;
  position: relative; overflow: hidden;
}
html[lang="zh-CN"] .btn-hero {
  font-family: 'ZCOOL XiaoWei', 'KaiTi', serif; letter-spacing: 0.06em;
}
.btn-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--duration) var(--ease);
}
.btn-hero:hover {
  background: var(--accent-hover);
  transform: translateY(-3px);
  box-shadow: 0 0 40px rgba(196, 59, 59, 0.5), inset 0 1px 0 rgba(255,255,255,0.15);
}
.btn-hero:hover::before { opacity: 1; }
.btn-hero:active { transform: translateY(-1px); }
.btn-hero:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

/* Scroll indicator */
.scroll-hint {
  position: absolute; bottom: 40px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--text-tertiary); font-size: 12px;
  opacity: 0;
  animation: fadeIn 0.6s var(--ease-out) 1.2s forwards;
}
.scroll-hint span { letter-spacing: 0.1em; text-transform: uppercase; }
.scroll-arrow {
  width: 20px; height: 20px;
  border-right: 1px solid var(--text-tertiary);
  border-bottom: 1px solid var(--text-tertiary);
  transform: rotate(45deg);
  animation: bounce 2s ease-in-out infinite;
}
@keyframes bounce {
  0%, 100% { transform: rotate(45deg) translateY(0); opacity: 0.5; }
  50% { transform: rotate(45deg) translateY(6px); opacity: 1; }
}

/* ===== Sections ===== */
.section { padding: 110px 0; }
.section-alt { background: var(--bg-secondary); position: relative; }
.section-alt::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--glass-border), transparent);
}
.section-title {
  text-align: center; font-size: 38px; font-weight: 700;
  margin-bottom: 16px; letter-spacing: 0.08em;
}
html[lang="zh-CN"] .section-title {
  font-family: 'Ma Shan Zheng', 'KaiTi', 'STKaiti', cursive;
}
.section-desc {
  text-align: center; color: var(--text-secondary); font-size: 17px;
  margin-bottom: 60px;
}
html[lang="zh-CN"] .section-desc {
  font-family: 'Noto Serif SC', 'STSong', 'Songti SC', serif;
}

/* Section decorative label */
.section-label {
  display: inline-block;
  font-size: 11px; font-weight: 600; letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
  opacity: 0.7;
}

/* ===== Features ===== */
.features-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 36px 30px;
  transition: all 0.4s var(--ease);
  position: relative; overflow: hidden;
}
/* Top gradient accent on card */
.feature-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}
.feature-card.revealed {
  opacity: 1; transform: translateY(0);
}
.feature-card:not(.revealed) {
  opacity: 0; transform: translateY(30px);
}
.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(196, 59, 59, 0.3);
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 40px rgba(196, 59, 59, 0.08);
}
.feature-card:hover::before { opacity: 1; }

/* Feature number badge */
.feature-num {
  position: absolute; top: 20px; right: 20px;
  font-size: 48px; font-weight: 800;
  color: rgba(196, 59, 59, 0.06);
  line-height: 1;
  font-family: 'SF Pro Display', -apple-system, sans-serif;
  pointer-events: none;
  transition: color 0.4s var(--ease);
}
.feature-card:hover .feature-num { color: rgba(196, 59, 59, 0.12); }

.feature-icon {
  color: var(--accent); margin-bottom: 20px;
  width: 56px; height: 56px;
  background: var(--accent-bg);
  border: 1px solid rgba(196, 59, 59, 0.15);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.4s var(--ease);
}
.feature-icon svg { width: 28px; height: 28px; }
.feature-card:hover .feature-icon {
  background: rgba(196, 59, 59, 0.2);
  border-color: rgba(196, 59, 59, 0.3);
  transform: scale(1.08);
  box-shadow: 0 0 24px rgba(196, 59, 59, 0.25);
}
.feature-card h3 {
  font-size: 20px; margin-bottom: 12px;
  background: linear-gradient(135deg, #f0f0f5, #c43b3b);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
html[lang="zh-CN"] .feature-card h3 {
  font-family: 'Ma Shan Zheng', 'KaiTi', 'STKaiti', cursive;
}
.feature-card p { color: var(--text-secondary); font-size: 14px; line-height: 1.8; }

/* ===== Download ===== */
.download-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px;
}
.download-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 36px 22px;
  text-align: center;
  transition: all 0.4s var(--ease);
  position: relative; overflow: hidden;
}
.download-card.revealed {
  opacity: 1; transform: translateY(0);
}
.download-card:not(.revealed) {
  opacity: 0; transform: translateY(30px);
}
.download-card.available {
  border-color: rgba(196, 59, 59, 0.25);
  box-shadow: 0 0 20px rgba(196, 59, 59, 0.06);
}
.download-card.available::after {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.7;
}
.download-card.available:hover {
  border-color: rgba(196, 59, 59, 0.5);
  box-shadow: 0 0 40px rgba(196, 59, 59, 0.15), 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: translateY(-6px);
}
.download-card:not(.available) {
  opacity: 0.45; cursor: default;
}
/* Coming badge */
.coming-badge {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  font-size: 11px; font-weight: 500;
  color: var(--text-tertiary);
  letter-spacing: 0.05em;
  margin-top: 8px;
}

.download-icon {
  color: var(--text-secondary); margin-bottom: 20px;
  width: 56px; height: 56px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px;
  transition: all 0.4s var(--ease);
}
.download-icon svg { width: 26px; height: 26px; }
.download-card.available .download-icon {
  color: var(--accent);
  background: var(--accent-bg);
  border-color: rgba(196, 59, 59, 0.2);
}
.download-card.available:hover .download-icon {
  transform: scale(1.1);
  box-shadow: 0 0 30px rgba(196, 59, 59, 0.2);
}
.download-card h3 {
  font-size: 18px; margin-bottom: 8px; font-weight: 600;
}
html[lang="zh-CN"] .download-card h3 { font-family: 'ZCOOL XiaoWei', 'KaiTi', serif; }
.download-version { font-size: 13px; color: var(--text-secondary); margin-bottom: 20px; }
html[lang="zh-CN"] .download-version { font-family: 'Noto Serif SC', serif; }
.download-coming { font-size: 13px; color: var(--text-tertiary); }
html[lang="zh-CN"] .download-coming { font-family: 'Noto Serif SC', serif; }
.btn-download {
  display: inline-block; padding: 9px 24px; border-radius: 22px;
  background: var(--accent); color: #fff; font-size: 14px; font-weight: 600;
  transition: all var(--duration) var(--ease);
  box-shadow: var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.1);
  position: relative; overflow: hidden;
}
html[lang="zh-CN"] .btn-download {
  font-family: 'ZCOOL XiaoWei', 'KaiTi', serif; letter-spacing: 0.04em;
}
.btn-download::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--duration) var(--ease);
}
.btn-download:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 30px rgba(196, 59, 59, 0.45), inset 0 1px 0 rgba(255,255,255,0.15);
  transform: translateY(-2px);
}
.btn-download:hover::before { opacity: 1; }
.btn-download:active { transform: translateY(0); }
.btn-download:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.download-size { font-size: 12px; color: var(--text-tertiary); margin-top: 14px; }
html[lang="zh-CN"] .download-size { font-family: 'Noto Serif SC', serif; }

/* ===== About ===== */
.about-inner {
  max-width: 760px; text-align: center;
  position: relative;
}
.about-inner::before, .about-inner::after {
  content: '"'; font-size: 80px; line-height: 1;
  color: rgba(196, 59, 59, 0.12);
  position: absolute;
  font-family: Georgia, serif;
}
.about-inner::before { top: -20px; left: -40px; }
.about-inner::after { bottom: -40px; right: -40px; }
.about-inner p {
  color: var(--text-secondary); font-size: 16px;
  margin-bottom: 20px; line-height: 2;
}
html[lang="zh-CN"] .about-inner p {
  font-family: 'Noto Serif SC', 'STSong', 'Songti SC', serif;
}

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--glass-border);
  padding: 36px 0;
  background: var(--bg-primary);
  position: relative;
}
.footer::before {
  content: '';
  position: absolute; top: 0; left: 50%;
  transform: translateX(-50%);
  width: 100px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
}
.footer-brand { display: flex; align-items: center; gap: 8px; color: var(--text-secondary); font-size: 14px; }
.footer-brand img { width: 24px; height: 24px; opacity: 0.6; }
.footer-copy { color: var(--text-tertiary); font-size: 13px; }
html[lang="zh-CN"] .footer-copy { font-family: 'Noto Serif SC', serif; }
.footer-links { display: flex; gap: 24px; }
.footer-links a {
  color: var(--text-tertiary); font-size: 13px;
  transition: color var(--duration) var(--ease);
}
.footer-links a:hover { color: var(--text-secondary); }

/* ===== Modal ===== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn 0.25s var(--ease-out);
}
.modal {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 40px 44px;
  max-width: 420px; width: 90%; text-align: center;
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.6), 0 0 60px rgba(196, 59, 59, 0.06);
  animation: modalIn 0.3s var(--ease-out);
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.92) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal h3 { font-size: 22px; margin-bottom: 14px; font-weight: 700; }
html[lang="zh-CN"] .modal h3 { font-family: 'Ma Shan Zheng', 'KaiTi', cursive; }
.modal p { color: var(--text-secondary); font-size: 14px; margin-bottom: 24px; line-height: 1.7; }
.modal .btn-download { margin-right: 12px; }
.modal .btn-cancel {
  display: inline-block; padding: 11px 32px; border-radius: 24px;
  border: 1px solid var(--glass-border); background: transparent;
  color: var(--text-secondary); font-size: 15px; cursor: pointer;
  transition: all var(--duration) var(--ease);
}
html[lang="zh-CN"] .modal .btn-cancel {
  font-family: 'ZCOOL XiaoWei', 'KaiTi', serif;
}
.modal .btn-cancel:hover { border-color: rgba(255, 255, 255, 0.2); color: var(--text-primary); }
.modal .btn-cancel:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ===== Scroll reveal ===== */
.section-title, .section-desc {
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.section-title:not(.revealed), .section-desc:not(.revealed) {
  opacity: 0; transform: translateY(20px);
}
.section-title.revealed, .section-desc.revealed {
  opacity: 1; transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 1200px) {
  .download-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .download-grid { grid-template-columns: repeat(2, 1fr); }
  .about-inner::before, .about-inner::after { display: none; }
}
@media (max-width: 640px) {
  .hero { padding: 120px 0 80px; }
  .hero h1 { font-size: 36px; }
  .hero-tagline { font-size: 17px; }
  .features-grid { grid-template-columns: 1fr; }
  .download-grid { grid-template-columns: 1fr; }
  .section-title { font-size: 28px; }
  .section { padding: 80px 0; }
  .header-inner { height: 56px; }
  .nav { gap: 16px; }
  .nav a { font-size: 14px; }
  .scroll-hint { display: none; }
  .hero-divider { width: 60px; }
  .footer-inner { flex-direction: column; gap: 16px; text-align: center; }
  .footer-links { justify-content: center; }
}
