/* ========== RESET / GLOBAL STYLES ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  width: 100%;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  font-size: 1.2rem;
  background-color: #fff;
  color: #222;
  line-height: 1.6;
}

/* ========== LAYOUT WRAPPER ========== */
.main-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 100vh;
  padding-top: var(--header-height);
  margin-top: 50px;
}

/* ========== CSS VARIABLES ========== */
:root {
  --header-height: 160px;
  --header-bg: #f9f9f9;
  --primary-color: #5300a0;
  --accent-color: #2db803;
  --max-content-width: 1200px;
  --gutter: 20px;
}

/* ========== HEADER ========== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  /* height: var(--header-height); */
  background-color: var(--header-bg);
  box-shadow: 2px 5px 10px rgba(0,0,0,0.08);
  z-index: 1000;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0% 5%;
  height: auto;
}

/* Top row: logo + title */
/* Header Top */
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between; /* logo left, title center, menu right */
  width: 100%;
  /* padding: 0px 0px; */
  flex-wrap: wrap; /* allow title to wrap on small screens */
  min-height: var(--header-height);
  position: relative;
  gap: 5px; /* add horizontal gap between logo, title, and menu */
}

/* Logo */
.logo-link {
  display: flex;
  align-items: center;
}

.logo {
  max-height: 100px;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: max-height 0.3s ease;
  /* margin-top: 50%; */
}

/* Title */
.site-title {
  flex: 1; /* takes remaining space between logo & menu */
  text-align: center;
  font-size: 3rem;
  font-weight: bold;
  color: var(--primary-color);
  white-space: normal;
  overflow: visible;
  text-shadow: 1px 2px 3px rgba(0,0,0,0.2),
               1px 2px 3px rgba(0,0,0,0.2);
  margin-top: 10px; /*spacing from logo & menu*/
}

/* Menu Toggle (☰) */
.menu-toggle {
  display: none; /* hidden on desktop/tablet */
  font-size: 0.7rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--primary-color);
  transition: font-size 0.3s ease;
}


/* Navigation Menu */
.header-nav {
  /* margin-top: 0px; */
  width: 100%;
  display: flex;
  justify-content: center;
}

.nav-menu {
  list-style: none;
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 2%;
  flex-grow: 2;
  margin-bottom: 10px;
}

.nav-menu a {
  text-decoration: none;
  color: #000;
  font-weight: bold;
  font-size: 1.2rem;
  transition: color 0.2s;
  
}

/* Center-align text inside nav menu links */
.nav-menu li a {
  display: inline-block; /* make it a block-level inside li */
  text-align: center;    /* center the wrapped lines */
  white-space: normal;   /* allow wrapping */
  line-height: 1.4;      /* better spacing for 2-line text */
  padding: 0px 0px;     /* adjust padding as needed */
}

.nav-menu a:hover {
  color: var(--accent-color);
}

.active-link {
  color: var(--accent-color);
  /* border-bottom: 2px solid var(--accent-color); */
}

/* ========== CONTENT CONTAINER ========== */
.container {
  width: 100%;
  max-width: var(--max-content-width);
  padding: 0 var(--gutter);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}




/* ========== FORM / TOOL SECTION ========== */
.form-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  width: 100%;
}

#youtubeUrl {
  width: 90%;
  max-width: 900px;
  padding: 1rem;
  border: 4px solid var(--primary-color);
  border-radius: 5px;
  font-size: 1.1rem;
  margin-bottom: 20px;
  margin-top: 3%;
}

.format-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  align-items: center;
}

.format-group label {
  font-weight: bold;
  font-size: 1.2rem;
}

.format-group select {
  padding: 0.5rem;
  font-size: 0.95rem;
  border-radius: 4px;
  border: 1px solid #ccc;
  background: #fff;
}

/* Buttons */
.btn-primary, #downloadBtn {
  width: 90%;
  max-width: 300px;
  text-align: center;
  padding: 0.8rem 1rem;
  font-size: 1rem;
  font-weight: bold;
  color: white;
  background-color: var(--primary-color);
  border-radius: 5px;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-primary:hover, #downloadBtn:hover {
  background-color: var(--accent-color);
}

/* ========== VIDEO & AUDIO OPTIONS FLEX ========== */
#videoOptions, #audioOptions {
  display: flex;
  gap: 10px; /* gap between label and select */
  align-items: center;
  justify-content: center;
  min-width: 200px; /* ensure minimum width */
}

/* Hide audio options initially (controlled via JS) */
#audioOptions {
  display: none;
}


