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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  color: #111827;
  background: #f7f5f2;
  line-height: 1.7;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  width: 100%;
  display: block;
  border-radius: 16px;
}

.container {
  width: min(1200px, 92%);
  margin: 0 auto;
}

.header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
  flex-wrap: wrap;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}

.logo svg {
  width: 36px;
  height: 36px;
  padding: 6px;
  border-radius: 10px;
  background: #7c3aed;
  color: #fff;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-name {
  font-size: 1.05rem;
}

.logo-tagline {
  font-size: 0.9rem;
  color: #6b7280;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.95rem;
}

.nav-link {
  padding: 6px 12px;
  border-radius: 999px;
  background: #ede9fe;
}

.nav-link.active {
  background: #7c3aed;
  color: #fff;
}

.cta-btn {
  padding: 10px 18px;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  font-weight: 600;
  border: none;
}

.menu-toggle {
  border: 1px solid #e5e7eb;
  background: #fff;
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border-radius: 10px;
}

.menu-toggle span {
  width: 22px;
  height: 2px;
  background: #111827;
  border-radius: 999px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 90px 0 70px;
  color: #fff;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(17, 24, 39, 0.8), rgba(124, 58, 237, 0.65));
}

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

.hero-title {
  font-size: clamp(2.2rem, 2.6vw + 1.4rem, 3.2rem);
  margin: 0 0 14px;
}

.hero-subtitle {
  margin: 0 0 24px;
  color: #e5e7eb;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  background: transparent;
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn-primary {
  background: #7c3aed;
  color: #fff;
}

.btn-outline {
  border-color: #e5e7eb;
  color: #e5e7eb;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  background: rgba(17, 24, 39, 0.6);
  padding: 16px;
  border-radius: 16px;
}

.stat-number {
  font-size: 1.1rem;
  font-weight: 700;
}

.stat-label {
  font-size: 0.85rem;
  color: #e5e7eb;
}

.section-header {
  margin-bottom: 26px;
}

.section-title {
  margin: 8px 0;
  color: #111827;
}

.section-desc {
  margin: 0;
  color: #6b7280;
}

.section-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: #ede9fe;
  color: #5b21b6;
  font-size: 0.85rem;
}

.hot-section,
.categories-section,
.updates-section,
.ranking-section,
.features-section,
.about-section,
.cta-section {
  padding: 60px 0;
}

.hot-section,
.ranking-section,
.features-section {
  background: #ffffff;
}

.categories-section,
.updates-section {
  background: #f1ede8;
}

.manga-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.manga-card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.manga-card.large {
  grid-column: span 2;
}

.manga-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.8rem;
}

.manga-badge.new {
  background: #10b981;
}

.manga-cover {
  position: relative;
}

.manga-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(17, 24, 39, 0.4);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.manga-cover:hover .manga-overlay {
  opacity: 1;
}

.btn-read {
  padding: 8px 16px;
  background: #7c3aed;
  color: #fff;
  border-radius: 999px;
  font-weight: 600;
  border: none;
}

.manga-info {
  padding: 16px;
}

.manga-genre {
  color: #6b7280;
  margin-top: 4px;
}

.manga-desc {
  color: #4b5563;
  margin: 8px 0;
}

.manga-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #6b7280;
}

.rating svg {
  width: 16px;
  height: 16px;
  margin-right: 4px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.category-card {
  background: #fff;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid #ede9fe;
}

.category-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #ede9fe;
  color: #5b21b6;
  margin-bottom: 10px;
}

.category-count {
  display: inline-block;
  margin-top: 8px;
  color: #7c3aed;
  font-weight: 600;
}

.update-list {
  display: grid;
  gap: 16px;
}

.update-card {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 16px;
  align-items: center;
  background: #fff;
  padding: 16px;
  border-radius: 16px;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.06);
}

.update-info h3 {
  margin: 0 0 6px;
}

.update-chapter {
  margin: 0;
  color: #6b7280;
}

.update-time {
  margin: 0;
  color: #9ca3af;
}

.btn-continue {
  padding: 8px 16px;
  border-radius: 999px;
  background: #ede9fe;
  color: #5b21b6;
  font-weight: 600;
  border: none;
}

.ranking-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.ranking-tab {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #4b5563;
  font-weight: 600;
}

.ranking-tab.active {
  background: #7c3aed;
  color: #fff;
  border-color: transparent;
}

.ranking-list {
  display: grid;
  gap: 16px;
}

.ranking-item {
  display: grid;
  grid-template-columns: 60px 140px 1fr;
  gap: 16px;
  align-items: center;
  background: #fff;
  padding: 16px;
  border-radius: 16px;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.06);
}

.ranking-number {
  font-weight: 700;
  color: #5b21b6;
  text-align: center;
}

.ranking-number.top {
  color: #f59e0b;
}

.ranking-stats {
  display: flex;
  gap: 12px;
  color: #6b7280;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.feature-card {
  background: #fff;
  padding: 20px;
  border-radius: 16px;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #ede9fe;
  color: #5b21b6;
  margin-bottom: 12px;
}

.about-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  align-items: center;
}

.cta-section {
  background: linear-gradient(135deg, #7c3aed, #111827);
  color: #fff;
}

.cta-content {
  text-align: center;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.btn-large {
  padding: 12px 26px;
}

.btn-white {
  background: #fff;
  color: #111827;
}

.btn-outline-white {
  border: 1px solid #fff;
  color: #fff;
}

.footer {
  background: #111827;
  color: #e5e7eb;
  padding: 32px 0;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
}

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

.footer-logo svg {
  width: 38px;
  height: 38px;
}

.footer-desc {
  color: #cbd5f5;
}

.footer-social {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.footer-social svg {
  width: 22px;
  height: 22px;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}

.footer-col h4 {
  margin: 0 0 8px;
}

.footer-col a {
  display: block;
  color: #cbd5f5;
  margin-bottom: 6px;
}

.footer-bottom {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  color: #94a3b8;
}

.footer-links-inline {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.scroll-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: #7c3aed;
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.2);
}

@media (max-width: 900px) {
  .header-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .manga-card.large {
    grid-column: span 1;
  }

  .update-card {
    grid-template-columns: 1fr;
  }

  .ranking-item {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

@media (max-width: 600px) {
  .hero-actions {
    flex-direction: column;
  }

  .menu-toggle {
    display: flex;
  }
}
