/*
* Theme Name: Xtraordinary
* Text Domain: Xtraordinary
* Version: 1.0
* Description: An extraordinary theme for extraordinary websites.
* Tags: responsive, modern, web-novels
* Author: giuxtaposition
* Author URI: https://giuxtaposition.com
*/

:root {
  --font-family: "Helvetica Neue", sans-serif;
  --font-size: 16px;
  --line-height: 1.6;
  --background-color: #232136;
  --surface-color: 248deg, 24%, 20%;
  --overlay-color: #393552;
  --text-color: #e0def4;
  --primary-color: 267deg 57% 78%;
  --secondary-color: 197deg 49% 38%;
  --subtle-text-color: #908caa;
  --red-color: 343deg 76% 68%;
  --green-color: 189deg 43% 73%;
  --dark-green-color: 197deg, 53%, 34%;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size);
  line-height: var(--line-height);
  background-color: var(--background-color);
  color: var(--text-color);
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

* {
  box-sizing: border-box;
}

a {
  color: hsl(var(--primary-color));
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1rem 2rem;
  width: 100vw;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

main {
  display: flex;
  margin: 2rem 0;
  width: 100%;
  padding: 0 3rem;
}

header a:hover {
  text-decoration: none;
}

.logo {
  display: flex;
  align-items: center;
  color: var(--text-color);
}

.logo:hover {
  text-decoration: none;
}

.site-title {
  font-size: 1rem;
  font-weight: bold;
  text-transform: uppercase;
}

article {
  display: flex;
  flex-direction: column;
  gap: 4rem;
  width: 100%;
}

nav a {
  color: var(--text-color);
}

ul.menu {
  margin: 0;
  padding: 0;
}

ul.menu li {
  list-style: none;
  display: inline-block;
  padding: 1px;
  font-weight: bold;
  border-radius: 3px;
}

ul.menu li:hover {
  background-color: var(--overlay-color);
}
ul.menu li a {
  text-decoration: none;
  padding: 5px;
}

ul.sub-menu {
  display: none;
}

ul.menu li:hover ul.sub-menu {
  display: flex;
  flex-direction: column;
  position: absolute;
  background-color: hsl(var(--surface-color));
  padding: 0.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  width: 300px;
}

.logo {
  display: flex;
  gap: 0.5rem;
}

.logo img {
  height: 40px;
  width: auto;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
}

.container {
  background-color: hsl(var(--surface-color));
  border-radius: 1rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.container-header {
  display: flex;
  justify-content: space-between;
}

.container-header .date {
  color: var(--subtle-text-color);
  font-size: 0.9rem;
}

.container-header .tags {
  display: flex;
  gap: 0.5rem;
}

.tag {
  display: flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
  gap: 0.3rem;
  background-color: var(--overlay-color);
  color: var(--text-color);
  border-radius: 0.3rem;
  font-size: 0.8rem;
}

.tag a {
  color: var(--text-color);
}

.tag:hover {
  background-color: hsl(var(--secondary-color));
}

.tag a:hover {
  text-decoration: none;
}

.container-footer {
  display: flex;
  justify-content: space-between;
}

.categories {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.author-box {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
}

.author-avatar img,
.avatar {
  object-fit: cover;
  border-radius: 50%;
}

.comment-body {
  gap: 0.5rem;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
}

li.comment {
  list-style: none;
}

li.comment:has(+ li.comment) {
  border-bottom: 1px solid var(--overlay-color);
}

.comment-author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-right: 0.5rem;
}

.comment-meta {
  display: flex;
  align-items: center;
}

.comment-meta a {
  color: var(--subtle-text-color);
}

.comment > :nth-child(n + 4) {
  grid-column: 1 / -1; /* full width */
}

.says {
  display: none;
}

section.comments {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

label[for="comment"] {
  display: none;
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background-color: hsl(var(--surface-color));
  padding: 1rem;
  border-radius: 1rem;
}

.comment-form-comment {
  width: 100%;
}

.comment-notes {
  display: none;
}

p:has(input[type="text"]),
textarea#comment {
  width: inherit;
  box-sizing: border-box;
  padding: 0.5rem;
  border: 1px solid var(--overlay-color);
  border-radius: 0.5rem;
  background-color: hsl(var(--surface-color));
  color: var(--text-color);
  font-size: var(--font-size);
}

p.form-submit {
  width: inherit;
  border-radius: 0.5rem;
  background-color: var(--overlay-color);
}

.btn-primary {
  background-color: hsl(var(--primary-color));
  color: var(--background-color);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
}

.logged-in-as {
  display: none;
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding: 1rem 2rem;
  flex-wrap: wrap;
}

.nav-links .page-numbers {
  background-color: var(--overlay-color);
  color: var(--text-color);
  padding: 0.25rem 1rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: bold;
  transition-duration: 0.2s;
  transition-property:
    background-color, border-color, color, fill, stroke, opacity, box-shadow,
    transform;
}

.nav-links .page-numbers.current {
  background-color: hsl(var(--secondary-color));
}

.nav-links .page-numbers:hover {
  background-color: hsl(var(--secondary-color));
}

footer {
  width: 100%;
  padding: 1rem 3rem;
  display: flex;
  flex-direction: column;
  color: var(--subtle-text-color);
  border-top: 1px solid var(--overlay-color);
  gap: 2rem;
}

.searchform div {
  background-color: hsl(var(--surface-color));
  padding: 0rem 0.75rem;
  border-radius: 1rem;
  border: 2px solid var(--overlay-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.searchform div:hover,
.searchform div:focus-within {
  border-color: hsl(var(--secondary-color));
}

input[type="text"] {
  color: var(--text-color);
  background-color: transparent;
  border: none;
  outline: none;
}

.searchform input[type="text"] {
  width: 100%;
  height: 2.5rem;
  color: var(--text-color);
  background-color: transparent;
  border: none;
  outline: none;
}

.searchform input::placeholder {
  color: var(--subtle-text-color);
}

.searchform input[type="submit"],
.searchform button {
  color: var(--subtle-text-color);
  background: transparent;
  border: none;
  cursor: pointer;
}

.searchform input[type="submit"]:hover,
.searchform button:hover {
  color: var(--text-color);
}

p:has(input[type="checkbox"]) {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  background-color: transparent;
  margin: 0;
  font: inherit;
  color: currentColor;
  width: 1.15em;
  height: 1.15em;
  border: 0.15em solid currentColor;
  border-radius: 0.15em;
  transform: translateY(-0.075em);
  display: grid;
  place-content: center;
}

input[type="checkbox"]::before {
  content: "";
  width: 0.65em;
  height: 0.65em;
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
  transform: scale(0);
  transform-origin: bottom left;
  transition: 120ms transform ease-in-out;
  box-shadow: inset 1em 1em hsl(var(--primary-color));
  background-color: CanvasText;
}

input[type="checkbox"]:checked::before {
  transform: scale(1);
}

.all-categories .cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  row-gap: 1rem;
  column-gap: 1rem;
}

.card {
  border-radius: 1rem;
  max-width: 200px;
  justify-self: stretch;
  gap: 0.25rem;
  display: flex;
  flex-direction: column;
}

.card a {
  font-size: 0.8rem;
  text-decoration: none;
  color: inherit;
}

.thumbnail-container {
  position: relative;
  border-radius: 0.5rem;
  overflow: hidden;
  aspect-ratio: 2 / 3;
}

.thumbnail-container img {
  border-radius: 0.5rem;
  max-width: 100%;
  height: 100%;
  width: 100%;
  object-fit: cover;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.thumbnail-container img:hover {
  scale: 105%;
}

.category-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.category-posts {
  font-size: 0.8rem;
  display: flex;
  gap: 0.5rem;
  height: 100%;
}
.category-group h3 {
  font-size: 1rem;
}

.category-group h3 a {
  color: var(--text-color);
  line-clamp: 1;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  display: -webkit-box;
  overflow: hidden;
}

.category-posts ul {
  list-style: none;
  margin: 0;
  padding: 0;
  min-width: 11rem;
}

.latest-updates .thumbnail-container {
  aspect-ratio: unset;
}

.latest-updates .thumbnail-container img {
  object-fit: scale-down;
  width: unset;
  max-height: 120px;
}

.latest-updates .cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  row-gap: 1rem;
  column-gap: 1rem;
}

.latest-update {
  color: var(--subtle-text-color);
}

.footer-widgets-in-grid {
  display: flex;
  gap: 2rem;
  padding: 1rem 0;
}

.footer-widgets-in-grid > div {
  flex: 1 1 0px;
}

.footer-widgets {
  width: 100%;
  display: flex;
  justify-content: center;
}

.footer-widgets .wrapper {
  max-width: 768px;
}

form#subscribe-blog button,
.button,
button {
  background-color: hsl(var(--primary-color));
  color: var(--background-color);
  border: none;
  padding: 0.375rem 0.75rem !important;
  border-radius: 1rem;
  cursor: pointer;
  height: fit-content;
}

button:hover,
.button:hover {
  background-color: hsl(var(--primary-color) / 0.8);
  text-decoration: none;
}

form#subscribe-blog input {
  background-color: hsl(var(--surface-color));
  color: var(--text-color);
  outline: none;
  padding: 0.375rem 0.75rem !important;
  border-radius: 1rem;
  border: 2px solid var(--overlay-color);
}

.footer-bottom {
  width: 100%;
  border-top: 1px solid var(--overlay-color);
  padding-top: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}

.novel-page .thumbnail-container {
  height: fit-content;
  max-width: 200px;
  min-width: 200px;
  width: 100%;
  border-radius: 30px;
}

.novel-page-banner {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.novel-page-details {
  flex: 1;
  gap: 0.5rem;
}

.novel-page-details h1 {
  font-size: 30px;
}

.novel-page-details p {
  font-size: 1.2rem;
  font-weight: normal;
}

.novel-page-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.summary {
  transition: all 0.5s ease;
  font-size: 1rem;
}

.summary button {
  margin-top: 1rem;
}

.hidden {
  display: none;
}

.summary p.has-medium-font-size {
  font-size: 1rem !important;
}

.posts-list {
  flex: 1;
}

.discord {
  position: fixed;
  bottom: 2rem;
  right: 1rem;
  width: clamp(50px, 5vw, 64px);
  height: clamp(50px, 5vw, 64px);
  padding: clamp(10px, 2vw, 16px);
  background-color: rgb(79 70 229);
  border-radius: 50%;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  cursor: pointer;
  color: white;
}

.discord:hover {
  background-color: rgb(67 56 202);
}

.badge {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  border-radius: 0.375rem;
  display: inline-flex;
  width: fit-content;
}

.badge-green {
  color: hsl(var(--green-color));
  background-color: hsl(var(--green-color) / 0.1);
}

.badge-red {
  color: hsl(var(--red-color));
  background-color: hsl(var(--red-color) / 0.1);
}

.novel-chapters {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.novel-data {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chapter-title {
  display: flex;
  flex-direction: column;
}

.icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  background-color: hsl(var(--primary-color) / 0.1);
  padding: 1.125rem;
}

.novel-chapter {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem;
  background-color: var(--overlay-color);
  border-radius: 0.5rem;
  border: 1px solid hsl(var(--surface-color));
  font-size: 0.85rem;
}

@media (min-width: 1400px) {
  main,
  footer {
    padding-left: 12%;
    padding-right: 12%;
  }
}

@media (max-width: 40rem) {
  header {
    flex-direction: column;
    align-items: unset;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  main,
  footer {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .latest-updates .cards {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }

  .footer-widgets-in-grid {
    flex-direction: column;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .container {
    padding: 0;
    background-color: transparent;
  }

  .container-footer {
    flex-direction: column;
  }

  .novel-page-banner {
    flex-direction: column;
    align-items: center;
  }

  .novel-page h1 {
    font-size: 1.5rem;
  }
}

@media (min-width: 40rem) {
  .all-categories .cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 48rem) {
  .all-categories .cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 64rem) {
  .all-categories .cards {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

.completed-badge {
  position: absolute;
  bottom: 15px;
  padding: 8px 10px;
  box-shadow: -1px 2px 3px rgba(0, 0, 0, 0.3);
  background: hsla(var(--dark-green-color), 0.9);
  border-end-end-radius: 5px;
  border-start-end-radius: 5px;
  z-index: 1;
}

p + p {
  margin-top: 1rem;
}
