/* Dracin21 — Chinese Ink & Jade Theme */
/* Signature: ink wash gradients, jade glow, Eastern typography */

@import url('https://fonts.googleapis.com/css2?family=Noto+Serif:ital,wght@0,400;0,600;0,700;0,800;1,400&family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
  /* Palette — ink, jade, atmospheric */
  --bg-primary: #0A0F14;
  --bg-secondary: #0E1520;
  --bg-card: #131C28;
  --bg-card-hover: #1A2535;
  --text-primary: #E8E4DF;
  --text-secondary: #9CA3AF;
  --text-muted: #5C6672;
  --accent: #2A9D6E;
  --accent-hover: #34B882;
  --accent-dark: #1E7A52;
  --accent-glow: rgba(42, 157, 110, 0.15);
  --plum: #C2185B;
  --plum-dim: rgba(194, 24, 91, 0.12);
  --border: #1E2A3A;
  --border-hover: #2A3A4E;
  --gradient: linear-gradient(135deg, #2A9D6E 0%, #1E7A52 100%);
  --gradient-ink: linear-gradient(180deg, rgba(10,15,20,0) 0%, rgba(10,15,20,0.6) 50%, rgba(10,15,20,0) 100%);
  --shadow: 0 8px 32px rgba(0,0,0,0.5);
  --shadow-card: 0 4px 20px rgba(0,0,0,0.4);
  --shadow-jade: 0 0 24px rgba(42,157,110,0.12);
  --radius: 8px;
  --radius-sm: 5px;
  --max-width: 1200px;
  --nav-height: 56px;
}

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

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

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.25s ease;
}

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

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

h1, h2, h3, h4, h5, h6 {
  font-family: 'Noto Serif', Georgia, serif;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

h1 { font-size: clamp(1.8rem, 4.5vw, 2.8rem); font-weight: 800; }
h2 { font-size: clamp(1.3rem, 3.5vw, 2rem); font-weight: 700; }
h3 { font-size: clamp(1rem, 2vw, 1.25rem); font-weight: 600; }

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

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

/* ============================================
   INK WASH DIVIDER — signature element
   ============================================ */
.ink-wash-divider {
  height: 40px;
  margin: 0.5rem 0;
  background:
    radial-gradient(ellipse 60% 100% at 20% 50%, rgba(42,157,110,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 40% 80% at 80% 50%, rgba(194,24,91,0.04) 0%, transparent 70%),
    var(--gradient-ink);
  opacity: 0.8;
  position: relative;
}

.ink-wash-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.4;
}

/* ============================================
   NAVBAR — Minimal, ink-inspired
   ============================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 15, 20, 0.92);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border);
  height: var(--nav-height);
}

.navbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.navbar-logo img {
  height: 30px;
  width: auto;
}

.navbar-logo span {
  font-family: 'Noto Serif', serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.3px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.25s ease;
  white-space: nowrap;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: all 0.25s ease;
  transform: translateX(-50%);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.lang-switch {
  display: flex;
  background: var(--bg-card);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.lang-switch a {
  padding: 0.2rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  transition: all 0.2s ease;
}

.lang-switch a.active {
  background: var(--accent);
  color: #fff;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.hamburger span {
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* ============================================
   HERO — Atmospheric, with banner bg
   ============================================ */
.hero {
  position: relative;
  min-height: 45vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.5rem 1.5rem;
  overflow: hidden;
  /* Ink wash atmospheric background */
  background:
    radial-gradient(ellipse 70% 60% at 30% 30%, rgba(42,157,110,0.05) 0%, transparent 70%),
    radial-gradient(ellipse 50% 50% at 80% 70%, rgba(194,24,91,0.03) 0%, transparent 70%),
    linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.2;
  z-index: 0;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(10,15,20,0.2), rgba(10,15,20,0.95));
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.hero h1 {
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.hero h1 .accent-word {
  color: var(--accent);
}

.hero p {
  font-size: 1.05rem;
  margin-bottom: 2rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.25s ease;
  border: none;
  text-align: center;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 4px 16px rgba(42,157,110,0.25);
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(42,157,110,0.35);
}

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-sm {
  padding: 0.45rem 1rem;
  font-size: 0.8rem;
}

.btn-group {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
  padding: 2rem 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.section-header h2 {
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.section-header p,
.section-subtitle {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
  font-size: 0.9rem;
}

.section-dark {
  background: var(--bg-secondary);
  max-width: 100%;
  padding: 2rem 1.5rem;
}

.section-dark .section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-title {
  text-align: center;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  font-size: clamp(1.3rem, 3.5vw, 2rem);
}

.section-cta {
  text-align: center;
  margin-top: 2rem;
}

/* ============================================
   CARDS
   ============================================ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card), var(--shadow-jade);
  border-color: rgba(42,157,110,0.2);
}

.card-img {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
}

.card-body {
  padding: 1.25rem;
}

.card-body h3 {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.card-body p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

.card-tag {
  display: inline-block;
  background: var(--accent-glow);
  color: var(--accent);
  padding: 0.15rem 0.55rem;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-bottom: 0.5rem;
}

/* ============================================
   FEATURE GRID
   ============================================ */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.feature-item {
  text-align: center;
  padding: 1.5rem 1rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.feature-item:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-jade);
}

.feature-icon {
  font-size: 1.8rem;
  margin-bottom: 0.75rem;
}

.feature-item h3 {
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  font-size: 1rem;
}

.feature-item p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* ============================================
   GENRE PILLS
   ============================================ */
.genre-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
}

.genre-pill {
  display: inline-block;
  padding: 0.5rem 1.3rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  transition: all 0.25s ease;
}

.genre-pill:hover {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--accent);
}

/* ============================================
   CTA BANNER
   ============================================ */
.cta-banner {
  background: var(--gradient);
  padding: 1.5rem 2rem;
  text-align: center;
  border-radius: var(--radius);
  margin: 1rem auto;
  max-width: var(--max-width);
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}

.cta-banner h2 {
  color: #fff;
  margin-bottom: 0.75rem;
}

.cta-banner p {
  color: rgba(255,255,255,0.85);
  margin-bottom: 1rem;
  font-size: 1rem;
}

/* ============================================
   FAQ
   ============================================ */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 0;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  color: var(--text-primary);
  font-family: 'Noto Serif', serif;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0;
  transition: color 0.2s ease;
}

