:root {
  --primary-color: #00c853;
  --primary-light: #00e676;
  --dark-color: #1a1a1a;
  --text-color: #333;
  --light-gray: #f5f5f5;
  --white: #ffffff;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Inter", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background: #f2f4f8;
  color: var(--text-color);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  text-decoration: none;
  color: white;
}

header {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-light)
  );
  padding: 1rem 10%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow);
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Main Navigation */
nav {
  margin-left: auto;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

nav a {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  padding: 0.5rem 0;
  position: relative;
}

nav a:hover {
  opacity: 0.9;
}

nav a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--white);
  transition: var(--transition);
}

nav a:hover::after {
  width: 100%;
}

.nav-links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links li {
  margin-left: 25px;
}

.nav-links a {
  text-decoration: none;
  color: var(--dark-color);
  font-weight: 500;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 0.35rem;
  cursor: pointer;
  padding: 0.5rem;
}

.hamburger div {
  width: 25px;
  height: 3px;
  background: var(--white);
  transition: var(--transition);
}

.hamburger.active div:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.active div:nth-child(2) {
  opacity: 0;
}

.hamburger.active div:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.mobile-menu {
  display: none;
  flex-direction: column;
  background: var(--white);
  position: absolute;
  right: 5%;
  top: 70px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  z-index: 999;
  width: 90%;
  max-width: 300px;
}

.mobile-menu a {
  color: var(--dark-color);
  padding: 1rem;
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: var(--transition);
}

.mobile-menu a:hover {
  background: var(--light-gray);
}

.mobile-menu.show {
  display: flex;
}

.container {
  padding: 2rem 5%;
  max-width: 1200px;
  margin: 0 auto;
  flex: 1;
}

.hero {
  text-align: center;
  margin-bottom: 3rem;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--dark-color);
  line-height: 1.2;
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-color);
  max-width: 700px;
  margin: 0 auto 2rem;
}

.input-container {
  background: var(--white);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
  max-width: 800px;
  margin: 0 auto;
}

.input-group {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

input {
  flex: 1;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  border: 2px solid var(--primary-color);
  border-radius: 8px;
  outline: none;
  transition: var(--transition);
}

input:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(0, 200, 83, 0.2);
}

button,
.btn-a {
  padding: 0.875rem 1.75rem;
  background: linear-gradient(
    to right,
    var(--primary-color),
    var(--primary-light)
  );
  color: var(--white);
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  font-size: 1rem;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 200, 83, 0.3);
}

button:active {
  transform: translateY(0);
}

.btn-a:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 200, 83, 0.3);
}

.contact {
  width: 100%;
  padding: 0.875rem 1.75rem;
  background: linear-gradient(
    to right,
    var(--primary-color),
    var(--primary-light)
  );
  color: var(--white);
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  font-size: 1rem;
}

/* Language Switcher */
.language-switcher {
  position: relative;
  margin-left: 25px;
}

.language-btn {
  background: var(--white);
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  font-size: 0.85rem;
}

.language-dropdown {
  display: none;
  position: absolute;
  right: 0;
  background: white;
  border-radius: 8px;
  min-width: 120px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 4px 0;
  z-index: 1000;
  list-style: none;
}

.language-dropdown a {
  color: var(--dark-color);
  padding: 8px 16px;
  display: block;
  text-decoration: none;
}

.language-dropdown a:hover {
  background: #ececec;
}

.login-btn {
  padding: 4px 12px;
  margin: 0px 1rem;
  background-color: rgb(255, 255, 255);
  color: var(--primary-color);
  border-radius: 8px;
  transition: var(--transition);
  font-weight: 500;
  cursor: pointer;
  /* text-align: center; */
}
.login-btn:hover {
  /* background-color: #007d34; */
  /* border: 1px solid green; */
  /* font-size: 17px; */
}

.video-info {
  display: none;
  flex-direction: column;
  align-items: center;
  margin: 20px 0;
  gap: 15px;
  justify-content: center;
  text-align: center;
}

.video-info img {
  max-width: 100%;
  border-radius: 8px;
  transition: filter 0.3s ease;
  cursor: pointer;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.img-container {
  position: relative;
  min-width: 75px;
  height: auto;
  min-height: 75px;
}
.blur-wrapper {
  transition: filter 0.3s;
}
.blur-wrapper.blurred {
  filter: blur(10px);
}

.menu-button {
  position: absolute;
  top: 16px;
  right: 28px;
  /* border: none; */
  border-radius: 20%;
  /* padding: 0; */
  width: 32px;
  height: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
}

.menu-button:hover {
  transform: scale(1.1);
}

.menu-dots {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dot {
  width: 8px;
  height: 8px;
  background: #c9c9c9;
  border-radius: 50%;
}

/* NEW: Dropdown menu styles */
.dropdown-menu {
  position: absolute;
  top: 50px;
  right: 0px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) scale(0.95);
  transition: all 0.2s ease;
  z-index: 100;
  overflow: hidden;
  min-width: 140px;
  border: 1px solid #e0e0e0;
}
.dropdown-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.menu-item {
  padding: 12px 16px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #333;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
}
.menu-item:hover {
  background-color: #f5f5f5;
}
.menu-item:not(:last-child) {
  border-bottom: 1px solid #eee;
}
.menu-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
/* Overlay to close menu when clicking outside */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 50;
  display: none;
}
.menu-overlay.active {
  display: block;
}

