/* 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-bluegray-60: #424e5e;
  --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);
}

#app {
  display: flex;
  flex-direction: column;
  align-items: center;
}

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

main#main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 56px;
  width: 100%;
  padding: 64px 80px;
  overflow: auto;

  .main-title {
    width: 100%;
    font-size: 2.25rem;
    font-weight: 600;
    color: var(--white);
  }
}

main#main > section,
main#main > ul {
  width: 100%;
}

.hidden {
  display: none;
}

.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: 8px;
}

button.full-width {
  width: 100%;
  height: 49px;
  font-size: 1.5rem;
  font-weight: 600;
}

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

.background-container {
  position: relative;
  background-position: center center;
  background-size: cover;
  width: 100%;
  height: 500px;
  padding: 48px;
}

.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 {
  margin-top: 64px;
}

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

.logo-container {
  position: absolute;
  top: 48px;
  left: 6%;
  cursor: pointer;
}

.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;
}

header {
  width: 100vw;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 2;
}

.search-form-wrapper {
  position: absolute;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: 525px;
}

.search-form {
  display: flex;
  align-items: center;
  width: 100%;
  height: 36px;
  border: 2px solid var(--color-gray-300);
  border-radius: 32px;
  background: transparent;
  overflow: hidden;
  padding: 0 12px;
}

.search-input {
  flex: 1;
  height: 100%;
  border: none;
  background: transparent;
  color: var(--color-white);
  font-size: 0.9rem;
  outline: none;
}

.search-input::placeholder {
  color: var(--color-bluegray-30);
}

.search-button {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
}

.search-button img {
  width: 18px;
  height: 18px;
}

.no-search-result {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 130px;
  font-size: 2.25rem;
  font-weight: 600;
}

footer.footer {
  min-height: 180px;
  background-color: var(--color-bluegray-80);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  text-align: center;

  p {
    font-size: 1rem;
    font-weight: 400;
    color: var(--white);
  }
}

@keyframes skeleton-gradient {
  0% {
    background-position: 200% 200%;
  }
  100% {
    background-position: -100% -100%;
  }
}

.skeleton {
  width: 200px;
  height: 300px;
  background: linear-gradient(
    15deg,
    var(--color-bluegray-90) 35%,
    var(--color-bluegray-60) 50%,
    var(--color-bluegray-90) 65%
  );
  background-size: 300% 300%;
  animation: skeleton-gradient 4s linear infinite;
  border-radius: 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-bluegray-60: #424e5e;
  --color-gray-300: #d1d3d4;
  --color-yellow: #ffc700;
  --color-ffffff: #ffffff;
  --color-242a32: #242a32;
}

.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;
}
: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-bluegray-60: #424e5e;
  --color-gray-300: #d1d3d4;
  --color-yellow: #ffc700;
  --color-ffffff: #ffffff;
  --color-242a32: #242a32;
}

.thumbnail-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, 200px);
  gap: 70px;
  justify-content: center;
}

.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-bluegray-60: #424e5e;
  --color-gray-300: #d1d3d4;
  --color-yellow: #ffc700;
  --color-ffffff: #ffffff;
  --color-242a32: #242a32;
}

body.modal-open {
  overflow: hidden;
}

.modal-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  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;
  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: min(1000px, 90vw);
  max-height: 90vh;
  overflow-y: auto;
}

.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 {
  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;
}

/* 내 별점 */

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

.my-rating-label {
  font-weight: bold;
  white-space: nowrap;
}

.my-rating-stars {
  display: flex;
  gap: 4px;
}

.star-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.star-btn img {
  width: 24px;
  height: 24px;
  transition: transform 0.1s ease;
}

.star-btn:hover img {
  transform: scale(1.15);
}

.my-rating-text {
  font-size: 0.9rem;
  color: #ccc;
  white-space: nowrap;
}

/* 바텀 시트 */

@media (max-width: 800px) {
  .modal-background {
    align-items: flex-end;
  }

  .modal {
    width: 100%;
    max-height: 80vh;
    border-radius: 16px 16px 0 0;
    transform: translateY(100%);
    transition: transform 0.3s ease;
  }

  .modal-background.active .modal {
    transform: translateY(0);
  }

  .modal-image img {
    width: min(200px, 40%);
  }
}

/* 모바일: 포스터 위, 내용 아래로 스택 */

@media (max-width: 390px) {
  .modal-container {
    flex-direction: column;
  }

  .modal-image img {
    width: 100%;
  }

  .modal-description {
    margin-left: 0;
    margin-top: 16px;
  }

  .detail {
    max-height: none;
  }
}
