@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root{
  --bg1:#f7f5ff;
  --bg2:#f2f3ff;
  --card:#ffffff;

  --ink:#0f172a;
  --muted:#64748b;
  --line:rgba(15,23,42,.10);

  --p1:#6d28d9;
  --p2:#7c3aed;
  --p3:#a855f7;

  --dangerBg:rgba(239,68,68,.10);
  --dangerLine:rgba(239,68,68,.22);
  --dangerText:#991b1b;

  --shadow:0 18px 55px rgba(2,6,23,.10);
  --radius:18px;

  --bar:#0b1220;
  --barText:#cbd5e1;
  --barNum:#38bdf8;
}

*{ box-sizing:border-box; }

body{
  font-family:'Poppins', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--ink);
  background:
    radial-gradient(900px 380px at 50% 0%, rgba(124,58,237,.18), transparent 70%),
    linear-gradient(180deg, var(--bg1), var(--bg2));
  font-weight:500;
  min-height:100vh;
}

.page{ padding:38px 14px 80px; }
.wrap{ max-width:980px; margin:0 auto; }

.tool-title{
  text-align:center;
  font-weight:600;
  letter-spacing:-.3px;
  font-size:42px;
  margin:0;
  line-height:1.15;
  white-space:normal;
}
.tool-title .p{ color:var(--p2); }

/* ================================
   ✅ FIX ONLY TITLE (for India)
   - same size as title
   - underline = thin gradient marker (not a box)
================================ */
.cityLine{
  display:inline-flex;
  align-items:baseline;
  gap:10px;
  margin-left:10px;

  font-size:inherit;        /* ✅ same size as title */
  font-weight:500;
  line-height:inherit;
  color:rgba(15,23,42,.70);

  transform:translateY(-1px);
}

.cityName{
  position:relative;
  display:inline-block;

  font-size:inherit;        /* ✅ same size as title */
  font-weight:900;
  line-height:1;

  color:var(--p2);
  padding:0 .08em;          /* small side space for underline */
}

.cityName::after{
  content:"";
  position:absolute;
  left:-10px;
  right:-10px;
  height:.34em;             /* ✅ underline thickness relative */
  bottom:-.08em;

  border-radius:999px;
  z-index:-1;

  background:linear-gradient(
    90deg,
    rgba(109,40,217,.28),
    rgba(124,58,237,.42),
    rgba(168,85,247,.28)
  );
}
/* ================================ */

.tool-sub{
  text-align:center;
  color:var(--muted);
  margin-top:10px;
  margin-bottom:22px;
  font-size:14px;
  font-weight:500;
}

.cardx{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  overflow:hidden;
}
.pad{ padding:16px; }

/* top mini actions */
.topbar{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  margin-bottom:12px;
}
.pill{
  border:1px solid rgba(15,23,42,.12);
  background:#fff;
  color:var(--ink);
  border-radius:12px;
  padding:9px 12px;
  font-weight:600;
  font-size:12px;
  transition:.12s;
  user-select:none;
}
.pill:hover{ transform:translateY(-1px); }
.pill-danger{
  background:var(--dangerBg);
  color:var(--dangerText);
  border-color:var(--dangerLine);
}
.pill:disabled{ opacity:.55; cursor:not-allowed; transform:none; }

/* DROP AREA */
.dropBox{
  border:1px dashed rgba(109,40,217,.28);
  background:
    radial-gradient(700px 220px at 50% 0%, rgba(168,85,247,.14), rgba(255,255,255,0) 70%),
    linear-gradient(180deg, rgba(15,23,42,.02), rgba(15,23,42,.00));
  border-radius:16px;
  padding:16px;
  text-align:center;
  transition:.12s;
}
.dropBox.dragover{
  border-color:rgba(124,58,237,.75);
  box-shadow:0 16px 55px rgba(124,58,237,.18);
  transform:translateY(-1px);
}

/* SINGLE MAIN BUTTON (center) */
.mainBtn{
  width:min(560px, 100%);
  border:0;
  color:#fff;
  font-weight:600;
  font-size:16px;
  border-radius:14px;
  padding:14px 16px;
  background:linear-gradient(135deg, var(--p1), var(--p2), var(--p3));
  box-shadow:0 16px 45px rgba(109,40,217,.22);
  transition:.12s;
  user-select:none;
}
.mainBtn:hover{ transform:translateY(-1px); filter:saturate(1.02); }
.mainBtn:active{ transform:translateY(1px); }
.mainBtn:disabled{
  opacity:.55;
  cursor:not-allowed;
  transform:none;
  box-shadow:none;
  filter:none;
}

