html {
  /* Reset 1rem = 10px */
  font-size: 62.5%;
}

body {
  font-family: 'Crete Round', serif;
}

* {
  box-sizing: border-box;
}

body {
  background: #343d46;
}

#content-wrap {
  max-width: 96rem;
  margin: 0 auto;
}

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

a[data-goto-page],
a[data-goto-details] {
  cursor: pointer;
}

header {
  display: flex;
  padding: 15rem 5rem 5rem;
}

.filter {
  display: flex;
  padding: 0 5rem;
}

.filter>input {
  flex: 1;
  font-size: 4.8rem;
  font-family: inherit;
  padding: 1rem;
  margin: -1rem;
  background: #272c31;
  color: #d3e3ea;
  border: 0;
}

.page.inactive {
  display: none;
}

.page-header {
  flex: 0.25;
  font-size: 4.8rem;
  color: #d3e3ea;
}

.page-header.inactive {
  opacity: 0.5;
}

.showtime {
  display: flex;
  flex-flow: row wrap;
  padding: 5rem;
}

.showtime-time {
  flex: 1;
  font-size: 9.6rem;
  color: #d3e3ea;
}

.showtime-info {
  flex: 3;
  padding: 1.5rem 0 0 5rem;
}

.showtime-title,
.empty {
  font-size: 4.8rem;
  color: #93cce4;
  line-height: 1.1em;
}

.showtime-language {
  color: #2e8ab1;
}

.showtime-location {
  font-size: 3.6rem;
  text-transform: uppercase;
  margin-top: 2.5rem;
  color: #2e8ab1;
  letter-spacing: .8rem;
}

.details {
  background: rgba(20, 24, 28, 0.92);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: auto;
  height: auto;
  padding: 2rem;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  opacity: 0;
  transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  display: flex;
}

.details.active {
  opacity: 1;
  pointer-events: auto;
}

.details-wrapper {
  display: flex;
  flex-direction: column;
  max-width: 96rem;
  max-height: 90vh;
  margin: 0 auto;
  overflow-y: auto;
  background: #343d46;
  border-radius: 1rem;
  padding: 3.5rem 2rem 3.5rem 2rem;
  position: relative;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  transform: translateY(-3rem);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.details.active .details-wrapper {
  transform: translateY(0);
}

.details-controls {
  position: absolute;
  top: 2rem;
  right: 2rem;
  z-index: 1;
}

.details-controls button {
  display: block;
  width: 3.2rem;
  height: 3.2rem;
  background-color: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.details-controls button .close-icon {
  width: 1.6rem;
  height: 1.6rem;
  display: block;
  filter: invert(1);
}

.details-controls button:hover {
  background: #1f6b8a;
}

.details-text {
  color: #93cce4;
}

.details .showtime-stats {
  margin-top: 2rem;
  font-size: 2.4rem;
}

.details .showtime-stats .showtime-stat {
  margin-top: 1rem;
}

.details .showtime-stat-label {
  color: #2e8ab1;
}

.details .showtime-image {
  width: 100%;
  object-fit: scale-down;
}

.ticket-button {
  display: inline-block;
  background: #2e8ab1;
  color: #d3e3ea;
  font-size: 3.6rem;
  padding: 2rem 4rem;
  border-radius: 0.5rem;
  margin: 2rem 0;
  text-align: center;
  transition: background-color 0.2s;
}

.ticket-button:hover {
  background: #1f6b8a;
}

.tmdb-attribution {
  margin-top: auto;
  text-align: right;
  position: sticky;
  bottom: 0;
  right: 0;
  padding: 1rem 0;
  float: right;
  clear: both;
  pointer-events: none;
}

.tmdb-attribution img {
  height: 20px;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.tmdb-attribution img:hover {
  opacity: 1;
}

.tmdb-attribution a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #8fa7ad;
  font-size: 1.3rem;
  text-decoration: none;
  pointer-events: auto;
}

.tmdb-powered {
  color: #8fa7ad;
  font-size: 1.3rem;
  font-weight: 300;
  letter-spacing: 0.05em;
}

.details-main {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 4rem;
  margin-bottom: 4rem;
}

.details-poster-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 18rem;
  max-width: 40vw;
}

.showtime-image {
  width: 18rem;
  max-width: 100%;
  height: auto;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

.details-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.details-text .showtime-title {
  margin-top: 2.5rem;
}

.details-text .showtime-description {
  font-size: 3.6rem;
  font-weight: 400;
  line-height: 1.4;
  margin: 2.5rem 0 5rem;
  opacity: 0.75;
}

@media (max-width: 600px) {
  .details-main {
    flex-direction: column;
    align-items: stretch;
  }

  .details-poster-col {
    max-width: 100%;
    min-width: 0;
    align-items: stretch;
  }

  .showtime-image {
    width: 100%;
    max-width: 100%;
    margin-bottom: 1.5rem;
  }

  .ticket-button {
    width: 100%;
  }

  .details .showtime-title {
    font-size: 4.8rem;
  }

  .details .showtime-description {
    font-size: 5.2rem;
  }
}

.ticket-button {
  display: block;
  width: 100%;
  margin: 1.5rem 0 0 0;
  font-size: 2.2rem;
}
