:root{
  --bg0:#f7fbff;
  --bg1:#ffffff;
  --stroke:#dbe8ff;
  --text:#0b1630;
  --muted:#4c5a78;

  --neon1:#00d4ff;
  --neon2:#7c5cff;
  --neon3:#00ffb3;

  --shadow: 0 10px 30px rgba(10, 30, 80, 0.10);
  --shadow2: 0 18px 50px rgba(50, 40, 120, 0.12);

  --r: 16px;
  --pad: 16px;
  --gap: 14px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Noto Sans Arabic", "Noto Sans Persian", sans-serif;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family:var(--sans);
  color:var(--text);
  background:
    radial-gradient(900px 500px at 20% 0%, rgba(0,212,255,0.18), transparent 60%),
    radial-gradient(700px 400px at 90% 10%, rgba(124,92,255,0.18), transparent 60%),
    radial-gradient(800px 500px at 50% 95%, rgba(0,255,179,0.16), transparent 65%),
    linear-gradient(180deg, var(--bg0), #ffffff 50%, #f8fbff);
}

.container{
  max-width:1100px;
  margin:0 auto;
  padding: 18px 14px 28px;
}

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding: 14px 14px 6px;
  max-width:1100px;
  margin:0 auto;
}

.brand{ display:flex; align-items:center; gap:12px; }
.logoMark{
  width:46px;
  height:46px;
  border-radius:14px;
  display:grid;
  place-items:center;
  font-weight:900;
  letter-spacing:0.8px;
  color:var(--text);
  background:
    linear-gradient(135deg, rgba(0,212,255,0.35), rgba(124,92,255,0.25)),
    #ffffff;
  border:1px solid rgba(0,212,255,0.35);
  box-shadow:
    0 0 0 6px rgba(0,212,255,0.08),
    0 0 22px rgba(124,92,255,0.20);
}
.brandTitle{ font-weight:900; letter-spacing:0.6px; }
.brandSub{ font-size:13px; color:var(--muted); margin-top:2px; }
.topActions{ display:flex; gap:10px; align-items:center; }

.hero{
  background: linear-gradient(135deg, rgba(0,212,255,0.14), rgba(124,92,255,0.10), rgba(0,255,179,0.10));
  border:1px solid rgba(0,212,255,0.22);
  border-radius: var(--r);
  padding: 14px 16px;
  box-shadow: var(--shadow);
}
.heroLine{ margin:0; font-weight:800; }
.heroLine.subtle{ margin-top:6px; font-weight:650; color:var(--muted); }

.panel{ margin-top:14px; }

.tabs{ display:flex; gap:10px; margin-bottom:10px; }
.tab{
  flex:1;
  padding: 12px 14px;
  border-radius: 14px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,0.70);
  color:var(--text);
  box-shadow: 0 6px 18px rgba(20,30,70,0.06);
  font-weight:900;
  cursor:pointer;
  transition: transform .08s ease, box-shadow .12s ease, border-color .12s ease;
}
.tab:hover{ transform: translateY(-1px); }
.tab.active{
  border-color: rgba(0,212,255,0.40);
  box-shadow:
    0 0 0 5px rgba(0,212,255,0.10),
    0 16px 40px rgba(124,92,255,0.12);
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,255,255,0.75));
}

.view{ display:none; }
.view.active{ display:block; }

.grid2{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
}
@media (max-width: 980px){
  .grid2{ grid-template-columns: 1fr; }
  .topbar{ padding: 14px 14px 0; }
}

.card{
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(219,232,255,0.95);
  border-radius: var(--r);
  padding: var(--pad);
  box-shadow: var(--shadow2);
  backdrop-filter: blur(6px);
}

.cardHeader{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom: 10px;
}
.cardTitle{ font-size: 18px; margin:0; }

.pill{
  font-size:12px;
  font-weight:900;
  letter-spacing:0.6px;
  padding: 7px 10px;
  border-radius: 999px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,0.70);
  color: var(--muted);
}
.pill.neon{
  color: var(--text);
  border-color: rgba(0,212,255,0.50);
  background:
    linear-gradient(135deg, rgba(0,212,255,0.20), rgba(124,92,255,0.12), rgba(0,255,179,0.14));
  box-shadow: 0 0 0 5px rgba(0,212,255,0.10);
}

.label{ display:block; font-weight:900; margin: 10px 0 7px; }

.textarea, .input{
  width:100%;
  border-radius: 14px;
  border:1px solid rgba(219,232,255,0.95);
  background: rgba(255,255,255,0.92);
  outline:none;
  transition: box-shadow .12s ease, border-color .12s ease;
}
.textarea{
  padding: 12px 12px;
  resize: vertical;
  min-height: 120px;
  font-size: 15px;
  line-height:1.45;
}
.textarea.mono{ font-family: var(--mono); font-size: 13.5px; }
.input{ padding: 11px 12px; font-size: 15px; }
.textarea:focus, .input:focus{
  border-color: rgba(0,212,255,0.60);
  box-shadow: 0 0 0 6px rgba(0,212,255,0.12);
}
::placeholder{ color: rgba(76,90,120,0.65); font-weight:650; }

.row{ display:flex; gap:10px; align-items:center; }
.row.wrap{ flex-wrap:wrap; }
.row.between{ justify-content:space-between; }
.grow{ flex:1; }
.mini{ min-width: 240px; flex:1; }

