:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --grad: linear-gradient(135deg, #2563eb 0%, #7c3aed 55%, #ec4899 100%);
  --radius: 16px;
  --btn-radius: 14px;
  --shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans Bengali", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  color: var(--text);
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  object-fit: cover;
}

.brand-sub {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.1;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hdr-btn {
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.hdr-btn:hover {
  border-color: #cbd5e1;
  background: var(--surface-soft);
}

.lang-btn {
  background: #eff6ff;
  color: var(--primary);
  border-color: #bfdbfe;
  min-width: 52px;
  justify-content: center;
}

/* Main Container */
.container {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 18px 16px 40px;
  flex: 1;
}

/* Cards & Grids */
.card-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.section-title {
  margin: 0 0 6px;
  font-size: 19px;
  font-weight: 700;
}

.section-sub {
  margin: 0 0 16px;
  font-size: 13.5px;
  color: var(--muted);
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

@media (max-width: 480px) {
  .tools-grid {
    grid-template-columns: 1fr;
  }
}

.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 13px;
  cursor: pointer;
  text-align: left;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.tool-card:hover,
.tool-card.active {
  border-color: var(--primary);
  transform: translateY(-1px);
}

.tool-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #eff6ff;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.tool-card h3 {
  margin: 0 0 3px;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text);
}

.tool-card p {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
}

/* Unified Website Buttons */
.btn-primary {
  width: 100%;
  height: 50px;
  padding: 0 20px;
  border: none;
  border-radius: var(--btn-radius);
  background: var(--grad);
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.25);
  transition: opacity 0.15s ease, transform 0.12s ease;
}

.btn-primary:active {
  transform: scale(0.99);
}

.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-secondary {
  height: 46px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: var(--btn-radius);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-secondary:hover {
  background: var(--surface-soft);
  border-color: #cbd5e1;
}

.btn-sm {
  height: 36px;
  padding: 0 12px;
  font-size: 13px;
  border-radius: 10px;
}

.btn-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Option Pills */
.pill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
}

.pill-btn {
  height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.pill-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

/* Upload Zone */
.dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 26px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--primary);
  background: #eff6ff;
}

/* Progress Bar (0% - 100%) */
.progress-box {
  display: none;
  margin: 14px 0;
  padding: 12px 14px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
}

.progress-box.active {
  display: block;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 6px;
}

.progress-track {
  width: 100%;
  height: 8px;
  background: #dbeafe;
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--grad);
  border-radius: 999px;
  transition: width 0.2s ease;
}

/* Footer (No Call Button) */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 16px;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 6px;
}

.footer-links a,
.footer-links button {
  background: none;
  border: none;
  padding: 0;
  color: var(--primary);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

/* Modal & Toast */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.52);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-backdrop.open {
  display: flex;
}

.modal-card {
  width: 100%;
  max-width: 460px;
  background: var(--surface);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.2);
}

.toast-msg {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  background: #0f172a;
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  display: none;
}

.toast-msg.show {
  display: block;
}

@media print {
  .site-header,
  .site-footer,
  .no-print {
    display: none !important;
  }
}
