:root {
  --bg: #0f1720;
  --bg-2: #121d29;
  --surface: #172432;
  --surface-2: #1c2c3c;
  --line: rgba(220, 235, 245, 0.14);
  --text: #edf7fb;
  --muted: #9bb0bd;
  --soft: #cfe0e8;
  --brand: #3dd6c6;
  --brand-2: #78a8ff;
  --warm: #f5b85b;
  --danger: #ff6b6b;
  --success: #65d58b;
  --ink: #061018;
  --shadow: 0 20px 55px rgba(0, 0, 0, 0.28);
  --radius: 8px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(61, 214, 198, 0.08), transparent 460px),
    linear-gradient(135deg, rgba(245, 184, 91, 0.08), transparent 360px),
    var(--bg);
  color: var(--text);
  font-family: Cairo, "Segoe UI", Tahoma, Arial, sans-serif;
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
  pointer-events: none;
}

img,
svg,
canvas,
video {
  max-width: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
}

a {
  color: inherit;
}

.skip-link {
  position: absolute;
  inset-inline-start: 16px;
  top: -60px;
  z-index: 50;
  padding: 10px 14px;
  background: var(--brand);
  color: var(--ink);
  border-radius: var(--radius);
  font-weight: 800;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 12px;
}

.container {
  width: min(var(--max), calc(100% - 32px));
  margin-inline: auto;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(18px);
  background: rgba(15, 23, 32, 0.78);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 900;
  color: var(--text);
  white-space: nowrap;
}

.brand img {
  width: 42px;
  height: 42px;
}

.brand span span {
  color: var(--brand);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a,
.footer-links a {
  text-decoration: none;
  color: var(--soft);
  padding: 10px 12px;
  border-radius: var(--radius);
  font-weight: 700;
}

.nav-links a:hover,
.footer-links a:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn,
.lang-btn,
.primary-btn,
.secondary-btn,
.ghost-btn,
.danger-btn,
.copy-mini {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 850;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.icon-btn:hover,
.lang-btn:hover,
.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover,
.danger-btn:hover,
.copy-mini:hover {
  transform: translateY(-1px);
}

.icon-btn {
  width: 42px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  border: 1px solid var(--line);
}

.lang-btn {
  padding: 0 14px;
  background: var(--text);
  color: var(--ink);
}

.primary-btn {
  padding: 12px 18px;
  background: var(--brand);
  color: var(--ink);
}

.secondary-btn {
  padding: 12px 18px;
  background: rgba(120, 168, 255, 0.12);
  color: var(--text);
  border: 1px solid rgba(120, 168, 255, 0.34);
}

.ghost-btn {
  padding: 11px 16px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid var(--line);
}

.danger-btn {
  padding: 11px 16px;
  background: rgba(255, 107, 107, 0.14);
  color: #ffd6d6;
  border: 1px solid rgba(255, 107, 107, 0.3);
}

.copy-mini {
  min-height: 34px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid var(--line);
}

.menu-btn {
  display: none;
}

.hero-band {
  padding: 76px 0 48px;
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 34px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--brand);
  font-weight: 900;
  margin-bottom: 14px;
}

.hero-title,
.page-title,
.tool-title {
  margin: 0;
  line-height: 1.08;
  color: #fff;
  letter-spacing: 0;
}

.hero-title {
  font-size: 54px;
  max-width: 780px;
}

.hero-title span {
  color: var(--brand);
}

.hero-copy,
.page-copy,
.tool-copy {
  color: var(--soft);
  line-height: 1.9;
  font-size: 18px;
  margin: 18px 0 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.hero-console {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.console-bar {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  background: rgba(0, 0, 0, 0.22);
  border-bottom: 1px solid var(--line);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--danger);
}

.dot:nth-child(2) {
  background: var(--warm);
}

.dot:nth-child(3) {
  background: var(--success);
}

.console-body {
  padding: 20px;
  display: grid;
  gap: 12px;
}

.metric-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.metric-row b {
  color: #fff;
}

.metric-row span {
  color: var(--muted);
}

.home-controls {
  padding: 28px 0 10px;
}

.control-strip {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.search-box,
.input-control,
.textarea-control,
.select-control {
  width: 100%;
  color: var(--text);
  background: rgba(255, 255, 255, 0.065);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
}

.search-box,
.input-control,
.select-control {
  min-height: 48px;
  padding: 0 14px;
}

.textarea-control {
  min-height: 180px;
  resize: vertical;
  padding: 14px;
  line-height: 1.7;
}

.search-box:focus,
.input-control:focus,
.textarea-control:focus,
.select-control:focus {
  border-color: rgba(61, 214, 198, 0.7);
  box-shadow: 0 0 0 4px rgba(61, 214, 198, 0.1);
}

.filter-tabs,
.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-tabs button,
.segmented button {
  min-height: 42px;
  border-radius: var(--radius);
  padding: 0 13px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.06);
  color: var(--soft);
  border: 1px solid var(--line);
  font-weight: 800;
}

.filter-tabs button.active,
.segmented button.active {
  color: var(--ink);
  background: var(--warm);
  border-color: transparent;
}

.tools-section {
  padding: 18px 0 72px;
}

.section-heading {
  margin: 34px 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-heading h2 {
  margin: 0;
  color: #fff;
  font-size: 26px;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.tool-card {
  min-height: 178px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  text-decoration: none;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.tool-card:hover {
  transform: translateY(-3px);
  border-color: rgba(61, 214, 198, 0.55);
  background: rgba(255, 255, 255, 0.09);
}

.tool-card .tool-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: rgba(61, 214, 198, 0.12);
  color: var(--brand);
}

.tool-card h3 {
  margin: 0;
  color: #fff;
  font-size: 20px;
}

.tool-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--soft);
  background: rgba(255, 255, 255, 0.055);
  font-size: 13px;
  font-weight: 800;
}

.page-band,
.tool-band {
  padding: 50px 0 24px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--brand);
  font-weight: 900;
  margin-bottom: 20px;
}

.tool-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
}

