/* http://meyerweb.com/eric/tools/css/reset/
   v2.0 | 20110126
   License: none (public domain)
*/

html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
  display: block;
}
body {
  line-height: 1;
}
ol,
ul {
  list-style: none;
}
blockquote,
q {
  quotes: none;
}
blockquote:before,
blockquote:after,
q:before,
q:after {
  content: "";
  content: none;
}
table {
  border-collapse: collapse;
  border-spacing: 0;
}
:root {
  --color-white: #ffffff;
  --color-lightblue-90: #0da9fd;
  --color-bluegray-100: #242a32;
  --color-bluegray-80: #39414d;
  --color-bluegray-10: #e0e6ed;
  --color-bluegray-30: #a6b1c3;
  --color-bluegray-90: #2f3844;
  --color-gray-300: #d1d3d4;
  --color-yellow: #ffc700;
  --color-ffffff: #ffffff;
  --color-242a32: #242a32;
}

* {
  box-sizing: border-box;
}

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

body {
  font-size: 16px;
  color: var(--color-white);
  background-color: var(--color-bluegray-80);
}

#wrap,
section {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.star {
  width: 24px;
}

button {
  border: 0;
  padding: 8px 16px;
  cursor: pointer;
}

button.primary {
  color: var(--color-white);
  font-weight: bold;
  background-color: var(--color-lightblue-90);
  border-radius: 4px;
  width: 80px;
  padding: 10px 0;
}

#wrap {
  min-width: 1440px;
  background-color: var(--color-bluegray-100);
}

#wrap h2 {
  font-size: 1.4rem;
  font-weight: bold;
  margin-bottom: 32px;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
}

.background-container {
  position: fixed;
  width: 100%;
  background-position: center center;
  background-size: cover;
  padding: 48px;
  z-index: 100;
  transition: background-color 0.3s ease;
}

.background-container.scrolled {
  background-color: var(--color-bluegray-80);
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  background-color: rgba(0, 0, 0, 0.5);
  width: 100%;
  height: 100%;
  z-index: 1;
}

.top-rated-container {
  user-select: none;
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
}

.top-rated-movie {
  position: relative;
  height: 500px;
}

.top-rated-movie > *:not(:last-child) {
  margin-bottom: 8px;
}

