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

:root {
  --primary: #E63946;
  --primary-dark: #C92A35;
  --primary-light: #F15B66;
  --accent: #FF6B7A;
  --secondary: #FF8FA3;
  --dark: #1A1A2E;
  --dark-gray: #16213E;
  --gray: #5E6E7C;
  --light-gray: #C8D1D8;
  --lighter: #FFF5F5;
  --white: #ffffff;
  --shadow: 0 8px 25px rgba(230, 57, 70, 0.15);
  --shadow-lg: 0 15px 40px rgba(230, 57, 70, 0.2);
  --shadow-xl: 0 25px 60px rgba(230, 57, 70, 0.25);
  --gradient: linear-gradient(135deg, #E63946, #FF8FA3);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Noto Sans SC', system-ui, -apple-system, sans-serif;
  background: var(--white);
  color: var(--dark);
  line-height: 1.6;
  overflow-x: hidden;
}

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  box-shadow: 0 2px 15px rgba(230, 57, 70, 0.1);
  transition: all 0.3s ease;
}

.nav.scrolled {
  box-shadow: 0 2px 25px rgba(230, 57, 70, 0.2);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  gap: 2rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  color: var(--dark);
  font-weight: 800;
  font-size: 1.375rem;
  transition: all 0.3s;
  flex-shrink: 0;
}

.nav-brand:hover {
  color: var(--primary);
  transform: scale(1.05);
}

.nav-icon {
  width: 2rem;
  height: 2rem;
  color: var(--primary);
  transition: all 0.3s;
}

.nav-brand:hover .nav-icon {
  transform: rotate(180deg);
}

.nav-search {
  flex: 1;
  max-width: 500px;
  display: flex;
  align-items: center;
  background: var(--lighter);
  border-radius: 50px;
  padding: 0.5rem 0.75rem;
  transition: all 0.3s;
  border: 2px solid transparent;
}

.nav-search:focus-within {
  background: white;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(230, 57, 70, 0.1);
}

.search-input {
  flex: 1;
  border: none;
  background: none;
  padding: 0.375rem 0.75rem;
  font-size: 0.9375rem;
  color: var(--dark);
  outline: none;
  font-family: inherit;
}

.search-input::placeholder {
  color: var(--gray);
}

.search-btn {
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  background: var(--gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  flex-shrink: 0;
}

.search-btn svg {
  width: 1.125rem;
  height: 1.125rem;
  color: white;
}

.search-btn:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-item {
  color: var(--gray);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
  transition: all 0.3s;
  position: relative;
}

.nav-item::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 100%;
  height: 3px;
  background: var(--gradient);
  border-radius: 3px;
  transition: transform 0.3s;
}

.nav-item:hover,
.nav-item.active {
  color: var(--primary);
}

.nav-item:hover::after,
.nav-item.active::after {
  transform: translateX(-50%) scaleX(1);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--primary);
  transition: all 0.3s;
  border-radius: 2px;
}

.hero {
  position: relative;
  min-height: 90vh;
  padding-top: 70px;
  overflow: hidden;
}

.hero-slider {
  position: relative;
  height: 100%;
}

.hero-slide {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
}

.hero-slide-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
}

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

.hero-slide-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(26, 26, 46, 0.88) 0%, rgba(255, 105, 180, 0.75) 100%);
  z-index: 1;
}

.hero-slide-content {
  position: relative;
  z-index: 2;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  color: white;
  animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.5rem;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.875rem;
  margin-bottom: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero-badge svg {
  width: 1.125rem;
  height: 1.125rem;
}

.hero-title {
  font-size: 4.5rem;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.03em;
}

.hero-desc {
  font-size: 1.375rem;
  line-height: 1.7;
  margin-bottom: 3rem;
  opacity: 0.95;
  max-width: 600px;
}

.hero-actions {
  display: flex;
  gap: 1.25rem;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.125rem 2.5rem;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.0625rem;
  border-radius: 50px;
  transition: all 0.3s;
}

.hero-btn.primary {
  background: white;
  color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.hero-btn.primary svg {
  width: 1.25rem;
  height: 1.25rem;
}

.hero-btn.primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
}

.hero-btn.secondary {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.hero-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
}

.hero-wave {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  line-height: 0;
}

.hero-wave svg {
  width: 100%;
  height: auto;
}

.stats {
  padding: 4rem 0;
  background: var(--dark);
}

.stats-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3rem;
}

