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

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
  sans-serif;
  background: #05060a;
  color: #f5f5f5;
  min-height: 100vh;
}

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

header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #222;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  background: #070812;
  position: sticky;
  top: 0;
  z-index: 10;
}

.logo {
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 1.1rem;
  border-radius: 2px;
  width: 160px;
  height: 42px;
  padding: 3px;
  padding-top: 6px;
  justify-content: space-around;
}

.accent {
  color: #16a4ff;
}

nav.nav {
  display: flex;
  gap: 0.75rem;
  font-size: 0.9rem;
}

nav.nav a {
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid transparent;
  color: #ccc;
}

nav.nav a.active,
nav.nav a:hover {
  border-color: #16a4ff;
  color: #f5f5f5;
}

#search-form {
  display: flex;
  gap: 0.5rem;
}

#search-input {
  padding: 0.4rem 0.6rem;
  border-radius: 999px;
  border: 1px solid #333;
  background: #0e1018;
  color: #fff;
  min-width: 200px;
}

#search-input:focus {
  outline: none;
  border-color: #16a4ff;
}

.btn {
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  border: 1px solid #333;
  background: #10121d;
  color: #f5f5f5;
  cursor: pointer;
  font-size: 0.85rem;
  white-space: nowrap;
}

main {
  padding: 1rem 1.5rem 3.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

#status {
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  color: #aaa;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

#results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  align-items: stretch;
}

.card {
  background: #0c0f1a;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

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

.card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: #151827;
  display: block;
}

.card-body {
  padding: 0.6rem 0.7rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
}

.meta {
  font-size: 0.8rem;
  color: #aaa;
  display: flex;
  justify-content: space-between;
  gap: 0.4rem;
}

.rating {
  font-weight: 600;
}

.overview {
  font-size: 0.78rem;
  color: #c5c5c5;
  margin-top: 0.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}



#pagination {
  margin-top: 1.5rem;
  display: none; 
  justify-content: center;
  gap: 0.75rem;
  align-items: center;
  font-size: 0.85rem;
  color: #ccc;
}

#pagination button {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid #333;
  background: #10121d;
  color: #f5f5f5;
  cursor: pointer;
  min-width: 70px;
}

#pagination button[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
}



.detail-card {
  background: #0c0f1a;
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.detail-header {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.detail-poster {
  flex: 0 0 220px;
}

.detail-poster img,
.detail-poster-placeholder {
  width: 100%;
  border-radius: 0.75rem;
  background: #151827;
}

.detail-main {
  flex: 1 1 260px;
  min-width: 0;
}

.detail-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.detail-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #bbb;
  margin-bottom: 0.5rem;
}

.detail-tagline {
  font-size: 0.9rem;
  font-style: italic;
  color: #ccc;
  margin-bottom: 0.5rem;
}

.detail-meta {
  font-size: 0.85rem;
  color: #ccc;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.detail-overview {
  font-size: 0.9rem;
  color: #ddd;
  margin-top: 0.6rem;
}

.detail-links {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}



footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.5rem 1.5rem;
  border-top: 1px solid #111;
  background: rgba(5, 6, 10, 0.96);
  font-size: 0.75rem;
  color: #888;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(10px);
}



main > article,
.article-content {
  max-width: 900px;
  margin: 2.5rem auto 4.5rem;
  padding: 1.8rem 2rem;
  border-radius: 18px;
  position: relative;
  background: radial-gradient(circle at top left, #14182a 0, #05060a 55%, #04050a 100%);
  box-shadow:
    0 18px 45px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(255, 255, 255, 0.02);
  color: #e5e7f2;
  line-height: 1.7;
  font-size: 0.97rem;
}


main > article::before,
.article-content::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 18px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(22, 164, 255, 0.8), transparent, rgba(95, 203, 255, 0.7));
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.7;
}


main > article::after,
.article-content::after {
  content: "GUIDE MADROZ";
  position: absolute;
  top: 0.75rem;
  right: 1.4rem;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(22, 164, 255, 0.5);
  background: rgba(7, 10, 24, 0.95);
  color: #cfe9ff;
}



