* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

a {
  text-decoration: none;
  color: inherit;
}

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  background-color: #121212; /* гол фон */
  color: #e0e0e0;           /* ерөнхий текст */
}

/* Header */
header {
  background-color: #7318a0; /* үндсэн ягаан */
  color: white;
  padding: 15px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

header a img {
  max-width: 180px;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
}

nav ul li a {
  color: #fff;
  font-size: 16px;
  transition: color 0.3s;
}

nav ul li a:hover,
nav ul li a.active {
  color: #ffcc00; /* шар – тод контраст */
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: white;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Mobile styles */
@media (max-width: 768px) {
  nav {
    display: none;
    position: absolute;
    top: 70px;
    right: 30px;
    background: #7318a0;
    border-radius: 8px;
    flex-direction: column;
    padding: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.3s ease;
  }

  nav.active {
    display: flex;
  }

  nav ul {
    flex-direction: column;
    gap: 10px;
  }

  .hamburger {
    display: flex;
  }

  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }

  @keyframes fadeIn {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* Main content */
main {
  width: 100%;
  margin-top: 50px;
  padding: 20px;
  background-color: #1a1a1a;
}

.container {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0.5rem;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 0.5rem 0.75rem;
}

.section-title h3 {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}

.section-title a {
  font-size: 14px;
  color: #999;
  transition: color 0.3s;
}

.section-title a:hover {
  color: #ffcc00; /* шар цохицол */
}

/* Manga list */
.manga-list {
  display: grid;
  grid-template-columns: 1fr; /* mobile */
  background: #222;
  padding: 0.75rem;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .manga-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .manga-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

.manga-item {
  width: 100%;
  padding: 0.25rem 0.25rem 0.75rem;
  border-bottom: 1px solid #312f40;
  background: #1f1f1f;
  border-radius: 6px;
  transition: transform 0.3s, box-shadow 0.3s;
}

.manga-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.manga-grid {
  display: grid;
  grid-template-columns: 3fr 9fr;
  margin: 0.5rem;
  gap: 0.5rem;
}

.manga-thumb img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

.manga-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.manga-title a {
  font-size: 15px;
  font-weight: 500;
  color: #fff;
  transition: color 0.3s;
}

.manga-title a:hover {
  color: #ffcc00;
}

/* Chapters */
.chapter-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 0.25rem;
}

.chapter {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chapter a {
  font-size: 14px;
  color: #bbb;
  transition: color 0.3s;
}

.chapter a:hover {
  color: #18ffff; /* cyan accent */
}

.chapter-time {
  font-size: 12px;
  color: #888;
}

/* Footer */
footer {
  background: #7318a0;
  color: white;
  text-align: center;
  padding: 20px;
  margin-top: 50px;
}
