@import url("https://fonts.googleapis.com/css2?family=Martel+Sans:wght@600&family=Poppins:wght@300;400;700;900&display=swap");

@font-face {
  font-family: "Netflix Sans Bolder";
  src: url("../fonts/NetflixSans-Bold.otf") format("opentype");
}

:root {
  --main-page-bg: black;
  --main-text-color: white;
  --box-opacity: 0.69;
  --separation-color: #2d2d2d;
  --section-bg: black;
  --section-text-color: white;
  --faq-box-bg: #2d2d2d;
  --faq-box-hover-bg: #414141;
  --faq-svg-filter: white;
  --input-bg-color: rgba(23, 23, 23, 0.7);
  --input-border-color: rgba(246, 238, 238, 0.5);
  --footer-text-color: rgba(255, 255, 255, 0.7);
}

body[data-theme="light"] {
  --main-page-bg: white;
  --main-text-color: black;
  --box-opacity: 0.2;
  --separation-color: #ccc;
  --section-bg: white;
  --section-text-color: black;
  --faq-box-bg: #f9f9f9;
  --faq-box-hover-bg: #e9e9e9;
  --faq-svg-filter: black;
  --input-bg-color: rgba(255, 255, 255, 0.8);
  --input-border-color: rgba(0, 0, 0, 0.3);
  --footer-text-color: #555;
}

* {
  padding: 0;
  margin: 0;
  font-family: "Poppins", sans-serif;
  box-sizing: border-box;
}