main > article h1,
.article-content h1 {
  font-size: 1.7rem;
  margin-bottom: 1rem;
  text-align: center;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

main > article h1 span,
.article-content h1 span {
  color: #16a4ff;
}

main > article h2,
.article-content h2 {
  font-size: 1.25rem;
  margin-top: 1.7rem;
  margin-bottom: 0.8rem;
  color: #f4f6ff;
  position: relative;
  padding-left: 0.9rem;
}

main > article h2::before,
.article-content h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35rem;
  width: 3px;
  height: 1.2rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #16a4ff, #5fcbff);
}

main > article h3,
.article-content h3 {
  font-size: 1.05rem;
  margin-top: 1.1rem;
  margin-bottom: 0.45rem;
  color: #e8ecff;
}



main > article p,
.article-content p {
  margin-bottom: 0.7rem;
  color: #d5d9f2;
}

main > article a,
.article-content a {
  color: #5fcbff;
  text-decoration: none;
  border-bottom: 1px dashed rgba(95, 203, 255, 0.6);
}

main > article a:hover,
.article-content a:hover {
  border-bottom-style: solid;
}



main > article ul,
main > article ol,
.article-content ul,
.article-content ol {
  margin: 0.5rem 0 0.9rem 1.5rem;
}

main > article li,
.article-content li {
  margin-bottom: 0.35rem;
}

main > article ul li::marker,
.article-content ul li::marker {
  color: #5fcbff;
}



main > article blockquote,
.article-content blockquote {
  margin: 1rem 0;
  padding: 0.8rem 1rem 0.9rem;
  border-radius: 10px;
  border-left: 3px solid #16a4ff;
  background: rgba(4, 7, 18, 0.9);
  font-style: italic;
  color: #dde3ff;
}



main > article table,
.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.3rem;
  font-size: 0.9rem;
}

main > article th,
main > article td,
.article-content th,
.article-content td {
  padding: 0.55rem 0.7rem;
  border: 1px solid #1b2033;
}

main > article thead,
.article-content thead {
  background: #10152a;
}



main > article strong,
.article-content strong {
  color: #ffffff;
}

main > article code,
.article-content code {
  font-family: Consolas, Monaco, "SF Mono", monospace;
  font-size: 0.85rem;
  padding: 0.12rem 0.35rem;
  border-radius: 4px;
  background: rgba(12, 18, 40, 0.9);
  border: 1px solid rgba(31, 41, 80, 0.9);
}


main > article img,
.article-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.1rem auto;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.75);
}



@media (max-width: 768px) {
  main > article,
  .article-content {
    margin: 1.7rem 0 3.5rem;
    padding: 1.2rem 1.2rem 1.4rem;
    border-radius: 14px;
  }

  main > article::before,
  .article-content::before {
    border-radius: 14px;
  }

  main > article::after,
  .article-content::after {
    right: 0.9rem;
    top: 0.55rem;
    font-size: 0.6rem;
    padding: 0.22rem 0.55rem;
  }

  main > article h1,
  .article-content h1 {
    font-size: 1.3rem;
  }

  main > article h2,
  .article-content h2 {
    font-size: 1.05rem;
  }
}
a.btn.btn-watch-main {
    background: #e09b13;
    color: #211705;
    font-weight: bold;
    display: flex;
    justify-content: space-around;
    align-items: center;
    line-height: 17px;
    gap: 5px;
}

.btn:not(.btn-watch-main) {
    border: none;
    background: none;
    color: #4a4f60;
    text-decoration: underline;
}



@media (max-width: 600px) {
  header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  nav.nav {
    order: 3;
  }

  #search-form {
    width: 100%;
  }

  #search-input {
    flex: 1;
    width: 100%;
  }

  main {
    padding-inline: 1rem;
  }

  footer {
    font-size: 0.7rem;
    padding-inline: 1rem;
  }

  .detail-header {
    flex-direction: column;
  }

  .detail-poster {
    max-width: 260px;
  }
}
