/* ===== CSS Reset & Base ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  background: linear-gradient(135deg, #f5f5f7 0%, #e8e8ec 100%);
  color: #1d1d1f;
  line-height: 1.6;
  transition: background 0.4s ease, color 0.4s ease;
  min-height: 100vh;
}

/* ===== Dark Mode ===== */
body.dark {
  background: linear-gradient(135deg, #1c1c1e 0%, #2a2a2d 100%);
  color: #f5f5f7;
}

/* ===== Links ===== */
a { color: #0066cc; text-decoration: none; transition: color 0.2s; }
a:hover { text-decoration: underline; color: #e94560; }

/* ===== Container ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ===== Header ===== */
.header {
  background: rgba(26, 26, 46, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: #fff;
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: box-shadow 0.3s ease, background 0.3s ease;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.header.scrolled {
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
  background: rgba(26, 26, 46, 0.95);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ===== Logo ===== */
.logo { font-size: 24px; font-weight: 700; color: #e94560; letter-spacing: 1px; }
.logo span { color: #fff; }

/* ===== Navigation ===== */
.nav { display: flex; gap: 20px; flex-wrap: wrap; }
.nav a {
  color: #ddd;
  font-size: 14px;
  padding: 5px 12px;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s, transform 0.2s;
  position: relative;
}
.nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: #e94560;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}
.nav a:hover::after { width: 80%; }
.nav a:hover {
  background: rgba(233, 69, 96, 0.15);
  color: #e94560;
  text-decoration: none;
  transform: translateY(-1px);
}

/* ===== Search Box ===== */
.search-box { display: flex; gap: 5px; }
.search-box input {
  padding: 8px 16px;
  border: none;
  border-radius: 20px;
  font-size: 14px;
  width: 180px;
  outline: none;
  background: rgba(255,255,255,0.15);
  color: #fff;
  backdrop-filter: blur(10px);
  transition: all 0.3s;
}
.search-box input::placeholder { color: rgba(255,255,255,0.6); }
.search-box input:focus { background: rgba(255,255,255,0.25); width: 200px; }
.search-box button {
  padding: 8px 18px;
  background: linear-gradient(135deg, #e94560, #c23152);
  color: #fff;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.search-box button:hover { transform: scale(1.05); box-shadow: 0 4px 15px rgba(233,69,96,0.4); }

/* ===== Dark Toggle ===== */
.dark-toggle {
  background: rgba(255,255,255,0.1);
  border: 2px solid #e94560;
  color: #e94560;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  backdrop-filter: blur(10px);
  transition: all 0.3s;
}
.dark-toggle:hover { background: #e94560; color: #fff; }

/* ===== Mobile Menu Button ===== */
.mobile-menu-btn { display: none; background: none; border: none; color: #fff; font-size: 28px; cursor: pointer; }

/* ===== Hero Section ===== */
.hero {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 70%, #533483 100%);
  color: #fff;
  padding: 80px 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(233,69,96,0.1) 0%, transparent 60%);
  animation: heroGlow 8s ease-in-out infinite;
}
@keyframes heroGlow {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(30px, 30px); }
}
.hero h1 { font-size: 38px; margin-bottom: 15px; line-height: 1.3; position: relative; z-index: 1; }
.hero h1 span { color: #e94560; background: linear-gradient(90deg, #e94560, #ff6b81); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { font-size: 18px; max-width: 700px; margin: 0 auto 25px; opacity: 0.9; position: relative; z-index: 1; }
.hero .btn {
  display: inline-block;
  background: linear-gradient(135deg, #e94560, #c23152);
  color: #fff;
  padding: 14px 45px;
  border-radius: 30px;
  font-size: 18px;
  font-weight: 600;
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative;
  z-index: 1;
  box-shadow: 0 4px 20px rgba(233,69,96,0.3);
}
.hero .btn:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 30px rgba(233,69,96,0.5);
  text-decoration: none;
}

/* ===== Carousel ===== */
.carousel {
  position: relative;
  overflow: hidden;
  margin-top: 35px;
  border-radius: 16px;
  height: 220px;
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
}
.carousel-inner { display: flex; transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94); height: 100%; }
.carousel-item {
  min-width: 100%;
  padding: 40px 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.carousel-item h3 { font-size: 24px; margin-bottom: 10px; }
.carousel-item p { font-size: 15px; opacity: 0.8; max-width: 500px; }
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(233,69,96,0.7);
  color: #fff;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 22px;
  z-index: 2;
  backdrop-filter: blur(5px);
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.carousel-btn:hover { background: #e94560; transform: translateY(-50%) scale(1.1); }
.carousel-btn.prev { left: 15px; }
.carousel-btn.next { right: 15px; }

/* ===== Breadcrumb ===== */
.breadcrumb {
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(10px);
  padding: 12px 0;
  font-size: 13px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
body.dark .breadcrumb { background: rgba(44,44,46,0.7); border-color: rgba(255,255,255,0.05); }
.breadcrumb a { color: #666; }
body.dark .breadcrumb a { color: #aaa; }
.breadcrumb span { color: #999; }

/* ===== Section ===== */
.section { padding: 60px 0; }
.section-title {
  font-size: 30px;
  text-align: center;
  margin-bottom: 45px;
  position: relative;
  font-weight: 700;
}
.section-title::after {
  content: "";
  display: block;
  width: 70px;
  height: 4px;
  background: linear-gradient(90deg, #e94560, #ff6b81);
  margin: 12px auto 0;
  border-radius: 2px;
}

/* ===== Grid ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

/* ===== Card ===== */
.card {
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
  transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
  border: 1px solid rgba(255,255,255,0.3);
}
.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.1);
  background: rgba(255,255,255,0.9);
}
body.dark .card {
  background: rgba(44,44,46,0.7);
  backdrop-filter: blur(20px);
  border-color: rgba(255,255,255,0.08);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
body.dark .card:hover { background: rgba(44,44,46,0.9); }
.card h3 { font-size: 20px; margin-bottom: 12px; color: #e94560; }
.card p { font-size: 14px; color: #555; line-height: 1.7; }
body.dark .card p { color: #ccc; }
.card svg { width: 48px; height: 48px; margin-bottom: 15px; display: block; }

/* ===== FAQ ===== */
.faq-item {
  border-bottom: 1px solid rgba(0,0,0,0.08);
  padding: 20px 0;
  transition: all 0.3s;
}
body.dark .faq-item { border-color: rgba(255,255,255,0.08); }
.faq-question {
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
  padding: 5px 0;
  transition: color 0.2s;
}
.faq-question:hover { color: #e94560; }
.faq-question::after {
  content: "+";
  font-size: 24px;
  transition: transform 0.3s, color 0.3s;
  color: #e94560;
}
.faq-item.active .faq-question::after { content: "−"; transform: rotate(180deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), padding 0.3s;
  padding-top: 0;
  color: #555;
  font-size: 14px;
  line-height: 1.8;
}
body.dark .faq-answer { color: #ccc; }
.faq-item.active .faq-answer { max-height: 500px; padding-top: 15px; }

/* ===== HowTo Steps ===== */
.howto-steps { list-style: none; counter-reset: step; }
.howto-steps li {
  counter-increment: step;
  padding: 18px 0 18px 55px;
  position: relative;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  font-size: 15px;
  line-height: 1.7;
}
body.dark .howto-steps li { border-color: rgba(255,255,255,0.06); }
.howto-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 18px;
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #e94560, #c23152);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  box-shadow: 0 4px 10px rgba(233,69,96,0.3);
}

/* ===== Article List ===== */
.article-list .article-item {
  padding: 22px 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  transition: all 0.3s;
}
body.dark .article-list .article-item { border-color: rgba(255,255,255,0.06); }
.article-item:hover { padding-left: 10px; }
.article-item h4 { font-size: 18px; margin-bottom: 6px; color: #1d1d1f; transition: color 0.2s; }
body.dark .article-item h4 { color: #f5f5f7; }
.article-item h4:hover { color: #e94560; }
.article-item .meta { font-size: 12px; color: #999; margin-bottom: 8px; }
.article-item p { font-size: 14px; color: #555; line-height: 1.7; }
body.dark .article-item p { color: #ccc; }
.article-item .read-more { color: #e94560; font-weight: 600; font-size: 13px; transition: all 0.2s; display: inline-block; }
.article-item .read-more:hover { transform: translateX(5px); text-decoration: none; }

/* ===== Contact Info ===== */
.contact-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(20px);
  padding: 35px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.3);
}
body.dark .contact-info {
  background: rgba(44,44,46,0.7);
  border-color: rgba(255,255,255,0.08);
}
.contact-info div { font-size: 14px; line-height: 1.7; }
.contact-info strong { display: block; margin-bottom: 6px; color: #e94560; font-size: 15px; }

/* ===== Footer ===== */
.footer {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  color: #ccc;
  padding: 50px 0 25px;
  font-size: 13px;
}
.footer a { color: #aaa; transition: color 0.2s; }
.footer a:hover { color: #e94560; text-decoration: none; }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 25px;
  margin-bottom: 35px;
}
.footer-grid h4 { color: #fff; margin-bottom: 12px; font-size: 15px; font-weight: 600; }
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 8px; }
.copyright {
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 25px;
  margin-top: 25px;
  font-size: 12px;
  opacity: 0.8;
}

/* ===== Back to Top ===== */
.back-top {
  position: fixed;
  bottom: 35px;
  right: 35px;
  background: linear-gradient(135deg, #e94560, #c23152);
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
  z-index: 999;
  box-shadow: 0 4px 20px rgba(233,69,96,0.3);
}
.back-top.show { opacity: 1; visibility: visible; }
.back-top:hover { transform: translateY(-5px) scale(1.05); box-shadow: 0 8px 30px rgba(233,69,96,0.5); }

/* ===== HowTo Content Box ===== */
.howto-content {
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(20px);
  padding: 35px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.3);
}
body.dark .howto-content {
  background: rgba(44,44,46,0.7);
  border-color: rgba(255,255,255,0.08);
}
.howto-content h3 { margin: 25px 0 15px; color: #e94560; font-size: 20px; }
.howto-content ul { padding-left: 25px; margin-bottom: 15px; }
.howto-content ul li { margin-bottom: 8px; line-height: 1.7; }

/* ===== Scroll Animations ===== */
.card, .article-item, .howto-content, .contact-info, .faq-item {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.card.show, .article-item.show, .howto-content.show, .contact-info.show, .faq-item.show {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav {
    display: none;
    flex-direction: column;
    width: 100%;
    background: rgba(26,26,46,0.95);
    backdrop-filter: blur(20px);
    padding: 20px;
    border-radius: 12px;
    margin-top: 10px;
  }
  .nav.open { display: flex; }
  .mobile-menu-btn { display: block; }
  .hero h1 { font-size: 28px; }
  .hero p { font-size: 16px; }
  .hero { padding: 60px 0 40px; }
  .carousel { height: 180px; }
  .carousel-item { padding: 30px 20px; }
  .section-title { font-size: 24px; }
  .search-box input { width: 130px; }
  .search-box input:focus { width: 150px; }
  .contact-info { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 24px; }
  .hero .btn { padding: 12px 30px; font-size: 16px; }
  .container { padding: 0 15px; }
  .header-inner { gap: 8px; }
  .logo { font-size: 20px; }
  .nav a { font-size: 13px; }
  .search-box input { width: 100px; font-size: 12px; }
  .search-box button { font-size: 12px; padding: 6px 12px; }
  .dark-toggle { font-size: 12px; padding: 4px 10px; }
  .grid { grid-template-columns: 1fr; gap: 20px; }
  .card { padding: 20px; }
  .carousel { height: 160px; }
  .carousel-item h3 { font-size: 20px; }
  .contact-info { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .back-top { bottom: 20px; right: 20px; width: 40px; height: 40px; font-size: 20px; }
}