.faq-question:hover {
  color: var(--accent);
}

.faq-question::after {
  content: '+';
  font-size: 1.3rem;
  color: var(--accent);
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-left: 1rem;
  font-weight: 300;
}

.faq-item.open .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.open .faq-answer {
  max-height: 500px;
}

.faq-answer p {
  padding-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ============================================
   BREADCRUMB
   ============================================ */
.breadcrumb {
  padding: 0.75rem 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--text-muted);
}

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

.breadcrumb span {
  margin: 0 0.4rem;
  opacity: 0.5;
}

/* ============================================
   RELATED LINKS
   ============================================ */
.related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.related-link {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50px;
  color: var(--text-secondary);
  font-size: 0.8rem;
  transition: all 0.2s ease;
}

.related-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

/* ============================================
   FOOTER — Ink wash top border
   ============================================ */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem 1rem;
  margin-top: 2rem;
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: var(--gradient-ink);
  transform: translateY(-100%);
  pointer-events: none;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
}

.footer-brand p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  line-height: 1.6;
}

.footer h4 {
  color: var(--accent);
  font-size: 0.72rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: color 0.2s ease;
}

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

.footer-bottom {
  max-width: var(--max-width);
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ============================================
   ARTICLE CONTENT
   ============================================ */
.article-content {
  max-width: 800px;
  margin: 0 auto;
}

.article-content h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.article-content h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.article-content ul, .article-content ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.article-content li {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.article-content strong {
  color: var(--text-primary);
}

/* ============================================
   TABLE
   ============================================ */
.table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
}

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.table-wrap th {
  background: var(--bg-card);
  color: var(--text-primary);
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  border-bottom: 2px solid var(--accent);
}

.table-wrap td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

.table-wrap tr:hover td {
  background: var(--bg-card);
}

/* ============================================
   PAGE HEADER
   ============================================ */
.page-header {
  padding: 2rem 1.5rem 1.5rem;
  text-align: center;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  position: relative;
}

.page-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 2px;
  background: var(--accent);
  opacity: 0.4;
}

.page-header h1 {
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.page-header p {
  max-width: 700px;
  margin: 0 auto;
  font-size: 1rem;
}

/* ============================================
   ANIMATIONS
   ============================================ */
.fade-in {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .fade-in {
    transition: none;
    opacity: 1;
    transform: none;
  }
  .card:hover {
    transform: none;
  }
  .btn:hover {
    transform: none;
  }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1rem 1.5rem;
    gap: 0.75rem;
  }

  .nav-links.open {
    display: flex;
  }

  .hamburger {
    display: flex;
  }

  .hero {
    min-height: 50vh;
    padding: 3rem 1rem 2rem;
  }

  .card-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .feature-grid {
    grid-template-columns: 1fr 1fr;
  }

  .cta-banner {
    margin: 1rem;
    padding: 2rem 1.5rem;
  }

  .btn-group {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 40vh;
  }
}

/* ============================================
   DETAILS/SUMMARY FAQ
   ============================================ */
details.faq-item summary.faq-question {
  list-style: none;
}
details.faq-item summary.faq-question::-webkit-details-marker {
  display: none;
}
details.faq-item[open] .faq-question::after {
  transform: rotate(45deg);
}
details.faq-item[open] .faq-answer {
  max-height: 500px;
}

/* NAV DROPDOWN */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle { cursor: pointer; }
.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    min-width: 200px;
    padding: 0.4rem 0;
    list-style: none;
    margin: 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
    display: block;
}
.nav-dropdown-menu li a {
    display: block;
    padding: 0.45rem 1rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
    white-space: nowrap;
    transition: background 0.15s;
}
.nav-dropdown-menu li a:hover {
    background: var(--bg-card-hover);
    color: var(--accent);
}
.dropdown-divider {
    border-top: 1px solid var(--border);
    margin: 0.3rem 0;
}
.dropdown-all {
    color: var(--accent) !important;
    font-weight: 600;
}

@media (max-width: 768px) {
    .nav-dropdown-menu {
        position: static;
        display: none;
        box-shadow: none;
        border: none;
        background: transparent;
        padding-left: 1rem;
    }
    .nav-dropdown.open .nav-dropdown-menu {
        display: block;
    }
}
