/* ==========================================================================
   base
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: #333333;
  background-color: #f5f5f5;
  line-height: 1.6;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: #333333;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #ff6b6b;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 0.5em;
  font-weight: 700;
  line-height: 1.3;
  color: #333333;
}

p {
  margin: 0 0 1em;
}

/* ==========================================================================
   layout
   ========================================================================== */

.site-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: #f5f5f5;
}

.site-main {
  flex: 1 0 auto;
  width: 100%;
}

.site-header {
  background-color: #ffffff;
  border-bottom: 1px solid #e8e8e8;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.site-footer {
  background-color: #2b2b2b;
  color: #cccccc;
  margin-top: 48px;
}

/* ==========================================================================
   components: header / nav
   ========================================================================== */

.brand-logo {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-name {
  font-size: 20px;
  font-weight: 700;
  color: #333333;
  letter-spacing: 0.02em;
}

.brand-slogan {
  font-size: 12px;
  color: #888888;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: #333333;
  transition: background-color 0.2s ease;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-list li {
  margin: 0;
}

.nav-list a {
  display: block;
  padding: 8px 16px;
  font-size: 15px;
  font-weight: 500;
  color: #333333;
  border-radius: 4px;
}

.nav-list a:hover {
  color: #ff6b6b;
  background-color: #fafafa;
}

.nav-list a.is-current {
  color: #ff6b6b;
  font-weight: 700;
}

/* ==========================================================================
   components: breadcrumb / page header
   ========================================================================== */

.breadcrumb {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 20px 0;
  font-size: 14px;
  color: #888888;
}

.breadcrumb a {
  color: #888888;
}

.breadcrumb a:hover {
  color: #ff6b6b;
}

.breadcrumb-sep {
  margin: 0 8px;
  color: #cccccc;
}

.breadcrumb-current {
  color: #333333;
}

.page-header {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 8px;
}

.page-title {
  font-size: 32px;
  font-weight: 700;
  color: #333333;
  margin-bottom: 8px;
}

.page-description {
  font-size: 15px;
  color: #666666;
  max-width: 80ch;
}

/* ==========================================================================
   components: cards / tags / steps
   ========================================================================== */

.comic-card {
  background-color: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.comic-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.comic-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.comic-card h3 {
  font-size: 16px;
  margin: 12px 12px 6px;
}

.comic-card p {
  font-size: 14px;
  color: #666666;
  margin: 0 12px 14px;
}

.tag {
  display: inline-block;
  padding: 6px 16px;
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  font-size: 14px;
  color: #333333;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.tag:hover {
  background-color: #ff6b6b;
  border-color: #ff6b6b;
  color: #ffffff;
}

.step-item,
.step-card {
  background-color: #ffffff;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  position: relative;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background-color: #ff6b6b;
  color: #ffffff;
  border-radius: 50%;
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 12px;
}

.step-item h3,
.step-card h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

.step-item p,
.step-card p {
  font-size: 14px;
  color: #666666;
  margin-bottom: 0;
}

.text-link {
  display: inline-block;
  color: #ff6b6b;
  font-size: 14px;
  font-weight: 500;
}

.text-link:hover {
  color: #e05555;
}

/* ==========================================================================
   components: buttons
   ========================================================================== */

.btn-primary,
.btn-secondary {
  display: inline-block;
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.btn-primary {
  background-color: #ff6b6b;
  color: #ffffff;
}

.btn-primary:hover {
  background-color: #e05555;
  color: #ffffff;
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: #ffffff;
  color: #333333;
  border: 1px solid #e0e0e0;
}

.btn-secondary:hover {
  background-color: #fafafa;
  color: #ff6b6b;
}

/* ==========================================================================
   components: sidebar
   ========================================================================== */

.sidebar-card,
.related-box {
  background-color: #ffffff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.sidebar-card h2,
.sidebar-title,
.related-box h2 {
  font-size: 16px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f0f0f0;
}

.sidebar-links li,
.related-links li {
  margin-bottom: 4px;
}

.sidebar-links a,
.related-links a {
  display: block;
  padding: 6px 0;
  font-size: 14px;
  color: #555555;
  border-radius: 4px;
}

.sidebar-links a:hover,
.related-links a:hover {
  color: #ff6b6b;
  padding-left: 8px;
}

.sidebar-note,
.side-note {
  margin-top: 16px;
  padding: 12px;
  background-color: #fafafa;
  border-radius: 6px;
  font-size: 13px;
  color: #888888;
}

/* ==========================================================================
   components: footer
   ========================================================================== */

.footer-columns {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px 24px;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 40px;
}

.footer-col h3 {
  font-size: 15px;
  color: #ffffff;
  margin-bottom: 14px;
  font-weight: 600;
}

.footer-col p {
  font-size: 13px;
  color: #aaaaaa;
  line-height: 1.6;
}

.footer-col ul li {
  margin-bottom: 8px;
}

.footer-col ul a {
  font-size: 13px;
  color: #aaaaaa;
}

.footer-col ul a:hover {
  color: #ff6b6b;
}

.footer-bottom {
  border-top: 1px solid #444444;
  padding: 16px 20px;
  text-align: center;
}

.footer-bottom p {
  margin: 0;
  font-size: 13px;
  color: #888888;
}

/* ==========================================================================
   pages: index
   ========================================================================== */

.home-main {
  padding-bottom: 0;
}

/* hero */
.hero-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px 40px;
  display: grid;
  grid-template-columns: 1.1fr 1fr 0.9fr;
  gap: 24px;
  align-items: center;
}

.hero-media {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.hero-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.hero-content h1 {
  font-size: 28px;
  margin-bottom: 12px;
}

.hero-content p {
  font-size: 15px;
  color: #666666;
  margin-bottom: 20px;
}

.hero-actions {
  display: flex;
  gap: 12px;
}

.hero-index {
  background-color: #ffffff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.hero-index h2 {
  font-size: 16px;
  margin-bottom: 14px;
}

.hero-index ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hero-index ul a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 6px;
  transition: background-color 0.2s ease;
}

.hero-index ul a:hover {
  background-color: #fafafa;
}

.hero-index ul img {
  width: 48px;
  height: 48px;
  border-radius: 4px;
  object-fit: cover;
}

/* category nav */
.category-nav-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px;
}

.category-nav-section h2 {
  font-size: 22px;
  margin-bottom: 8px;
}

.category-nav-section > p {
  font-size: 14px;
  color: #666666;
  margin-bottom: 20px;
}

.category-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* hot recommend */
.hot-recommend-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px;
}

.hot-recommend-section h2 {
  font-size: 22px;
  margin-bottom: 8px;
}

.hot-recommend-section > p {
  font-size: 14px;
  color: #666666;
  margin-bottom: 20px;
}

.recommend-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* guide entry */
.guide-entry-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px;
}

.guide-entry-section h2 {
  font-size: 22px;
  margin-bottom: 8px;
}

.guide-entry-section > p {
  font-size: 14px;
  color: #666666;
  margin-bottom: 20px;
}

.steps-wrapper {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

.guide-entry-section > .text-link {
  margin-top: 16px;
}

/* longtail preview */
.longtail-preview-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px 48px;
}

.longtail-preview-section h2 {
  font-size: 22px;
  margin-bottom: 20px;
}

.topic-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.topic-card {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 16px;
  background-color: #ffffff;
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  align-items: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.topic-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.topic-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
}

.topic-card h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

.topic-card p {
  font-size: 14px;
  color: #666666;
  margin-bottom: 10px;
}

/* ==========================================================================
   pages: inner pages common
   ========================================================================== */

.inner-main {
  padding-bottom: 40px;
}

.page-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 32px;
  align-items: start;
}

