/* ORIGINAL CSS - Unchanged except upload button and upload box updated */

html, body {
  width: 100%;
  min-height: 100vh;
  padding: 0;
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: linear-gradient(120deg, #f6f7fb 60%, #eaf0fb 100%);
  color: #232c4b;
  box-sizing: border-box;
  scroll-behavior: smooth;
  background-size: 200% 200%;
  animation: gradientBg 8s ease-in-out infinite;
}

@keyframes gradientBg {
  0% {background-position: 0 0;}
  50% {background-position: 100% 100%;}
  100% {background-position: 0 0;}
}

/* Fancy scrollbar */
::-webkit-scrollbar {
  width: 8px; background: #f3f5fc;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(120deg, #625fff 30%, #03dec0 100%);
  border-radius: 5px;
}

/* Glassmorphism Particle Overlay */
body.landing::before {
  content: "";
  position: fixed;
  top:0; left:0; width:100vw; height:100vh;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle, #03dec064 5px,transparent 30%) 30vw 40vh/160px 160px,
    radial-gradient(circle, #625fff47 7px,transparent 30%) 70vw 75vh/110px 110px,
    radial-gradient(circle, #625fff29 16px,transparent 25%) 85vw 20vh/72px 72px;
  background-repeat: no-repeat;
  opacity:.32;
}

/* Navbar */
.navbar {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.15rem 2.1rem;
  backdrop-filter: blur(12px);
  background: linear-gradient(90deg, #22293a88 0%, #43495ad9 100%);
  box-shadow: 0 8px 32px rgba(50,60,80,.15), 0 0.5px 0 #03dec044;
  position: sticky;
  top: 0;
  z-index: 101;
  box-sizing: border-box;
}

/* Logo */
.logo {
  font-size: 2.1rem;
  font-weight: 900;
  letter-spacing: -1.5px;
  background: linear-gradient(90deg,#04574c,#010015 73%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
  text-decoration: none;
  user-select: none;
  transition: transform .13s cubic-bezier(0.4,1.8,0.6,1.2);
  filter: drop-shadow(0 1px 6px #625fff57);
}

.logo:hover, .logo:focus {
  transform: scale(1.06) rotate(-2deg);
}

/* Navbar actions container for About Us and Coffee button */
.navbar-actions {
  display: flex;
  align-items: center;
  gap: 18px; /* Space between About Us and Coffee buttons */
}

/* About Us Button */
.about-btn {
  background: linear-gradient(92deg, #625fff 70%, #03dec0 98%);
  color: #fff;
  border: none;
  padding: 0.65em 1.3em;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  position: relative;
  box-shadow: 0 3px 18px rgba(98,95,255,.19);
  transition: background .24s, box-shadow .16s, color .16s, transform .12s;
  will-change: transform;
  overflow: hidden;
  outline: none;
}

.about-btn:hover, .about-btn:focus {
  color: #232c4b;
  background: linear-gradient(94deg,#03dec0 60%, #625fff 99%);
  transform: scale(1.05);
  box-shadow: 0 3px 18px rgba(3,222,192,.20);
}

.about-btn:focus::after {
  content:"";
  position:absolute; left:-4px; top:-4px; right:-4px; bottom:-4px;
  border-radius:11px;
  background: linear-gradient(90deg, #03dec0, #625fff 90%);
  filter: blur(5px);
  opacity: .7;
  z-index: 2;
  animation: neonGlow 1.2s infinite linear alternate;
  pointer-events: none;
}
@keyframes neonGlow {
  0% { opacity: .45; }
  100% { opacity: .95;}
}

/* Buy Me a Coffee Button */
.coffee-navbar-button {
  display: flex;
  align-items: center;
}

.bmc-btn {
  display: block;
  height: 42px;
  border-radius: 8px;
  transition: transform .12s;
  box-shadow: 0 2px 14px rgba(255, 216, 75, 0.2);
}

.bmc-btn:hover, .bmc-btn:focus {
  transform: scale(1.07) rotate(-2deg);
  box-shadow: 0 3px 18px rgba(255, 216, 75, 0.29);
}

/* Responsive for Navbar and Coffee Button */
@media (max-width: 700px) {
  .navbar {
    padding: 1rem 0.9rem;
  }
  .navbar-actions {
    gap: 8px;
  }
  .bmc-btn {
    height: 36px;
  }
}

/* Landing section */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  z-index: 1;
  position: relative;
}
.landing-container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 44px;
  padding: 3.5rem 2rem 2.2rem 2rem;
  flex: 1;
  box-sizing: border-box;
  position: relative;
}
.landing-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 540px;
  flex: 1.38;
  z-index: 3;
}

.landing-left h1 {
  font-size: 3.49rem;
  font-weight: 800;
  margin-bottom: 1.25rem;
  line-height: 1.17;
  background: linear-gradient(90deg, #0efbb0 0%, #625fff 75%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.7px;
  background-clip: text;
  animation: h1-shine 4s infinite linear alternate;
}
@keyframes h1-shine {
  0%   { filter: brightness(1) drop-shadow(0 2px 9px #625fff30);}
  100% { filter: brightness(1.11) drop-shadow(0 4px 25px #03dec057);}
}

.landing-left p {
  color: #535c92;
  font-size: 1.46rem;
  margin-bottom: 1.8rem;
  max-width: 96vw;
  text-shadow: 0 1.5px 7px #b5fff61a;
}

.landing-left .highlight, .landing-left a {
  color: #4fd7cc;
  font-weight: 700;
  background: linear-gradient(90deg, #52ffdb 60%, #7b6eff 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: highlight-blink 1s infinite alternate;
}
@keyframes highlight-blink {
  from{filter: brightness(1);}
  to{filter: brightness(1.15);}
}

.landing-left ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.3rem 0;
  animation: fadeInList .82s cubic-bezier(.25,1,.7,1) .2s both;
}
@keyframes fadeInList {from{opacity:0;transform:translateY(25px);}to{opacity:1;transform:none;}}

.landing-left li {
  position: relative;
  font-size: 1.14rem;
  margin-bottom: 0.45em;
  padding-left: 2.15em;
  color: #323a46;
  line-height: 147%;
  opacity: .96;
}
.landing-left li:before {
  content: "✨";
  position: absolute;
  left: 0;
  top: 0.18em;
  font-size: 1.15em;
  color: #03dec0;
  text-shadow: 0 1px 0px #625fff22;
  animation: icon-glow 3s infinite alternate;
}
@keyframes icon-glow {
  50% { filter: contrast(1.8) drop-shadow(0 1px 4px #52ffdb55);}
}

/* -----------------UPDATED UPLOAD BOX & BUTTON----------------- */

.upload-box {
  background: rgba(246,247,251,0.85); /* Slightly more opaque for clarity */
  box-shadow: 0 12px 48px rgba(93,125,255,0.22); /* stronger glow */
  padding: 1.32rem 1.16rem;
  border-radius: 20px;
  margin-bottom: 2rem; /* larger bottom margin to separate content */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.92rem;
  max-width: 400px;
  position: relative;
  border: 1.5px solid #7b6eff;
  backdrop-filter: blur(20px);
  overflow: visible;
  transition: box-shadow 0.3s ease;
}
.upload-box:hover, .upload-box:focus-within {
  box-shadow: 0 18px 54px rgba(98,95,255,0.32);
}
.upload-box::after {
  content: "";
  position: absolute;
  top: -10px; right: -10px; left: -10px; bottom: -10px;
  border-radius: 24px;
  pointer-events: none;
  opacity: 0.18;
  border: 2.5px solid #625fff;
  filter: blur(2.5px);
  transition: opacity 0.3s;
}

.upload-btn {
  background: linear-gradient(90deg, #625fff 5%, #03dec0 90%);
  border: none;
  min-width: 180px;
  color: white;
  font-size: 1.22rem;
  font-weight: 800;
  padding: 1.15rem 2.8rem;
  border-radius: 14px;
  cursor: pointer;
  position: relative;
  z-index: 2;
  box-shadow: 0 10px 28px rgba(75,90,255,0.16);
  margin-bottom: 0.1rem;
  transition: box-shadow .30s, transform .15s, filter .25s;
  width: 100%; /* Full width on desktop for prominence */
  max-width: 400px;
}
.upload-btn:hover,
.upload-btn:focus {
  background: linear-gradient(90deg, #03dec0, #625fff 94%);
  box-shadow: 0 16px 52px rgba(98,95,255,0.32);
  transform: translateY(-2px) scale(1.04);
  filter: brightness(1.14) drop-shadow(0 2px 12px #27ffd6aa);
}
.upload-btn:active {
  filter: brightness(0.92) saturate(1.1);
}

/* Ripple effect unchanged */
.upload-btn:focus::after,
.upload-btn:active::after {
  content:'';
  pointer-events: none;
  position:absolute;
  left:50%; top:50%;
  width:10px; height:10px;
  background:rgba(127,255,240,.18);
  border-radius:50%;
  transform:translate(-50%,-50%) scale(1);
  animation: ripple-ef .48s linear;
  z-index: 5;
}
@keyframes ripple-ef {
  to {width:330px; height:70px; opacity:0;}
}

/* Landing image */
.landing-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  z-index: 1;
}
.landing-image {
  background: linear-gradient(135deg, #0f5170 80%, #eae6fc 100%);
  max-width: 640px;
  width: 100%;
  min-width: 220px;
  height: auto;
  object-fit: contain;
  border-radius: 1.7rem;
  box-shadow: 0 16px 39px 0 rgba(80,97,210,.24), 0 43px 92px #03dec015;
  margin: 0 10px 0 0;
  transition: transform .18s, box-shadow .16s, filter .15s;
  filter: drop-shadow(0 18px 40px rgba(2,23,45,0.11));
}
.landing-image:hover {
  transform: scale(1.03) rotate(-1deg) translateY(-9px);
  box-shadow: 0 16px 60px rgba(41,108,195,0.18);
  filter: brightness(1.09);
}

/* Footer */
.legal-footer {
  width: 100%;
  background: linear-gradient(92deg, #212432 0%, #43495a 100%);
  color: #b9fff6;
  padding: 1.3rem 1.2rem 1.18rem 1.2rem;
  border-top: 1px solid #505a6f44;
  font-size: 1.1rem;
  text-align: center;
  line-height: 1.7;
  margin-top: auto;
  box-sizing: border-box;
  position: relative;
  box-shadow: 0 1.5px 10px #03dec00b;
}
.legal-footer::after {
  content: '';
  display: block;
  position: absolute;
  bottom: 4px; right: 7vw; left: auto;
  width: 7px; height: 7px;
  background: radial-gradient(circle, #03dec0 60%, #625fff33 100%);
  border-radius: 99px;
  opacity: 0.7;
  animation: footerDot 1.5s infinite alternate;
}
@keyframes footerDot {from{transform:scale(1);}to{transform:scale(1.8) translateY(-4px);}}

.footer-links {
  display: flex;
  gap: 2.1em;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 0.66em;
}
.footer-link {
  background: none;
  border: none;
  color: #57f7df;
  font-size: 1.09rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0 0.18em;
  text-decoration: none;
  position: relative;
  transition: color 0.18s, text-shadow 0.21s;
  outline: none;
}
.footer-link:hover, .footer-link:focus {
  color: #b9fff6;
  text-shadow: 0 1px 8px #03dec077;
}
.footer-link::before {
  content: "";
  display: block;
  position: absolute;
  left: 40%; right: 40%;
  bottom: -2px;
  height: 2px;
  background: linear-gradient(90deg, #03dec0 30%, #625fff 100%);
  border-radius: 2px;
  opacity: 0;
  transition: left 0.18s, right 0.18s, opacity 0.18s;
}
.footer-link:hover::before,
.footer-link:focus::before {
  left: 9%; right: 9%; opacity: 0.7;
}

.footer-copy {
  color: #d0f4f5;
  font-size: 1.03rem;
  margin-top: 0.83em;
  margin-bottom: 0;
  letter-spacing: 0.01em;
  opacity: .75;
}

.legal-footer a {
  color: #57f7df;
  text-decoration: underline;
  transition: color 0.19s;
}
.legal-footer a:hover, .legal-footer a:focus {
  color: #fff;
  text-shadow: 0 2px 7px #625fff44;
}

/* Responsive */

@media (max-width: 1140px) {
  .landing-container {max-width: 97vw; padding-left: 1vw; padding-right: 1vw;}
}
@media (max-width: 900px) {
  .landing-container {
    flex-direction: column-reverse;
    gap: 1.2rem;
    padding: 2rem 4vw 1.2rem 4vw;
    align-items: stretch;
  }
  .landing-left, .landing-right {
    max-width: 100vw;
    width: 100%;
  }
  .landing-left h1 {
    font-size: 2.35rem;
  }
  .upload-box {
    width: 100%;
    max-width: none;
    margin-bottom: 1.5rem;
  }
  .upload-btn {
    width: 100%;
    font-size: 1.05rem;
    padding: 1rem 2rem;
    max-width: none;
  }
  .landing-image {
    max-width: 93vw;
    margin: 0 auto 1.15rem auto;
    border-radius: 1.2rem;
  }
  .footer-links {gap: 1.4em;}
}

@media (max-width: 600px) {
  .navbar,
  .main-wrapper,
  .legal-footer {
    padding-left: 5px; padding-right: 5px;
  }
  .navbar {
    padding: 0.8rem 2.5vw;
  }
  .logo {
    font-size: 1.2rem;
  }
  .landing-container {
    flex-direction: column-reverse;
    gap: 0.8rem;
    padding: 1.2rem 3vw 0.8rem 3vw;
  }
  .landing-left h1 {
    font-size: 1.2rem;
    margin-bottom: 0.4rem;
    letter-spacing: -.5px;
  }
  .landing-left p {
    font-size: 1.04rem;
    margin-bottom: 1rem;
  }
  .upload-box {
    padding: 0.8rem 0.3rem;
    border-radius: 12px;
    margin-bottom: 1.6rem;
  }
  .upload-btn {
    border-radius: 10px;
    font-size: 1rem;
    padding: 0.92rem 1.6rem;
    width: 100%;
    max-width: 100%;
  }
  .landing-image {
    max-width: 99vw;
    width: 100%;
    border-radius: 13px;
  }
  .footer-container {
    font-size: 0.92rem;
    padding: 1.05rem 2vw 0.7rem 2vw;
  }
  .footer-links {
    gap: 1em;
  }
  .legal-footer {
    font-size: .98rem;
    border-radius: 6px;
  }
}

/* Focus outlines */
.upload-btn:focus,
.about-btn:focus,
.footer-link:focus {
  outline: 2.5px solid #625fff;
  outline-offset: 2px;
}
:focus-visible {
  outline: 2.5px solid #03dec0 !important;
}



/* cofee css  */
.coffee-button {
  margin: 1rem 0;
  text-align: center;
}

.coffee-button .bmc-btn {
  height: 45px;       /* default for desktop */
  width: auto;
  border-radius: 8px;
  transition: transform 0.2s ease-in-out;
}

/* Hover animation for desktop */
.coffee-button .bmc-btn:hover {
  transform: scale(1.05);
}

/* ✅ Mobile responsiveness */
@media (max-width: 600px) {
  .coffee-button .bmc-btn {
    height: 38px;     /* slightly smaller on mobile */
  }
}

----------------------------------------------------------------------------------------------------------




html, body {
   min-height: 100vh;
   width: 100%;
   overflow-x: hidden;
   padding: 0;
   margin: 0;
   box-sizing: border-box;
}

body.converter {
   font-family: 'Inter', sans-serif;
   background: linear-gradient(135deg, #667788, #346b93);
   color: #222;
   min-height: 100vh;
   display: block;
}

/* Center the content horizontally, allow vertical scroll if needed */
.page-wrapper {
   background: whitesmoke;
   max-width: 960px;
   width: 100%;
   border-radius: 18px;
   box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
   padding: 3rem 2.5rem;
   margin: 3vh auto 3vh auto;
   animation: fadeInUp 0.8s ease forwards;
   box-sizing: border-box;
}

/* Header */
.header {
   text-align: center;
   margin-bottom: 2.5rem;
}

/* Consistent Image Styling with Aspect Ratio Preservation */
.preview-image {
   display: block;
   width: 100%;
   max-width: 420px;
   height: auto;
   object-fit: contain;
   background: transparent;
   border: none;
   border-radius: 12px;
   box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
   margin: 0.5rem auto 0.5rem auto;
   transition: transform 0.23s ease, box-shadow 0.2s ease;
}

/* Hover Effects */
.preview-box:hover {
   transform: translateY(-3px) scale(1.012);
}

.preview-image:hover {
   transform: scale(1.025);
   box-shadow: 0 12px 36px rgba(0, 0, 0, 0.11);
}

/* Text Styling */
.title {
   font-size: 2.3rem;
   font-weight: 900;
   background: linear-gradient(90deg, #4f5eff, #351a88);
   -webkit-background-clip: text;
   -webkit-text-fill-color: transparent;
   letter-spacing: -0.5px;
   margin-bottom: 0.75rem;
   line-height: 1.2;
   transition: transform 0.3s;
}

.title:hover {
   transform: scale(1.02);
}

.subtitle {
   font-size: 1.12rem;
   color: #0f0101;
   max-width: 700px;
   margin: 0 auto 0 auto;
   line-height: 1.6;
   text-align: center;
}

/* Upload Form */
.upload-form {
   display: flex;
   flex-direction: column;
   align-items: center;
   margin-bottom: 2.2rem;
   gap: 1rem;
}

.upload-label {
   background: #eef1f5;
   border: 2px dashed #bbb;
   padding: 0.85rem 1.7rem;
   border-radius: 12px;
   font-size: 1rem;
   cursor: pointer;
   transition: background 0.3s;
}

.upload-label:hover {
   background: #e1e6ec;
}

.file-input {
   display: none;
}

.btn-submit, .btn-download {
   background: linear-gradient(90deg, #585d93, #b527ab);
   border: none;
   color: white;
   font-size: 1rem;
   padding: 0.8rem 2rem;
   border-radius: 10px;
   cursor: pointer;
   font-weight: 600;
   box-shadow: 0 6px 18px rgba(79, 94, 255, 0.18);
   transition: all 0.3s;
   margin-top: 0.7rem;
}

.btn-submit:hover,
.btn-download:hover {
   background: linear-gradient(90deg, #3c46f0, #5564ff);
   transform: translateY(-2px) scale(1.03);
   box-shadow: 0 12px 30px rgba(79, 94, 255, 0.18);
}

/* Preview Section */
.preview-section {
   display: flex;
   flex-wrap: wrap;
   gap: 2rem;
   justify-content: center;
   margin-top: 2.2rem;
}

/* Each Box (Original / Result) */
.preview-box {
   background: transparent;
   padding: 1.5rem;
   border-radius: 18px;
   box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
   display: flex;
   justify-content: center;
   align-items: center;
   flex-direction: column;
   position: relative;
   overflow: visible;
   width: 100%;
   max-width: 420px;
   min-width: 260px;
   min-height: 280px;
   transition: transform 0.27s ease-in-out;
   text-align: center;
}

.preview-box h3 {
   font-size: 1.22rem;
   font-weight: 800;
   color: #111;
   margin-bottom: 1rem;
   letter-spacing: -0.25px;
}

/* Download Button */
.btn-download {
   display: inline-block;
}

/* Spinner */
.spinner {
   display: flex;
   align-items: center;
   justify-content: center;
   gap: 12px;
   margin: 24px 0;
}
.spin {
   width: 28px;
   height: 28px;
   border: 4px solid #eee;
   border-top: 4px solid #270967;
   border-radius: 50%;
   animation: spin 1s linear infinite;
}
@keyframes spin {
   0% { transform: rotate(0deg);}
   100% { transform: rotate(360deg);}
}
.hidden { display: none !important; }


/* Responsive Design */
@media (max-width: 1024px) {
   .page-wrapper {
      padding: 2rem 1vw;
   }
   .preview-section {
      gap: 1rem;
   }
}

@media (max-width: 800px) {
   .page-wrapper {
      padding: 1.2rem 0.3rem;
      border-radius: 0;
      box-shadow: none;
   }
   .header {
      padding: 0 10px;
   }
   .preview-section {
      flex-direction: column;
      gap: 1.1rem;
      align-items: stretch;
   }
   .preview-box {
      max-width: 98vw;
      min-width: 0;
      width: 99vw;
      margin: 0 auto;
      padding: 1rem 0.35rem 1.05rem 0.35rem;
      min-height: 200px;
   }
   .preview-image {
      width: 100%;
      max-width: 98vw;
      height: auto;
      object-fit: contain;
      border-radius: 11px;
   }
   .title {
      font-size: 1.4rem;
   }
   .subtitle {
      font-size: 1rem;
      padding: 0 8px;
      line-height: 1.4;
   }
   .btn-submit, .btn-download {
      font-size: 0.97rem;
      padding: 0.69rem 1.1rem;
      border-radius: 7px;
   }
   .upload-label {
      font-size: 0.97rem;
      padding: 0.6rem 0.8rem;
      border-radius: 7px;
   }
}

@media (max-width: 500px) {
   .page-wrapper {
      border-radius: 0;
      box-shadow: none;
      padding: 0.4rem 0.01rem 0.6rem 0.01rem;
   }
   .header {
      margin-bottom: 0.7rem;
      padding: 0 2vw;
   }
   .preview-section {
      gap: 0.7rem;
   }
   .preview-box {
      width: 99vw;
      max-width: 99vw;
      min-width: 0;
      padding: 0.7rem 0.2rem 1rem 0.2rem;
      border-radius: 10px;
      margin: 0 auto;
      min-height: 180px;
      box-sizing: border-box;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: flex-start;
   }
   .preview-box h3 {
      font-size: 1rem;
      margin-bottom: 0.5rem;
   }
   .preview-image {
      width: 96vw;
      max-width: 96vw;
      height: auto;
      object-fit: contain;
      border-radius: 8px;
      margin-top: 0.2em;
      margin-left: auto;
      margin-right: auto;
      background: transparent;
   }
   .title {
      font-size: 1.01rem;
      margin-bottom: 0.28rem;
      line-height: 1.17;
   }
   .subtitle {
      font-size: 0.9rem;
      padding: 2px 4px;
      letter-spacing: 0.02em;
      line-height: 1.17;
   }
   .btn-submit, .btn-download {
      padding: 0.53rem 0.5rem;
      font-size: 0.95rem;
      border-radius: 6px;
   }
   .upload-label {
      padding: 0.44rem 0.59rem;
      font-size: 0.91rem;
      border-radius: 5px;
   }
}

/* Animation */
@keyframes fadeInUp {
   from {
      opacity: 0;
      transform: translateY(30px);
   }
   to {
      opacity: 1;
      transform: translateY(0);
   }
}

/* Edit Button Group */
.btn-group {
   display: flex;
   gap: 10px;
   flex-wrap: wrap;
   margin-top: 0.8rem;
}

.btn-edit {
   background: linear-gradient(90deg, #585d93, #b527ab);
   border: none;
   color: white;
   font-size: 1rem;
   padding: 0.8rem 2rem;
   border-radius: 10px;
   cursor: pointer;
   font-weight: 600;
   box-shadow: 0 6px 18px rgba(79, 94, 255, 0.18);
   transition: all 0.3s;
   margin-top: 0.7rem;
}

.btn-edit:hover {
   background: linear-gradient(90deg, #3c46f0, #5564ff);
   transform: translateY(-2px) scale(1.03);
   box-shadow: 0 12px 30px rgba(79, 94, 255, 0.18);
}
@media (max-width: 600px) {
   .btn-edit {
     display: block;
     margin-left: auto;
     margin-right: auto;
   }
}

/* Edit Section */
.edit-section {
   display: none;
   margin-top: 3rem;
   background: #f5f5f5;
   padding: 2rem;
   border-radius: 16px;
   box-shadow: 0 10px 30px rgba(0,0,0,0.08);
   animation: fadeInUp 0.6s ease;
}

.edit-section h3 {
   font-size: 1.4rem;
   margin-bottom: 1rem;
   font-weight: bold;
   text-align: center;
}

/* Color Buttons */
.edit-buttons {
   display: flex;
   flex-wrap: wrap;
   gap: 10px;
   justify-content: center;
   margin-bottom: 1.4rem;
}

.edit-buttons button,
.edit-buttons input[type="color"] {
   padding: 0.6rem 1.2rem;
   border: none;
   border-radius: 8px;
   cursor: pointer;
   background: #e0e0e0;
   font-size: 0.95rem;
   font-weight: 500;
   transition: background 0.25s;
}

.edit-buttons button:hover {
   background: #cfcfcf;
}

/* Preview Area */
.preview-container {
   background: white;
   padding: 1.5rem;
   border-radius: 12px;
   box-shadow: 0 6px 18px rgba(0,0,0,0.06);
   display: flex;
   justify-content: center;
   align-items: center;
   overflow: hidden;
}

/* Container that holds the background */
#resultWrapper {
   position: relative;
   padding: 20px;
   border-radius: 10px;
   overflow: hidden;
   background-size: cover;
   background-position: center;
   background-repeat: no-repeat;
}

/* Image inside the preview container */
.preview-container img {
   max-width: 100%;
   height: auto;
   border-radius: 10px;
   background: transparent;
   background-color: transparent;
   z-index: 1;
   position: relative;
}

/* Dropdown Background Selector */
.dropdown-container {
   position: relative;
   margin-top: 1rem;
   text-align: center;
}

#backgroundSelect {
   width: 100%;
   max-width: 320px;
   padding: 0.7rem 1.2rem;
   font-size: 1rem;
   border-radius: 10px;
   border: 1px solid #ccc;
   background: #f9f9f9;
   cursor: pointer;
   transition: border-color 0.3s ease;
   box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

#backgroundSelect:focus,
#backgroundSelect:hover {
   border-color: #888;
   outline: none;
}

#backgroundSelect option {
   padding: 0.7rem;
   font-size: 1rem;
}