* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
  background-color: #03272c;
  font-family: system-ui, -apple-system, "Segoe UI", Tahoma, "Cairo",
    "Noto Naskh Arabic", sans-serif;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  min-height: 100svh;
}

.stage {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  padding: 0;
}

.image-frame {
  position: relative;
  display: inline-block;
  line-height: 0;
  max-width: 100vw;
}

.bg-image {
  display: block;
  width: min(100vw, 560px);
  max-width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.hotspot-svg {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: auto;
}

.hotspot-svg a {
  cursor: pointer;
  pointer-events: auto;
  /* إطار التركيز الافتراضي للمتصفح يظهر كمستطيل أبيض حول الروابط داخل SVG */
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.svg-hotspot {
  fill: transparent;
  stroke: transparent;
  stroke-width: 0;
  pointer-events: all;
  transition: fill 120ms ease, stroke 120ms ease;
}

.hotspot-svg a:focus-visible .svg-hotspot {
  stroke: #f5c542;
  stroke-width: 4;
  vector-effect: non-scaling-stroke;
}

.svg-debug-label {
  display: none;
  fill: #fff;
  stroke: rgba(0, 0, 0, 0.75);
  stroke-width: 3;
  paint-order: stroke;
  font-family: system-ui, -apple-system, "Segoe UI", Tahoma, "Cairo",
    "Noto Naskh Arabic", sans-serif;
  font-size: 58px;
  font-weight: 700;
  pointer-events: none;
  user-select: none;
}

body.debug .svg-center {
  fill: rgba(0, 180, 255, 0.22);
  stroke: #00b4ff;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}

body.debug .svg-bottom-box {
  fill: rgba(255, 80, 80, 0.18);
  stroke: #ff5050;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}

body.debug .hotspot-svg a:hover .svg-hotspot {
  fill: rgba(255, 80, 80, 0.28);
  stroke: #ff5050;
}

body.debug .svg-debug-label {
  display: block;
}

body.debug .svg-sector {
  fill: rgba(245, 197, 66, 0.22);
  stroke: #f5c542;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}
body.debug .svg-debug-vertex { fill: #ffffff; }

.debug-panel {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 12px;
  line-height: 1.4;
  padding: 8px 10px;
  border-radius: 6px;
  max-width: 320px;
  max-height: 60vh;
  overflow: auto;
  display: none;
}

body.debug .debug-panel { display: block; }
