@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', Arial, sans-serif;
  background: #f5f5f7;
  min-height: 100vh;
  color: #1d1d1f;
  -webkit-font-smoothing: antialiased;
}

/* ===== HEADER ===== */
.main-header {
  background: rgba(255,255,255,0.97);
  border-bottom: 1px solid #d2d2d7;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 9999;
}

.header-container {
  max-width: 1000px;
  margin: auto;
  padding: 0 20px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.site-logo {
  font-size: 17px;
  font-weight: 700;
  color: #1d1d1f;
  text-decoration: none;
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #fe2c55, #e0264b);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 2px 8px rgba(225,48,108,0.3);
  flex-shrink: 0;
}

/* ===== NAVBAR desktop ===== */
.navbar {
  display: flex;
  gap: 4px;
  align-items: center;
}

.navbar a {
  font-size: 13px;
  font-weight: 500;
  color: #6e6e73;
  text-decoration: none;
  padding: 7px 15px;
  border-radius: 9px;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.navbar a:hover { background: #f5f5f7; color: #1d1d1f; }
.navbar a.active { background: #fe2c55; color: #fff; }

/* ===== HAMBURGER ===== */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  background: #f5f5f7;
  border: 1.5px solid #e5e5ea;
  border-radius: 10px;
  cursor: pointer;
  padding: 10px 9px;
  transition: background 0.15s, border-color 0.15s;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: #1d1d1f;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease, background 0.15s;
  transform-origin: center;
}

.hamburger.open { background: #fff0f4; border-color: #fe2c55; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); background: #fe2c55; }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); background: #fe2c55; }

/* ===== PAGE ===== */
.page-wrap { padding: 48px 20px 60px; }
.container { max-width: 680px; margin: auto; }

/* ===== HERO ===== */
.hero { text-align: center; margin-bottom: 36px; }

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff; border: 1px solid #d2d2d7; border-radius: 99px;
  padding: 5px 14px; font-size: 12px; font-weight: 600; color: #6e6e73;
  margin-bottom: 18px; letter-spacing: 0.3px; text-transform: uppercase;
}
.hero-eyebrow span { color: #fe2c55; }

.hero h1 {
  font-size: 38px; font-weight: 700; letter-spacing: -1px;
  color: #1d1d1f; line-height: 1.15; margin-bottom: 12px;
}
.hero h1 em { font-style: normal; color: #fe2c55; }
.hero p { font-size: 16px; color: #6e6e73; line-height: 1.6; }

/* ===== TOOL CARD ===== */
.tool-card {
  background: #fff; border-radius: 20px; border: 1px solid #d2d2d7;
  padding: 28px; margin-bottom: 28px; animation: fadeIn 0.4s ease;
}

/* ===== INPUT ===== */
.input-row { display: flex; gap: 10px; margin-bottom: 14px; }
.search-box { flex: 1; min-width: 0; }

.search-box input {
  width: 100%; height: 52px;
  border: 1.5px solid #d2d2d7; border-radius: 12px;
  padding: 0 16px; font-size: 15px;
  font-family: 'Inter', Arial, sans-serif;
  color: #1d1d1f; outline: none; transition: all 0.2s; background: #f5f5f7;
  -webkit-appearance: none;
  appearance: none;
}
.search-box input:focus { border-color: #fe2c55; background: #fff; box-shadow: 0 0 0 3px rgba(225,48,108,0.1); }
.search-box input::placeholder { color: #aeaeb2; }
.search-box input.input-error { border-color: #fe2c55 !important; box-shadow: 0 0 0 3px rgba(225,48,108,0.15) !important; animation: shake 0.35s ease; }

.fetch-btn {
  height: 52px; padding: 0 22px; background: #fe2c55; color: #fff;
  border: none; border-radius: 12px; font-size: 15px; font-weight: 600;
  cursor: pointer; transition: all 0.2s; white-space: nowrap;
  font-family: 'Inter', Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  flex-shrink: 0;
}
.fetch-btn:hover { background: #e0264b; }
.fetch-btn:active { transform: scale(0.97); }
.fetch-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ===== PILLS ===== */
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill {
  display: flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 500; color: #6e6e73;
  background: #f5f5f7; border: 1px solid #e5e5ea;
  border-radius: 99px; padding: 4px 12px;
}
.pill-dot { color: #fe2c55; font-size: 10px; }

/* ===== ROCKET LOADER ===== */
.loader { padding: 32px 0 20px; text-align: center; }

.rocket-scene {
  position: relative;
  height: 64px;
  overflow: hidden;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
}

.stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.stars span {
  position: absolute;
  width: 3px; height: 3px;
  background: #fe2c55;
  border-radius: 50%;
  opacity: 0;
  animation: starTwinkle 1.4s ease-in-out infinite;
}
.stars span:nth-child(1)  { left:5%;  top:20%; animation-delay:0s; }
.stars span:nth-child(2)  { left:15%; top:70%; animation-delay:0.2s; }
.stars span:nth-child(3)  { left:28%; top:30%; animation-delay:0.5s; }
.stars span:nth-child(4)  { left:40%; top:65%; animation-delay:0.1s; }
.stars span:nth-child(5)  { left:55%; top:20%; animation-delay:0.7s; }
.stars span:nth-child(6)  { left:65%; top:75%; animation-delay:0.3s; }
.stars span:nth-child(7)  { left:75%; top:40%; animation-delay:0.9s; }
.stars span:nth-child(8)  { left:82%; top:15%; animation-delay:0.4s; }
.stars span:nth-child(9)  { left:90%; top:60%; animation-delay:0.6s; }
.stars span:nth-child(10) { left:96%; top:35%; animation-delay:1.1s; }

.track-dots {
  position: absolute;
  bottom: 12px;
  left: 0; right: 0;
  display: flex;
  justify-content: space-evenly;
  padding: 0 20px;
}
.track-dots span {
  width: 4px; height: 4px;
  background: #f2c4d4;
  border-radius: 50%;
  animation: dotPulse 1.2s ease-in-out infinite;
}
.track-dots span:nth-child(1)  { animation-delay: 0s; }
.track-dots span:nth-child(2)  { animation-delay: 0.12s; }
.track-dots span:nth-child(3)  { animation-delay: 0.24s; }
.track-dots span:nth-child(4)  { animation-delay: 0.36s; }
.track-dots span:nth-child(5)  { animation-delay: 0.48s; }
.track-dots span:nth-child(6)  { animation-delay: 0.60s; }
.track-dots span:nth-child(7)  { animation-delay: 0.72s; }
.track-dots span:nth-child(8)  { animation-delay: 0.84s; }
.track-dots span:nth-child(9)  { animation-delay: 0.96s; }
.track-dots span:nth-child(10) { animation-delay: 1.08s; }

.rocket-wrap {
  position: absolute;
  bottom: 18px;
  left: -70px;
  display: flex;
  align-items: center;
  animation: rocketFly 2s cubic-bezier(0.4,0,0.2,1) infinite;
}
.rocket-emoji {
  font-size: 32px;
  line-height: 1;
  animation: rocketBob 0.45s ease-in-out infinite alternate;
  filter: drop-shadow(0 4px 10px rgba(225,48,108,0.5));
}
.exhaust-flame {
  position: absolute;
  right: calc(100% - 4px);
  top: 50%;
  transform: translateY(-50%);
  filter: blur(1px);
}
.exhaust-flame::after {
  content: '';
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  height: 10px;
  width: 28px;
  background: linear-gradient(90deg, transparent, rgba(255,180,0,0.6), rgba(225,48,108,0.8));
  border-radius: 0 4px 4px 0;
  transform-origin: right center;
  animation: flamePulse 0.3s ease-in-out infinite alternate;
}

.loader-text { font-size: 13px; color: #6e6e73; font-weight: 500; }
.dots span { animation: dotFade 1.2s ease-in-out infinite; opacity: 0; }
.dots span:nth-child(1) { animation-delay: 0s; }
.dots span:nth-child(2) { animation-delay: 0.2s; }
.dots span:nth-child(3) { animation-delay: 0.4s; }

/* ===== RESULT CARD ===== */
.result-card {
  border-radius: 16px;
  overflow: hidden;
  margin-top: 22px;
  border: 1px solid #e5e5ea;
  animation: slideUp 0.35s ease;
  background: #0a0a0a;
}

/* Video box: fixed 280x420 centered */
.video-preview-wrap {
  display: flex;
  justify-content: center;
  padding: 20px 20px 0;
  background: #0a0a0a;
}

.thumb-block {
  display: none; /* hide thumbnail, show video only */
}

/* ===== VIDEO + THUMBNAIL FIX ===== */

.video-block{
    position: relative;
    width: 280px;
    height: 420px;
    overflow: hidden;
    border-radius: 14px;
    background: #000;
}

.video-block video{
    width:100%;
    height:100%;
    display:block;
    object-fit:cover;
    position:relative;
    z-index:1;
}

/* Thumbnail Overlay */
.thumb-overlay{
    position:absolute;
    inset:0;
    z-index:2;
    overflow:hidden;
    border-radius:inherit;
    transition:opacity .3s ease;
    cursor:pointer;
}

.thumb-overlay img{
    width:100%;
    height:100%;
    display:block;
    object-fit:cover;
}

/* Play icon */
.thumb-overlay::after{
    content:'▶';
    position:absolute;
    top:50%;
    left:50%;
    transform:translate(-50%,-50%);
    width:72px;
    height:72px;
    border-radius:50%;
    background:rgba(0,0,0,.55);
    color:#fff;
    font-size:32px;
    display:flex;
    align-items:center;
    justify-content:center;
    backdrop-filter:blur(4px);
}

/* Hidden state */
.thumb-overlay.hide{
    opacity:0;
    pointer-events:none;
}


.caption {
  padding: 14px 20px 10px;
  font-size: 13px; color: #bbb;
  line-height: 1.6;
  background: #0a0a0a;
  text-align: center;
}


/* ===== DOWNLOAD BUTTON ===== */
.dl-buttons {
  padding: 10px 20px 20px;
  background: #0a0a0a;
  display: flex;
  justify-content: center;
}

.btn-dl {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 40px;
  border-radius: 12px;
  text-decoration: none;
  font-size: 15px; font-weight: 600;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  font-family: 'Inter', Arial, sans-serif;
  letter-spacing: 0.1px;
  min-width: 200px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.btn-dl.video { background: #34C759; color: #fff; }
.btn-dl.video:hover { background: #28a745; }
.btn-dl.video:active { transform: scale(0.97); }
.btn-dl.video:disabled { opacity: 0.6; cursor: not-allowed; }

/* ===== STEPS ===== */
.section-label {
  font-size: 11px; font-weight: 700; color: #aeaeb2;
  letter-spacing: 1px; text-transform: uppercase; margin-bottom: 14px;
}
.steps-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-bottom: 28px; }
.step-box { background: #fff; border: 1px solid #d2d2d7; border-radius: 14px; padding: 18px 14px; text-align: center; }
.step-num {
  width: 32px; height: 32px; border-radius: 50%;
  background: #fff0f4; color: #fe2c55; font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 10px;
}
.step-box h4 { font-size: 13px; font-weight: 600; color: #1d1d1f; margin-bottom: 4px; }
.step-box p  { font-size: 12px; color: #aeaeb2; line-height: 1.5; }

/* ===== FEATURES ===== */
.features-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; margin-bottom: 36px; }
.feat-box { background: #fff; border: 1px solid #d2d2d7; border-radius: 14px; padding: 18px; display: flex; gap: 14px; align-items: flex-start; }
.feat-icon { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 20px; }
.feat-icon.pink  { background: #fff0f4; }
.feat-icon.green { background: #f0fdf4; }
.feat-icon.blue  { background: #eff6ff; }
.feat-icon.amber { background: #fffbeb; }
.feat-box h4 { font-size: 14px; font-weight: 600; color: #1d1d1f; margin-bottom: 3px; }
.feat-box p  { font-size: 12px; color: #aeaeb2; line-height: 1.5; }

/* ===== FOOTER ===== */
.footer {
  background: rgba(255,255,255,0.97);
  border-top: 1px solid #d2d2d7;
  padding: 40px 24px 0;
  margin-top: 20px;
}
.footer-inner {
  max-width: 1000px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  flex-wrap: wrap;
  padding-bottom: 32px;
  border-bottom: 1px solid #e5e5ea;
}
.footer-brand { max-width: 240px; }
.footer-logo { color: #1d1d1f !important; }
.footer-logo .logo-icon { background: linear-gradient(135deg, #fe2c55, #e0264b); }
.footer-tagline { font-size: 13px; color: #6e6e73; margin-top: 10px; line-height: 1.6; }
.footer-links { display: flex; gap: 40px; flex-wrap: wrap; }
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col-title {
  font-size: 11px; font-weight: 700; letter-spacing: 0.8px;
  text-transform: uppercase; color: #fe2c55; margin-bottom: 4px;
}
.footer-col a { font-size: 13px; color: #6e6e73; text-decoration: none; transition: color 0.15s; }
.footer-col a:hover { color: #fe2c55; }
.footer-bottom {
  max-width: 1000px; margin: auto;
  padding: 18px 0; text-align: center;
}
.footer-bottom p { font-size: 12px; color: #aeaeb2; line-height: 2; }
.footer-bottom a { color: #fe2c55; text-decoration: none; }

/* Footer badges — updated for light bg */
.footer-badge {
  font-size: 11px; font-weight: 600;
  color: #fe2c55;
  background: #fff0f4;
  border: 1px solid #f2c4d4;
  border-radius: 99px;
  padding: 3px 10px;
}

/* ===== ANIMATIONS ===== */
@keyframes rocketFly {
  0%   { left: -70px; }
  85%  { left: calc(100% + 30px); opacity: 1; }
  86%  { left: -70px; opacity: 0; }
  100% { left: -70px; opacity: 1; }
}
@keyframes rocketBob {
  from { transform: translateY(0) rotate(-2deg); }
  to   { transform: translateY(-6px) rotate(2deg); }
}
@keyframes flamePulse {
  from { width: 18px; opacity: 0.7; }
  to   { width: 32px; opacity: 1; }
}
@keyframes starTwinkle {
  0%,100% { opacity: 0; transform: scale(0.5); }
  50%      { opacity: 1; transform: scale(1.2); }
}
@keyframes dotPulse {
  0%,100% { background: #f2c4d4; transform: scale(1); }
  50%      { background: #fe2c55; transform: scale(1.5); }
}
@keyframes dotFade {
  0%,80%,100% { opacity: 0; }
  40%          { opacity: 1; }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-6px); }
  40%      { transform: translateX(6px); }
  60%      { transform: translateX(-4px); }
  80%      { transform: translateX(4px); }
}

/* ===== TABLET ===== */
@media (max-width: 768px) {
  .hero h1 { font-size: 30px; }
  /* Footer stays row on tablet — brand left, links right */
  .footer-inner {
    flex-direction: row;
    align-items: flex-start;
    gap: 20px;
  }
  .footer-brand { max-width: 180px; }
  .footer-links { gap: 24px; }
}

/* ===== MOBILE — hamburger ===== */
@media (max-width: 560px) {
  .hamburger { display: flex; }

  .navbar {
    display: none;
    flex-direction: column;
    gap: 2px;
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    width: 100%;
    background: #fff;
    border-top: 1px solid #e5e5ea;
    border-bottom: 1px solid #e5e5ea;
    padding: 8px 12px 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.10);
    z-index: 9999;
  }
  .navbar.open { display: flex; }

  .navbar a {
    text-align: left;
    padding: 12px 16px;
    font-size: 15px;
    border-radius: 10px;
    display: block;
    width: 100%;
  }
  .navbar a:hover { background: #f5f5f7; }
  .navbar a.active { background: #fe2c55; color: #fff; }

  .page-wrap { padding: 24px 12px 40px; }
  .tool-card { padding: 18px 14px; }
  .input-row { flex-direction: column; gap: 8px; }
  .fetch-btn { width: 100%; height: 48px; font-size: 16px; }
  .hero h1 { font-size: 26px; letter-spacing: -0.5px; }
  .hero p { font-size: 14px; }
  .steps-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }

  /* Mobile footer: brand LEFT, page links RIGHT */
  .footer-inner {
    flex-direction: row !important;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: nowrap;
    gap: 16px;
  }
  .footer-brand { max-width: 130px; flex-shrink: 0; }
  .footer-tagline { font-size: 11px; }
  .footer-badges { display: none; }
  .footer-links { gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
  .footer-col { gap: 5px; min-width: 70px; }
  .footer-col a { font-size: 12px; }
  .footer-col-title { font-size: 10px; }

  /* Video preview on mobile: slightly smaller */
  .video-block {
    width: 240px;
    height: 360px;
  }
  .btn-dl { min-width: 180px; padding: 13px 30px; font-size: 14px; }
}

/* ===== SMALL PHONES (iPhone SE etc.) ===== */
@media (max-width: 375px) {
  .hero h1 { font-size: 22px; }
  .video-block { width: 200px; height: 300px; }
  .tool-card { padding: 14px 12px; }
}

/* ===== SWEETALERT ===== */
.swal-custom-popup {
  border-radius: 20px !important;
  padding: 32px 28px !important;
  box-shadow: 0 24px 60px rgba(0,0,0,0.12) !important;
  border: 1px solid #f0f0f0 !important;
  font-family: 'Inter', Arial, sans-serif !important;
  max-width: 340px !important;
}
.swal-custom-btn {
  background: #fe2c55 !important; color: #fff !important;
  border: none !important; border-radius: 10px !important;
  padding: 12px 32px !important; font-size: 14px !important;
  font-weight: 600 !important; font-family: 'Inter', Arial, sans-serif !important;
  cursor: pointer !important; margin-top: 8px !important;
  transition: all 0.2s !important;
}
.swal-custom-btn:hover { background: #e0264b !important; }
.swal2-backdrop-show {
  background: rgba(0,0,0,0.35) !important;
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
}
/* ===== FAQ ===== */
#faq { margin-bottom: 28px; }
.faq-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 28px; }
.faq-item {
  background: #fff;
  border: 1px solid #d2d2d7;
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.faq-item[open] { border-color: #fe2c55; }
.faq-item summary {
  padding: 16px 18px;
  font-size: 14px;
  font-weight: 600;
  color: #1d1d1f;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  -webkit-tap-highlight-color: transparent;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 18px;
  color: #fe2c55;
  font-weight: 400;
  transition: transform 0.2s;
  flex-shrink: 0;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p {
  padding: 0 18px 16px;
  font-size: 13px;
  color: #6e6e73;
  line-height: 1.7;
}

/* ===== SEO CONTENT BLOCK ===== */
.seo-content {
  background: #fff;
  border: 1px solid #d2d2d7;
  border-radius: 14px;
  padding: 22px 24px;
  margin-bottom: 36px;
}
.seo-content h2 {
  font-size: 18px;
  font-weight: 700;
  color: #1d1d1f;
  margin-bottom: 10px;
  letter-spacing: -0.3px;
}
.seo-content p {
  font-size: 13px;
  color: #6e6e73;
  line-height: 1.75;
  margin-bottom: 8px;
}
.seo-content p:last-child { margin-bottom: 0; }

/* ===== FOOTER BADGES ===== */
.footer-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.footer-badge {
  font-size: 11px;
  font-weight: 600;
  color: #aeaeb2;
  background: #2c2c2e;
  border: 1px solid #3a3a3c;
  border-radius: 99px;
  padding: 3px 10px;
}

/* ===== FILE SIZE BADGE on download button ===== */
.file-size-badge {
  display: none;
  align-items: center;
  background: rgba(255,255,255,0.25);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 99px;
  padding: 2px 8px;
  margin-left: 6px;
  letter-spacing: 0.3px;
}

/* ===== AD SLOTS (populated from admin panel config.json) ===== */
.ad-slot { display: flex; justify-content: center; align-items: center; overflow: hidden; margin: 18px auto; max-width: 728px; }
.ad-slot:empty { display: none; margin: 0; }
.ad-slot-header { margin: 0 auto 10px; }
.ad-slot-footer { margin: 30px auto 0; padding-bottom: 10px; }
