/* 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);
}

section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: 1280px;
}

h2 {
  font-size: 1.4rem;
  font-weight: bold;
  margin-bottom: 32px;
  padding-left: 30px;
}

@media (max-width: 360px) {
  h2 {
    padding-left: 0;
    text-align: center;
  }
}

main {
  margin: 32px 0;
  display: flex;
  flex-direction: column;
  align-items: 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;
  margin-top: 16px;
}

.hidden {
  display: none;
}

.header-top-wrapper {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  margin-bottom: 40px;
}

.pretty-search-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  
  width: 90%;
  max-width: 480px;
  
  height: 48px;
  padding: 0 16px;
  border-radius: 40px;
  border: 1px solid var(--color-bluegray-30);
  background: var(--color-bluegray-90);
}

.search-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  outline: none;

  color: white;
  font-size: 16px;
  font-weight: 700;
  padding: 0;
  text-overflow: ellipsis;
}

.search-icon-btn {
  flex-shrink: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  margin-left: 10px;
  display: flex; 
  align-items: center; 
  justify-content: center;
}

.empty-result {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 400px;
  color: var(--color-white);
  font-size: 1.2rem;
  font-weight: bold;
}

.empty-image {
  width: 120px; 
  margin-bottom: 20px;
}

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

.skeleton {
  background-color: var(--color-bluegray-30);
  border-radius: 8px;
}

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

h1.logo {
  font-size: 2rem;
}

.top-rated-movie {
  margin-top: 64px;
}

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

.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: clamp(1rem, 6vw, 3rem); 
  font-weight: bold;
  word-break: keep-all;
  line-height: 1.2;
}

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

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

.thumbnail-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 40px 30px;
  padding: 0 30px;
  width: 100%;
}

.thumbnail {
  width: 100%;
  aspect-ratio: 2/3;
  border-radius: 8px;
  object-fit: cover;
  margin-bottom: 12px;
}

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

@media (max-width: 360px) {
  .thumbnail-list {
    grid-template-columns: repeat(1, 1fr);
    gap: 20px 15px;
    padding: 0 15px;
  }
}

.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 {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  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;
  max-width: 1000px;
  width: 90%;
  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-loading-wrapper {
  width: 100%;
  height: 400px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.modal-image {
  flex-shrink: 0;
  width: 40%;
  max-width: 350px;
}

.modal-image img {
  width: 100%;
  border-radius: 16px;
  object-fit: cover;
}

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

.rate {
  display: flex;
  align-items: center;
  font-size: 20px;
  padding: 0 0 12px 0;
}

.average-star {
  width: 24px;
  margin: 0 0 0 8px;
}

.modal-description .rate .average-text {
  margin-left: 0;
}

.average-text {
  color: var(--color-white);
}

.my-rating-container {
  margin: 24px 0;
}

.my-rating-container h3 {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 18px;
}

.star-rating {
  display: flex;
  align-items: center;
  cursor: pointer;
  margin-bottom: 24px;
}

.stars-wrapper {
  display: flex;
  flex-direction: row; 
  align-items: center;
}

.rate-star-img {
  width: 32px;
  height: 32px;
  margin-right: 4px;
  transition: transform 0.1s ease;
}

.rate-star-img:hover {
  transform: scale(1.1);
}

.rating-desc {
  margin-left: 12px;
  font-size: 1.5rem;
  font-weight: bold;
}

.score-number {
  color: var(--color-bluegray-30);
  font-weight: bold; 
  font-size: 1.5rem;
}

.plot-container {
  margin-top: 24px;
}

.plot-container h3 {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 12px;
}

.detail {
  max-height: 430px;
  overflow-y: auto;
}

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

  .modal {
    width: 100%;
    max-width: 100%;
    border-radius: 24px 24px 0 0;
    padding: 32px 24px 48px;
    max-height: 50vh;
    
    transform: translateY(100%);
    animation: slideUp 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  }

  .modal-container {
    flex-direction: column; 
    align-items: flex-start;
  }

  .close-modal {
    top: 24px;
    right: 24px;
    z-index: 1000;
  }

  .modal-image {
    align-self: center;
    width: 40%;
    min-width: 150px;
    margin-bottom: 16px;
  }

  .modal-image img {
    width: 100%;
    margin-bottom: 0;
  }
  
  .modal-description {
    width: 100%;
    margin-left: 0;
  }

  .modal-description h2,
  .modal-description .category {
    text-align: center;
  }

  .modal-description .rate {
    justify-content: center;
  }

  .my-rating-container { text-align: left; }
  .star-rating { justify-content: flex-start; }
  .plot-container h3, .plot-container .detail { text-align: left; }
}

@media (max-width: 360px) {
  .modal-image {
    display: none; 
  }

  .my-rating-container {
    text-align: center;
  }
  
  .star-rating {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .rating-desc {
    margin-left: 0; 
  }

  .plot-container h3 {
    text-align: center;
  }
  
  .plot-container .detail {
    text-align: left;
  }
}

@keyframes slideUp {
  to { transform: translateY(0); }
}