/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  background-color: #3c3b44;
  color: white;
}

body.film-page {
  overflow-y: hidden;
  height: 100vh;
}

hr {
  border: 1px solid #4b4955;
}

/* Common Colors and Styles */
.film-description,
.film-category,
.nav-links a,
.about-text p,
.film-categories {
  color: #a9a9a9;
}
.film-trailer-button,
.film-review-button,
.submit-button {
  height: 58px;
  border: 1px solid #5a5a5b;
  color: #979797;
  cursor: pointer;
  text-transform: uppercase;
}

.submit-button {
  width: 138px;
}

.film-review-button {
  padding: 15px;
  gap: 15px;
}

.form-input,
.form-textarea {
  background-color: #24232d;
  border: 1px solid #5a5a5b;
  color: white;
  width: 100%;
}

/* Navigation */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #3c3b44;
  padding: 15px 40px;
  z-index: 10;
  position: relative;
}

.nav-links {
  display: flex;
  gap: 30px;
}

.nav-links a {
  text-decoration: none;
  text-transform: uppercase;
  font-size: 14px;
  letter-spacing: 1px;
}

.social-icons {
  display: flex;
  gap: 15px;
}

.social-icon {
  background-color: #000;
  border-radius: 5px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.social-icon img {
  object-fit: contain;
  height: 30px;
  width: 30px;
}

/* Hero Sections */
.hero {
  height: 300px;
  background-color: #e6e6e6;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-title {
  font-size: 100px;
  color: white;
  text-transform: uppercase;
  letter-spacing: 5px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.au_hero {
  background-color: #3c3b44;
}

.au_hero-title {
  font-size: 75px;
}

/* Carousel */
.carousel-section {
  padding: 50px 0;
  min-height: 500px;
  background-color: #3c3b44;
  position: relative;
  z-index: 1;
}

.carousel {
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 75px;
  position: relative;
  z-index: 2;
}

.carousel-item {
  background-color: #2a292f;
  margin-top: 10%;
  max-width: 22em;
  width: 22em;
  height: 32em;
  border-radius: 5px;
  position: relative;
  transition: 0.3s ease;
}

.carousel-item:hover {
  transform: scale(1.05);
}

.carousel-item img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.film-info {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(42, 41, 47, 0.9);
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.carousel-item:hover .film-info {
  opacity: 1;
}

.film-title {
  font-size: 24px;
  margin-bottom: 15px;
  text-align: center;
  text-transform: uppercase;
  color: white;
}

.film-description {
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 20px;
  overflow-y: auto;
  max-height: 250px;
}

.film-category {
  text-align: center;
  font-size: 14px;
  margin-top: auto;
}

.film-icons {
  display: flex;
  gap: 5px;
  margin-top: 20px;
  justify-content: center;
}

.film-icon {
  width: 20px;
  height: 20px;
  background-color: #a9a9a9;
  border-radius: 2px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.film-icon > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: transparent;
}

/* About Us Section */
.about-section {
  background-color: #2a292f;
  padding: 150px 40px;
  border-top: #4b4955 2px solid;
  border-bottom: #4b4955 2px solid;
}

.about-container {
  display: flex;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.about-image img {
  border: #4b4955 2px solid;
  width: 85%;
  max-width: 500px;
  min-width: 200px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.about-text {
  max-width: 600px;
  margin-left: 50px;
}

.about-text h2 {
  font-size: 36px;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.about-text p {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 20px;
}

/* Database Section */
.review-table-section {
  background-color: #2a292f;
  padding: 60px 20px;
  display: flex;
  justify-content: center;
}

.table-container {
  width: 100%;
  max-width: 1000px;
  overflow-x: auto;
}

.review-table {
  width: 100%;
  border-collapse: collapse;
  background-color: #3c3b44;
  color: white;
  font-size: 14px;
  border-collapse: collapse;
}

.review-table th,
.review-table td {
  padding: 15px 20px;
  border: 1px solid #4b4955;
  text-align: center;
}

td {
  max-width:100px;
  word-wrap: break-word;
}

.review-table th {
  background-color: #2a292f;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 13px;
  color: #d3d3d3;
}

.review-table tr:nth-child(even) {
  background-color: #34333b;
}

/* Film Detail Section */
.film-detail {
  display: flex;
  width: 100%;
  height: calc(100vh - 70px);
  position: relative;
  overflow: hidden;
}

.film-info-container {
  width: 50%;
  height: 100%;
  padding: 40px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.film-poster-container {
  width: 50%;
  height: 100%;
  background-color: #000000;
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
}

.film-poster-container > iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.film-header {
  margin-top: 60px;
  margin-bottom: 40px;
  text-align: center;
}

.film-detail-title {
  font-size: 64px;
  margin-bottom: 20px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.film-categories {
  font-size: 20px;
  text-align: center;
  padding: 20px;
}

.film-description-container {
  margin-bottom: 40px;
  max-height: 40vh;
  overflow-y: auto;
}

.film-detail-description {
  color: #78777e;
  font-size: 16px;
  line-height: 1.6;
}

.film-icons-container {
  display:flex;
  margin-top: 20%;
  gap: 15px;
  justify-content: center;
}

.film-icon-box {
  width: 52px;
  height: 52px;
  background-color: #d9d9d9;
  border-radius: 6px;
}

.film-icon-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.film-review-button-container {
  display: flex;
  margin-top: 20%;
  justify-content: center;
}

.film-trailer-button,
.film-review-button {
  background-color: #24232d;
  box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
  font-size: 20px;
  margin-bottom: 25px;
}

.film-trailer-button:hover,
.film-review-button:hover {
  background-color: #2a292f;
}

.film-trailer-button {
  display: none;
}

.review-body {
  background-color: #2a292f;
}

.review-form {
  display: flex;
  width: 100%;
  max-width: 1200px;
  height: 80%;
  margin: 0 auto;
  justify-content: center;
}

.form-left {
  margin-top: 200px;
  width: 50%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.form-right {
  position: absolute;
  top: 150px;
}

.form-group {
  margin-bottom: 30px;
  width: 100%;
  text-align: left;
}

.form-group label {
  display: block;
  color: white;
  font-size: 18px;
  margin-bottom: 15px;
}

.form-input {
  height: 50px;
  padding: 10px;
}

.rating-input-container {
  position: relative;
  display: flex;
  width: 100%;
}

.review-text-group {
  height: calc(100% - 200px);
  width: 100%;
  min-height: 300px;
}

.form-textarea {
  height: 100%;
  padding: 15px;
  resize: none;
  min-height: 300px;
}

.film-title-review {
  font-size: 48px;
  color: #8d8d92;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-align: right;
}

.submit-container {
  position: fixed;
  right: 1%;
  bottom: 2%;
}

.submit-button {
  background-color: transparent;
  font-size: 18px;
  transition: 0.3s;
}

.submit-button:hover {
  background-color: #24232d;
}

/* Responsive Styles */

@media (max-width: 768px) {
  body {
    overflow-y: auto;
    overflow-x: hidden;
    height: auto;
  }

  body.film-page {
    overflow-y: auto;
    height: auto;
  }

  .navbar {
    flex-direction: column;
    padding: 15px 20px;
  }

  .nav-links {
    margin-bottom: 15px;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero {
    height: 200px;
  }

  .hero-title {
    font-size: 40px;
    text-align: center;
    letter-spacing: 3px;
  }

  .au_hero-title {
    font-size: 36px;
  }

  .carousel-section {
    padding: 20px 10px;
    min-height: auto;
    display: block;
    width: 100%;
    overflow: visible;
    margin-bottom: 30px;
  }

  .carousel {
    display: block;
    width: 100%;
    padding: 0;
    margin: 0;
    overflow: visible;
  }

  .carousel-item {
    display: block;
    width: 100%;
    height: 400px;
    max-width: none;
    margin: 0 0 30px 0;
    position: relative;
  }

  .carousel-item img {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }

  .film-info {
    opacity: 100%;
    background-color: rgba(42, 41, 47, 0.8);
  }

  .about-section {
    padding: 60px 20px;
  }

  .about-text h2 {
    font-size: 28px;
  }

  .about-text p {
    font-size: 14px;
  }

  /* Film Detail Responsive */
  .film-detail {
    flex-direction: column;
    height: auto;
    min-height: calc(100vh - 70px);
    overflow: visible;
  }

  .film-info-container {
    width: 100%;
    top: 0;
    position: relative;
  }

  .film-poster-container {
    display: none;
  }

  .film-info-container {
    height: auto;
    padding: 20px;
    order: 1;
    overflow-y: visible;
  }

  .film-detail-title {
    font-size: 32px;
  }

  .film-description-container {
    max-height: none;
    overflow-y: visible;
  }

  .film-header {
    margin: 20px 0;
  }

  .film-icons-container {
    margin-top: 40%;
  }
  
  .film-review-button-container {
    gap:15px;
  }
  
  a {
    text-decoration: none;
  }

  .film-trailer-button {
    display:block;
    padding: 15px;
  }

  /* Review Table Responsive */
  .review-table th,
  .review-table td {
    padding: 10px;
    font-size: 12px;
  }

  /* Review Form Responsive */
  .review-form-container {
    height: auto;
    min-height: calc(100vh - 70px);
    padding: 20px;
  }

  .form-left {
    width: 100%;
    position: relative;
    left: auto;
    transform: none;
    margin-top: 100px;
  }

  .form-right {
    margin-top: 20px;
    position: relative;
    right: auto;
    top: auto;
    width: 100%;
    text-align: center;
  }

  .film-title-review {
    text-align: center;
    font-size: 28px;
  }

  .review-text-group {
    min-height: 200px;
  }

  .submit-container {
    position: relative;
    bottom: auto;
    right: auto;
    display: flex;
    justify-content: center;
    margin-top: 20px;
  }

  .review-form {
    flex-direction: column;
    height: auto;
  }

  .form-group label {
    font-size: 16px;
  }
}