:root {
  --bg: #ffffff;
  --text: #1a1a1a;
  --muted: #6b6b6b;
  --border: #d4d4d4;
  --accent: #fe2c55;
  --accent-text: #ffffff;
  --card-bg: #fafafa;
  --radius: 12px;
  --shadow: 0 2px 8px rgba(0,0,0,0.06);
  --header-bg: #ffffff;
  --max-width: 860px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0f0f;
    --text: #f0f0f0;
    --muted: #a0a0a0;
    --border: #333333;
    --card-bg: #1a1a1a;
    --header-bg: #161616;
    --shadow: 0 2px 8px rgba(0,0,0,0.4);
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Cairo', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  direction: rtl;
  font-size: 16px;
}

a { color: var(--accent); }

img { max-width: 100%; display: block; }

/* Header */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
header nav { display: flex; gap: 20px; flex-wrap: wrap; }
header nav a { text-decoration: none; color: var(--text); font-weight: 600; font-size: 14px; }
header nav a:hover { color: var(--accent); }

/* Breadcrumb */
.breadcrumb {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: var(--max-width);
  margin: 16px auto 0;
  padding: 0 20px;
  font-size: 13px;
  color: var(--muted);
}
.breadcrumb li:not(:last-child)::after { content: "›"; margin-inline-start: 6px; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb [aria-current="page"] { color: var(--text); font-weight: 600; }

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px;
}

/* Hero */
.hero { text-align: center; padding: 32px 0 20px; }
.hero h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 800; margin-bottom: 12px; }
.hero .lead { color: var(--muted); font-size: 1.05rem; max-width: 640px; margin: 0 auto; }

section { margin: 36px 0; }
section h2 { font-size: 1.4rem; font-weight: 800; margin-bottom: 14px; }
section h3 { font-size: 1.1rem; font-weight: 700; margin: 16px 0 8px; }
section p { margin-bottom: 12px; color: var(--text); }
section ul { padding-inline-start: 22px; margin-bottom: 12px; }
section li { margin-bottom: 6px; }

/* Tool card */
.tool {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.tool h2 { text-align: center; }

.input-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
  justify-content: center;
  margin-top: 16px;
}
.input-group label { flex-basis: 100%; font-weight: 600; font-size: 14px; text-align: center; margin-bottom: 4px; }
.input-group input {
  flex: 1 1 260px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
}
.input-group input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.input-group button {
  padding: 14px 28px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 800;
  font-size: 16px;
  cursor: pointer;
  transition: opacity .15s;
}
.input-group button:hover { opacity: .9; }
.input-group small {
  flex-basis: 100%;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

/* Result card */
.result-card {
  margin-top: 24px;
  padding: 24px;
  text-align: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.result-card svg { margin: 0 auto 10px; }
.result-card .username { font-size: 1.2rem; font-weight: 800; margin-bottom: 4px; }
.result-card .label { color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.result-card iframe { border-radius: 8px; max-width: 100%; }
.result-card .tt-link {
  display: inline-block;
  margin-top: 14px;
  font-weight: 700;
  text-decoration: none;
}
.result-card .note { display: block; margin-top: 14px; color: var(--muted); font-size: 12px; }

/* Examples */
.examples { margin-top: 22px; text-align: center; }
.examples p { color: var(--muted); font-size: 14px; margin-bottom: 10px; }
.examples button {
  padding: 8px 16px;
  margin: 4px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}
.examples button:hover { border-color: var(--accent); color: var(--accent); }

/* FAQ */
details {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
  background: var(--card-bg);
}
summary { cursor: pointer; font-weight: 700; }
details p { margin-top: 10px; margin-bottom: 0; color: var(--muted); }

/* Tools index cards */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 20px;
}
.tool-card {
  display: block;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card-bg);
  text-decoration: none;
  color: var(--text);
  transition: transform .15s, box-shadow .15s;
}
.tool-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.tool-card h2 { font-size: 1.1rem; margin-bottom: 6px; }
.tool-card p { color: var(--muted); font-size: 14px; margin: 0; }

footer {
  text-align: center;
  padding: 30px 20px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
}
footer a { color: var(--muted); font-weight: 600; }
footer p { margin-bottom: 6px; }

@media (max-width: 480px) {
  .input-group button { width: 100%; }
  .input-group input { flex-basis: 100%; }
}
