:root {
  --primary: #e94560;
  --primary-dark: #c23152;
  --secondary: #0f3460;
  --accent: #16213e;
  --bg: #1a1a2e;
  --bg-card: rgba(255, 255, 255, 0.05);
  --text: #eaeaea;
  --text-muted: #a0a0b0;
  --glass: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.12);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  --radius: 16px;
  --transition: 0.3s ease;
}

[data-theme="light"] {
  --bg: #f5f5fa;
  --bg-card: rgba(0, 0, 0, 0.03);
  --text: #1a1a2e;
  --text-muted: #555;
  --glass: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(0, 0, 0, 0.08);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  --accent: #e8e8f0;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  transition: background 0.4s, color 0.4s;
  overflow-x: hidden;
}

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }

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

header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  padding: 12px 0;
  transition: var(--transition);
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
}

.logo { font-size: 1.6rem; font-weight: 800; color: var(--text); letter-spacing: -0.5px; }
.logo span { color: var(--primary); }

nav { display: flex; gap: 28px; align-items: center; }
nav a { color: var(--text-muted); font-size: 0.95rem; font-weight: 500; position: relative; }
nav a::after {
  content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 2px;
  background: var(--primary); transition: var(--transition);
}
nav a:hover, nav a.active { color: var(--text); }
nav a:hover::after, nav a.active::after { width: 100%; }

.theme-toggle, .menu-toggle {
  background: none; border: 2px solid var(--glass-border); color: var(--text);
  width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; transition: var(--transition);
}
.theme-toggle:hover, .menu-toggle:hover { background: var(--glass); }
.menu-toggle { display: none; }

.hero {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--bg) 0%, var(--secondary) 50%, var(--accent) 100%);
  position: relative; overflow: hidden; padding: 100px 0 60px;
}
.hero::before {
  content: ''; position: absolute; width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(233, 69, 96, 0.15), transparent);
  top: -200px; right: -200px; border-radius: 50%;
}
.hero::after {
  content: ''; position: absolute; width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(15, 52, 96, 0.2), transparent);
  bottom: -100px; left: -100px; border-radius: 50%;
}
.hero-content { text-align: center; position: relative; z-index: 2; max-width: 800px; }
.hero h1 { font-size: 3.5rem; font-weight: 800; margin-bottom: 20px; line-height: 1.2; }
.hero h1 span { color: var(--primary); }
.hero p { font-size: 1.2rem; color: var(--text-muted); margin-bottom: 36px; max-width: 600px; margin-left: auto; margin-right: auto; }
.hero-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.btn {
  padding: 14px 36px; border-radius: 50px; font-weight: 600; font-size: 1rem;
  cursor: pointer; transition: var(--transition); border: none; display: inline-block;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 10px 30px rgba(233, 69, 96, 0.3); }
