.port-manager-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-index-modal);
  animation: fadeIn 0.15s ease-out;
}

.port-manager {
  width: 90%;
  max-width: 500px;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  animation: slideUp 0.2s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.port-manager-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border-default);
  background: var(--color-bg-overlay);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  flex-shrink: 0;
}

.port-manager-title {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--color-text-primary);
}

.port-manager-title h2 {
  margin: 0;
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
}

.port-manager-close {
  padding: 6px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.port-manager-close:hover {
  background: var(--color-bg-hover);
  color: var(--color-text-primary);
}

.port-manager-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.port-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.port-section h3 {
  margin: 0;
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

.port-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: var(--color-bg-inset);
  border-radius: var(--radius-md);
}

.port-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--font-size-sm);
}

.port-label {
  color: var(--color-text-secondary);
  font-weight: var(--font-weight-medium);
}

.port-status {
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
}

.port-status.running {
  background: rgba(34, 197, 94, 0.2);
  color: var(--color-success);
}

.port-status.stopped {
  background: rgba(107, 114, 128, 0.2);
  color: var(--color-text-tertiary);
}

.port-value {
  font-family: var(--font-family-mono);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

.port-actions {
  display: flex;
  gap: 8px;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.action-btn.primary {
  background: var(--color-primary);
  color: white;
}

.action-btn.primary:hover:not(:disabled) {
  background: var(--color-primary-dark);
}

.action-btn.danger {
  background: var(--color-danger);
  color: white;
}

.action-btn.danger:hover:not(:disabled) {
  background: var(--color-danger-dark);
}

.action-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.port-hint {
  padding: 16px;
  background: var(--color-bg-inset);
  border-radius: var(--radius-md);
  text-align: center;
}

.port-hint p {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
}

.port-hint p:first-child {
  font-weight: var(--font-weight-medium);
  margin-bottom: 8px;
}

.hint-text {
  font-size: 12px !important;
  color: var(--color-text-tertiary) !important;
}

.port-tips {
  padding: 16px;
  background: var(--color-bg-inset);
  border-radius: var(--radius-md);
}

.port-tips h4 {
  margin: 0 0 12px 0;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

.port-tips ul {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.port-tips li {
  font-size: 12px;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

@media (prefers-reduced-motion: reduce) {
  .port-manager-overlay,
  .port-manager,
  .action-btn,
  .port-manager-close {
    animation: none;
    transition: none;
  }
}
