/* ==========================================================================
   JXProxy Wuxia Blog - Võ Lâm Kiếm Hiệp Theme
   Tối ưu hiệu năng, chuẩn SEO, responsive 100%
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Cinzel:wght@600;700;800;900&display=swap');

:root {
  --bg-dark: #0b0c10;
  --bg-panel: #13141a;
  --bg-panel-2: #191b24;
  --bg-card: #151720;
  --border-gold: #c28b2a;
  --border-gold-soft: rgba(194, 139, 42, 0.28);
  --gold-primary: #f59e0b;
  --gold-gradient: linear-gradient(135deg, #fef3c7 0%, #f59e0b 45%, #d97706 80%, #78350f 100%);
  --gold-glow: 0 0 20px rgba(245, 158, 11, 0.35);
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --font-heading: 'Cinzel', 'Playfair Display', Georgia, serif;
  --font-body: 'Be Vietnam Pro', system-ui, -apple-system, sans-serif;
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.6);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.65;
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(245, 158, 11, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 10% 30%, rgba(30, 41, 59, 0.4) 0%, transparent 50%),
    radial-gradient(circle at 90% 70%, rgba(20, 20, 30, 0.5) 0%, transparent 50%);
  background-attachment: fixed;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.25s ease;
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 12, 16, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-gold-soft);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

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

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo img, .brand-logo svg {
  height: 48px;
  width: auto;
  display: block;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.main-nav a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  padding: 6px 0;
}

.main-nav a:hover, .main-nav a.active {
  color: #fbbf24;
}

.main-nav a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gold-gradient);
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.8);
}

.header-cta {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-gold {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gold-gradient);
  color: #1a0f02;
  font-weight: 700;
  font-size: 14.5px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid #fde68a;
  box-shadow: var(--gold-glow);
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.6);
  color: #000;
}

/* ==========================================================================
   HERO SCROLL BANNER (CUỘN TRANH BÍ KÍP VÕ LÂM)
   ========================================================================== */
.hero-wuxia-section {
  max-width: 1320px;
  margin: 28px auto 40px;
  padding: 0 24px;
}

.scroll-banner-container {
  position: relative;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #1b1510 0%, #151824 100%);
  border: 2px solid var(--border-gold);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8), inset 0 0 30px rgba(194, 139, 42, 0.2);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  min-height: 380px;
}

/* Bamboo/Scroll side rollers */
.scroll-banner-container::before,
.scroll-banner-container::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 14px;
  background: linear-gradient(90deg, #78350f, #d97706, #451a03);
  box-shadow: inset 0 0 4px #000;
  z-index: 5;
}

.scroll-banner-container::before { left: 0; border-radius: var(--radius-lg) 0 0 var(--radius-lg); }
.scroll-banner-container::after { right: 0; border-radius: 0 var(--radius-lg) var(--radius-lg) 0; }

.scroll-content {
  padding: 40px 48px;
  z-index: 2;
}

.wuxia-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(194, 139, 42, 0.2);
  border: 1px solid var(--border-gold);
  color: #fbbf24;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 30px;
  margin-bottom: 18px;
  letter-spacing: 0.5px;
}

.scroll-title {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 800;
  line-height: 1.25;
  color: #fff;
  margin-bottom: 16px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.scroll-title span {
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.scroll-desc {
  font-size: 15px;
  color: #cbd5e1;
  margin-bottom: 24px;
  line-height: 1.6;
}

.scroll-image-wrap {
  position: relative;
  height: 100%;
  min-height: 380px;
  overflow: hidden;
}

.scroll-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  mask-image: linear-gradient(to right, transparent 0%, black 25%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 25%);
}

/* ==========================================================================
   MAIN LAYOUT & GRID (BLOG + SIDEBAR)
   ========================================================================== */
.main-wrapper {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px 60px;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
}

.main-wrapper.single-layout {
  grid-template-columns: 280px 1fr 320px;
  gap: 28px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-gold-soft);
  padding-bottom: 14px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: #fbbf24;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::before {
  content: '◆';
  font-size: 14px;
  color: var(--gold-primary);
}

/* Post Grid */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border-gold-soft);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
  position: relative;
}

.post-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-gold);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.7), 0 0 15px rgba(245, 158, 11, 0.2);
}

.post-thumb-link {
  display: block;
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #000;
}

.post-thumb-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.post-card:hover .post-thumb-link img {
  transform: scale(1.05);
}

.post-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(15, 17, 23, 0.85);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border-gold);
  color: #fbbf24;
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
}

