@keyframes show-bug {
  from {
    opacity: 1;
    scale: 1;
  }

  to {
    opacity: 0;
    scale: 3;
  }
}

* {
  padding: 0;
  margin: 0;
}

a {
  color: unset;
  text-decoration: unset;
}

body {
  min-height: 100vh;
  display: grid;
  grid-template-areas:
    "header"
    "main"
    "footer";
  grid-template-rows: 64px 1fr 100px;
  color: #f3f3f3;
  font-family: sans-serif;
  background: #1f1f1f;
}

body.has-lightbox {
  overflow: hidden;
}

.top-nav {
  grid-area: header;
  padding: 0 5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  background: #2f2f2f;
  flex-wrap: nowrap;
}

div#canvas {
  grid-area: main;
  overflow: hidden;
}

.footer {
  grid-area: footer;
  margin: 0 5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.5rem;
  color: #7f7f7f;
  border-top: 1px solid #5f5f5f;
}

.main-banner {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100vw;
  max-height: calc(90vh - 64px);
}

.main-banner-nav {
  position: absolute;
  top: 0px;
  left: 0px;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.main-banner-items {
  position: relative;
  display: flex;
  flex-wrap: nowrap;
  overflow-x: scroll;
  overflow-y: hidden;
  height: 100%;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  width: 100vw;
}

.main-banner-items::-webkit-scrollbar {
  display: none;
}

.main-banner-item {
  position: relative;
  width: 100%;
  height: 100%;
  flex-shrink: 0;
  scroll-snap-align: start;
}

.main-banner-item-bg {
  position: absolute;
  top: 0px;
  left: 0px;
  width: 100%;
  height: 100%;
}

.main-banner-item-bg img[data-layout="portrait"] {
  display: none;
}

.main-banner-item-content {
  position: absolute;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 5rem;
  width: 400px;
}

.main-banner-item-title {
  font-size: 48px;
  color: #ff8833;
  margin-bottom: 1rem;
}

:root {
  font-size: 16px;
}

.main-banner-item-summary {
  margin-bottom: 1rem;
  font-size: 20px;
  line-height: 1.3em;
}

.main-banner-item-actions {
  display: flex;
  gap: 1rem;
}

.main-banner-button {
  font-size: 20px;
  text-transform: uppercase;
  font-weight: 500;
  border: 2px solid #f83;
  padding: 1rem 1.5rem;
  background: #f83;
  color: #2f2f2f;
  cursor: pointer;
}

.main-banner-button.button-outline {
  background: transparent;
  color: #f83;
}

.main-banner-nav-button {
  font-size: 32px;
  text-shadow: 0px 0px 4px black;
  position: absolute;
  top: 0px;
  height: 100%;
  width: 5rem;
  justify-content: center;
  display: flex;
  align-items: center;
}

.main-banner-button i:not(:last-child) {
  margin-right: 1rem;
}

.main-banner-item-bg::after {
  display: block;
  content: "";
  position: absolute;
  background: linear-gradient(45deg, black, transparent 70%);
  width: 100%;
  height: 100%;
  left: 0px;
  top: 0px;
}

.main-banner img {
  width: 100%;
  height: auto;
}

.top-nav-logo img {
  display: block;
}

.top-nav-menu {
  font-size: 20px;
  flex-grow: 1;
}

.top-nav-user-menu {
  display: flex;
  gap: 2rem;
  font-size: 1.5rem;
}

.top-nav-user-button {
  cursor: pointer;
}

.main-banner-item-shadow {
  display: block;
  content: "";
  height: 30%;
  width: 100%;
  bottom: 0px;
  left: 0px;
  background: linear-gradient(0deg, #1f1f1f 0%, rgba(0, 0, 0, 0.1) 50%, rgba(0, 0, 0, 0) 90%);
  position: absolute;
}

.season-picks {
  padding: 0 5rem;
  margin-bottom: 4rem;
}

.season-picks-title {
  font-size: 48px;
  line-height: 1.5em;
  margin-bottom: 2rem;
}

.season-picks-items {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  overflow-x: scroll;
  scrollbar-width: 0px;
  gap: 2.5rem;
  overflow-y: hidden;
  height: auto;
  scroll-snap-type: x mandatory;
  width: 100%;
}

.season-picks-items::-webkit-scrollbar {
  display: none;
}

.season-picks-item {
  width: 300px;
  cursor: pointer;
  overflow: hidden;
  flex-shrink: 0;
}

.season-picks-art {
  height: 450px;
  position: relative;
  display: flex;
  background: #000;
}

.season-picks-new {
  position: absolute;
  background: #bd4152;
  color: #fafafa;
  font-weight: bold;
  text-transform: uppercase;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.5rem;
  width: 150px;
  right: -50px;
  top: 0px;
  rotate: 27.5deg;
}

.season-picks-art img {
  display: block;
  position: absolute;
  height: auto;
  width: 100%;
  top: 50%;
  left: 0px;
  transform: translateY(-50%);
}

.season-picks-hover {
  position: absolute;
  opacity: 0;
  top: 0px;
  left: 0px;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  padding: 2rem;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.season-picks-art:hover .season-picks-hover {
  opacity: 1;
  transition: opacity 0.15s ease-out;
}

.season-picks-art-title {
  font-weight: bold;
  font-size: 1.3rem;
  line-height: 1.5em;
}

.season-picks-art-rating {
  margin-bottom: 2rem;
  color: #cfcfcf;
}

.season-picks-art-text {
  flex-grow: 1;
  text-wrap: balance;
  white-space: pre-wrap;
}

.season-picks-text-short {
  max-height: 250px;
  display: -webkit-box;
  -webkit-line-clamp: 10;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.season-picks-art-actions {
  font-size: 1.5rem;
  color: #f83;
  display: flex;
  gap: 1.5rem;
}

.season-picks-fan-title {
  margin-top: 1rem;
  font-size: 1.5rem;
  line-height: 1.5em;
}

.season-picks-format {
  color: #cfcfcf;
}

.season-picks-wrap .season-picks-items {
  flex-wrap: wrap;
  row-gap: 4rem;
}

.browse-nav {
  margin: 4rem 0 2rem 0;
  padding: 0 5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.browse-nav-title {
  font-size: 32px;
}

.browse-nav-buttons {
  font-size: 1rem;
  display: flex;
  gap: 2rem;
  color: #cfcfcf;
  text-transform: uppercase;
  font-weight: bold;
}

.browse-nav-button {
  cursor: pointer;
}

.browse-nav-button i {
  margin-right: 0.5rem;
}

.sub-art {
  padding: 0 5rem;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  position: relative;
  max-height: calc(80vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.sub-art img {
  display: block;
  position: relative;
  z-index: 1;
  height: auto;
  width: 100%;
}

.sub-art[data-orientation="portrait"] img {
  height: calc(80vh - 64px);
  width: auto;
}

.sub-art::before {
  content: "";
  display: block;
  position: absolute;
  top: 0px;
  left: 0px;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
}

.sub-message {
  max-width: 960px;
  display: flex;
  margin: 4rem auto;
  padding: 0 5rem;
  gap: 4rem;
}

.sub-message-left {
  flex-grow: 1;
}

.sub-message-right {
  width: 350px;
}

.sub-title {
  font-size: 32px;
  line-height: 2em;
}

.sub-meta {
  line-height: 1.5em;
  color: #cfcfcf;
}

.sub-rating {
  line-height: 2em;
  color: #cfcfcf;
}

.sub-message-text {
  margin: 2rem 0;
  white-space: pre-wrap;
}

.sub-publisher {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid #5f5f5f;
  padding-top: 1rem;
}

.sub-label {
  font-weight: bold;
}

.video-thumb iframe {
  width: 350px;
  height: 196px;
}

.video-thumb {
  margin-bottom: 1rem;
}

.sub-video-button {
  padding: 1rem;
  background: #f83;
  color: #000;
  text-transform: uppercase;
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.main-banner-nav-button.nav-next {
  right: 0px;
}

.main-banner-nav-button.nav-prev {
  left: 0px;
}

.lightbox {
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(5px);
  position: fixed;
  top: 0px;
  left: 0px;
  width: 100vw;
  height: 100vh;
  overflow: scroll;
}

.lightbox-image {
  position: absolute;
  top: 0px;
  left: 0px;
  width: 100%;
  height: 100%;
}

.lightbox-image img {
  width: 100%;
  height: auto;
}

.lightbox-close-button {
  position: absolute;
  top: 10px;
  right: 10px;
  color: #fafafa;
  text-shadow: 0px 0px 5px rgba(0, 0, 0, 0.8);
  font-size: 32px;
  background: rgba(0, 0, 0, 0.8);
  width: 56px;
  height: 56px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 100%;
  cursor: pointer;
}

.chumbug {
  animation: show-bug 1s ease-out forwards;
  position: fixed;
  z-index: 1000;
}

@media (max-width: 900px) OR (orientation: portrait) {
  .top-nav-user-menu {
    display: none;
  }

  .main-banner {
    aspect-ratio: auto;
    height: calc(90vh - 64px);
  }

  .main-banner-item-bg {
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    width: 100vw;
  }

  .main-banner-item {
    width: 100vw;
  }

  .main-banner img {
    height: 100%;
    width: auto;
  }

  .main-banner-item-bg img[data-layout="portrait"] {
    display: block;
  }

  .main-banner-item-bg img[data-layout="landscape"] {
    display: none;
  }

  .main-banner-nav-button {
    display: none;
  }

  .main-banner-item-content {
    width: auto;
    padding: 0 2rem;
  }

  .main-banner-item-actions .button-bookmark {
    display: none;
  }

  .main-banner-item-actions .button-watch {
    width: 100%;
    justify-content: center;
    display: flex;
  }

  .season-picks {
    padding: 0 1rem;
  }

  .season-picks-items {
    gap: 1rem;
    justify-content: flex-start !important;
  }

  .season-picks .season-picks-title {
    font-size: 28px;
  }

  .season-picks-item {
    width: 170px;
  }

  .season-picks-art {
    height: 255px;
  }

  body {
    display: block;
  }

  .top-nav {
    height: 64px;
    padding: 0 1rem;
    justify-content: space-between;
  }

  .top-nav-menu {
    flex-grow: 0;
  }

  .footer {
    height: 100px;
    margin: 0;
  }

  .browse-nav {
    padding: 0 1rem;
  }

  .browse-nav-title {
    font-size: 28px;
  }

  .browse-nav-buttons {
    display: none;
  }

  .season-picks-hover {
    display: none;
  }

  .sub-art {
    padding: 0;
  }
  .sub-art img {
    width: 100%;
    height: auto;
  }

  .sub-message {
    display: block;
    padding: 0 1rem;
  }
  .sub-message-left {
    margin-bottom: 4rem;
  }

  .main-banner-item-title,
  .main-banner-item-summary {
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.9);
    color: #f3f3f3;
  }
}

/* edit page */
.edit-toolbar {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  position: fixed;
  background: #000;
  width: 100vw;
  padding: 1rem 0 0 1rem;
  box-sizing: border-box;
  top: 0px;
  left: 0px;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.6);
}

.page.page-edit {
  padding: 2rem;
}

.button {
  background: #69c;
  padding: 1rem;
  border-radius: 3rem;
  font-weight: bold;
  width: fit-content;
  margin-bottom: 1rem;
  cursor: pointer;
  user-select: none;
}

.edit-entries {
  border-top: 1px solid #fafafa;
  padding: 1rem 0;
}

.edit-entry {
  border-bottom: 1px dashed #fafafa;
  margin-bottom: 2rem;
  padding: 1rem 0;
  display: grid;
  grid-template-areas:
    "actions actions"
    "fields images";
  grid-template-columns: 1fr 300px;
  gap: 1rem;
}

.edit-entry-fields {
  grid-area: fields;
}

.edit-entry-image {
  grid-area: images;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.edit-image-field img {
  max-width: 150px;
  max-height: 150px;
  display: block;
  border-radius: 10px;
  border: 2px solid #fafafa;
  min-width: 100px;
  min-height: 100px;
  cursor: pointer;
}

.edit-image-field-label {
  font-weight: bold;
}

.edit-field {
  padding-bottom: 1rem;
}

.edit-field-label {
  line-height: 1.5em;
}

input.edit-field-input {
  padding: 0.5rem;
  display: block;
  width: 100%;
  box-sizing: border-box;
  border-radius: 2px;
  border: 1px solid #000;
}

textarea.edit-field-textarea {
  border-radius: 2px;
  border: 1px solid #000;
  display: block;
  width: 100%;
  min-height: 5rem;
  padding: 0.5rem;
  box-sizing: border-box;
}
