*,
*::before,
*::after {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

:root {
  --color-primary: #020d18;
  --color-secondary: #551a8b;
}

.active {
  color: var(--color-secondary);
}

body {
  background-color: var(--color-primary);
  font-family: "Poppins", sans-serif;
  font-size: 16px;
  color: #fff;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: #fff;
}

ul {
  list-style: none;
}

.text-primary {
  color: var(--color-secondary);
}

.text-secondary {
  color: var(--color-secondary);
}

.back {
  margin-top: 30px;
}

.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  border: 1px solid var(--color-secondary);
  border-radius: 5px;
  color: #fff;
  cursor: pointer;
  background: transparent;
  transition: all 0.3s ease-in-out;
}

.btn:hover {
  background: var(--color-secondary);
  color: #000;
}

.btn:disabled {
  border-color: #ccc;
  cursor: not-allowed;
}

.btn:disabled:hover {
  background: transparent;
  color: #fff;
}

.container {
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
  max-width: 1200px;
}

.main-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

.main-header {
  padding: 18px 0;
  background: rgba(0, 0, 0, 0.8);
}
.logo {
  text-transform: uppercase;
  font-weight: 700;
  font-size: 30px;
  color: #fff;
}

sub {
  font-size: 12px;
  text-transform: none;
}

.main-header ul {
  display: flex;
}

.main-header ul li {
  margin-left: 18px;
}

.main-header ul li a {
  font-size: 16px;
}

.main-header ul li a:hover {
  color: var(--color-secondary);
  font-weight: 700;
}

/* Now Playing */
.now-playing {
  padding: 60px;
  background: url(../images/showcase-bg.jpg) center no-repeat;
}

section h2 {
  text-align: center;
  text-transform: uppercase;
  margin: 20px 0;
}

/* Now Playing Swiper */
.swiper {
  width: 100%;
  height: 50%;
}

.swiper-slide {
  font-size: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
}

.swiper-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.swiper-rating {
  margin: 10px 0;
  padding: 10px;
}

/* Search */
.search {
  padding: 60px;
  margin-bottom: 40px;
}

.search .container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.search .container h2 {
  margin-bottom: 20px;
}

.search .container form {
  width: 100%;
  max-width: 600px;
}

.search-radio label {
  margin-right: 16px;
}

.search-flex {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  margin-top: 10px;
}

.search .container form input[type="text"] {
  padding: 10px;
  border: 1px solid #fff;
  color: #fff;
  flex: 5.8;
  background: transparent;
  border-radius: 6px;
  width: 100%;
}

.search .container form input[type="text"]::placeholder {
  color: #fff;
}

.search .container form input[type="text"]:focus {
  outline: none;
}

.search form button {
  flex: 1;
  display: block;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--color-secondary);
  border-radius: 5px;
  height: 55px;
  cursor: pointer;
  background: var(--color-secondary);
  color: #000;
  margin: 0 10px;
}

.search .container form button:hover {
  background: transparent;
  color: #fff;
}

.search-result-heading{
  font-size: 16px;
}

/* pagination */
.pagination {
  margin-top: 20px;
}

.page-counter {
  margin-top: 10px;
}

/* Flex */
.flex {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-evenly;
  width: 100%;
}

/* Card */
.card {
  background: #033261;
  padding: 6px;
  width: 24%;
  margin: 12px auto;
}

.card img {
  width: 100%;
}

.card-body {
  padding: 10px;
  font-size: 20px;
}

.card:hover {
  transform: scale(1.05);
  transition: all 0.5s ease-in-out;
  background: #0a4b8f;
}

@media (max-width: 1099px) {
  .card {
    flex: 0.1 1 28%;
  }
}

@media (max-width: 939px) {
  .card {
    flex: 0.2 1 30%;
  }
}

@media (max-width: 864px) {
  .card {
    flex: 0.4 1 34%;
  }
}

@media (max-width: 563px) {
  .card {
    flex: 0.4 1 35%;
  }
}

@media (max-width: 530px) {
  .card {
    flex: 0.4 1 70%;
  }
}

@media (max-width: 390px) {
  .card {
    flex: 0.5 1 80%;
  }
}

/* Movie Details */
.details-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 50px 0 30px;
}

@media (max-width: 700px) {
  .details-top {
    display: block;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: #ccc solid 1px;
  }
}

.details-top img {
  width: 400px;
  height: 100%;
  margin-right: 60px;
  object-fit: cover;
}

.details-top p {
  margin: 20px 0;
}

.details-top .btn {
  margin-top: 20px;
}

.details-top h5 {
  font-size: 16px;
  margin-bottom: 4px;
}

.details-below li {
  margin: 15px 0;
  padding-bottom: 8px;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.1);
}

.details-below h4 {
  margin-bottom: 6px;
}

/* Footer */
footer {
  background: #020d18;
  padding: 20px 0;
  margin-top: 20px;
}
footer .container {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

footer .container .logo {
  font-size: 22px;
}

footer .container .social-links {
  display: flex;
  font-size: 20px;
}

footer .container .social-links a {
  margin-left: 10px;
  color: #fff;
}

footer .container .social-links a:hover {
  color: var(--color-secondary);
}

/* Alert */
.alert {
  padding: 10px 20px;
  margin-bottom: 20px;
  border-radius: 5px;
  color: #fff;
  background-color: red;
}

.success {
  background: green;
}

.error {
  background: red;
}
