: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;
}
main {
  min-height: 400px;
  padding: 64px 0;
  background-color: var(--color-bluegray-100);
}
.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;
}
#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;
}
.header-bar {
  position: fixed;
  z-index: 10;
  max-width: 1280px;
  width: 100%;
  justify-self: center;
  padding: 40px 0;

  display: grid;
  align-items: center;
  grid-template-columns: 123px 1fr 123px;
}
.header-search {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}
.search-box {
  width: 100%;
  max-width: 525px;
  display: flex;

  width: 100%;
  height: 36px;
  padding: 0 16px;
  border: 2px solid var(--color-white);
  border-radius: 999px;
}
.search-input {
  flex: 1;
  border: none;
  background-color: transparent;
  color: #fff;
  font-size: 16px;
  box-sizing: border-box;
  outline: none;
}
#search-input::placeholder {
  color: var(--color-white);
}
.search-button {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
}
.background-container {
  position: relative;
  background-position: center center;
  background-size: cover;
  height: 500px;
  padding: 48px;

  display: flex;
  align-items: center;
}
.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;
  width: 100%;
  margin: 0 auto;
}
.top-rated-movie > *:not(:last-child) {
  margin-bottom: 8px;
}
h1.logo {
  font-size: 2rem;
}
.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;
}
.title {
  font-size: 3rem;
  font-weight: bold;
}
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;
}
@media (max-width: 1279px) {
  .header-bar {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }

  .background-container {
    padding: 80px 48px;
    align-items: end;
  }
}
@media (max-width: 670px) {
  .header-bar {
    max-width: 300px;
    width: 100%;
  }

  .background-container {
    height: 400px;
  }

  .title {
    font-size: 24px;
    font-weight: 600;
  }
}
/* modal.css */
body.modal-open {
  overflow: hidden;
}
.modal-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: rgba(0, 0, 0, 0.5); /* 반투명 배경을 위해 설정 */
  backdrop-filter: blur(10px); /* 블러 효과 적용 */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
  visibility: hidden; /* 모달이 기본적으로 보이지 않도록 설정 */
  opacity: 0;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}