.header-container {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.header-container .search-form {
  position: relative;
}

.search-form button {
  position: absolute;
  display: flex;
  align-items: center;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  background-color: transparent;
  padding: 0;
}

.header-container .search {
  padding: 8px 16px;
  background-color: transparent;
  color: var(--color-white);
  width: 525px;
  border: solid var(--color-gray-300) 2px;
  border-radius: 50px;
}

.header-container .search::placeholder {
  color: var(--color-white);
}

h1.logo {
  position: absolute;
  font-size: 2rem;
  left: 0;
}

.home-section-heading {
  font-weight: 600;
  font-size: 2rem;
  margin-top: 64px;
}

.rate {
  display: flex;
  align-items: baseline;
  color: var(--color-yellow);
}

.rate > img {
  position: relative;
  top: 2px;
}

span.rate-value {
  margin-left: 8px;
  font-weight: bold;
  font-size: 1.66rem;
}

.top-rated-movie > .container {
  padding-block: 200px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.title {
  font-size: 3rem;
  font-weight: bold;
}

.load-more-button {
  width: 100%;
  font-size: 20px;
}

footer.footer {
  min-height: 180px;
  background-color: var(--color-bluegray-80);
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  font-size: 1.1rem;
}

footer.footer p:not(:last-child) {
  margin-bottom: 8px;
}

@keyframes skeleton-shimmer {
  0% {
    background-position: -400px 0;
  }
  100% {
    background-position: 400px 0;
  }
}

.skeleton-box {
  display: block;
  background: linear-gradient(
    90deg,
    var(--color-bluegray-80) 25%,
    var(--color-bluegray-90) 50%,
    var(--color-bluegray-80) 75%
  );
  background-size: 800px 100%;
  animation: skeleton-shimmer 1.5s infinite linear;
  border-radius: 4px;
}

.notice-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 50px;
  justify-content: center;
  width: 100%;
  padding-block: 120px;
  grid-column: 1 / -1;
}

.notice-text {
  font-size: 36px;
  font-weight: 600;
  text-align: center;
}

.skeleton-rate {
  width: 48px;
  height: 16px;
}

.skeleton-title {
  width: 140px;
  height: 16px;
  margin-top: 4px;
}
:root {
  --color-white: #ffffff;
  --color-lightblue-90: #0da9fd;
  --color-bluegray-100: #242a32;
  --color-bluegray-80: #39414d;
  --color-bluegray-10: #e0e6ed;
  --color-bluegray-30: #a6b1c3;
  --color-bluegray-90: #2f3844;
  --color-gray-300: #d1d3d4;
  --color-yellow: #ffc700;
  --color-ffffff: #ffffff;
  --color-242a32: #242a32;
}

.thumbnail-list {
  position: relative;
  margin: 3.5rem auto 56px;
  display: grid;
  grid-template-columns: repeat(5, 200px);
  gap: 70px;
}

.thumbnail {
  width: 200px;
  height: 300px;
  border-radius: 8px;
}

.item {
  user-select: none;
  cursor: pointer;
}

.item-desc > *:not(:last-child) {
  position: relative;
  margin-bottom: 4px;
  line-height: 1.2rem;
}

p.rate {
  display: flex;
  align-items: baseline;
  color: var(--color-yellow);
}

p.rate > span {
  margin-left: 4px;
}

.item .star {
  width: 16px;
  top: 1px;
}
:root {
  --color-white: #ffffff;
  --color-lightblue-90: #0da9fd;
  --color-bluegray-100: #242a32;
  --color-bluegray-80: #39414d;
  --color-bluegray-10: #e0e6ed;
  --color-bluegray-30: #a6b1c3;
  --color-bluegray-90: #2f3844;
  --color-gray-300: #d1d3d4;
  --color-yellow: #ffc700;
  --color-ffffff: #ffffff;
  --color-242a32: #242a32;
}

/* modal.css */

body.modal-open {
  overflow: hidden;
}

.modal-background {
  display: none;
}

.modal-background[open] {
  position: fixed;
  margin: 0;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  background-color: rgba(0, 0, 0, 0.5); /* 반투명 배경을 위해 설정 */
  backdrop-filter: blur(10px); /* 블러 효과 적용 */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.modal {
  background-color: var(--color-bluegray-90);
  padding: 20px;
  border-radius: 16px;
  color: white;
  z-index: 2;
  position: relative;
  width: 1000px;
}

.close-modal {
  position: absolute;
  margin: 0;
  padding: 0;
  top: 24px;
  right: 24px;
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
}

.modal-container {
  display: flex;
}

.modal-image img {
  width: 380px;
  border-radius: 16px;
}

.modal-description {
  width: 100%;
  padding: 8px;
  margin-left: 16px;
  line-height: 1.6rem;
}

.modal-description .rate > img {
  position: relative;
  top: 5px;
}

.modal-description > *:not(:last-child) {
  margin-bottom: 8px;
}

.modal-description h2 {
  font-size: 2rem;
  margin: 0 0 8px;
}

.detail {
  max-height: 430px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.modal .average-container {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.modal .category {
  margin: 16px 0;
}

.modal .detail-container dt,
.modal .my-rating-container dt,
.modal .my-rating-container dd {
  font-size: 24px;
  font-weight: 600;
  margin: 16px 0;
}

.modal .my-rating-container dd {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal .my-rating-container dd button {
  background-color: transparent;
  padding: 0;
}

.modal .my-rating-container dd button img {
  width: 32px;
  height: 32px;
}

.modal .my-rating-container .rating-ratio {
  color: var(--color-bluegray-30);
}
@media (max-width: 1024px) {
  .thumbnail-list {
    grid-template-columns: repeat(4, 200px);
  }

  .header-container {
    flex-direction: column;
    gap: 12px;
  }

  h1.logo {
    position: static;
  }
}

@media (max-width: 768px) {
  .thumbnail-list {
    grid-template-columns: repeat(3, 200px);
  }

  .modal-background[open] {
    align-items: flex-end;
    padding: 0;
  }

  .modal {
    border-radius: 0;
  }

  .modal-container {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  #movie-detail-poster {
    width: 200px;
  }

  #movie-detail-title,
  .modal .category {
    text-align: center;
  }

  .modal .average-container {
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .thumbnail-list {
    grid-template-columns: repeat(1, 200px);
  }

  .top-rated-movie .container {
    padding-left: 24px;
    padding-right: 24px;
  }

  #movie-detail-poster {
    display: none;
  }

  .modal .my-rating-container,
  .modal .detail-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .modal .my-rating-container dd {
    display: flex;
    flex-direction: column;
  }
}
