@font-face {
  font-family: "Yekan";
  src: url("../fonts/Yekan.woff2") format("woff2"),
       url("../fonts/Yekan.woff") format("woff");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

.amirfarm-scope {
  direction: rtl;
  font-family: "Yekan", Tahoma, "Segoe UI", sans-serif;
  display: block;
}
.amirfarm-scope, .amirfarm-scope * {
  font-family: "Yekan", Tahoma, "Segoe UI", sans-serif !important;
  box-sizing: border-box;
}

.amirfarm-boot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 460px;
  border-radius: 22px;
  background: radial-gradient(circle at 50% 15%, #1c2b1a 0%, #070c06 72%);
  color: #a7c4a2;
  direction: rtl;
  border: 1px solid rgba(202, 164, 86, 0.18);
}
.amirfarm-boot-mark { color: #caa456; font-size: 22px; }

.amirfarm-shell {
  position: relative;
  width: 100%;
  height: var(--amirfarm-height, 680px);
  min-height: 460px;
  overflow: hidden;
  border-radius: 22px;
  color: #f1e6cb;
  background: radial-gradient(circle at 50% 12%, #16261a 0%, #050a05 75%);
  box-shadow: 0 0 0 1px rgba(202, 164, 86, 0.16), 0 30px 70px rgba(0, 0, 0, 0.45);
}

.amirfarm-shell .af-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.amirfarm-shell .af-mount { position: absolute; inset: 0; z-index: 1; }
.amirfarm-shell .af-mount canvas { display: block; }

.amirfarm-shell .af-topbar {
  position: absolute;
  inset-inline: 0;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 20px;
  background: linear-gradient(to bottom, rgba(5, 10, 5, 0.92), transparent);
}
.amirfarm-shell .af-brand { display: flex; align-items: center; gap: 12px; }
.amirfarm-shell .af-brand-mark {
  color: #caa456;
  font-size: 24px;
  text-shadow: 0 0 14px rgba(202, 164, 86, 0.65);
}
.amirfarm-shell .af-brand-title {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: #f1e6cb;
  font-family: Georgia, "Times New Roman", serif !important;
}
.amirfarm-shell .af-brand-title-accent { color: #7cffb0; }
.amirfarm-shell .af-brand-sub { font-size: 11px; color: #a7c4a2; margin-top: 3px; }

.amirfarm-shell .af-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.amirfarm-shell .af-btn {
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid rgba(202, 164, 86, 0.35);
  cursor: pointer;
  background: rgba(202, 164, 86, 0.14);
  color: #caa456;
  transition: transform 0.15s ease, background 0.15s ease;
}
.amirfarm-shell .af-btn:hover { transform: translateY(-1px); background: rgba(202, 164, 86, 0.22); }
.amirfarm-shell .af-btn-boost { background: rgba(124, 255, 176, 0.14); color: #7cffb0; border-color: rgba(124, 255, 176, 0.35); }
.amirfarm-shell .af-btn-boost:hover { background: rgba(124, 255, 176, 0.24); }
.amirfarm-shell .af-btn:disabled { opacity: 0.55; cursor: default; transform: none; }
.amirfarm-shell .af-btn-paused { background: rgba(255, 180, 84, 0.18); color: #ffb454; border-color: rgba(255, 180, 84, 0.35); }
.amirfarm-shell .af-select {
  padding: 9px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #f1e6cb;
}

.amirfarm-shell .af-panels {
  position: absolute;
  top: 96px;
  bottom: 16px;
  right: 16px;
  z-index: 5;
  width: 280px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}
.amirfarm-shell .af-panels::-webkit-scrollbar { width: 5px; }
.amirfarm-shell .af-panels::-webkit-scrollbar-thumb { background: rgba(202, 164, 86, 0.35); border-radius: 10px; }

.amirfarm-shell .af-panel {
  border-radius: 16px;
  padding: 14px 15px;
  background: rgba(9, 18, 10, 0.74);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(202, 164, 86, 0.18);
  flex: none;
}
.amirfarm-shell .af-panel-hero { border-color: rgba(124, 255, 176, 0.3); }
.amirfarm-shell .af-panel-title {
  font-size: 11px;
  font-weight: 700;
  color: #caa456;
  letter-spacing: 0.03em;
  margin-bottom: 9px;
  text-transform: uppercase;
}

.amirfarm-shell .af-tree-total { font-size: 28px; font-weight: 900; color: #7cffb0; }
.amirfarm-shell .af-tree-total small { font-size: 12px; font-weight: 400; color: #a7c4a2; }
.amirfarm-shell .af-tree-split { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.amirfarm-shell .af-pill {
  font-size: 10.5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #c9dfc4;
}
.amirfarm-shell .af-pill b { color: inherit; }
.amirfarm-shell .af-pill-good { background: rgba(124, 255, 176, 0.14); color: #7cffb0; }
.amirfarm-shell .af-pill-warn { background: rgba(255, 180, 84, 0.14); color: #ffb454; }

.amirfarm-shell .af-metric { display: flex; align-items: center; justify-content: space-between; padding: 4px 0; font-size: 12px; }
.amirfarm-shell .af-metric span { color: #a7c4a2; }
.amirfarm-shell .af-metric b { font-weight: 700; color: #f1e6cb; }

.amirfarm-shell .af-total { font-size: 24px; font-weight: 900; color: #ff8a5b; }
.amirfarm-shell .af-total small { font-size: 11px; font-weight: 400; color: #a7c4a2; }
.amirfarm-shell .af-active-threats { font-size: 11px; color: #a7c4a2; margin: 6px 0 10px; }
.amirfarm-shell .af-active-threats b { color: #f1e6cb; }

.amirfarm-shell .af-species-list { margin-top: 4px; display: flex; flex-direction: column; gap: 8px; }
.amirfarm-shell .af-species-row { display: flex; align-items: center; gap: 7px; font-size: 11px; }
.amirfarm-shell .af-species-name { flex: 1; display: flex; flex-direction: column; }
.amirfarm-shell .af-species-name small { color: #7f9a7a; font-size: 9.5px; margin-top: 1px; }
.amirfarm-shell .af-species-count { color: #f1e6cb; font-weight: 700; }
.amirfarm-shell .af-dot { width: 9px; height: 9px; border-radius: 999px; display: inline-block; flex: none; box-shadow: 0 0 6px currentColor; }

.amirfarm-shell .af-radar-wrap {
  position: absolute;
  bottom: 16px;
  left: 16px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}
.amirfarm-shell .af-radar {
  border-radius: 50%;
  border: 1px solid rgba(124, 255, 176, 0.4);
  box-shadow: 0 0 34px rgba(124, 255, 176, 0.18);
}
.amirfarm-shell .af-radar-label { font-size: 10px; color: #a7c4a2; letter-spacing: 0.04em; }

.amirfarm-shell .af-selected {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(8, 16, 9, 0.92);
  border: 1px solid rgba(202, 164, 86, 0.35);
  cursor: pointer;
  white-space: nowrap;
}
.amirfarm-shell .af-selected small { color: #a7c4a2; font-weight: 400; }

.amirfarm-shell .af-toast {
  position: absolute;
  top: 96px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 7;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(124, 255, 176, 0.16);
  color: #7cffb0;
  border: 1px solid rgba(124, 255, 176, 0.4);
}

.amirfarm-shell .af-hint {
  position: absolute;
  bottom: 16px;
  right: 312px;
  z-index: 5;
  font-size: 10px;
  color: #5c7658;
}

@media (max-width: 940px) {
  .amirfarm-shell .af-panels { position: static; width: auto; margin-top: 260px; padding: 0 12px 12px; }
  .amirfarm-shell .af-mount { height: 280px; }
  .amirfarm-shell { height: auto; }
  .amirfarm-shell .af-hint { display: none; }
  .amirfarm-shell .af-radar-wrap { bottom: auto; top: 108px; }
  .amirfarm-shell .af-selected { bottom: auto; top: 108px; }
}

/* هر عنصری که display خودش را ست کرده نباید بر ویژگی استاندارد hidden مرورگر غلبه کند */
.amirfarm-scope [hidden] { display: none !important; }