.tool-shell {
  padding: 22px 0 54px;
}

.tool-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}

.workspace,
.side-panel,
.content-panel,
.seo-panel {
  background: rgba(255, 255, 255, 0.065);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.16);
}

.workspace {
  padding: 20px;
  min-width: 0;
}

.side-panel {
  padding: 18px;
  position: sticky;
  top: 92px;
}

.content-panel,
.seo-panel {
  padding: 24px;
}

.content-panel {
  max-width: 880px;
  margin: 0 auto 58px;
}

.content-panel h1,
.content-panel h2,
.seo-panel h2,
.side-panel h3 {
  color: #fff;
  margin-top: 0;
}

.content-panel p,
.content-panel li,
.seo-panel p,
.side-panel p {
  color: var(--soft);
  line-height: 1.9;
}

.seo-panel {
  margin-top: 18px;
}

.faq-grid {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: rgba(0, 0, 0, 0.12);
}

.faq-item b {
  color: #fff;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.stack {
  display: grid;
  gap: 14px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.upload-zone {
  min-height: 168px;
  display: grid;
  place-items: center;
  gap: 8px;
  text-align: center;
  padding: 22px;
  border: 1px dashed rgba(61, 214, 198, 0.52);
  border-radius: var(--radius);
  background: rgba(61, 214, 198, 0.07);
  cursor: pointer;
}

.upload-zone.dragging {
  background: rgba(61, 214, 198, 0.14);
  border-color: var(--brand);
}

.upload-zone strong {
  color: #fff;
}

.upload-zone span {
  color: var(--muted);
}

.file-list,
.result-list,
.preview-list {
  display: grid;
  gap: 10px;
}

.file-item,
.result-item,
.data-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.14);
  border: 1px solid var(--line);
}

.file-item small,
.result-item small,
.data-row small {
  color: var(--muted);
}

.status {
  min-height: 34px;
  padding: 9px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  color: var(--soft);
  background: rgba(255, 255, 255, 0.05);
}

.status.ok {
  color: #d9ffe5;
  border-color: rgba(101, 213, 139, 0.34);
  background: rgba(101, 213, 139, 0.1);
}

.status.warn {
  color: #fff1d7;
  border-color: rgba(245, 184, 91, 0.34);
  background: rgba(245, 184, 91, 0.1);
}

.status.bad {
  color: #ffe0e0;
  border-color: rgba(255, 107, 107, 0.34);
  background: rgba(255, 107, 107, 0.1);
}

.range-line {
  display: grid;
  gap: 8px;
}

.range-line input[type="range"] {
  width: 100%;
  accent-color: var(--brand);
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.check-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--line);
  color: var(--soft);
}

.switch {
  position: relative;
  width: 48px;
  height: 26px;
  flex: 0 0 auto;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  cursor: pointer;
  transition: background 0.2s ease;
}

.slider::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  inset-inline-start: 3px;
  top: 3px;
  border-radius: 999px;
  background: #fff;
  transition: transform 0.2s ease;
}

.switch input:checked + .slider {
  background: var(--brand);
}

.switch input:checked + .slider::before {
  transform: translateX(22px);
}

[dir="rtl"] .switch input:checked + .slider::before {
  transform: translateX(-22px);
}

.password-box,
.score-box,
.time-box {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.18);
}

.password-value,
.time-value {
  font-family: Consolas, "Courier New", monospace;
  direction: ltr;
  text-align: left;
  font-size: 24px;
  color: #fff;
  overflow-wrap: anywhere;
}