.post-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.post-meta {
  font-size: 12.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.post-title {
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  color: #fff;
  margin-bottom: 10px;
}

.post-title a:hover {
  color: #fbbf24;
}

.post-excerpt {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
  flex-grow: 1;
}

.post-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 12px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.read-more-link {
  color: #fbbf24;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.read-more-link:hover {
  text-decoration: underline;
  gap: 8px;
}

/* ==========================================================================
   SIDEBAR (LỆNH BÀI HOÀNG KIM & CTA WIDGETS)
   ========================================================================== */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.sidebar.sticky-bar {
  position: sticky;
  top: 88px;
}

/* Golden Seal Download Box */
.widget-golden-seal {
  background: radial-gradient(circle at 50% 20%, #2a1f10 0%, #15161f 85%);
  border: 2px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 28px 22px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), inset 0 0 25px rgba(245, 158, 11, 0.15);
  position: relative;
  overflow: hidden;
}

.widget-golden-seal::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: var(--gold-gradient);
}

.seal-icon-wrap {
  width: 96px;
  height: 96px;
  margin: 0 auto 16px;
  border-radius: 50%;
  position: relative;
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.4);
}

.seal-icon-wrap img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.widget-title-gold {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
  color: #fbbf24;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.widget-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.features-list {
  list-style: none;
  margin-bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  background: rgba(0, 0, 0, 0.3);
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(194, 139, 42, 0.2);
}

.features-list li {
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #e2e8f0;
}

.features-list li span.check {
  color: #10b981;
  font-weight: bold;
}

.btn-download-full {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  font-size: 15px;
}

/* Sidebar Recent Posts */
.widget-box {
  background: var(--bg-panel);
  border: 1px solid var(--border-gold-soft);
  border-radius: var(--radius-md);
  padding: 20px;
}

.widget-header {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: #fbbf24;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-gold-soft);
  padding-bottom: 10px;
}

.recent-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.recent-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.recent-item img {
  width: 68px;
  height: 50px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.recent-item-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: #e2e8f0;
}

.recent-item-title:hover {
  color: #fbbf24;
}

/* ==========================================================================
   SINGLE ARTICLE / BÍ KÍP VIEW
   ========================================================================== */
/* Left: Table of contents (Cuộn Trúc Mục Lục) */
.toc-bamboo-box {
  background: #181922;
  border: 2px solid #854d0e;
  border-radius: var(--radius-md);
  padding: 20px 16px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
  position: sticky;
  top: 88px;
}

.toc-bamboo-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: #fbbf24;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--border-gold-soft);
  display: flex;
  align-items: center;
  gap: 8px;
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toc-list li a {
  font-size: 13px;
  color: var(--text-muted);
  display: block;
  padding: 6px 10px;
  border-radius: 4px;
  border-left: 2px solid transparent;
  transition: all 0.2s ease;
}

.toc-list li a:hover,
.toc-list li a.active {
  color: #fbbf24;
  background: rgba(194, 139, 42, 0.12);
  border-left-color: #f59e0b;
}

/* Article Content Body */
.article-container {
  background: var(--bg-panel);
  border: 1px solid var(--border-gold-soft);
  border-radius: var(--radius-md);
  padding: 36px 40px;
  box-shadow: var(--shadow-card);
}

.article-header {
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border-gold-soft);
  padding-bottom: 20px;
}

.article-title {
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight: 800;
  line-height: 1.3;
  color: #fff;
  margin-bottom: 14px;
}

.article-meta-bar {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.article-body {
  font-size: 15.5px;
  line-height: 1.8;
  color: #e2e8f0;
}

.article-body p {
  margin-bottom: 20px;
}

.article-body h2 {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: #fbbf24;
  margin: 36px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(194, 139, 42, 0.3);
  display: flex;
  align-items: center;
  gap: 10px;
}

.article-body h3 {
  font-size: 18px;
  color: #fde68a;
  margin: 24px 0 12px;
}

/* Step Badges */
.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border-gold-soft);
  border-radius: var(--radius-md);
  padding: 24px;
  margin: 24px 0;
  position: relative;
}

.step-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #78350f, #b45309);
  color: #fef3c7;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 4px;
  border: 1px solid #fbbf24;
  margin-bottom: 12px;
}

.code-box {
  background: #090a0d;
  border: 1px solid rgba(194, 139, 42, 0.3);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin: 16px 0;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 13.5px;
  color: #38bdf8;
  overflow-x: auto;
  position: relative;
}

.img-featured-post {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-gold-soft);
  margin: 16px 0;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background: #08090c;
  border-top: 1px solid var(--border-gold-soft);
  padding: 40px 24px 30px;
  text-align: center;
  font-size: 13.5px;
  color: var(--text-muted);
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
}

.footer-nav a:hover {
  color: #fbbf24;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 1100px) {
  .main-wrapper.single-layout {
    grid-template-columns: 1fr 300px;
  }
  .toc-bamboo-box {
    display: none; /* Hide sticky TOC on medium screens */
  }
}

@media (max-width: 860px) {
  .scroll-banner-container {
    grid-template-columns: 1fr;
  }
  .scroll-image-wrap {
    display: none;
  }
  .main-wrapper,
  .main-wrapper.single-layout {
    grid-template-columns: 1fr;
  }
  .posts-grid {
    grid-template-columns: 1fr;
  }
  .sidebar {
    order: 2;
  }
}