/* ========== DOWNLOAD / STATUS SECTION ========== */
#download-container, #downloadBtn {
  display: none;
  width: 90%;
  max-width: 300px;
  flex-direction: column;
  align-items: center;
  margin-top: 25px;
}

#downloadBtn {
  position: relative;
  z-index: 2000; /* make sure it's clickable above other layers */
}

.status-message {
  padding: 1rem;
  max-width: 700px;
  width: 100%;
  text-align: center;
  border-radius: 5px;
  background: #f9f9f9;
  color: #333;
  margin-bottom: 15px;
}

.progress-container {
  width: 100%;
  max-width: 700px;
  background-color: rgba(138, 136, 136, 0.7);
  border-radius: 5px;
  overflow: hidden;
  margin: 10px 0;
}

.progress-bar {
  height: 20px;
  background-color: var(--primary-color);
  width: 100%;
  transition: width 0.3s ease;
}

/* ========== INFO SECTIONS (About / FAQ) ========== */
.info-section {
  width: 95%;
  max-width: var(--max-content-width);
  padding: 2rem;
  margin: 2rem auto;
  background-color: #f4f4f4;
  text-align: center;
}

.info-section h2 {
  font-size: 2rem;
  color: #333;
  margin-bottom: 20px;
}

.info-section p {
  font-size: 1.2rem;
  color: #555;
  margin-bottom: 25px;
}

.info-section h3 {
  margin-top: 30px;
  font-size: 1.8rem;
  color: #222;
  margin-bottom: 15px;
}

.info-section ul, .info-section ol {
  max-width: 900px;
  margin: 20px auto;
  text-align: left;
}

.info-section ul li, .info-section ol li {
  font-size: 1.2rem;
  color: #444;
  margin-bottom: 10px;
}

/* Supported Platform Icons */
.platform-icons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 60px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.platform-icons img {
  width: 20%;
  max-width: 120px;
  height: auto;
  object-fit: contain;
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
}

.platform-icons img:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* FAQ Accordion */
.faq-container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid #ddd;
}

.faq-question {
  width: 100%;
  background: #f9f9f9;
  border: none;
  padding: 0.8rem 1rem;
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--primary-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: background 0.3s;
}

.faq-question:hover {
  background: #f1f1f1;
}

.faq-question::after {
  content: "\25BC";
  font-size: 1rem;
  transition: transform 0.3s;
}

.faq-question.active::after {
  transform: rotate(180deg);
}

.faq-answer {
  display: none;
  padding: 0.8rem 1rem;
  background: #fff;
  color: #444;
  font-size: 1rem;
}

/* ========== FOOTER ========== */
.footer {
  width: 100%;
  background-color: #f4f4f4;
  color: #222;
  padding: 2rem 5%;
}

