:root{
  --primary:#2563eb;
  --accent:#16a34a;
  --bg:#f8fafc;
  --border:#e5e7eb;
  --danger:#ef4444;
}

*{box-sizing:border-box}

body{
  margin:0;
  font-family:system-ui,-apple-system,sans-serif;
  background:var(--bg);
  color:#111827;
}



/* LAYOUT */
.container{max-width:1100px;margin:auto;padding:30px 20px}
.hero{text-align:center;margin-bottom:30px}
.hero h1 span{color:var(--primary)}

/* TOOL */
.tool-wrapper{display:flex;justify-content:center}
.tool-card{
  background:#fff;
  max-width:900px;
  width:100%;
  padding:30px;
  border-radius:20px;
  box-shadow:0 20px 40px rgba(0,0,0,.08);
}

/* UPLOAD */
.upload-box{
  border:2px dashed var(--border);
  border-radius:20px;
  padding:40px;
  text-align:center;
  background:#f9fafb;
}
.upload-btn{
  padding:16px 28px;
  font-size:16px;
  background:#2563eb;
  color:#fff;
  border:none;
  border-radius:14px;
  cursor:pointer;
}
.upload-desc{margin-top:12px;font-size:14px;color:#6b7280}

/* IMAGE CONTAINER */
.image-container{
  display:none;
  margin-top:20px;
  border:2px dashed var(--border);
  border-radius:20px;
  min-height:300px;
  background:#f1f5f9;
  position:relative;
  justify-content:center;
  align-items:center;
}
.image-container img{
  max-height:280px;
  max-width:100%;
}
.delete-btn{
  position:absolute;
  top:10px;
  right:10px;
  background:var(--danger);
  color:#fff;
  border:none;
  width:28px;
  height:28px;
  border-radius:50%;
  cursor:pointer;
}
.change-btn{
  position:absolute;
  bottom:12px;
  right:12px;
  background:#fff;
  border:1px solid var(--border);
  padding:8px 14px;
  border-radius:10px;
  cursor:pointer;
}

/* CONTROLS */
.controls{
  display:flex;
  flex-direction:column;
  gap:16px;
  margin-top:20px;
}
.size-select{order:1}
.resize-btn{order:2}

@media(min-width:768px){
  .controls{flex-direction:row;align-items:center}
  .size-select{max-width:150px}
}

.size-select select{
  width:100%;
  height:52px;
  border-radius:10px;
  border:1px solid var(--border);
  font-size:16px;
}

/* BUTTON */
.resize-btn{
  width:100%;
  padding:16px;
  background:#2563eb;
  color:#fff;
  border:none;
  border-radius:14px;
  font-size:16px;
  cursor:pointer;
}

/* ERROR */
.error-msg{
  display:none;
  margin-top:16px;
  background:#fee2e2;
  color:#991b1b;
  padding:12px;
  border-radius:12px;
  text-align:center;
}

/* LOADING */
.loading{display:none;margin-top:20px;text-align:center}
.spinner{
  width:40px;height:40px;
  border:4px solid var(--border);
  border-top:4px solid var(--primary);
  border-radius:50%;
  animation:spin 1s linear infinite;
  margin:auto;
}
@keyframes spin{to{transform:rotate(360deg)}}

/* RESULT */
.result-box{display:none;margin-top:20px}
.sizes{display:flex;justify-content:space-between}
.download-btn{
  display:block;
  margin-top:14px;
  padding:14px;
  background:var(--accent);
  color:#fff;
  border-radius:14px;
  text-decoration:none;
  text-align:center;
  font-weight:600;
}

/* ABOUT & FAQ */
.info-card,.faq-section{
  max-width:900px;
  margin:60px auto;
}
.info-card{
  background:#fff;
  padding:40px;
  border-radius:20px;
  box-shadow:0 20px 40px rgba(0,0,0,.08);
}
.faq-section details{
  background:#fff;
  padding:18px 22px;
  border-radius:16px;
  margin-bottom:14px;
  box-shadow:0 10px 30px rgba(0,0,0,.06);
}

/* FOOTER */
.footer{
  background:#0f172a;
  color:#cbd5f5;
  padding:40px 20px 20px;
}
.footer-inner{
  max-width:1100px;
  margin:auto;
  display:flex;
  justify-content:space-between;
  flex-wrap:wrap;
}
.footer-links a{
  margin-right:16px;
  color:#cbd5f5;
  text-decoration:none;
}
.footer-copy{text-align:center;margin-top:20px;font-size:13px;color:#94a3b8}

/* DRAG OVERLAY */
.drag-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.45);
  z-index:9999;
  display:none;
  align-items:center;
  justify-content:center;
  backdrop-filter:blur(2px);
  pointer-events:none;
}
.drag-overlay-text{
  color:#fff;
  font-size:22px;
  font-weight:600;
  padding:20px 30px;
  border:2px dashed rgba(255,255,255,0.6);
  border-radius:16px;
}

.info-with-image{
  display:flex;
  gap:30px;
  align-items:center;
}

.info-with-image .info-text{
  flex:1;
}

.info-with-image .info-image{
  flex:0 0 420px;
}

.info-with-image img{
  width:100%;
  height:auto;
  border-radius:16px;
  border:1px solid var(--border);
}

/* MOBILE */
@media (max-width:768px){
  .info-with-image{
    flex-direction:column;
    text-align:left;
  }

  .info-with-image .info-image{
    flex:0 0 auto;
    margin-top:20px;
  }
}
