:root{
  --bg:#0a0a0a;
  --card:#ffffff;
  --text:#111827;
  --muted:#6b7280;
  --brand1:#1fb6ff;
  --brand2:#13ce66;
  --accent:#7c3aed;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Inter,Ubuntu,'Helvetica Neue',Arial,sans-serif;
  color:var(--text);
  background:linear-gradient(135deg,#eaf4ff,#eafff4);
}
.container{max-width:1100px;margin:0 auto;padding:24px}
.header{
  display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 12px;
}
.brand{display:flex;align-items:center;gap:12px}
.brand img{width:36px;height:36px;border-radius:8px}
.brand h1{font-size:20px;margin:0}
.nav a{color:var(--muted);text-decoration:none;margin-left:16px;transition:color .2s}
.nav a:hover{color:var(--text)}

/* Hide menu toggle on desktop by default */
.menu-toggle{display:none}

.hero{
  background:#fff;border-radius:18px;padding:20px;
  box-shadow:0 6px 30px rgba(16,24,40,.08);
  display:grid;grid-template-columns:1.2fr 1fr;gap:20px;align-items:center
}
.hero img{width:100%;border-radius:14px}
.hero h2{font-size:34px;margin:0 0 12px}
.hero p{color:var(--muted);margin:0 0 14px}
.card{
  background:#fff;border-radius:16px;padding:18px;
  box-shadow:0 6px 24px rgba(16,24,40,.07);margin-top:18px
}

/* Form groups */
fieldset{
  border:1px solid #e5e7eb;
  border-radius:10px;
  padding:14px;
  margin:0 0 12px;
}
legend{
  font-size:14px;
  font-weight:600;
  color:var(--brand1);
  padding:0 6px;
}
.controls{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  margin-top:10px
}
.controls label{font-size:14px;color:var(--muted);display:block;margin-bottom:4px}
.controls input,.controls select,.controls button{
  width:100%;padding:10px 12px;border:1px solid #e5e7eb;border-radius:10px;font-size:15px
}
.controls input:focus,.controls select:focus{
  border-color:var(--brand1);
  outline:none;
  box-shadow:0 0 0 2px rgba(31,182,255,0.2);
}

/* Buttons */
.primary-btn{
  background:linear-gradient(135deg,var(--brand1),var(--brand2));
  color:white;border:none;cursor:pointer;font-weight:600;transition:filter .2s;
  border-radius:10px;
  padding:10px 16px;
}
.primary-btn:hover{filter:brightness(1.05)}
.primary-btn:disabled{
  opacity:.6;
  cursor:not-allowed;
}
.kbd{
  border:1px solid #e5e7eb;
  border-bottom-width:2px;
  border-radius:6px;
  padding:6px 10px;
  background:#fff;
  font-weight:600;
  cursor:pointer;
  font-size:14px;
  display:flex;
  align-items:center;
  gap:4px;
  transition:background .2s;
}
.kbd:hover{background:#f3f4f6}

/* Reset button special */
button[type="reset"].kbd{
  color:var(--muted);
}
button[type="reset"].kbd:hover{
  background:#fee2e2;
  border-color:#fca5a5;
  color:#b91c1c;
}

/* Grid */
.grid-3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}

/* Preview */
.preview{
  display:flex;
  align-items:center;
  justify-content:center;
  background:#f9fafb;
  border:1px dashed #e5e7eb;
  border-radius:12px;
  min-height:220px;
  position:relative;
  overflow:hidden;
  text-align:center;
}
#placeholder{
  color:var(--muted);
  font-size:14px;
}
#spinner{
  position:absolute;
  top:50%;
  left:50%;
  transform:translate(-50%,-50%);
  font-size:15px;
  color:var(--text);
  font-weight:500;
}
#preview{
  max-width:100%;
  max-height:400px;
  border-radius:10px;
  display:block;
  margin:auto;
}
#preview.hidden{display:none !important}

/* Badges & helpers */
.footer{color:var(--muted);text-align:center;padding:40px 16px}
.badge{display:inline-flex;align-items:center;gap:8px;padding:6px 10px;border-radius:999px;background:#eef2ff;color:#3730a3;font-weight:600;font-size:12px}
.small{font-size:12px;color:var(--muted)}
input[type="file"]{padding:10px;background:#f8fafc;border:1px dashed #e5e7eb;border-radius:10px}
.notice{background:#f8faff;border:1px solid #e0e7ff;color:#1e3a8a;padding:12px;border-radius:10px;margin-top:10px;font-size:14px}

/* Hidden always wins */
.hidden{display:none !important}
canvas{max-width:100%;height:auto;border-radius:10px}

/* Drag & Drop Zone (only for index.html) */
#dropZone{
  transition:background .2s,border-color .2s;
}
#dropZone:hover{
  background:#f9fafb;
  border-color:var(--brand1);
}
#dropZone.dragover{
  background:#e0f2fe;
  border-color:var(--brand1);
}

/* File Info */
#fileInfo{
  margin-top:6px;
  font-size:13px;
  color:var(--muted);
}