.stat-item {
  text-align: center;
}

.stat-icon {
  width: 4rem;
  height: 4rem;
  background: var(--gradient);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  box-shadow: 0 8px 20px rgba(230, 57, 70, 0.3);
}

.stat-icon svg {
  width: 2rem;
  height: 2rem;
  color: white;
}

.stat-num {
  font-size: 2.5rem;
  font-weight: 900;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 0.625rem;
}

.stat-label {
  font-size: 1rem;
  color: var(--light-gray);
  font-weight: 600;
}

.section-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 6rem 2rem;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 3rem;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 2rem;
  font-weight: 900;
  color: var(--dark);
}

.section-title svg {
  width: 2rem;
  height: 2rem;
  color: var(--primary);
}

.section-more {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9375rem;
  transition: all 0.3s;
}

.section-more svg {
  width: 1.125rem;
  height: 1.125rem;
  transition: transform 0.3s;
}

.section-more:hover {
  color: var(--primary-dark);
}

.section-more:hover svg {
  transform: translateX(5px);
}

.hot {
  background: white;
}

.manga-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.manga-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.manga-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.manga-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 3/4;
  overflow: hidden;
  border-radius: 20px 20px 0 0;
}

.manga-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.manga-card:hover .manga-cover img {
  transform: scale(1.1);
}

.manga-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(26, 26, 46, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

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

.manga-play {
  width: 4rem;
  height: 4rem;
  border: none;
  background: var(--gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: var(--shadow-lg);
}

.manga-play svg {
  width: 2rem;
  height: 2rem;
  color: white;
  margin-left: 3px;
}

.manga-play:hover {
  transform: scale(1.1);
}

.manga-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.375rem 1rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.75rem;
  color: white;
  backdrop-filter: blur(10px);
}

.manga-badge.hot {
  background: linear-gradient(135deg, #FF4757, #FF6B81);
}

.manga-badge.new {
  background: linear-gradient(135deg, #5F27CD, #9C88FF);
}

.manga-info {
  padding: 1.25rem;
}

.manga-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.manga-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
}

.manga-chapter {
  color: var(--gray);
}

.manga-rating {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: #FFD700;
  font-weight: 700;
}

.manga-rating svg {
  width: 1rem;
  height: 1rem;
}

.categories {
  background: var(--lighter);
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.5rem;
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  background: white;
  border-radius: 20px;
  text-decoration: none;
  transition: all 0.3s;
  border: 2px solid transparent;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.category-icon {
  width: 3.5rem;
  height: 3.5rem;
  background: var(--gradient);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  transition: all 0.3s;
}

.category-card:hover .category-icon {
  transform: scale(1.1) rotate(5deg);
}

.category-icon svg {
  width: 1.75rem;
  height: 1.75rem;
  color: white;
}

.category-card h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.375rem;
}

.category-card p {
  font-size: 0.875rem;
  color: var(--gray);
}

.latest {
  background: white;
}

.latest-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.latest-item {
  display: flex;
  gap: 2rem;
  padding: 2rem;
  background: var(--lighter);
  border-radius: 20px;
  transition: all 0.3s;
  border: 2px solid transparent;
}

.latest-item:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
  transform: translateX(5px);
}

.latest-cover {
  width: 150px;
  height: 200px;
  border-radius: 15px;
  overflow: hidden;
  flex-shrink: 0;
}

.latest-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.latest-item:hover .latest-cover img {
  transform: scale(1.1);
}

.latest-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.latest-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 0.75rem;
}

.latest-desc {
  font-size: 1rem;
  color: var(--gray);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.latest-meta {
  display: flex;
  gap: 2rem;
  font-size: 0.9375rem;
}

.latest-chapter {
  color: var(--primary);
  font-weight: 700;
}

.latest-time {
  color: var(--gray);
}

.ranking {
  background: linear-gradient(135deg, var(--lighter) 0%, #FFF 100%);
}

.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.ranking-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  background: white;
  border-radius: 20px;
  transition: all 0.3s;
  border: 2px solid transparent;
}

.ranking-item:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
  transform: translateX(8px);
}

