/* =========================
   Theme
========================= */
:root {
  --accent1: #8b5cf6;
  --accent2: #06b6d4;
  --bg: #0B0F1A;
  --surface: #111827;
  --text: #f1f5f9;
  --radius: 0.75rem;
}

/* =========================
   Base / Reset
========================= */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Inter", Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; }

/* =========================
   Header
========================= */
.header {
  background: var(--surface);
  border-bottom: 1px solid #1f2937;
  padding: 12px 20px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { font-weight: 800; letter-spacing: .2px; }

/* =========================
   Layout
========================= */
.container {
  max-width: 820px;
  margin: 24px auto;
  padding: 0 16px;
}

/* =========================
   Card
========================= */
.card {
  background: var(--surface);
  border: 1px solid #1f2937;
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,.35);
}
.card h2 {
  margin: 0 0 12px 0;
  padding: 10px 14px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(90deg, var(--accent2), #3b82f6);
  font-size: 1.05rem;
}
.meta { opacity: .85; font-size: .9rem; }

/* =========================
   Form
========================= */
.form-grid { display: grid; gap: 12px; }
.input, select, textarea {
  width: 100%;
  background: #1e293b;
  color: var(--text);
  border: 1px solid #243041;
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
}
.input:focus, select:focus, textarea:focus { border-color: var(--accent2); }
label { display: grid; gap: 6px; font-weight: 600; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }

/* =========================
   Buttons
========================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  border: 1px solid #1f2937;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
}
.btn:hover {
  transform: translateY(-1px);
  border-color: var(--accent2);
  box-shadow: 0 6px 14px rgba(0,0,0,0.45);
}
.btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.btn.grad {
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
  color: #0B0F1A;
  border: none;
}
.btn.grad:hover { filter: brightness(1.03); }
.btn.sm { padding: 6px 10px; font-size: .85rem; }

/* =========================
   Results Grid
========================= */
.grid2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 10px;
}

/* =========================
   Inline Field (Label : Value [Copy])
========================= */
.field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: #101623;
  border: 1px solid #243041;
  border-radius: 10px;
}

/* label বামে, একই লাইনে থাকবে */
.field label {
  margin: 0;
  font-weight: 700;
  font-size: .9rem;
  color: var(--accent2);
  white-space: nowrap;
}
.field label::after {
  content: ":";
  margin-left: 6px;
  opacity: .85;
  color: var(--text);
}

/* value ডানে, copy বাটনসহ এক লাইনে */
.field .value {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  text-align: right;
}
.field .value span {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
}

/* Copy buttons */
.copy-box { display: flex; align-items: center; gap: 8px; }
.copy-btn {
  padding: 4px 8px;
  font-size: .8rem;
  border-radius: 6px;
  cursor: pointer;
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
  border: none;
  color: #0B0F1A;
  font-weight: 700;
}
.copy-btn:hover { opacity: .9; }

/* One-line summary field (Copy All row) */
.outbox { display: flex; gap: 8px; align-items: center; margin-top: 8px; }

/* =========================
   Helpers
========================= */
.hidden { display: none !important; }

/* =========================
   Responsive
========================= */
@media (max-width: 560px) {
  .row { flex-direction: column; }
  .outbox { flex-direction: column; align-items: stretch; }
  .btn { width: 100%; }

  /* মোবাইল স্ক্রিনে label উপরে, value নিচে – readable stack */
  .field { flex-direction: column; align-items: stretch; }
  .field .value { justify-content: space-between; text-align: left; }
}