.main-content {
  min-width: 0;
}

/* ==========================================================================
   pages: category
   ========================================================================== */

.category-list-section {
  margin-bottom: 40px;
}

.section-title {
  font-size: 20px;
  margin-bottom: 8px;
}

.section-intro {
  font-size: 14px;
  color: #666666;
  margin-bottom: 20px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.category-card {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 14px;
  background-color: #ffffff;
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.category-card-img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 6px;
}

.category-card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.category-card-body h3 {
  font-size: 16px;
  margin-bottom: 6px;
}

.category-card-body p {
  font-size: 13px;
  color: #666666;
  margin-bottom: 8px;
  line-height: 1.5;
}

.category-link {
  font-size: 13px;
  color: #ff6b6b;
  font-weight: 500;
}

.category-desc-section p {
  font-size: 14px;
  color: #555555;
  line-height: 1.8;
  margin-bottom: 12px;
}

/* ==========================================================================
   pages: guide
   ========================================================================== */

.guide-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 8px;
}

.guide-section h2 {
  font-size: 20px;
  margin-bottom: 16px;
}

.guide-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.step-card p a {
  color: #ff6b6b;
}

.step-card p a:hover {
  text-decoration: underline;
}

.tips-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.tip-item {
  background-color: #ffffff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.tip-item h3 {
  font-size: 15px;
  margin-bottom: 8px;
}

.tip-item p {
  font-size: 14px;
  color: #666666;
  margin-bottom: 0;
}

.guide-figure {
  margin: 0 0 20px;
  border-radius: 8px;
  overflow: hidden;
  background-color: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.guide-figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.guide-figure figcaption {
  padding: 12px 16px;
  font-size: 13px;
  color: #888888;
  background-color: #ffffff;
}

.tool-desc p {
  font-size: 14px;
  color: #555555;
  line-height: 1.8;
  margin-bottom: 12px;
}

.habit-tips > p {
  font-size: 14px;
  color: #555555;
  margin-bottom: 16px;
}

.habit-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.habit-list li {
  background-color: #ffffff;
  border-radius: 6px;
  padding: 14px 16px;
  font-size: 14px;
  color: #555555;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  position: relative;
  padding-left: 36px;
}

.habit-list li::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #4ecdc4;
}

/* ==========================================================================
   pages: hot-blood
   ========================================================================== */

.recommend-list-section {
  margin-bottom: 40px;
}

.recommend-list-section .comic-card {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  padding: 14px;
  margin-bottom: 16px;
}