.footer-container {
  width: 100%;
  max-width: var(--max-content-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
  
}

.footer-brand, .footer-links, .footer-languages {
  flex: 1 1 300px;
}

.footer-brand h2 {
  color: var(--primary-color);
  font-size: 1.8rem;
  margin-bottom: 15px;
}

.footer-logo {
  width: 80px;
  height: auto;
  margin-top: 10px;
}

.footer-links h3, .footer-languages h3 {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 10px;
  
}


.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links li a {
  text-decoration: none;
  color: #222;
  transition: color 0.2s;
}

.footer-links li a:hover {
  color: var(--accent-color);
  font-weight: bold;
}

.footer-languages p {
  color: #222;
  line-height: 2;
}

.footer-bottom {
    
  text-align: center;
  width: 100%;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 2px solid var(--primary-color);
  font-size: 1.3rem;
  font-weight: bold;
  color: var(--primary-color);
}


/* ========== RESPONSIVE BREAKPOINTS ========== */

/* Tablet / medium screens */
@media (max-width: 992px) {
  :root { --header-height: 140px; }

  .site-title { font-size: 2rem; }
  .logo { max-height: 60px; }
  #getDetailsBtn, .btn-primary { max-width: 250px; }
  .platform-icons img { max-width: 100px; }
  .info-section { padding: 1.5rem; }
  .format-group { gap: 15px; }
}

/* Mobile */
@media (max-width: 600px) {
  :root { --header-height: 120px; }

  .site-title { font-size: 1.5rem; }
  .logo { max-height: 48px; }
  .nav-menu { flex-direction: column; gap: 10px; }
  #youtubeUrl, .btn-primary { width: 95%; }
  .format-group { flex-direction: column; gap: 10px; }
  .platform-icons img { width: 40%; max-width: 80px; }
  .footer-container { flex-direction: column; align-items: left; }
  .info-section h2 { font-size: 1.5rem; }
  .info-section h3 { font-size: 1.5rem; }
  .info-section p, .info-section li { font-size: 1.1rem; }

  /* #videoOptions, #audioOptions {
  width: 95%; /* full width 
  justify-content: space-between; /* label & select spaced evenly 
}

#videoOptions label, #audioOptions label {
  flex: 1; /* label takes equal space 
  text-align: left;
}

#videoFormat, #audioFormat {
  flex: 1; /* select box takes equal space 
} */

}


@media (max-width: 768px) {
  .site-title {
    display: block; /* ensure title always shows */
    text-align: center;
    font-size: 0.8rem; /* adjust size for small screens */
    margin: 10px 0;
  }
}


@media (max-width: 768px) {
  .header-logo img {
    max-width: 120px; /* smaller logo for mobile */
    height: auto;
    display: block;
    margin: 0 auto; /* center horizontally */
  }
}


@media (max-width: 768px) {
  nav ul {
    display: flex;
    flex-direction: column; /* stack menu vertically */
    align-items: center;
    gap: 10px;
    padding: 0;
    margin: 0;
    background: #fff; /* keep it visible */
    z-index: 1000;
  }

  nav ul li {
    width: 100%;
    text-align: center;
  }
}


/* ========== TOGGLE MENU (MOBILE) ========== */
@media (max-width: 768px) {
  .logo {
    max-height: 48px; /* resize logo */
  }

  .menu-toggle {
    display: block; /* show ☰ on mobile */
    font-size: 2rem; /* scale with device */
  }

  .site-title {
    flex-basis: 0%; /* force title to wrap to next line if needed */
    font-size: 1.7rem;
    text-align: center;
    margin: 0px 0;
  }

  .header-top {
    justify-content: space-between;
    flex-wrap: wrap; /* allows title to go to next line */
    padding: 20px 10px;
  }

  /* Mobile dropdown menu */
  .nav-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: var(--header-height);
    right: 0;
    width: 200px;
    background: #f6f4f4;
    gap: 10px;
    padding: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    z-index: 1000;
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-menu li a {
  font-size: clamp(0.9rem, 2vw, 1.2rem);
}
}


@media (max-width: 768px) {
  .nav-menu li {
    border-bottom: 1px solid #515151; /* separator line */
    width: 100%;                   /* full width */
  }

  .nav-menu li a {
    display: block;                /* make link fill the row */
    padding: 12px 0;               /* spacing for readability */
    text-align: center;            /* center the text */
    color: #000;                   /* default text color */
    font-weight: bold;
    font-size: 1rem;
    transition: background 0.3s, color 0.3s;
  }

  .nav-menu li a:hover {
    background: var(--accent-color); /* highlight full row */
    color: #fff;                     /* text turns white */
  }

  .nav-menu li:last-child {
    border-bottom: none; /* remove line after last item */
  }
}




@media (max-width: 768px) {
  .site-title {
    margin: 5px 10px; /* top/bottom + left/right spacing from logo & menu */
  }
}





@media (max-width: 600px) {
  .format-group {
    flex-direction: column; /* stack vertically */
    align-items: flex-start; /* align labels & selects to left */
    gap: 15px; /* space between each row */
  }

  #videoOptions, #audioOptions {
    flex-direction: column; /* stack label + select vertically */
    align-items: flex-start;
    gap: 5px; /* space between label and select */
    width: 100%;
  }

  #videoOptions label, #audioOptions label {
    margin-bottom: 5px; /* small spacing */
  }

  #videoFormat, #audioFormat, #downloadType {
    width: 100%; /* full width dropdown */
  }
}

/* Desktop only: lower the logo slightly */
@media (min-width: 1025px) {
  .logo {
    position: relative;
    top: 15px; /* push logo down */
  }
}



.search-heading {
  font-size: clamp(2.5rem, 2.5vw, 3rem); /* auto-adjust between 1.4rem and 1.8rem */
  font-weight: bold;
  text-align: center;
  margin-top: 4%;
  color: #000;
  line-height: 1.2;
}

/* Mobile adjustments if needed */
@media (max-width: 600px) {
  .search-heading {
    margin-bottom: 8px;
    font-size: clamp(2rem, 4vw, 3rem);
  }
}




/* ========== LANGUAGE SELECTOR ========== */
/* .footer-languages {
  /* text-align: right; */
  /* margin-top: 10px; 
} */

.footer-languages h3 {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 5px;
  color: #5300a0;
}

.language-btn {
  cursor: pointer;
  font-size: 1.2rem;
  color: #000;
  transition: color 0.3s ease;
}

.language-btn:hover {
  color: #2db803;
  font-weight: bold;
}