/* Tooltips */
label span[title]{
  font-size:12px;
  cursor:help;
  margin-left:4px;
  color:var(--muted);
}
label span[title]:hover{color:var(--brand1)}

/* FAQ Section (details/summary) */
.card h3{margin-top:0}
details{
  border-bottom:1px solid #e5e7eb;
  padding:8px 0;
}
details:last-of-type{border-bottom:none}
summary{
  cursor:pointer;
  font-weight:600;
  color:var(--text);
  list-style:none;
  position:relative;
  padding:6px 0;
}
summary::-webkit-details-marker{display:none}
summary:after{
  content:"➕";
  position:absolute;
  right:0;
  color:var(--muted);
  transition:transform .2s;
}
details[open] summary:after{
  content:"➖";
  color:var(--brand1);
}
details p{
  margin:6px 0 10px;
  color:var(--muted);
  line-height:1.5;
  font-size:14px;
}

/* Instagram page tweaks */
.hero img[alt*="Instagram"]{
  border:2px solid #e5e7eb;
}
section.card h3{
  font-size:18px;
  margin-bottom:8px;
}
section.card#tool{
  margin-top:22px;
}
section.card h3:before{
  content:"";
}

/* Blog post styles */
.blog-container{
  max-width:800px;
  margin:0 auto;
  padding:24px;
}
.blog-post h1{
  font-size:32px;
  margin-bottom:16px;
  color:var(--text);
}
.blog-post h2{
  font-size:24px;
  margin:24px 0 12px;
  color:var(--text);
}
.blog-post h3{
  font-size:20px;
  margin:20px 0 10px;
  color:var(--text);
}
.blog-post p{
  line-height:1.7;
  margin:12px 0;
  color:var(--text);
  font-size:16px;
}
.blog-post img{
  max-width:100%;
  border-radius:12px;
  margin:20px auto;
  display:block;
}
.blog-post img.post-hero{
  max-width:600px;    
  max-height:350px;   
  margin:20px auto;   
  display:block;
  height:auto;
  border-radius:12px;
  object-fit:contain; 
  box-shadow:0 4px 20px rgba(0,0,0,0.08);
}
.blog-post blockquote{
  border-left:4px solid var(--brand1);
  background:#f9fafb;
  margin:20px 0;
  padding:12px 16px;
  font-style:italic;
  color:var(--muted);
}
.blog-post ul, .blog-post ol{
  padding-left:20px;
  margin:12px 0;
}
.blog-post li{
  margin-bottom:6px;
}
.blog-post code{
  background:#f3f4f6;
  padding:2px 6px;
  border-radius:4px;
  font-family:monospace;
}
.blog-post pre{
  background:#1e293b;
  color:#f8fafc;
  padding:12px;
  border-radius:8px;
  overflow-x:auto;
  font-family:monospace;
}

/* Blog card styles */
.blog-card{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.blog-card .blog-thumb{
  width:100%;
  height:160px;
  object-fit:contain;
  background:#f9fafb;
  padding:6px;
  border-radius:10px;
}
.blog-card h3{
  margin:6px 0;
  font-size:18px;
}
.blog-card p{
  font-size:14px;
  color:var(--muted);
  line-height:1.5;
}

/* Responsive */
@media(max-width:900px){
  .hero{grid-template-columns:1fr}
  .controls{grid-template-columns:1fr}
  .grid-3{grid-template-columns:1fr}
}

/* ---------------- Contact Form Scoped Styles ---------------- */
#contactForm label{
  font-size:14px;
  font-weight:600;
  color:var(--text);
  margin-bottom:6px;
  display:block;
}
#contactForm input,
#contactForm textarea{
  width:100%;
  padding:12px 14px;
  border:1px solid #d1d5db;
  border-radius:12px;
  font-size:15px;
  transition:border .2s, box-shadow .2s;
  font-family:inherit;
}
#contactForm textarea{
  min-height:140px;
  resize:vertical;
  line-height:1.5;
}
#contactForm input:focus,
#contactForm textarea:focus{
  border-color:var(--brand1);
  box-shadow:0 0 0 3px rgba(31,182,255,0.2);
  outline:none;
}
#contactForm button.primary-btn{
  font-size:15px;
  padding:12px 20px;
}

/* ---------------- Mobile Enhancements ---------------- */
@media(max-width:768px){
  .header{flex-direction:column;align-items:flex-start}
  .hero{grid-template-columns:1fr;text-align:center}
  .hero h2{font-size:24px}
  .hero p{font-size:15px}
  .controls{grid-template-columns:1fr}
  .grid-3{grid-template-columns:1fr}
  
  /* Mobile nav toggle visible */
  .menu-toggle{display:block;margin-top:10px}
  .nav{display:none;flex-direction:column;gap:12px;margin-top:10px;width:100%}
  .nav.is-open{display:flex}
  .nav a{margin:8px 0;font-size:16px}
  
  /* Hero image responsiveness */
  .hero img{max-width:100%;height:auto;margin-top:14px}
  
  /* Larger brand logo on mobile */
  .brand img{width:48px;height:48px}
}
