@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;
}

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

.aquafarm-boot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 420px;
  border-radius: 20px;
  background: radial-gradient(circle at 50% 20%, #0d3238 0%, #04141a 70%);
  color: #7fa3a0;
  direction: rtl;
}
.aquafarm-boot-mark { color: #7cffd1; font-size: 20px; }

.aquafarm-shell {
  position: relative;
  width: 100%;
  height: var(--aquafarm-height, 640px);
  min-height: 420px;
  overflow: hidden;
  border-radius: 20px;
  color: #eaf6f2;
  background: radial-gradient(circle at 50% 20%, #0d3238 0%, #04141a 70%);
}

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

.aquafarm-shell .aq-topbar {
  position: absolute;
  inset-inline: 0;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: linear-gradient(to bottom, rgba(4, 20, 23, 0.85), transparent);
}
.aquafarm-shell .aq-brand { display: flex; align-items: center; gap: 10px; }
.aquafarm-shell .aq-brand-icon { color: #7cffd1; font-size: 20px; }
.aquafarm-shell .aq-brand-title { font-size: 14px; font-weight: 700; }
.aquafarm-shell .aq-brand-sub { font-size: 11px; color: #7fa3a0; margin-top: 2px; }
.aquafarm-shell .aq-controls { display: flex; align-items: center; gap: 8px; }

.aquafarm-shell .aq-btn {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  background: rgba(124, 255, 209, 0.15);
  color: #7cffd1;
  font-family: inherit;
}
.aquafarm-shell .aq-btn-paused { background: rgba(255, 180, 84, 0.18); color: #ffb454; }
.aquafarm-shell .aq-select {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: #eaf6f2;
  font-family: inherit;
}

.aquafarm-shell .aq-panels {
  position: absolute;
  top: 92px;
  bottom: 16px;
  right: 16px;
  z-index: 5;
  width: 270px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}
.aquafarm-shell .aq-panel {
  border-radius: 16px;
  padding: 14px;
  background: rgba(9, 32, 35, 0.72);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex: none;
}
.aquafarm-shell .aq-panel-title { font-size: 11px; font-weight: 700; color: #7fa3a0; letter-spacing: 0.02em; margin-bottom: 8px; }
.aquafarm-shell .aq-total { font-size: 26px; font-weight: 900; color: #7cffd1; }
.aquafarm-shell .aq-total small { font-size: 12px; font-weight: 400; color: #7fa3a0; }
.aquafarm-shell .aq-species-list { margin-top: 10px; display: flex; flex-direction: column; gap: 7px; }
.aquafarm-shell .aq-species-row { display: flex; align-items: center; gap: 7px; font-size: 11px; }
.aquafarm-shell .aq-species-name { flex: 1; }
.aquafarm-shell .aq-species-count { color: #c9e6e0; }
.aquafarm-shell .aq-dot { width: 9px; height: 9px; border-radius: 999px; display: inline-block; flex: none; }

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

.aquafarm-shell .aq-feed-status { font-size: 11px; color: #c9e6e0; margin-bottom: 8px; }
.aquafarm-shell .aq-feed-btn {
  width: 100%;
  padding: 9px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 180, 84, 0.18);
  color: #ffb454;
  cursor: pointer;
  font-family: inherit;
}
.aquafarm-shell .aq-feed-btn:disabled { background: rgba(255, 255, 255, 0.08); color: #7fa3a0; cursor: default; }

.aquafarm-shell .aq-sonar-wrap {
  position: absolute;
  bottom: 16px;
  left: 16px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.aquafarm-shell .aq-sonar {
  border-radius: 50%;
  border: 1px solid rgba(124, 255, 209, 0.35);
  box-shadow: 0 0 30px rgba(124, 255, 209, 0.15);
}
.aquafarm-shell .aq-sonar-label { font-size: 10px; color: #7fa3a0; }

.aquafarm-shell .aq-selected {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(8, 30, 33, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.14);
  cursor: pointer;
}
.aquafarm-shell .aq-selected small { color: #7fa3a0; font-weight: 400; }

.aquafarm-shell .aq-toast {
  position: absolute;
  top: 92px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 7;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(124, 255, 209, 0.16);
  color: #7cffd1;
  border: 1px solid rgba(124, 255, 209, 0.4);
}

.aquafarm-shell .aq-hint {
  position: absolute;
  bottom: 16px;
  right: 302px;
  z-index: 5;
  font-size: 10px;
  color: #5f8582;
}

@media (max-width: 900px) {
  .aquafarm-shell .aq-panels { position: static; width: auto; margin-top: 240px; padding: 0 12px 12px; }
  .aquafarm-shell .aq-mount { height: 260px; }
  .aquafarm-shell { height: auto; }
  .aquafarm-shell .aq-hint { display: none; }
  .aquafarm-shell .aq-sonar-wrap { bottom: auto; top: 100px; }
}

/* یک قانون یک‌بار برای همیشه: هر عنصری که display خودش را ست کرده (grid/flex/...)
   نباید بر ویژگی استاندارد hidden مرورگر غلبه کند. این باگ در نسخهٔ اول
   افزونهٔ آناتومی امیر کشف شد — اینجا از همان ابتدا رفعش می‌کنیم. */
.aquafarm-scope [hidden] { display: none !important; }