.btn-outline { background: transparent; color: var(--text); border: 2px solid var(--glass-border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

section { padding: 80px 0; }
.section-title { font-size: 2.2rem; font-weight: 700; margin-bottom: 12px; text-align: center; }
.section-subtitle { color: var(--text-muted); text-align: center; margin-bottom: 48px; font-size: 1.05rem; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.card {
  background: var(--glass); backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border); border-radius: var(--radius);
  padding: 32px 24px; transition: var(--transition); text-align: center;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card-icon { width: 56px; height: 56px; margin: 0 auto 16px; }
.card h3 { font-size: 1.3rem; margin-bottom: 12px; }
.card p { color: var(--text-muted); font-size: 0.95rem; }

.banner-carousel {
  position: relative; overflow: hidden; border-radius: var(--radius);
  background: var(--glass); border: 1px solid var(--glass-border);
  margin-bottom: 48px;
}
.banner-slide { display: none; padding: 60px 40px; text-align: center; animation: fadeIn 0.6s ease; }
.banner-slide.active { display: block; }
.banner-slide h2 { font-size: 2rem; margin-bottom: 16px; }
.banner-slide p { color: var(--text-muted); max-width: 600px; margin: 0 auto; }
.banner-dots { display: flex; justify-content: center; gap: 10px; padding: 16px 0; }
.banner-dots button {
  width: 12px; height: 12px; border-radius: 50%; border: none;
  background: var(--text-muted); opacity: 0.4; cursor: pointer; transition: var(--transition);
}
.banner-dots button.active { opacity: 1; background: var(--primary); }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; text-align: center; }
.stat-item { padding: 24px; }
.stat-number { font-size: 2.8rem; font-weight: 800; color: var(--primary); }
.stat-label { color: var(--text-muted); margin-top: 8px; font-size: 1rem; }

.article-card { text-align: left; }
.article-card .card-icon { width: 100%; height: 160px; border-radius: 12px; margin-bottom: 16px; }
.article-card time { font-size: 0.85rem; color: var(--text-muted); }
.article-card h3 { font-size: 1.15rem; margin: 8px 0; }
.article-card p { font-size: 0.9rem; margin-bottom: 12px; }
.article-card .btn { padding: 8px 20px; font-size: 0.85rem; }

.faq-item {
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: 12px; margin-bottom: 12px; overflow: hidden;
}
.faq-question {
  padding: 18px 24px; cursor: pointer; display: flex; justify-content: space-between;
  align-items: center; font-weight: 600; font-size: 1.05rem;
  transition: var(--transition);
}
.faq-question:hover { background: rgba(255,255,255,0.03); }
.faq-question .icon { transition: transform 0.3s; font-size: 1.2rem; }
.faq-item.open .faq-question .icon { transform: rotate(45deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.4s ease; padding: 0 24px; }
.faq-item.open .faq-answer { max-height: 400px; padding: 0 24px 18px; }
.faq-answer p { color: var(--text-muted); }

.howto-steps { counter-reset: step; }
.howto-step {
  display: flex; gap: 20px; margin-bottom: 28px;
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: var(--radius); padding: 24px;
}
.howto-step::before {
  counter-increment: step; content: counter(step);
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--primary); color: #fff; display: flex;
  align-items: center; justify-content: center; font-weight: 700; font-size: 1.2rem; flex-shrink: 0;
}
.howto-step h4 { font-size: 1.1rem; margin-bottom: 8px; }
.howto-step p { color: var(--text-muted); font-size: 0.95rem; }

footer {
  background: var(--accent); border-top: 1px solid var(--glass-border);
  padding: 60px 0 30px; margin-top: 40px;
}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; }
.footer-col h4 { font-size: 1.1rem; margin-bottom: 16px; color: var(--text); }
.footer-col a, .footer-col p { display: block; color: var(--text-muted); font-size: 0.9rem; margin-bottom: 8px; }
.footer-col a:hover { color: var(--primary); }
.footer-bottom { text-align: center; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--glass-border); }
.footer-bottom p { color: var(--text-muted); font-size: 0.85rem; }
.qr-code { width: 100px; height: 100px; border-radius: 8px; margin-top: 8px; }

.back-to-top {
  position: fixed; bottom: 30px; right: 30px; width: 48px; height: 48px;
  border-radius: 50%; background: var(--primary); color: #fff; border: none;
  font-size: 1.4rem; cursor: pointer; box-shadow: 0 4px 16px rgba(233, 69, 96, 0.3);
  transition: var(--transition); opacity: 0; visibility: hidden; transform: translateY(20px);
  z-index: 999;
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--primary-dark); transform: translateY(-3px); }

.search-modal {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(10px);
  z-index: 2000; display: none; align-items: center; justify-content: center;
}
.search-modal.open { display: flex; }
.search-modal-content { background: var(--bg); border-radius: var(--radius); padding: 32px; width: 90%; max-width: 500px; }
.search-modal input {
  width: 100%; padding: 14px 18px; border-radius: 8px; border: 2px solid var(--glass-border);
  background: var(--glass); color: var(--text); font-size: 1rem; outline: none;
}
.search-modal input:focus { border-color: var(--primary); }
.search-modal .close-btn {
  margin-top: 16px; padding: 10px 24px; background: var(--primary); color: #fff;
  border: none; border-radius: 8px; cursor: pointer;
}

.mobile-nav {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: var(--bg); z-index: 999; display: none;
  flex-direction: column; align-items: center; justify-content: center; gap: 24px;
}
.mobile-nav.open { display: flex; }
.mobile-nav a { font-size: 1.4rem; color: var(--text); }
.mobile-nav .close-btn {
  position: absolute; top: 20px; right: 20px;
  background: none; border: none; color: var(--text); font-size: 2rem; cursor: pointer;
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.animate-on-scroll { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s ease; }
.animate-on-scroll.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 768px) {
  .hero h1 { font-size: 2.2rem; }
  .section-title { font-size: 1.8rem; }
  nav { display: none; }
  .menu-toggle { display: flex; }
  .card-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .howto-step { flex-direction: column; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.8rem; }
  .footer-grid { grid-template-columns: 1fr; }
}