.hintRow{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:10px;
  margin-top:6px;
}
.hint{ font-size:12.5px; color: var(--muted); line-height:1.35; }
.strength{
  font-size:12px;
  font-weight:900;
  padding: 6px 10px;
  border-radius: 999px;
  border:1px solid rgba(219,232,255,0.95);
  background: rgba(255,255,255,0.75);
  white-space:nowrap;
}

.notice{
  margin-top:8px;
  padding: 10px 12px;
  border-radius: 14px;
  border:1px solid rgba(255, 99, 150, 0.35);
  background: rgba(255, 99, 150, 0.08);
  color: #7a2040;
  font-weight:800;
  font-size: 13px;
}

.status{
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border:1px solid rgba(219,232,255,0.95);
  background: rgba(255,255,255,0.70);
  color: var(--muted);
  min-height: 44px;
  display:flex;
  align-items:center;
  white-space: pre-wrap;
}

.check{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:900;
  color: var(--text);
}
.check input{ width:18px; height:18px; accent-color: var(--neon2); }

.segmented{
  display:flex;
  gap:8px;
  padding: 6px;
  border-radius: 14px;
  border:1px solid rgba(219,232,255,0.95);
  background: rgba(255,255,255,0.70);
  width: fit-content;
}
.seg{
  padding: 10px 12px;
  border-radius: 12px;
  border:1px solid transparent;
  background: transparent;
  font-weight:900;
  cursor:pointer;
}
.seg.active{
  background:
    linear-gradient(135deg, rgba(0,212,255,0.20), rgba(124,92,255,0.16), rgba(0,255,179,0.14));
  border-color: rgba(0,212,255,0.35);
  box-shadow: 0 0 0 5px rgba(0,212,255,0.10);
}

.btn{
  border-radius: 14px;
  border: 1px solid rgba(219,232,255,0.95);
  background: rgba(255,255,255,0.85);
  color: var(--text);
  padding: 12px 14px;
  font-weight:950;
  cursor:pointer;
  box-shadow: 0 10px 26px rgba(20,30,70,0.07);
  transition: transform .08s ease, box-shadow .12s ease, border-color .12s ease;
  user-select:none;
}
.btn:hover{ transform: translateY(-1px); }
.btn:active{ transform: translateY(0px); }
.btn[disabled]{ opacity:0.55; cursor:not-allowed; transform:none; box-shadow:none; }

.btn.primary{
  border-color: rgba(0,212,255,0.55);
  background:
    linear-gradient(135deg, rgba(0,212,255,0.22), rgba(124,92,255,0.16), rgba(0,255,179,0.16)),
    rgba(255,255,255,0.85);
  box-shadow:
    0 0 0 6px rgba(0,212,255,0.10),
    0 18px 40px rgba(124,92,255,0.12);
}
.btn.ghost{ background: rgba(255,255,255,0.72); }
.btn.small{ padding: 10px 12px; border-radius: 12px; }
.btn.glow{
  border-color: rgba(124,92,255,0.55);
  box-shadow:
    0 0 0 6px rgba(124,92,255,0.12),
    0 18px 40px rgba(124,92,255,0.14);
}

.partsArea{ margin-top: 6px; }
.emptyState{
  padding: 18px 14px;
  border-radius: 14px;
  border: 1px dashed rgba(219,232,255,0.95);
  color: var(--muted);
  background: rgba(255,255,255,0.55);
  font-weight:800;
}

.partCard{
  border-radius: 14px;
  border:1px solid rgba(219,232,255,0.95);
  background: rgba(255,255,255,0.82);
  padding: 12px 12px;
  box-shadow: 0 10px 24px rgba(20,30,70,0.06);
  margin-bottom: 10px;
}
.partTop{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-bottom: 8px;
}
.partTitle{ font-weight:950; color: var(--text); }
.partMeta{ font-family: var(--mono); font-size: 12px; color: var(--muted); }

.partText{
  font-family: var(--mono);
  font-size: 13px;
  line-height:1.4;
  direction:ltr;
  white-space: pre-wrap;
  word-break: break-word;
  border-radius: 12px;
  border:1px solid rgba(219,232,255,0.95);
  padding: 10px 10px;
  background: rgba(255,255,255,0.86);
}
.partText.hiddenWordsFa{
  font-family: var(--sans);
  direction: rtl;
}
.partText.hiddenWordsEn{
  font-family: var(--sans);
  direction: ltr;
}
.partActions{
  margin-top: 10px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.topSpace{ margin-top: 10px; }

.footer{
  margin-top: 16px;
  padding: 8px 4px;
  display:flex;
  justify-content:center;
}
.tiny{
  font-size: 12px;
  color: rgba(76,90,120,0.75);
  font-weight:800;
}

.toast{
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 18px;
  z-index: 9999;
  padding: 12px 14px;
  border-radius: 999px;
  border: 1px solid rgba(0,212,255,0.55);
  background:
    linear-gradient(135deg, rgba(0,212,255,0.22), rgba(124,92,255,0.16), rgba(0,255,179,0.16)),
    rgba(255,255,255,0.92);
  box-shadow:
    0 0 0 6px rgba(0,212,255,0.12),
    0 18px 40px rgba(124,92,255,0.14);
  font-weight:950;
}

@media (prefers-reduced-motion: reduce){
  .btn, .tab{ transition:none; }
  .btn:hover, .tab:hover{ transform:none; }
}
