@font-face {
  font-family: poppins;
  src: url(font/Poppins-Regular.woff);
}

@font-face {
  font-family: poppins-ExtraBold;
  src: url(font/Poppins-ExtraBold.woff);
}

@font-face {
  font-family: poppins-Medium;
  src: url(font/poppins-medium-webfont.woff);
}

@font-face {
  font-family: poppins-Semibold;
  src: url(font/poppins-semibold-webfont.woff);
}

html,
body div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
  margin: 0;
  padding: 0;
  border: 0;
}

/* ///////////////////////////////////////////////////////////////////////////////// */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body,
html {
  font-family: "poppins";
  /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
  min-height: 100vh;
  /* padding: 20px; */
}

.navbar {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
} */

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

.navbar-brand {
  font-size: 1.5rem;
  font-weight: bold;
  color: white;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  /* color: rgba(255, 255, 255, 0.9); */
  text-decoration: none;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: white;
}

.main {
  padding: 3rem 0;
}

.cust-navbar {
  background-color: #336aea;
  padding: unset;
}

.cust-navbar .navbar-nav .nav-link {
  color: white;
}

.cust-navbar .navbar-nav .nav-link.active {
  font-weight: 600;
}

.cust-navbar .navbar-brand {
  color: white;
}

.title {
  font-size: 3.5rem;
  font-weight: 700;
  text-align: center;
  /* color: white; */
  margin-bottom: 1rem;
}

.title-accent {
  background: #4285f4;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  text-align: center;
  color: #718096;
  font-size: 1rem;
  margin-bottom: 2rem;
  max-width: 750px;
  margin-left: auto;
  margin-right: auto;
  line-height: 24px;
}

.converter-card {
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
  padding: 2.5rem;
  margin-bottom: 2rem;
  position: relative;
  /* min-height: 500px; */
}

.format-section {
  margin-bottom: 2rem;
  /* padding: 1.5rem; */
  /* background: #f8fafc; */
  /* border-radius: 12px; */
  /* border: 2px dashed #e2e8f0; */
  display: none;
  /* Hidden by default */
}

.format-section.show {
  display: block;
}

.format-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.format-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(45deg, #667eea, #764ba2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: white;
}

.format-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: #2d3748;
}

.format-subtitle {
  color: #718096;
  font-size: 0.9rem;
}

.dropdown-row {
  display: flex;
  /* gap: 1rem; */
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.dropdown-group {
  /* flex: 1;
  min-width: 200px; */
}

.dropdown-label {
  display: block;
  font-weight: 500;
  color: #4a5568;
  margin-bottom: 0.5rem;
}

.format-select {
  width: unset;
  padding: 0.85rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 40px;
  font-size: 1rem;
  background: white;
  cursor: pointer;
  transition: border-color 0.3s;
}

.format-select:focus {
  outline: none;
  border-color: #667eea;
}

.arrow-icon {
  font-size: 2rem;
  color: #667eea;
  margin: 0 1rem;
  flex-shrink: 0;
}

.upload-area {
  border: 3px dashed #cbd5e0;
  border-radius: 20px;
  padding: 3rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  background: #f9f9f9;
  /* margin-bottom: 80px; */
  /* Space for bottom buttons */
}

.upload-area:hover,
.upload-area.dragover {
  border-color: #667eea;
  background: #edf2f7;
}

.upload-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.upload-text {
  font-size: 1.3rem;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 0.5rem;
}

.upload-subtext {
  color: #718096;
}

.file-list {
  margin-top: 2rem;
  /* margin-bottom: 80px; */
  /* Space for bottom buttons */
}

.file-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: #f8fafc;
  border-radius: 8px;
  margin-bottom: 1rem;
  border: 1px solid #e2e8f0;
  flex-wrap: wrap;
  justify-content: space-between;
}

.file-preview {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
}

.file-details {
  flex: 1;
  max-width: calc(100% - 310px);
}

.file-name {
  font-weight: 500;
  color: #2d3748;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-size {
  color: #718096;
  font-size: 0.9rem;
}