.meter {
  height: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
}

.meter span {
  display: block;
  width: 0%;
  height: 100%;
  background: var(--brand);
  transition: width 0.2s ease, background 0.2s ease;
}

.result-output {
  min-height: 160px;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.18);
  color: var(--soft);
  white-space: pre-wrap;
  overflow: auto;
}

.image-preview {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.image-preview img {
  width: 180px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.2);
}

.style-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.style-card,
.link-row,
.theme-swatch {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.14);
}

.style-card {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.style-card b {
  color: var(--muted);
  font-size: 13px;
}

.style-card p {
  margin: 0;
  color: #fff;
  overflow-wrap: anywhere;
  font-size: 18px;
}

.url-result {
  display: grid;
  gap: 12px;
}

.risk-banner {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.055);
}

.risk-banner.low {
  border-color: rgba(101, 213, 139, 0.32);
}

.risk-banner.medium {
  border-color: rgba(245, 184, 91, 0.36);
}

.risk-banner.high {
  border-color: rgba(255, 107, 107, 0.36);
}

.preview-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.18);
}

.code-editor {
  min-height: 300px;
  direction: ltr;
  text-align: left;
  font-family: Consolas, "Courier New", monospace;
}

.diff-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.diff-result {
  display: grid;
  gap: 4px;
  font-family: Consolas, "Courier New", monospace;
  direction: ltr;
  text-align: left;
}

.diff-line {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.diff-cell {
  min-height: 32px;
  padding: 7px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.055);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.diff-cell.del {
  background: rgba(255, 107, 107, 0.16);
  color: #ffd1d1;
}

.diff-cell.add {
  background: rgba(101, 213, 139, 0.14);
  color: #d7ffe4;
}

.bio-builder {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
}

.bio-preview {
  min-height: 620px;
  padding: 22px;
  border-radius: 28px;
  border: 8px solid #080d13;
  background: linear-gradient(180deg, #142233, #0b1118);
  box-shadow: var(--shadow);
  text-align: center;
  position: sticky;
  top: 92px;
  overflow: hidden;
}

.bio-preview .avatar {
  width: 92px;
  height: 92px;
  margin: 12px auto;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--brand);
  background: rgba(255, 255, 255, 0.08);
}

.preview-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  margin-top: 10px;
  padding: 0 12px;
  border-radius: var(--radius);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow-wrap: anywhere;
}

.link-row {
  padding: 12px;
  display: grid;
  gap: 8px;
}

.theme-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.theme-swatch {
  width: 42px;
  height: 42px;
  cursor: pointer;
}

.theme-swatch.active {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
}

.table-preview {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: var(--radius);
}

.table-preview th,
.table-preview td {
  padding: 9px 10px;
  border: 1px solid var(--line);
  color: var(--soft);
}

.table-preview th {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
}

.prompter {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  background: #05080c;
  color: #fff;
  padding: 28px;
}

.prompter.active {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 18px;
}

.prompter-text {
  overflow: auto;
  font-size: 34px;
  line-height: 1.9;
  padding: 30px;
  text-align: center;
}

.prompter-controls {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.12);
  padding: 28px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-links {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.loading-shell {
  min-height: 60vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: var(--muted);
}

.hidden {
  display: none !important;
}

@media (max-width: 980px) {
  .hero-grid,
  .tool-layout,
  .bio-builder {
    grid-template-columns: 1fr;
  }

  .hero-title {
    font-size: 42px;
  }

  .tools-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .side-panel,
  .bio-preview {
    position: static;
  }
}

@media (max-width: 760px) {
  .nav-inner {
    min-height: 66px;
  }

  .menu-btn {
    display: inline-flex;
  }

  .nav-links {
    position: fixed;
    inset-inline: 16px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 32, 0.96);
    box-shadow: var(--shadow);
  }

  .nav-links.active {
    display: flex;
  }

  .control-strip,
  .field-grid,
  .option-grid,
  .style-grid,
  .diff-grid,
  .image-preview {
    grid-template-columns: 1fr;
  }

  .hero-band {
    padding-top: 46px;
  }

  .hero-title {
    font-size: 34px;
  }

  .hero-copy,
  .tool-copy,
  .page-copy {
    font-size: 16px;
  }

  .tools-grid {
    grid-template-columns: 1fr;
  }

  .tool-heading,
  .footer-inner {
    grid-template-columns: 1fr;
    display: grid;
    align-items: start;
  }

  .workspace,
  .content-panel,
  .seo-panel {
    padding: 16px;
  }

  .diff-line {
    grid-template-columns: 1fr;
  }

  .prompter-text {
    font-size: 24px;
    padding: 16px;
  }
}