.recommend-list-section .comic-media {
  border-radius: 6px;
  overflow: hidden;
}

.recommend-list-section .comic-media img {
  width: 140px;
  height: 180px;
  object-fit: cover;
}

.recommend-list-section .comic-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.recommend-list-section .comic-title {
  font-size: 17px;
  margin-bottom: 8px;
}

.recommend-list-section .comic-desc {
  font-size: 14px;
  color: #666666;
  margin-bottom: 10px;
  line-height: 1.6;
}

.comic-tags {
  font-size: 13px;
  color: #4ecdc4;
  font-weight: 500;
}

.genre-features p {
  font-size: 14px;
  color: #555555;
  line-height: 1.8;
  margin-bottom: 12px;
}

/* ==========================================================================
   pages: romance
   ========================================================================== */

.layout-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 32px;
  align-items: start;
}

.main-col {
  min-width: 0;
}

.recommend-list {
  margin-bottom: 40px;
}

.recommend-list > h2 {
  font-size: 20px;
  margin-bottom: 8px;
}

.section-desc {
  font-size: 14px;
  color: #666666;
  margin-bottom: 20px;
}

.comic-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  background-color: #ffffff;
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.comic-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.comic-cover-wrap {
  border-radius: 6px;
  overflow: hidden;
}

.comic-cover {
  width: 120px;
  height: 160px;
  object-fit: cover;
}

.comic-info h3 {
  font-size: 16px;
  margin-bottom: 6px;
}

.comic-info .comic-tags {
  margin-bottom: 8px;
}

.comic-info p {
  font-size: 14px;
  color: #666666;
  margin-bottom: 8px;
  line-height: 1.6;
}

.genre-feature p {
  font-size: 14px;
  color: #555555;
  line-height: 1.8;
  margin-bottom: 12px;
}

.related-box .side-note {
  margin-top: 12px;
  margin-bottom: 0;
}

.related-box .side-note a {
  color: #ff6b6b;
}

/* ==========================================================================
   pages: 404
   ========================================================================== */

.error-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
}

.error-content {
  text-align: center;
  max-width: 480px;
}

.error-content h1 {
  font-size: 48px;
  color: #ff6b6b;
  margin-bottom: 16px;
}

.error-content p {
  font-size: 15px;
  color: #666666;
  margin-bottom: 12px;
}

.error-home-link {
  display: inline-block;
  margin-top: 16px;
  padding: 10px 28px;
  background-color: #ff6b6b;
  color: #ffffff;
  border-radius: 6px;
  font-weight: 600;
  transition: background-color 0.2s ease;
}

.error-home-link:hover {
  background-color: #e05555;
  color: #ffffff;
}

/* ==========================================================================
   responsive
   ========================================================================== */

@media (max-width: 768px) {
  /* header */
  .header-inner {
    height: auto;
    min-height: 56px;
    padding: 8px 16px;
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    flex-basis: 100%;
  }

  .nav-list {
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 8px 0 12px;
    gap: 0;
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-list a {
    padding: 12px 8px;
    border-radius: 4px;
  }

  /* breadcrumb */
  .breadcrumb {
    padding: 12px 16px 0;
  }

  /* page header */
  .page-header {
    padding: 16px 16px 4px;
  }

  .page-title {
    font-size: 24px;
  }

  /* index hero */
  .hero-section {
    grid-template-columns: 1fr;
    padding: 20px 16px 24px;
    gap: 16px;
  }

  .hero-content h1 {
    font-size: 24px;
  }

  .hero-actions {
    flex-direction: column;
    gap: 10px;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
  }

  .hero-index ul {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .hero-index ul li {
    flex: 1 1 calc(50% - 8px);
    min-width: 140px;
  }

  /* index sections */
  .category-nav-section,
  .hot-recommend-section,
  .guide-entry-section,
  .longtail-preview-section {
    padding: 24px 16px;
  }

  .recommend-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .steps-wrapper {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .topic-cards {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .topic-card {
    grid-template-columns: 1fr;
  }

  /* inner layout */
  .page-layout,
  .layout-shell {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 16px 16px 0;
  }

  /* category page */
  .category-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* guide page */
  .guide-section {
    padding: 16px 16px 4px;
  }

  .guide-steps {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .tips-list {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .habit-list {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  /* hot-blood page */
  .recommend-list-section .comic-card {
    grid-template-columns: 100px 1fr;
    padding: 10px;
    gap: 12px;
  }

  .recommend-list-section .comic-media img {
    width: 100px;
    height: 140px;
  }

  /* romance page */
  .comic-item {
    grid-template-columns: 100px 1fr;
    padding: 10px;
    gap: 12px;
  }

  .comic-cover {
    width: 100px;
    height: 140px;
  }

  /* footer */
  .footer-columns {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 32px 16px 20px;
  }

  .footer-bottom {
    padding: 14px 16px;
  }
}

@media (max-width: 480px) {
  .hero-index ul li {
    flex: 1 1 100%;
  }

  .category-card {
    grid-template-columns: 80px 1fr;
    padding: 10px;
    gap: 12px;
  }

  .category-card-img {
    width: 80px;
    height: 80px;
  }
}