.modal-background.active {
  visibility: visible;
  opacity: 1;
}
.modal {
  background-color: var(--color-bluegray-90);
  padding: 20px;
  border-radius: 16px;
  color: white;
  z-index: 2;
  position: relative;
  width: 1000px;
  height: 588px;
}
.close-modal {
  position: absolute;
  margin: 0;
  padding: 0;
  top: 24px;
  right: 24px;
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  display: flex;
}
.modal-container {
  height: 100%;
  display: flex;
}
.modal-image img {
  width: 380px;
  height: 545px;
  border-radius: 16px;
}
.modal-description {
  width: 100%;
  padding: 8px;
  margin-left: 16px;
  line-height: 1.6rem;

  display: flex;
  flex-direction: column;
  gap: 16px;

  height: 545px;
}
.modal-description h2 {
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 8px;
}
.modal-description h3 {
  font-size: 24px;
  font-weight: 600;
}
.modal-title-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.rate-section {
  display: flex;
  gap: 16px;
  align-items: center;
}
.rate {
  display: flex;
  gap: 8px;
  align-items: center;
}
.rate img {
  height: 100%;
}
.rate p {
  font-size: 24px;
  font-weight: 600;
  color: var(--color-yellow);
}
.detail {
  max-height: 430px;
  overflow-y: auto;
}
.modal-myrate-section {
  padding: 24px 0;
  border-top: 1px solid var(--color-bluegray-30);
  border-bottom: 1px solid var(--color-bluegray-30);
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.myrate-section {
  display: flex;
  gap: 16px;
  align-items: center;
  font-size: 24px;
  font-weight: 600;
}
.myrate-stars {
  width: 170px;
  box-sizing: content-box;
  display: flex;
  gap: 2;
}
.myrate-stars img {
  width: 32px;
  height: 32px;
  position: relative;
  top: -2px;
  cursor: pointer;
}
.myrate-score {
  color: var(--color-bluegray-10);
}
.modal-detail-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
}
.modal-detail-section .detail {
  flex: 1;
  overflow-y: scroll;
}
.modal-error {
  width: 100%;
  height: 545px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  justify-content: center;
  align-items: center;
}
.modal-error p {
  font-size: 24px;
  font-weight: 600;
}
@media (max-width: 1279px) {
  .modal-background {
    align-items: end;
  }

  .modal {
    position: relative;
    width: 100%;
    height: 85%;
    border-radius: 0;
    padding: 40px 20px;
    overflow: hidden;
  }

  .close-modal {
    position: fixed;
    top: auto;
  }

  .modal-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    overflow-y: scroll;
    overflow-x: hidden;
  }

  .modal-image img {
    width: 200px;
    height: 300px;
    border-radius: 16px;
  }

  .modal-title-section {
    align-items: center;
    gap: 8px;
  }

  .modal-detail-section {
    overflow: auto;
  }

  .modal-detail-section .detail {
    flex: 1;
    overflow-y: auto;
  }
}
@media (max-width: 670px) {
  .modal {
    width: 100%;
    height: 70%;
    border-radius: 0;
    padding: 40px 20px;
  }

  .modal-myrate-section {
    align-items: center;
  }

  .myrate-section {
    flex-direction: column;
  }

  .modal-image {
    display: none;
  }
}
/* 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;
}
.tab {
  display: flex;
  margin: 32px 0;
}
.tab-item {
  cursor: pointer;
  user-select: none;

  display: flex;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 40px;

  border-radius: 40px;
  background: linear-gradient(90deg, #14191f 0%, #0a0d12 100%);
}
.tab-item.selected {
  background: linear-gradient(90deg, #4b8bf4 0%, #1c2a3a 100%);
}
.tab-item:hover {
  background: linear-gradient(90deg, #2f3e54 0%, #4b8bf4 100%);
}
.tab li:not(:last-child) {
  margin-right: 8px;
}
.thumbnail-container {
  position: relative;
  width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 56px;
}
.thumbnail-title {
  font-size: 28px;
  font-weight: 600;
}
.thumbnail-list {
  margin: 0 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;
}
.thumbnail-add-button {
  background-color: var(--color-lightblue-90);
  width: 100%;
  color: var(--color-white);
  border-radius: 8px;
  padding: 10px 0;
  font-weight: semibold;
  font-size: 24px;
  cursor: pointer;
}
.thumbnail-empty {
  position: absolute;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 16px;
}
.empty-message {
  font-size: 36px;
  font-weight: 600;
}
@media (max-width: 1279px) {
  .thumbnail-container {
    max-width: 800px;
    width: 100%;
    box-sizing: border-box;
    padding: 0 32px;
  }

  .thumbnail-list {
    width: 100%;
    grid-template-columns: repeat(3, 200px);
    justify-content: space-between;
    gap: 70px 0;
  }
}
@media (max-width: 670px) {
  .thumbnail-container {
    width: 100%;
    align-items: center;
  }

  .thumbnail-list {
    width: auto;
    grid-template-columns: repeat(1, 200px);
  }
}
.skeleton-card {
  list-style: none;
}
.skeleton-box {
  position: relative;
  overflow: hidden;
  background-color: #86888d;
}
.skeleton-box::after {
  content: "";
  position: absolute;
  top: 0;
  left: -150%;
  width: 150%;
  height: 100%;
  transform: skewX(-20deg);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.9),
    transparent
  );
  animation: skeleton-loading 1.2s infinite;
}
@keyframes skeleton-loading {
  100% {
    left: 150%;
  }
}
.skeleton-card .thumbnail {
  width: 200px;
  height: 300px;
  border-radius: 8px;
}
.skeleton-card .item-desc {
  margin-top: 8px;
}
.skeleton-card .rate {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.skeleton-star {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}
.skeleton-score {
  width: 40px;
  height: 16px;
  border-radius: 4px;
}
.skeleton-title {
  display: block;
  width: 140px;
  height: 20px;
  border-radius: 4px;
}
.modal-loading {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top: 4px solid white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
