:root {
  --primary: #0095f6;
  --primary-hover: #007bb5;
  --bg-color: #fafafa;
  --text-color: #262626;
  --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --section-bg: #ffffff;
  --nav-height: 70px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  padding-top: var(--nav-height);
}

/* --- NAVIGATION BAR --- */
.navbar {
  background: #ffffff;
  border-bottom: 1px solid #dbdbdb;
  height: var(--nav-height);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-container {
  width: 100%;
  max-width: 900px;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  text-decoration: none;
  background: -webkit-linear-gradient(
    45deg,
    #f09433 0%,
    #e6683c 25%,
    #dc2743 50%,
    #cc2366 75%,
    #bc1888 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-menu {
  list-style: none;
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
}

.nav-menu li a {
  text-decoration: none;
  color: #262626;
  font-weight: 600;
  font-size: 1rem;
  transition: color 0.3s;
}

.nav-menu li a:hover {
  color: var(--primary);
}

/* --- HAMBURGER MENU (Hidden on Desktop) --- */
.hamburger {
  display: none;
  cursor: pointer;
}

.bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  -webkit-transition: all 0.3s ease-in-out;
  transition: all 0.3s ease-in-out;
  background-color: #262626;
  border-radius: 2px;
}

/* --- MAIN LAYOUT --- */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

header {
  text-align: center;
  margin: 2rem 0 2rem;
}
h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  color: #333;
}
.subtitle {
  color: #666;
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

.search-box {
  background: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  border: 1px solid #eee;
  margin-bottom: 40px;
}

/* --- FORM WITH PASTE BUTTON --- */
form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.input-wrapper {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  min-width: 220px;
}

input {
  width: 100%;
  padding: 15px;
  padding-right: 80px;
  border: 2px solid #eee;
  border-radius: 6px;
  font-size: 16px;
  outline: none;
  transition: border 0.3s;
  box-sizing: border-box;
}
input:focus {
  border-color: var(--primary);
}

.btn-paste {
  position: absolute;
  right: 8px;
  background: #eef3f8;
  color: var(--primary);
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  font-weight: bold;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-paste:hover {
  background: #dce7f1;
}

/* --- BUTTON LOADER STYLES --- */
button.submit-btn {
  position: relative;
  padding: 15px 35px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  font-size: 16px;
  transition: all 0.3s;
  min-width: 140px;
}
button.submit-btn:hover {
  background: var(--primary-hover);
}

button.submit-btn.loading {
  pointer-events: none;
  opacity: 0.8;
}
button.submit-btn.loading .btn-text {
  visibility: hidden;
  opacity: 0;
}
button.submit-btn.loading::after {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  top: 50%;
  left: 50%;
  margin-top: -12px;
  margin-left: -12px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* --- RESULT AREA & MEDIA LOADER --- */
#result-area {
  margin-top: 30px;
  display: grid;
  gap: 20px;
  justify-content: center;
}
.card {
  background: white;
  border: 1px solid #eee;
  padding: 15px;
  border-radius: 8px;
  max-width: 100%;
  text-align: center;
  box-shadow: var(--card-shadow);
  position: relative;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.media-container {
  position: relative;
  min-height: 200px;
  background: #f9f9f9;
  border-radius: 4px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}

img,
video {
  max-width: 100%;
  border-radius: 4px;
  height: auto;
  max-height: 500px;
  object-fit: contain;
  display: none;
}

.img-loader {
  border: 3px solid #f3f3f3;
  border-top: 3px solid var(--primary);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
  position: absolute;
  z-index: 1;
}

/* --- SECTIONS --- */
section {
  background: var(--section-bg);
  padding: 40px;
  border-radius: 12px;
  margin-bottom: 30px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}
h2 {
  font-size: 1.8rem;
  color: #333;
  margin-top: 0;
  margin-bottom: 20px;
  border-bottom: 2px solid #f0f0f0;
  padding-bottom: 10px;
  /* display: inline-block; */
  display: block;
}
h3 {
  font-size: 1.4rem;
  color: #444;
  margin-top: 25px;
  margin-bottom: 10px;
}
p {
  color: #555;
  margin-bottom: 15px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}
.feature-item {
  background: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
}
.feature-icon {
  font-size: 2rem;
  margin-bottom: 10px;
}

.steps-list {
  counter-reset: step;
  list-style: none;
  padding: 0;
}
.steps-list li {
  position: relative;
  padding-left: 50px;
  margin-bottom: 20px;
}
.steps-list li::before {
  content: counter(step);
  counter-increment: step;
  position: absolute;
  left: 0;
  top: 0;
  width: 35px;
  height: 35px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  text-align: center;
  line-height: 35px;
  font-weight: bold;
}

.faq-item {
  margin-bottom: 15px;
  border-bottom: 1px solid #eee;
  padding-bottom: 15px;
}
.faq-question {
  font-weight: bold;
  color: #333;
  font-size: 1.1rem;
  display: block;
  margin-bottom: 5px;
}

.error-msg {
  color: #ed4956;
  background: #ffebeb;
  border: 1px solid #ed4956;
  padding: 15px;
  border-radius: 6px;
  margin-top: 20px;
  text-align: center;
  display: none;
}
.btn-dl {
  display: inline-block;
  text-decoration: none;
  background: #28a745;
  color: white;
  padding: 12px 25px;
  border-radius: 6px;
  font-weight: bold;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

footer {
  text-align: center;
  margin-top: 50px;
  padding: 30px;
  border-top: 1px solid #ddd;
  color: #777;
}
footer a {
  color: #555;
  text-decoration: none;
}

/* --- RESPONSIVE MEDIA QUERIES --- */
@media (max-width: 768px) {
  /* Hamburger Logic */
  .hamburger {
    display: block;
  }

  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .nav-menu {
    position: fixed;
    left: -100%;
    top: var(--nav-height);
    gap: 0;
    flex-direction: column;
    background-color: #ffffff;
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-menu li {
    margin: 16px 0;
  }
  
  /* Layout Adjustments */
  h1 {
    font-size: 2rem;
  }
  form {
    flex-direction: column;
  }
  .input-wrapper {
    width: 100%;
  }
  button.submit-btn {
    width: 100%;
  }
  section {
    padding: 20px;
  }
}