.portals-hero {
  padding: 2.5rem 0 1.5rem;
  margin-top: 0;
  background: var(--gradient-hero);
  position: relative;
}

.portals-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 20%, rgba(0, 204, 255, 0.1) 1px, transparent 1px),
    radial-gradient(circle at 70% 80%, rgba(0, 102, 255, 0.08) 1px, transparent 1px);
  background-size: 60px 60px, 100px 100px;
  z-index: -1;
}

.portals-hero .hero-title {
  font-size: clamp(2rem, 4vw, 3rem);
}

.portals-section {
  padding-top: 0.5rem;
  padding-bottom: 3rem;
}

.portals-section > .container {
  max-width: 1200px;
}

.portals-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-bottom: 14px;
}

.portals-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(90, 141, 217, 0.12);
  border: 1px solid rgba(90, 141, 217, 0.35);
  color: #9ec4f0;
  font-size: 0.85rem;
  font-weight: 600;
}

.portals-controls,
.portals-goto {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.portals-btn {
  appearance: none;
  border: 1px solid rgba(90, 141, 217, 0.35);
  background: rgba(26, 45, 74, 0.65);
  color: var(--white);
  border-radius: 8px;
  min-width: 36px;
  height: 34px;
  padding: 0 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.portals-btn:hover {
  background: rgba(61, 106, 158, 0.45);
  border-color: rgba(107, 159, 212, 0.55);
}

.portals-btn-go {
  background: rgba(61, 106, 158, 0.4);
}

.portals-input {
  width: 88px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(90, 141, 217, 0.35);
  background: rgba(12, 16, 22, 0.9);
  color: var(--white);
  padding: 0 10px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.portals-input:focus {
  outline: none;
  border-color: var(--neon-blue);
}

.portals-hint {
  color: #666;
  font-size: 0.82rem;
  margin-left: auto;
}

.portals-viewport {
  position: relative;
  width: 100%;
  height: min(74vh, 760px);
  min-height: 420px;
  background: #0a0e14;
  border: 1px solid #2a2a3e;
  border-radius: 16px;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
}

.portals-viewport.is-dragging {
  cursor: grabbing;
}

.portals-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.portals-hud {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(8, 10, 13, 0.78);
  border: 1px solid rgba(90, 141, 217, 0.28);
  color: #9eb4cc;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.45;
  pointer-events: none;
  max-width: calc(100% - 24px);
}

.portals-tooltip {
  position: absolute;
  z-index: 2;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(8, 10, 13, 0.92);
  border: 1px solid rgba(107, 159, 212, 0.45);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  pointer-events: none;
  white-space: nowrap;
  transform: translate(12px, 12px);
}

.portals-tooltip[hidden] {
  display: none;
}

.portals-livebar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 12px;
}

.portals-live-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(42, 48, 56, 0.55);
  border: 1px solid rgba(138, 147, 158, 0.35);
  color: #c5cdd6;
  font-size: 0.85rem;
  font-weight: 600;
}

.portals-live-status.is-ok {
  background: rgba(90, 205, 126, 0.12);
  border-color: rgba(90, 205, 126, 0.4);
  color: #5acd7e;
}

.portals-live-status.is-warn {
  background: rgba(240, 193, 74, 0.12);
  border-color: rgba(240, 193, 74, 0.4);
  color: #f0c14a;
}

.portals-live-status.is-muted {
  background: rgba(90, 141, 217, 0.1);
  border-color: rgba(90, 141, 217, 0.3);
  color: #9ec4f0;
}

.portals-live-status a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 720px) {
  .portals-hint {
    margin-left: 0;
    width: 100%;
  }

  .portals-input {
    width: 72px;
  }
}
