.main-wrap {
  max-width: 90rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
  width: 100%;
  flex: 1;
}

.page-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.page-title {
  font-size: clamp(1.6rem, 3.2vw, 2.3rem);
  font-weight: 900;
  color: var(--heading);
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.page-subtitle {
  font-size: 0.95rem;
  color: var(--dim);
  font-weight: 600;
  max-width: 60rem;
  line-height: 1.75;
}

.aqt-wrap {
  --aqt-ink: #0f172a;
  --aqt-accent: #059669;
  --aqt-accent-dark: #047857;
  --aqt-gold: #b0842a;
  --aqt-cream: #fbfbf9;
  --aqt-card: #ffffff;
  --aqt-line: #e2e8f0;
  --aqt-muted: #64748b;
  --aqt-ui: 'Cairo', -apple-system, 'Segoe UI', Roboto, sans-serif;

  font-family: var(--aqt-ui);
  color: var(--aqt-ink);
  background: radial-gradient(1100px 480px at 85% -8%, rgba(5, 150, 105, 0.08), transparent 60%),
              radial-gradient(900px 480px at -8% 2%, rgba(212, 175, 55, 0.08), transparent 55%),
              #ffffff;
  padding: clamp(18px, 3.5vw, 40px);
  border-radius: 24px;
  border: 1px solid var(--border);
  box-shadow: 0 10px 35px rgba(15, 23, 42, 0.06);
  max-width: 1280px;
  margin: 0 auto 3rem;
  box-sizing: border-box;
}
.aqt-wrap * {
  box-sizing: border-box;
}

.aqt-head {
  text-align: center;
  margin-bottom: 24px;
}
.aqt-eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--aqt-accent);
  font-weight: 800;
  direction: ltr;
  background: rgba(5, 150, 105, 0.08);
  border: 1px solid rgba(5, 150, 105, 0.2);
  padding: 4px 16px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.aqt-title {
  font-family: 'Aref Ruqaa', 'Amiri', serif;
  font-weight: 700;
  font-size: clamp(32px, 5.5vw, 54px);
  line-height: 1.2;
  margin: 6px 0 10px;
  color: var(--aqt-ink);
}
.aqt-sub {
  color: var(--aqt-muted);
  font-size: 15px;
  max-width: 720px;
  margin: 0 auto;
  line-height: 1.8;
}
.aqt-stats {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 16px;
  flex-wrap: wrap;
}
.aqt-stat {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--dim);
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}
.aqt-stat b {
  color: var(--accent);
}

.translate-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
}
.en-input-field {
  flex: 1;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 14px;
  color: var(--text);
  outline: none;
  direction: ltr;
  transition: all 0.2s;
}
.en-input-field:focus {
  background: #ffffff;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--ring);
}
.btn-translate-action {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.25);
  transition: all 0.2s;
}
.btn-translate-action:hover {
  background: linear-gradient(135deg, #047857 0%, #065f46 100%);
  transform: translateY(-1px);
}
.btn-translate-action:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.aqt-composer {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px 20px 16px;
  box-shadow: 0 16px 36px -20px rgba(15, 23, 42, 0.12);
  margin-bottom: 16px;
}
.aqt-input-wrap {
  position: relative;
}
.aqt-input {
  width: 100%;
  border: none;
  outline: none;
  resize: none;
  background: transparent;
  font-family: 'Amiri', 'Cairo', serif;
  font-size: clamp(26px, 4.5vw, 42px);
  line-height: 1.75;
  color: var(--text);
  text-align: center;
  padding: 10px 8px 14px;
  direction: rtl;
}
.aqt-input::placeholder {
  color: #94a3b8;
}
.aqt-input-meta {
  display: flex;
  justify-content: flex-end;
  padding: 0 6px 6px;
}
.js-char-count {
  font-size: 12px;
  color: var(--dim);
  font-weight: 600;
}

.aqt-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: center;
  padding: 8px 0 16px;
  border-bottom: 1px dashed var(--border);
  margin-bottom: 16px;
}
.aqt-q {
  border: 1px solid var(--border);
  background: var(--surface-alt);
  border-radius: 999px;
  padding: 5px 13px;
  font-size: 13px;
  cursor: pointer;
  font-family: 'Cairo', var(--aqt-ui);
  font-weight: 600;
  color: var(--dim);
  transition: all 0.18s;
}
.aqt-q:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: #ffffff;
  transform: translateY(-1px);
}

