/* =========================================================
    GLOBAL STYLES
========================================================= */
@font-face {
  font-family: 'Godzilla';
  src: url('../fonts/Godzilla.ttf') format('truetype');
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #1e1e1e;
  color: #ffffff;
  font-family: 'Times New Roman', serif;
  line-height: 1.6;
  word-wrap: break-word;
}

.content {
  max-width: 1280px;
  margin: auto;
  padding: 32px 20px;
}

/* =========================================================
    TOP NAVIGATION
========================================================= */
.topnav {
  display: flex;
  justify-content: center;
  align-items: center;
  position: sticky;
  top: 0;
  height: clamp(55px, 8vw, 70px);
  background-color: #2b0006;
  padding: 0 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
  z-index: 1000;
}

.topnav > a {
  position: absolute;
  left: 24px;
  width: clamp(32px, 8vw, 50px);
  height: clamp(32px, 8vw, 50px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  overflow: hidden;
}

.topnav > a > .logo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.logo_text {
  font-family: 'Godzilla';
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  color: #fff;
  text-align: center;
  margin: 0 1rem;
  white-space: nowrap;
}

/* =========================================================
    HOME PAGE: POSTERS GRID
========================================================= */
.era_title {
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  margin-top: 40px;
  margin-bottom: 4px;
}

.underline {
  width: 100%;
  height: 1px;
  background: #444;
  margin: 10px 0 20px 0;
}

.posters {
  display: grid;
  gap: 20px;
}

/* Desktop: auto-fill grid */
@media (min-width: 901px) {
  .posters {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
}

/* Tablets: 3 per row */
@media (max-width: 900px) and (min-width: 501px) {
  .posters {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Phones: 2 per row */
@media (max-width: 500px) {
  .posters {
    grid-template-columns: repeat(2, 1fr);
  }
}

.poster {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.poster:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.6);
}

.poster img {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.4);
}

/* =========================================================
    MOVIE PAGE
========================================================= */
.movie_details {
  display: grid;
  grid-template-columns: 300px 1fr;
  grid-template-rows: auto;
  gap: 32px;
  align-items: stretch;
}

/* Poster */
.movie_poster_wrapper {
  grid-column: 1 / 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.movie_poster {
  width: 100%;
  height: 100%;
  object-fit: cover; 
  border-radius: 10px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.4);
}

/* Trailer */
.movie_trailer {
  grid-column: 2 / 3;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 3px 8px rgba(0,0,0,0.4);
}

/* Movie Info */
.movie_info {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Movie Title */
.movie_title {
  font-family: 'Godzilla', sans-serif;
  font-size: 2rem;
  color: #ffffff;
  text-align: center;
  margin-bottom: 8px;
}

/* Movie Year */
.movie_year {
  font-family: 'Times New Roman', serif;
  font-size: 1rem;
  color: #ffffff;
  text-align: center;
  margin-bottom: 16px;
}

/* =========================================================
    GENRE / DIRECTOR / SCREENPLAY
========================================================= */
.movie_row_details {
  display: flex;
  justify-content: flex-start;
  gap: 32px; /* space between items */
  flex-wrap: wrap; /* wrap on small screens */
}

.movie_row_details p {
  margin: 4px 0;
  white-space: nowrap; /* prevent breaking label/value */
}

/* Labels */
.movie_row_details .label {
  font-size: 1.3rem;
  font-weight: 700;
  color: #ffd700;
  margin-right: 6px;
}

/* Values */
.movie_row_details .value {
  font-size: 1rem;
  font-weight: 400;
  color: #ffffff;
}

/* Mobile: stack vertically */
@media (max-width: 700px) {
  .movie_row_details {
    flex-direction: column;
    gap: 8px;
  }

  .movie_row_details p {
    white-space: normal; /* allow wrapping */
  }
}

/* Plot and Rating */
.movie_info p:not(.movie_row_details p) {
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  color: #fff;
}

.movie_info p:last-child strong {
  color: #ffd700;
  font-size: 1.3rem;
}

/* =========================================================
    RESPONSIVE
========================================================= */
@media (max-width: 900px) {
  .movie_details {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    gap: 24px;
  }

  .movie_poster_wrapper {
    grid-column: 1 / -1;
    grid-row: 1 / 2;
    max-width: 420px;
    margin: 0 auto;
  }

  .movie_trailer {
    grid-column: 1 / -1;
    grid-row: 3 / 4;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .movie_info {
    grid-column: 1 / -1;
    grid-row: 2 / 3;
    margin-left: 0;
    padding-top: 0;
  }

  .movie_poster {
    object-fit: contain;
  }
}

@media (max-width: 480px) {
  .content {
    padding: 20px 12px;
  }
}

/* =========================================================
    FOOTER LINE
========================================================= */
.bottomLine {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #444, transparent);
  opacity: 0.4;
  margin-top: 50px;
}