.duration-div p {
  cursor: pointer;
  position: absolute;
  bottom: 16px;
  left: 16px;
  color: white !important;
  background-color: rgba(0, 0, 0, 0.6);
  /* backdrop-filter: blur(10px); */
  padding: 2px 6px;
  margin: 0;
  font-size: 16px;
  border-radius: 4px;
  font-weight: bold;
  z-index: 10;
  transition: all 0.2s ease;
}

/* #video-info img.blurred {
  filter: blur(10px);
} */

#video-info img.prevent-context {
  pointer-events: none;
  /* Disable all interactions during long press */
}

.video-info h2 {
  margin-bottom: 15px;
  text-align: center;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  max-width: 100%;
}

.buttons-container {
  display: none;
  justify-content: center;
  gap: 15px;
  margin-top: 15px;
  flex-wrap: wrap;
}

.action-btn {
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
  border-radius: 8px;
  border: none;
  text-decoration: none;
  font-weight: bold;
  text-align: center;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 140px;
  justify-content: center;
}

.play-btn {
  background: linear-gradient(135deg, #00c853, #00e676);
  color: white;
}

.download-btn {
  background: var(--white);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.section {
  margin-bottom: 3rem;
  padding: 2.5rem;
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.section-title {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  color: var(--dark-color);
  text-align: center;
  position: relative;
  padding-bottom: 0.75rem;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: linear-gradient(
    to right,
    var(--primary-color),
    var(--primary-light)
  );
}

.step-boxes,
.features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

.step,
.feature {
  background: var(--white);
  padding: 1.75rem;
  border-radius: 12px;
  flex: 1 1 250px;
  box-shadow: 0 0 15px rgba(0, 200, 83, 0.1);
  transition: var(--transition);
  text-align: center;
}

.step:hover,
.feature:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 200, 83, 0.15);
}

.step img {
  width: 60px;
  height: 60px;
  margin-bottom: 1rem;
}

.step h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--dark-color);
}

.step p {
  color: var(--text-color);
  font-size: 0.95rem;
}

.feature {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-weight: 500;
}

.faq-item {
  margin-bottom: 1rem;
  border-radius: 8px;
  overflow: hidden;
}

.faq-item details {
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
}

.faq-item summary {
  background: linear-gradient(
    to right,
    var(--primary-color),
    var(--primary-light)
  );
  color: var(--white);
  padding: 1rem 1.5rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.25rem;
  transition: var(--transition);
}

.faq-item details[open] summary::after {
  content: "-";
}

.faq-item p {
  background: var(--white);
  padding: 1.5rem;
  margin: 0;
}

footer {
  background: var(--dark-color);
  color: #ccc;
  padding: 3rem 5%;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

footer a {
  color: var(--white);
  text-decoration: none;
  transition: var(--transition);
  font-weight: 500;
}

footer a:hover {
  color: var(--primary-light);
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.social-links a {
  font-size: 1.25rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.social-links a:hover {
  transform: translateY(-3px);
}

.copyright {
  margin-top: 1.5rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

@media (max-width: 868px) {
  header {
    padding: 1rem 5%;
  }

  .video-info {
    flex-direction: column;
    align-items: center;
  }

  .video-info h2 {
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: normal;
    max-width: 100%;
  }

  #video-info img {
    width: 100%;
  }

  .menu-button {
    top: 8px;
    right: 12px;
  }
  .dot {
    width: 6px;
    height: 6px;
  }

  .buttons-container {
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }

  .action-btn {
    width: 100%;
    padding: 0.875rem;
  }

  .logo {
    font-size: 1.25rem;
  }

  nav {
    display: none;
  }

  .language-switcher {
    margin-left: auto;
    margin-right: 15px;
  }

  .hamburger {
    display: flex;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .input-group {
    flex-direction: column;
  }

  button {
    width: 100%;
  }

  .section {
    padding: 1.5rem;
  }

  #searchButton {
    min-width: 100%;
  }
  .duration-div p {
    font-size: 14px;
    left: 10px;
  }
}

#searchButton {
  position: relative;
  min-width: 120px;
}

#buttonText {
  transition: opacity 0.2s ease;
}

#spinner {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* Toast notification */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--dark-color);
  color: var(--white);
  padding: 1rem 1.5rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
  transform: translateX(150%);
  transition: transform 0.3s ease;
  z-index: 1000;
  max-width: 300px;
}

.toast.show {
  transform: translateX(0);
}

.toast.error {
  background: #ff4444;
}

.toast.success {
  background: var(--primary-color);
}