.ranking-num {
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--gray);
  flex-shrink: 0;
}

.ranking-num.top {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.ranking-cover {
  width: 80px;
  height: 110px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
}

.ranking-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ranking-info {
  flex: 1;
}

.ranking-info h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.375rem;
}

.ranking-info p {
  font-size: 0.875rem;
  color: var(--gray);
}

.ranking-stats {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: #FFD700;
}

.ranking-stats svg {
  width: 1.25rem;
  height: 1.25rem;
}

.footer {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-gray) 100%);
  color: white;
  padding: 5rem 0 2rem;
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 50%, rgba(230, 57, 70, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 6rem;
  margin-bottom: 4rem;
  position: relative;
  z-index: 1;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.footer-logo {
  width: 3.5rem;
  height: 3.5rem;
  color: var(--primary);
}

.footer-name {
  font-size: 1.75rem;
  font-weight: 900;
  color: white;
}

.footer-domain {
  font-size: 1rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
}

.footer-desc {
  font-size: 1rem;
  color: var(--light-gray);
  line-height: 1.8;
  max-width: 500px;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.footer-col h4 {
  font-size: 1.125rem;
  font-weight: 800;
  color: white;
  margin-bottom: 1.5rem;
}

.footer-col a {
  display: block;
  color: var(--light-gray);
  text-decoration: none;
  font-size: 0.9375rem;
  margin-bottom: 1rem;
  transition: all 0.3s;
  position: relative;
  padding-left: 0;
}

.footer-col a::before {
  content: '';
  position: absolute;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient);
  transition: width 0.3s;
  bottom: -2px;
}

.footer-col a:hover {
  color: var(--primary);
  padding-left: 15px;
}

.footer-col a:hover::before {
  width: 10px;
}

.footer-bottom {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  position: relative;
  z-index: 1;
}

.footer-bottom p {
  font-size: 0.9375rem;
  color: var(--gray);
  margin: 0.5rem 0;
}

.footer-legal {
  font-size: 0.875rem;
  opacity: 0.7;
}

.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3.5rem;
  height: 3.5rem;
  background: var(--gradient);
  color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  box-shadow: var(--shadow-lg);
  z-index: 90;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-5px) scale(1.1);
  box-shadow: var(--shadow-xl);
}

.back-to-top svg {
  width: 1.5rem;
  height: 1.5rem;
}

@media (max-width: 1200px) {
  .hero-title {
    font-size: 3.5rem;
  }

  .section-title {
    font-size: 1.75rem;
  }

  .manga-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .stats-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 968px) {
  .nav-container {
    flex-wrap: wrap;
  }

  .nav-search {
    order: 3;
    flex-basis: 100%;
    margin-top: 1rem;
  }

  .nav-menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 2rem;
    gap: 0;
    transform: translateY(-100%);
    transition: transform 0.3s;
    box-shadow: var(--shadow-lg);
    align-items: stretch;
  }

  .nav-menu.active {
    transform: translateY(0);
  }

  .nav-item {
    padding: 1rem;
    border-bottom: 1px solid var(--lighter);
    text-align: center;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
  }

  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-desc {
    font-size: 1.125rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .manga-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 4rem;
  }

  .footer-links {
    grid-template-columns: 1fr;
  }

  .latest-item {
    flex-direction: column;
  }

  .latest-cover {
    width: 100%;
    height: 300px;
  }
}

@media (max-width: 640px) {
  .nav-container {
    padding: 0 1rem;
    height: auto;
    padding-top: 1rem;
    padding-bottom: 1rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-desc {
    font-size: 1rem;
  }

  .section-container {
    padding: 4rem 1rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .manga-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

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

  .category-card {
    padding: 1.5rem 1rem;
  }

  .latest-item {
    padding: 1.5rem;
  }

  .footer-container {
    padding: 0 1rem;
  }

  .footer-bottom {
    padding: 2rem 1rem 0;
  }
}
