* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #0f141b;
  color: #f5f5f5;
}

footer {
  padding: 24px;
  text-align: center;
  color: #71717a;
}

/* HEADER */

header {
  background: #151824;
  border-bottom: 1px solid #252a3a;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 48px;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: #ff4d8d;
}

nav {
  display: flex;
  gap: 24px;
}

nav a {
  color: #cfd3e6;
  text-decoration: none;
  font-size: 15px;
}

nav a:hover {
  color: #ffffff;
}

/* HERO */

.hero {
  min-height: 80vh;
  display: flex;
  align-items: center;
  padding: 80px 48px;
  background:
    radial-gradient(circle at top right, rgba(255, 77, 141, 0.18), transparent 35%),
    linear-gradient(135deg, #111821 0%, #0b0f14 100%);
}

.hero-content {
  max-width: 720px;
}

.badge {
  display: inline-block;
  padding: 8px 14px;
  background: #252a3a;
  color: #ff8ab6;
  border-radius: 999px;
  font-size: 14px;
  font-weight: bold;
}

h1 {
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
  margin: 0 0 16px;
  color: #ffffff;
}

.hero-text {
  font-size: 20px;
  line-height: 1.6;
  color: #cfd3e6;
  margin-bottom: 32px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
}

/* BUTTONS */

.button{
  display: inline-block;
  padding: 14px 22px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: bold;
  border: none;
  cursor: pointer;
}

.primary {
  background: #ff4d8d;
  color: #ffffff;
}
.primary:hover {
  background: #ff4d7d;
}

.secondary {
  background: #252a3a;
  color: #ffffff;
}

.secondary:hover {
  background: #33394d;
}

.button-dark {
  display: inline-block;
  padding: 11px 15px;
  border-radius: 10px;
  background: white;
  color: #18181b;
  text-decoration: none;
  font-weight: bold;
  border: none;
  cursor: pointer;
  font-size: 14px;
}

/* CONTAINER */

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

/* CATALOG CONTROLS */

.controls {
  display: grid;
  grid-template-columns: 1fr 220px 220px;
  gap: 16px;
  margin-bottom: 24px;
}

input,
select {
  width: 100%;
  height: 48px;
  padding: 12px 14px;
  border: 1px solid #252a3a;
  border-radius: 10px;
  font-size: 16px;
  background: #161d26;
  color: #ffffff;
  outline: none;
}
select  {
  cursor: pointer;
}
input::placeholder {
  color: #8b95a5;
}

/* CATALOG */

.catalog {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 24px;
}

.card {
  background: #161d26;
  border: 1px solid #252a3a;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  width: 270px;
  min-height: 560px;
  box-sizing: border-box;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.card img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  background: #252a3a;
  display: block;
  flex-shrink: 0;
}

.card-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;;
  box-sizing: border-box;
}

.card h2 {
  margin: 0 0 8px;
  font-size: 20px;
  color: #ffffff;
  min-height: 58px;
  line-height: 1.15;
  overflow: hidden;

}

.meta {
  margin: 0 0 12px;
  color: #aeb7c2;
  font-size: 14px;
}

.description {
  font-size: 14px;
  line-height: 1.5;
  color: #cfd3e6;
}

.card-content .button.primary {
  margin-top: auto;
  align-self: flex-start;
}

.card .description {
  min-height: 90px;
  margin-bottom: 20px;
}

.card .button {
  margin-top: auto;
}
header p {
  font-size: 16px;
  color: #cfd3e6;
}

/* TAGS */

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  margin-bottom: 20px;
  min-height: 24px;
}

.tag {
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  background: #252a3a;
  color: #cfd3e6;
}

.legal {
  background: #123524;
  color: #86efac;
}

.unknown {
  background: #3a3014;
  color: #fde68a;
}

.risk {
  background: #3a1717;
  color: #fca5a5;
}

.warning {
  background: #ea4335;
  color: #fca5a5;
}

/* AUTHOR PAGE */

.author-hero,
.author-block {
  max-width: 900px;
  margin: 30px auto;
  background: #161d26;
  border: 1px solid #252a3a;
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

.author-hero h1,
.author-block h2 {
  margin-top: 0;
  color: #ffffff;
}

.author-hero p,
.author-block p {
  color: #cfd3e6;
  line-height: 1.6;
}

.author-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.author-list p {
  margin: 0;
  padding: 14px;
  background: #252a3a;
  color: #ffffff;
  border-radius: 12px;
  font-weight: 500;
}

/* EMPTY */

.empty {
  display: none;
  padding: 30px;
  text-align: center;
  color: #aeb7c2;
  background: #161d26;
  border: 1px solid #252a3a;
  border-radius: 16px;
}

/* MOBILE */

@media (max-width: 800px) {
  .hero {
    padding: 60px 20px;
  }

  .logo, nav a[href="admin.html"], .description, .tags {
    display: none;
  }

  h1 {
    font-size: 38px;
  }

  .hero-text {
    font-size: 17px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: flex-start;
  }

  .controls {
    grid-template-columns: 1fr;
  }

  .card {
    width: 160px;
    min-height: 240px;
  }
  .card img {
    height: 240px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
  }

  .catalog {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
}
/* Readers */

.reader-title {
  margin-bottom: 22px;
  text-align: center;
}

.reader-title h1 {
  margin: 0 0 8px;
  font-size: 34px;
}

.reader-title p {
  margin: 0;
  color: #a1a1aa;
}

.reader-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

/* Mangas */

.manga-page {
  display: flex;
  max-width: 1200px;
  padding: 40px 20px 80px;
  color: white;
  justify-content: space-between;
}

.manga-cover {
  width: 220px;
  height: 320px;
  background: #2a2a35;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aaa;
  margin-bottom: 24px;
}

.manga-title {
  font-size: 56px;
  line-height: 1.05;
  margin: 0 0 20px;
}

.manga-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.manga-meta span {
  background: #2b2b38;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 14px;
}

.manga-description {
  max-width: 850px;
  font-size: 18px;
  line-height: 1.6;
  color: #e5e5e5;
  margin-bottom: 24px;
}

/* Chapters */

.chapters {
  margin-top: 32px;
}

.chapters h2 {
  font-size: 32px;
  margin-bottom: 16px;
}

.chapter-list {
  display: grid;
  gap: 12px;
}

.chapters a {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #24242f;
  color: white;
  text-decoration: none;
  padding: 14px 18px;
  border-radius: 14px;
}

.chapters a:hover {
  background: #333344;
}
.chapters span {
  margin-left: auto;
  color: white;
  opacity: 0.7;
  white-space: nowrap;
}

.chapters-empty {
  margin: 0;
  padding: 18px;
  color: #aeb7c2;
  background: #161d26;
  border: 1px solid #252a3a;
  border-radius: 14px;
}

.details {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Reader pages (для монолита) */

.reader-pages {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.page {
  width: 100%;
  max-width: 850px;
  min-height: 500px;
  background: #27272a;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a1a1aa;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35);
  position: relative;
}

.page img {
  width: 100%;
  display: block;
}

.page-number {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.65);
  color: white;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 13px;
}

@media (max-width: 700px) {
  .page {
    min-height: 420px;
    border-radius: 10px;
  }
}