.aqt-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  align-items: center;
  justify-content: center;
}
.aqt-ctrl {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
  font-weight: 700;
}
.aqt-ctrl label {
  white-space: nowrap;
  font-family: 'Cairo', var(--aqt-ui);
}
.aqt-ctrl input[type=range] {
  accent-color: var(--accent);
  width: 105px;
  cursor: pointer;
}
.aqt-color {
  width: 32px;
  height: 32px;
  border: 2px solid #ffffff;
  background: none;
  padding: 0;
  cursor: pointer;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--border);
}

.aqt-swatches {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.aqt-sw {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  cursor: pointer;
  box-shadow: 0 0 0 1px var(--border);
  background-size: cover;
  transition: transform 0.18s, box-shadow 0.18s;
}
.aqt-sw:hover {
  transform: scale(1.18);
}
.aqt-sw.active {
  transform: scale(1.18);
  box-shadow: 0 0 0 2px var(--accent);
}
.aqt-grsw {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 2px solid #ffffff;
  cursor: pointer;
  box-shadow: 0 0 0 1px var(--border);
  transition: transform 0.18s, box-shadow 0.18s;
}
.aqt-grsw:hover {
  transform: scale(1.18);
}
.aqt-grsw.active {
  transform: scale(1.18);
  box-shadow: 0 0 0 2px var(--accent);
}

.aqt-toggle {
  border: 1px solid var(--border);
  background: var(--surface-alt);
  border-radius: 999px;
  padding: 6px 16px;
  cursor: pointer;
  font-size: 13px;
  color: var(--dim);
  font-weight: 700;
  font-family: 'Cairo', var(--aqt-ui);
  transition: all 0.2s;
}
.aqt-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: #ffffff;
}
.aqt-toggle.on {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.3);
}

.aqt-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 18px 0 24px;
}
.aqt-chip {
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--dim);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 14px;
  cursor: pointer;
  font-family: 'Cairo', var(--aqt-ui);
  font-weight: 700;
  transition: all 0.2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}
.aqt-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}
.aqt-chip.active {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 3px 10px rgba(5, 150, 105, 0.35);
}

.aqt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 18px;
}
.aqt-cardx {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  animation: aqtIn .35s ease both;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}
@keyframes aqtIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.aqt-cardx:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px -15px rgba(15, 23, 42, 0.18);
  border-color: var(--accent);
}
.aqt-stage {
  flex: 1;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 18px;
  text-align: center;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}
.aqt-sample {
  width: 100%;
  word-break: break-word;
  line-height: 1.6;
  direction: rtl;
  user-select: none;
  transition: font-size 0.15s, color 0.15s, letter-spacing 0.15s;
}
.aqt-sample.grad {
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent !important;
  -webkit-text-fill-color: transparent;
}
.aqt-sample.outl {
  color: transparent !important;
  -webkit-text-fill-color: transparent;
}
.aqt-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface-alt);
}
.aqt-names {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: right;
}
.aqt-style {
  font-family: 'Cairo', var(--aqt-ui);
  font-weight: 700;
  font-size: 14px;
  color: var(--heading);
}
.aqt-fname {
  font-size: 11px;
  color: var(--dim);
  direction: ltr;
  text-align: right;
  font-weight: 600;
}
.aqt-acts {
  display: flex;
  gap: 6px;
}
.aqt-btn {
  border: 1px solid var(--border);
  background: #ffffff;
  border-radius: 10px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--dim);
  transition: all 0.18s;
}
.aqt-btn:hover {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  transform: translateY(-1px);
}
.aqt-btn svg {
  width: 16px;
  height: 16px;
}
.aqt-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--dim);
  padding: 48px;
  font-family: 'Cairo', var(--aqt-ui);
  font-size: 16px;
  font-weight: 600;
}

.aqt-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #0f172a;
  color: #ffffff;
  padding: 11px 24px;
  border-radius: 999px;
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  font-size: 14px;
  opacity: 0;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 99999;
  box-shadow: 0 12px 32px rgba(0,0,0,0.3);
}
.aqt-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 600px) {
  .aqt-grid {
    grid-template-columns: 1fr;
  }
  .aqt-ctrl input[type=range] {
    width: 80px;
  }
  .aqt-composer {
    padding: 14px 12px;
  }
}