.file-format-controls {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.quality-control {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 150px;
}

.quality-slider {
  width: 100%;
}

.quality-label {
  font-size: 0.85rem;
  color: #4a5568;
}

.progress-section {
  text-align: center;
  margin-top: 2rem;
  margin-bottom: 80px;
  /* Space for bottom buttons */
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
  margin: 1rem 0;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(45deg, #667eea, #764ba2);
  width: 0%;
  transition: width 0.3s;
}

/* Bottom Action Bar */
.bottom-action-bar {
  position: absolute;
  /* bottom: 0; */
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2.5rem;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  border-radius: 0 0 20px 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.bottom-left-buttons {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.bottom-right-buttons {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.btn-primary {
  background: #336aea;
  color: white;
  padding: 0.875rem 2rem;
  font-size: 1rem;
  font-weight: 700;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: #336aea;
}

.btn-secondary {
  background: white;
  color: #4a5568;
  border: 1px solid #e2e8f0;
  border-radius: 40px;
}

.btn-secondary:hover {
  background: #f8fafc;
  border-color: #cbd5e0;
  color: #4a5568;
}

.btn-icon {
  background: white;
  color: #4a5568;
  border: 1px solid #e2e8f0;
  padding: 0.75rem;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 40px;
}

.btn-icon:hover {
  background: #f8fafc;
  border-color: #cbd5e0;
}

.hidden {
  display: none !important;
}

.success-badge {
  background: linear-gradient(45deg, #48bb78, #38b2ac);
  color: white;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-weight: 600;
}

.features-list {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  /* color: rgba(255, 255, 255, 0.9); */
  font-size: 0.9rem;
}

.feature-icon {
  color: #4ecdc4;
}

/* Settings Modal */
.settings-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.settings-modal.show {
  display: flex;
}

.settings-content {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.settings-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #2d3748;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #718096;
}

@media (max-width: 768px) {

  /* .dropdown-row {
    flex-direction: column;
  }

  .arrow-icon {
    transform: rotate(90deg);
  } */
  .file-preview {
    display: none;
  }

  .title {
    font-size: 2.5rem;
  }

  .converter-card {
    padding: 1.5rem;
  }

  .bottom-action-bar {
    padding: 1rem 1.5rem;
    flex-direction: column;
    gap: 1rem;
  }

  .bottom-left-buttons,
  .bottom-right-buttons {
    width: 100%;
    justify-content: center;
  }

  .features-list {
    /* flex-direction: column; */
    align-items: center;
    gap: 1rem;
  }
}

@media (max-width: 578px) {
  .title {
    font-size: 1.5rem;
  }
}

.content-section {
  background: white;
  border-radius: 20px;
  padding: 2.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.content-section h2 {
  color: #2d3748;
  margin-bottom: 1rem;
}

.content-section p {
  color: #4a5568;
  line-height: 1.6;
  margin-bottom: 1rem;
}

/* ////////////////////////////////////////////////// */
/* Reset and base styles - using specific prefixes to avoid Bootstrap conflicts */
.format-dropdown-wrapper * {
  box-sizing: border-box;
}

.format-dropdown-wrapper {
  /* font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; */
  /* padding: 40px 20px; */
  line-height: 1.5;
}

.format-dropdown-wrapper h2 {
  color: #2d3748;
  margin-bottom: 30px;
  text-align: center;
  font-size: 24px;
  font-weight: 600;
}

/* Format Dropdown Container */
.format-dropdown-container {
  position: relative;
  display: flex;
  justify-content: center;
}

/* Format Dropdown Trigger */

.format-dropdown-trigger:hover {
  border-color: #cbd5e0;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}

.format-dropdown-main.format-dropdown-active .format-dropdown-trigger {
  border-color: #4299e1;
  box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.format-selected-text {
  font-weight: 600;
  color: #2d3748;
  font-size: 16px;
}

/* Format Dropdown Arrow */
.format-dropdown-arrow {
  color: #718096;
  transition: transform 0.2s ease;
  display: flex;
  align-items: center;
}

.format-dropdown-main.format-dropdown-active .format-dropdown-arrow {
  transform: rotate(180deg);
}

/* Format Dropdown Menu */
.format-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: white;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 1000;
  min-width: 280px;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
}

.format-dropdown-main.format-dropdown-active .format-dropdown-menu {
  max-height: 300px;
  /* Limit height */
  overflow-y: auto;
  /* Enable scrolling */
  scroll-behavior: smooth;
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  visibility: visible;
}

/* Format Options Grid */
.format-options-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  /* display: flex;
  flex-direction: column; */
  gap: 8px;
}

.format-option-grid {
  display: flex;
  flex-direction: column;
}

.format-option-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

/* Format Option Items */

.format-option-item:hover {
  background: #edf2f7;
  color: #2d3748;
  transform: translateY(-1px);
}

.format-option-item.format-selected {
  background: #edf2ff !important;
  color: #336aea !important;
  border-color: #336aea !important;
  font-weight: 600 !important;
}

.format-option-item:active {
  transform: translateY(0);
}

.format-option-item:focus {
  /* outline: 2px solid #4299e1; */
  /* outline-offset: 2px; */
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .format-dropdown-menu {
    min-width: 260px;
    padding: 16px;
  }

  .format-options-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .format-option-item {
    padding: 10px 12px;
    font-size: 13px;
  }
}

/* Animation for smooth opening/closing */
@keyframes formatDropdownSlideDown {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes formatDropdownSlideUp {
  from {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }

  to {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
  }
}

/* Ensure Bootstrap doesn't override our styles */
.format-dropdown-main,
.format-dropdown-trigger,
.format-dropdown-menu,
.format-option-item {
  all: unset;
}

.format-dropdown-main {
  position: relative;
  /* width: 200px; */
  display: block;
}

.format-dropdown-trigger {
  background: white;
  border: 1.5px solid #e2e8f0;
  border-radius: 50px;
  padding: 16px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  gap: 20px;
  /* width: 100%; */
}

.format-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  background: white;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(-10px);
  transition: all 0.2s ease;
  z-index: 1000;
  min-width: 280px;
}

.format-option-item {
  padding: 12px 16px;
  border-radius: 40px;
  text-align: center;
  font-weight: 500;
  font-size: 14px;
  color: #4a5568;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1.5px solid transparent;
  background: #f7fafc;
  display: block;
}

.custom-format-selector-wrapper {
  position: relative;
  display: inline-block;
}

.custom-format-main-btn {
  background: white;
  border: 1.5px solid #e2e8f0;
  border-radius: 50px;
  padding: 16px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  gap: 20px;
}

.custom-format-main-btn:hover {
  border-color: #9ca3af;
  background-color: #f9fafb;
}

.custom-format-main-btn:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.format-chevron-icon {
  transition: transform 0.2s ease;
  color: #6b7280;
}

.custom-format-main-btn.format-btn-expanded .format-chevron-icon {
  transform: rotate(180deg);
}

.custom-format-popup-panel {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 1000;
  margin-top: 0.25rem;
  background: white;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  padding: 0.75rem;
  min-width: 380px;
  animation: format-panel-slide-in 0.15s ease-out;
}

@keyframes format-panel-slide-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.format-choices-grid {
  /* display: grid; */
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.format-choice-btn {
  padding: 12px 16px;
  border-radius: 40px;
  text-align: center;
  font-weight: 500;
  font-size: 14px;
  color: #4a5568;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1.5px solid transparent;
  background: #f7fafc;
  display: block;
}

.format-choice-btn:hover {
  background: #edf2f7;
  color: #2d3748;
  transform: translateY(-1px);
}

.format-choice-btn.format-btn-active {
  background: #edf2ff !important;
  color: #336aea !important;
  border-color: #336aea !important;
  font-weight: 600 !important;
}

.format-choice-btn.format-btn-active:hover {
  background: #edf2f7;
  color: #2d3748;
  transform: translateY(-1px);
}

/* Expanded state for wrapper */
.custom-format-selector-wrapper.format-selector-expanded .custom-format-popup-panel {
  display: block;
}

/* Settings Dropdown */
.settings-trigger {
  position: relative;
}

.settings-dropdown {
  display: none;
  position: absolute;
  bottom: 100%;
  right: 0;
  margin-bottom: 8px;
  z-index: 1000;
  min-width: 300px;
}

.settings-dropdown.show {
  display: block;
}

.settings-dropdown-content {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1),
    0 8px 10px -6px rgba(0, 0, 0, 0.1);
  border: 1px solid #e2e8f0;
  padding: 20px;
  position: relative;
}

/* Arrow pointing down to settings button */
.settings-dropdown-content::after {
  content: "";
  position: absolute;
  bottom: -8px;
  right: 20px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid white;
}

.settings-dropdown-content::before {
  content: "";
  position: absolute;
  bottom: -9px;
  right: 20px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid #e2e8f0;
}

.quality-setting {
  margin: 0;
}

.setting-title {
  font-size: 18px;
  font-weight: 600;
  color: #1a202c;
  margin: 0 0 8px 0;
  line-height: 1.2;
}

.setting-description {
  color: #718096;
  font-size: 14px;
  margin: 0 0 20px 0;
  line-height: 1.4;
}

.quality-slider-container {
  position: relative;
  padding: 0;
  display: flex;
  align-items: center;
}

.modern-quality-slider {
  width: 80%;
  height: 6px;
  border-radius: 3px;
  background: #e2e8f0;
  outline: none;
  appearance: none;
  cursor: pointer;
  margin: 0;
}

.modern-quality-slider::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #4c6ef5;
  cursor: pointer;
  border: 3px solid white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
}

.modern-quality-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(76, 110, 245, 0.3);
}

.modern-quality-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #4c6ef5;
  cursor: pointer;
  border: 3px solid white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
}

.quality-value-display {
  position: absolute;
  right: 0;
  /* top: -8px; */
  background: #4c6ef5;
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  min-width: 40px;
  text-align: center;
}

/* Responsive design */
@media (max-width: 480px) {
  .settings-dropdown {
    right: -10px;
    min-width: 280px;
  }

  .settings-dropdown-content {
    padding: 16px;
  }

  .settings-dropdown-content::after {
    right: 30px;
  }

  .settings-dropdown-content::before {
    right: 30px;
  }
}

.settings-container {
  position: relative;
  display: inline-block;
}

.format-category {
  margin-bottom: 16px;
}

.format-category-title {
  font-size: 12px;
  font-weight: 600;
  color: #718096;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  padding-left: 8px;
  border-left: 3px solid #4c6ef5;
}

.format-choices-grid {
  max-height: 400px;
  overflow-y: auto;
  padding: 8px;
}

.foot {
  margin-top: auto !important;
  background-color: #336aea !important;


}

.foot .copy {
  font-size: 14px;
}
