/* =====================================================================
   YT Truyện EPUB — Editorial Light Theme SEO/AEO Website
   Matches the Extension's crisp alabaster + deep jade teal aesthetic.
   ===================================================================== */
:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --text-soft: #334155;
  --muted: #64748b;
  --accent: #0f766e;
  --accent-hover: #0d9488;
  --accent-soft: #f0fdfa;
  --accent-border: rgba(15, 118, 110, 0.25);
  --amber: #b45309;
  --amber-soft: #fffbeb;
  --shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 14px 36px rgba(15, 23, 42, 0.08);
  --radius: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Sticky Light Header */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 17px;
  color: var(--text);
  letter-spacing: -0.3px;
}
.brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 14px;
  font-weight: 600;
}
.nav-links a { color: var(--text-soft); }
.nav-links a:hover { color: var(--accent); text-decoration: none; }
.lang-pill {
  padding: 5px 12px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 13px;
}
.nav-cta {
  padding: 8px 15px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff !important;
}
.nav-cta:hover { background: var(--accent-hover); }

/* Hero */
.hero {
  padding: 58px 0 46px;
  background:
    radial-gradient(640px 380px at 92% 0%, rgba(204, 251, 241, 0.65), transparent 70%),
    radial-gradient(500px 320px at 8% 100%, rgba(254, 243, 199, 0.55), transparent 70%),
    var(--bg);
  border-bottom: 1px solid var(--border);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 40px;
  align-items: center;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  border-radius: 99px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 16px;
}
.hero h1 {
  font-size: clamp(28px, 4vw, 43px);
  line-height: 1.18;
  font-weight: 850;
  letter-spacing: -0.7px;
  margin-bottom: 16px;
}
.accent-jade { color: var(--accent); }
.accent-amber { color: var(--amber); }
.lead {
  font-size: 16px;
  color: var(--text-soft);
  margin-bottom: 24px;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 22px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.16s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: linear-gradient(135deg, #0f766e, #0d9488);
  color: #fff;
  box-shadow: 0 6px 18px rgba(15, 118, 110, 0.25);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(15, 118, 110, 0.34); }
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-secondary:hover { background: var(--accent-soft); border-color: var(--accent-border); color: var(--accent); }

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.hero-visual {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 12px;
  box-shadow: var(--shadow-lg);
}
.hero-visual img {
  border-radius: 12px;
  width: 100%;
}

/* Sections */
.section {
  padding: 64px 0;
}
.section.alt {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.sec-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 38px;
}
.sec-head h2 {
  font-size: clamp(23px, 3vw, 31px);
  font-weight: 800;
  letter-spacing: -0.4px;
  margin-bottom: 10px;
}
.sec-head p { color: var(--muted); font-size: 15.5px; }

/* Proof Metrics Strip */
.metrics-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: -22px;
  position: relative;
  z-index: 5;
}
.metric-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 16px;
  text-align: center;
  box-shadow: var(--shadow);
}
.metric-box strong {
  display: block;
  font-size: 26px;
  font-weight: 850;
  color: var(--accent);
  line-height: 1.2;
}
.metric-box span { font-size: 13px; color: var(--muted); font-weight: 600; }

/* Feature Grid */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.card-ico {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 13px;
}
.card h3 { font-size: 16.5px; font-weight: 750; margin-bottom: 7px; }
.card p { font-size: 14px; color: var(--text-soft); }

/* Screenshot Gallery */
.shot-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 10px;
  box-shadow: var(--shadow);
}
.shot-card img { border-radius: 10px; border: 1px solid var(--border); }
.shot-cap { padding: 10px 6px 4px; font-size: 13.5px; font-weight: 700; color: var(--text-soft); text-align: center; }

/* Comparison Table (AEO Gold!) */
.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--border); }
th { background: var(--bg); font-weight: 750; color: var(--text); }
tr:last-child td { border-bottom: none; }
td.hi { background: var(--accent-soft); font-weight: 700; color: var(--accent); }

/* Live Community Catalog Cards */
.catalog-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  align-items: center;
  justify-content: space-between;
}
.search-input {
  flex: 1;
  min-width: 240px;
  max-width: 440px;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  background: var(--surface);
  font-size: 14px;
  outline: none;
}
.search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1); }

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.book-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 15px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  transition: transform 0.15s, border-color 0.15s;
}
.book-card:hover { transform: translateY(-2px); border-color: var(--accent-border); }
.book-thumb-wrap { position: relative; aspect-ratio: 16/9; background: var(--surface-soft); overflow: hidden; }
.book-thumb-wrap img { width: 100%; height: 100%; object-fit: cover; }
.book-dur-badge {
  position: absolute;
  right: 8px;
  bottom: 8px;
  background: rgba(15, 23, 42, 0.82);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
}
.book-body { padding: 14px 15px 16px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.book-title { font-size: 15px; font-weight: 750; color: var(--text); line-height: 1.35; }
.book-meta { font-size: 12.5px; color: var(--muted); }
.book-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.tag-pill {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 8px;
  border-radius: 99px;
}
.book-actions {
  margin-top: auto;
  padding-top: 10px;
  display: flex;
  gap: 8px;
}
.btn-sm {
  flex: 1;
  height: 34px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-soft);
}
.btn-sm:hover { text-decoration: none; border-color: var(--accent-border); color: var(--accent); background: var(--accent-soft); }
.btn-sm.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-sm.primary:hover { background: var(--accent-hover); color: #fff; }

/* Steps */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

/* FAQ */
.faq-list { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 20px;
}
.faq-item summary {
  font-weight: 750;
  font-size: 15.5px;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::after { content: "+"; color: var(--accent); font-size: 20px; font-weight: 700; }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { margin-top: 10px; color: var(--text-soft); font-size: 14.5px; }

/* Policy / Prose Page */
.prose-card {
  max-width: 860px;
  margin: 40px auto 64px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 36px 40px;
  box-shadow: var(--shadow);
}
.prose-card h1 { font-size: 28px; margin-bottom: 10px; }
.prose-card h2 { font-size: 19px; color: var(--accent); margin: 26px 0 10px; }
.prose-card p, .prose-card li { color: var(--text-soft); margin-bottom: 10px; }
.prose-card ul { padding-left: 22px; }

/* AEO Direct Answer Box */
.aeo-answer {
  margin: 26px 0 0;
  background: var(--surface);
  border: 1px solid var(--accent-border);
  border-left: 4px solid var(--accent);
  border-radius: 14px;
  padding: 18px 22px;
  box-shadow: var(--shadow);
}
.aeo-answer-kicker {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent);
  margin-bottom: 6px;
}
.aeo-answer p { font-size: 14.5px; color: var(--text-soft); }

/* Footer */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 32px 0;
  font-size: 13.5px;
  color: var(--muted);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; }

@media (max-width: 900px) {
  .hero-grid, .grid-3, .grid-2, .catalog-grid, .steps-grid { grid-template-columns: 1fr; }
  .metrics-strip { grid-template-columns: 1fr 1fr; }
  .nav-links a:not(.lang-pill):not(.nav-cta) { display: none; }
  .prose-card { padding: 24px 20px; }
}