body {
  background-color: var(--main-page-bg);
  color: var(--main-text-color);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.main {
  background-image: url("../assets/images/home_page_background_image.jpg");
  background-position: center center;
  background-size: max(1200px, 100vw);
  background-repeat: no-repeat;
  height: 70vh;
  position: relative;
}

.main .box {
  height: 70vh;
  width: 100%;
  opacity: var(--box-opacity);
  position: absolute;
  top: 0;
  background-color: black;
}

nav {
  max-width: 80vw;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 92px;
}

nav img {
  position: relative;
  z-index: 10;
}

.nav-buttons {
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
  z-index: 10;
}

.hero {
  font-family: "Martel Sans", sans-serif;
  height: calc(100% - 92px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: white;
  position: relative;
  gap: 23px;
  padding: 0 30px;
  text-align: center;
}

.hero > :nth-child(1) {
  font-family: "Poppins", sans-serif;
  font-weight: 900;
  font-size: 48px;
}

.hero > :nth-child(2) {
  font-weight: 400;
  font-size: 24px;
}

.hero > :nth-child(3) {
  font-weight: 400;
  font-size: 20px;
}

.separation {
  height: 8px;
  background-color: var(--separation-color);
}

.btn {
  padding: 3px 8px;
  font-weight: 400;
  color: var(--main-text-color);
  background-color: rgba(77, 77, 77, 0.2);
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  cursor: pointer;
  font-size: 1rem;
  text-decoration: none;
}

body[data-theme="light"] .btn {
    border-color: rgba(0,0,0,0.5);
}


.btn-red {
  background-color: #e50914;
  color: white;
  padding: 12px 24px;
  font-size: 20px;
  border-radius: 4px;
  font-weight: 500;
  border: none;
}

.btn-red:hover, .btn-red-sm:hover{
  transform: scale(1.05);
  transition: 0.1s ease-in-out;
}

.btn-red-sm {
  background-color: #e50914;
  color: white;
  border: none;
  padding: 8px 16px;
}

.hero-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.main input {
  padding: 12px 100px 12px 14px;
  color: var(--main-text-color);
  font-size: 1rem;
  border-radius: 4px;
  background-color: var(--input-bg-color);
  border: 1px solid var(--input-border-color);
}

.first {
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 70vw;
  margin: auto;
  color: var(--section-text-color);
  background-color: var(--section-bg);
  padding: 48px 0;
}

.secImg {
  position: relative;
  margin: 0px 20px;
}

.secImg img {
  width: 555px;
  position: relative;
  z-index: 10;
  border-radius: 40px;
}

.secImg video {
  position: absolute;
  width: 410px;
  top: 87px;
  right: 75px;
}

section.first.third .secImg video {
    width: 345px;
    top: 44px;
    right: 106px;
}

section.first > div {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

section.first > div :nth-child(1) {
  font-size: 48px;
  font-weight: 900;
}

section.first > div :nth-child(2) {
  font-size: 24px;
  font-weight: 400;
}

.second {
  flex-direction: row-reverse;
}

.faq {
  background-color: var(--section-bg);
  color: var(--section-text-color);
  padding: 48px 12px;
}

.faq h2 {
  text-align: center;
  font-size: 48px;
  font-weight: 900;
  margin-bottom: 24px;
}

.faqbox {
  transition: background-color 0.3s ease-out;
  font-size: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: var(--faq-box-bg);
  padding: 24px;
  max-width: 60vw;
  margin: 10px auto;
  cursor: pointer;
}

.faqbox:hover {
  background-color: var(--faq-box-hover-bg);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faqbox svg {
  filter: var(--faq-svg-filter);
  transition: transform 0.2s ease-in-out;
}

.faqbox.active svg {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease-in-out, padding-top 0.25s ease-in-out;
  font-size: 1.2rem;
  padding-top: 0;
}

.faqbox.active .faq-answer {
  max-height: 300px;
  padding-top: 24px;
}

footer {
  color: var(--footer-text-color);
  max-width: 70vw;
  margin: auto;
  padding: 60px 0 20px 0;
}

footer .questions {
  padding: 24px 0;
}

footer a {
  font-size: 14px;
  color: var(--footer-text-color);
  text-decoration: none;
}
footer a:hover {
    text-decoration: underline;
}

.footer-links {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.footer-item {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.netflix-india {
    margin-top: 24px;
    font-size: 14px;
}

/* Chatbot styles */
#chatbot-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
}
#chatbot-toggle {
  background: #e50914;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 1.8rem;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
#chatbot-window {
  width: 340px;
  max-height: 70vh;
  background: #181818;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  position: absolute;
  bottom: 65px;
  right: 0;
  display: flex;
  flex-direction: column;
}
#chatbot-header {
  background: #e50914;
  padding: 12px 16px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#chatbot-close {
  cursor: pointer;
  font-size: 1.4rem;
}
#chatbot-messages {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
  background: #222;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chat-message { display: flex; flex-direction: column; }
.chat-message.user { align-items: flex-end; }
.bubble {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 16px;
  line-height: 1.5;
}
.chat-message.user .bubble { background: #e50914; border-bottom-right-radius: 4px; }
.chat-message.bot .bubble { background: #333; border-bottom-left-radius: 4px; }
#chatbot-loading { display: flex; justify-content: center; padding: 10px 0; }
.spinner { border: 3px solid #444; border-top: 3px solid #e50914; border-radius: 50%; width: 24px; height: 24px; animation: spin 1s linear infinite; }
@keyframes spin { 100% { transform: rotate(360deg); } }
#chatbot-form { display: flex; border-top: 1px solid #333; padding: 8px; gap: 8px; }
#chatbot-input { flex: 1; padding: 10px; border: none; background: #222; color: #fff; border-radius: 8px; outline: none; }
#chatbot-form button { background: #e50914; color: #fff; border: none; padding: 0 16px; border-radius: 8px; cursor: pointer; }

@media screen and (max-width: 960px) {
  .hero > :nth-child(1) { font-size: 32px; }
  .hero > :nth-child(2), .hero > :nth-child(3) { font-size: 18px; }
  .first { flex-wrap: wrap; text-align: center; }
  .second { flex-direction: row; }
  .secImg img { width: 100%; max-width: 400px; }
  .secImg video { position: absolute; width: 73%; top: 20.5%; right: 13.5%; }
  section.first.third .secImg video { width: 63%; top: 9.5%; right: 18%; }
  section.first > div :nth-child(1) { font-size: 32px; }
  section.first > div :nth-child(2) { font-size: 18px; }
  .faq h2 { font-size: 32px; }
  .footer-links { grid-template-columns: 1fr 1fr; }
}

@media screen and (max-width: 600px) {
    nav { max-width: 90vw; height: 80px; }
    nav img { width: 90px; }
    .hero-buttons { flex-direction: column; }
    .main input { width: 100%; }
    .btn-red { font-size: 1rem; padding: 10px 16px; }
    .faqbox { font-size: 18px; }
}