.dropNote{
  margin-top:10px;
  color:var(--muted);
  font-weight:500;
  font-size:13px;
}

#fileInput{ display:none; }

/* PREVIEW GRID */
.previewWrap{
  margin-top:12px;
  border:1px solid rgba(2,6,23,.10);
  border-radius:16px;
  background:linear-gradient(180deg, rgba(15,23,42,.02), rgba(15,23,42,.00));
  min-height:260px;
  padding:12px;
}
.hint{
  height:236px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  color:var(--muted);
  font-size:13px;
  font-weight:500;
  padding:14px;
}

.grid{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap:12px;
}

.cardFile{
  border:1px solid rgba(2,6,23,.10);
  border-radius:14px;
  background:#fff;
  overflow:hidden;
  box-shadow:0 8px 20px rgba(2,6,23,.06);
}
.cardTop{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:8px 10px;
  border-bottom:1px solid rgba(2,6,23,.08);
}
.fileName{
  font-size:12px;
  font-weight:600;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:120px;
}
.xBtn{
  border:1px solid rgba(2,6,23,.12);
  background:#fff;
  color:#111827;
  width:26px;
  height:26px;
  border-radius:10px;
  display:grid;
  place-items:center;
  font-weight:600;
  line-height:1;
  cursor:pointer;
  user-select:none;
  transition:.12s;
  flex:0 0 auto;
}
.xBtn:hover{ transform:translateY(-1px); background:rgba(2,6,23,.03); }

.thumb{
  width:100%;
  height:190px;
  background:linear-gradient(180deg, rgba(2,6,23,.02), rgba(2,6,23,.00));
  display:grid;
  place-items:center;
}
.thumb canvas{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.cardBottom{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:8px 10px;
  color:var(--muted);
  font-size:12px;
  font-weight:500;
}
.dragHandle{
  display:flex;
  align-items:center;
  gap:6px;
  color:#6b7280;
  user-select:none;
  cursor:grab;
  font-weight:600;
}
.badgeReady{
  background:rgba(109,40,217,.10);
  color:#5b21b6;
  border:1px solid rgba(109,40,217,.18);
  padding:2px 8px;
  border-radius:999px;
  font-size:11px;
  font-weight:600;
}

/* Progress */
.progress-wrap{ display:none; margin-top:12px; }
.progress-wrap.show{ display:block; }

/* Done box */
.after{
  display:none;
  margin-top:12px;
  border:1px solid rgba(2,6,23,.10);
  border-radius:16px;
  background:#fff;
  padding:12px 14px;
}
.after.show{ display:block; }
.after .big{ font-weight:600; font-size:15px; margin:0; }
.after .small{ color:var(--muted); font-size:13px; margin:6px 0 0; font-weight:500; }

/* Stats bar */
.stats{
  background:var(--bar);
  padding:14px 10px;
  display:flex;
  gap:10px;
  justify-content:space-around;
  border-top:1px solid rgba(255,255,255,.08);
}
.stat{ text-align:center; min-width:90px; }
.stat .num{
  font-weight:600;
  font-size:22px;
  color:var(--barNum);
  line-height:1;
}
.stat .lab{
  margin-top:4px;
  font-size:11px;
  color:var(--barText);
  letter-spacing:.9px;
  font-weight:500;
}

/* CMS content box */
.content-box{
  margin-top:16px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:0 10px 28px rgba(2,6,23,.06);
  padding:16px;
}

/* ✅ Mobile friendly */
@media (max-width:680px){
  .page{ padding:26px 12px 60px; }
  .tool-title{ font-size:30px; line-height:1.2; }

  /* ✅ keep cityLine same size as title on mobile too */
  .cityLine{
    margin-left:4px;
    gap:4px;
    transform:translateY(0);
  }
  .cityName::after{
    left:-8px;
    right:-8px;
    bottom:-.07em;
    height:.33em;
  }

  .tool-sub{ font-size:13px; margin-bottom:16px; }

  .pad{ padding:12px; }
  .dropBox{ padding:14px; border-radius:14px; }

  .mainBtn{
    width:100%;
    font-size:15px;
    padding:13px 14px;
    border-radius:14px;
  }

  .previewWrap{ min-height:220px; padding:10px; }
  .hint{ height:190px; font-size:12.5px; }

  .grid{ grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .thumb{ height:165px; }

  .stats{ padding:12px 8px; }
  .stat{ min-width:auto; }
  .stat .num{ font-size:18px; }
}

@media (max-width:420px){
  .tool-title{ font-size:26px; }
  .grid{ grid-template-columns: 1fr; }
  .thumb{ height:185px; }
}
